Bug 602361 - qt 4.7: sqliteman fails to build
qt 4.7: sqliteman fails to build
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: sqliteman (Show other bugs)
rawhide
All Linux
low Severity medium
: ---
: ---
Assigned To: Terje Røsten
Fedora Extras Quality Assurance
: Patch, Reopened
Depends On:
Blocks: 599939
  Show dependency treegraph
 
Reported: 2010-06-09 13:09 EDT by Terje Røsten
Modified: 2010-06-19 16:00 EDT (History)
9 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2010-06-16 17:09:22 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Patch to make SQLiteman build against Qt 4.7 (1.05 KB, patch)
2010-06-16 15:42 EDT, Alec Moskvin
no flags Details | Diff

  None (edit)
Description Terje Røsten 2010-06-09 13:09:41 EDT
Description of problem:

Building sqliteman in rawhide fails:

/usr/bin/c++   -DQT_GUI_LIB -DQT_XML_LIB -DQT_SQL_LIB -DQT_CORE_LIB -DQT_NO_DEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ss\
p-buffer-size=4 -m64 -mtune=generic  -O2 -Wall -I/usr/include/QtGui -I/usr/include/QtXml -I/usr/include/QtSql -I/usr/include/QtCore -I/rpm/BUILD/sqliteman-1.2.1 -I/rp\
m/BUILD/sqliteman-1.2.1/sqliteman -I/rpm/BUILD/sqliteman-1.2.1/sqliteman/. -I/rpm/BUILD/sqliteman-1.2.1/sqliteman/qscintilla2/Qt4 -I/rpm/BUILD/sqliteman-1.2.1/sqlitem\
an/qscintilla2/Qt4/Qsci   -DTRANSLATION_DIR=\"/usr/share/sqliteman/\" -DDOC_DIR=\"/usr/share/sqliteman/doc/\" -DICON_DIR=\"/usr/share/sqliteman/icons\" -DSQLITE_BINAR\
Y=\"sqlite3\" -DSQLITEMAN_VERSION=\"1.2.1\" -o CMakeFiles/sqliteman.dir/altertabledialog.o -c /rpm/BUILD/sqliteman-1.2.1/sqliteman/altertabledialog.cpp
/rpm/BUILD/sqliteman-1.2.1/sqliteman/altertabledialog.cpp: In member function 'virtual void AlterTableDialog::createButton_clicked()':
/rpm/BUILD/sqliteman-1.2.1/sqliteman/altertabledialog.cpp:164: error: call of overloaded 'QString(int)' is ambiguous
/usr/include/QtCore/qstring.h:427: note: candidates are: QString::QString(const QByteArray&)
/usr/include/QtCore/qstring.h:425: note:                 QString::QString(const char*)
/usr/include/QtCore/qstring.h:726: note:                 QString::QString(const QString&)
/usr/include/QtCore/qstring.h:106: note:                 QString::QString(QChar)
/usr/include/QtCore/qstring.h:105: note:                 QString::QString(const QChar*)
make[2]: *** [sqliteman/CMakeFiles/sqliteman.dir/altertabledialog.o] Error 1

Also see bug #599939

Sources in altertabledialog.cpp:

void AlterTableDialog::createButton_clicked()
{
        ui.resultEdit->clear();
        // rename table if it's required
        if (!renameTable())
                return;

        // drop columns first
//      if (m_dropColumns > 0)
        {
                QStringList existingObjects = Database::getObjects().keys();  // <---- Line 164 is here
                // indexes and triggers on the original table
                QStringList originalSrc = originalSource();


It builds just fine in Fedora 7 -> Fedora 13, seems like some changes in Qt 4.7 broke it.

Any ideas?
Comment 1 Rex Dieter 2010-06-09 14:15:33 EDT
sqliteman will require patching to remove any instances of ambiguous QString(0), which was silently accepted with < qt-4.7
Comment 2 Rex Dieter 2010-06-09 14:16:39 EDT
I take that back, not just 0, any instance of QString(foo), where foo is of type int.
Comment 3 Terje Røsten 2010-06-09 14:52:28 EDT
That was my fear :-)

Thanks for the quick response!
Comment 4 Kevin Kofler 2010-06-09 17:53:01 EDT
Actually, QString(non-0 integer) was never accepted. 0 is special in C++, it can be silently converted to any pointer type. QString(0) was previously interpreted as QString((char*)0). Now there's also a QString(QChar *), so now it's ambiguous.

But since QString((char*)0) is the same and less efficient as just QString(), the best fix is to just remove the 0.
Comment 5 Kevin Kofler 2010-06-09 17:53:55 EDT
(Actually, it's const char * and const QChar *.)
Comment 6 Alec Moskvin 2010-06-16 15:42:11 EDT
Created attachment 424566 [details]
Patch to make SQLiteman build against Qt 4.7

I made a patch, but the SQLiteman Bugtracker won't let me register, so I'm posting it here...

This patch is against trunk, but it also applies to the stable version (1.2.1).
Comment 7 Terje Røsten 2010-06-16 17:09:22 EDT
I have pushed the fix to rawhide and updated the SQLiteman Bugtracker with
relevant information.

Thank you very much Alec!
Comment 8 Petr Vanek 2010-06-19 16:00:50 EDT
hi guys,

I'm the author of Sqliteman. At first - I'd like to thank you for your investigation (and patch of course). Trunk and 1.2.x branch are patched and it's working.

I did a new release - 1.2.2. It contains fixes for:
#146: Views with spaces in name are not displayed correctly
#163: sqliteman 1.2.1 don't build with qt 4.7

source tarballs are located at sourceforge.

Some binary packages for Suse and Fedora are already prebuilt in OpenSuse's build service:
http://download.opensuse.org/repositories/home:/subik/

spec file is in the SVN in Packagers directory (if you are interested).

Please contact me again when you will face another issues.

at last - I do apologise for so much delayed reaction. Sqliteman is not my main project and I don't monitor its bugtracker daily (yes, e-mail notifications were broken).

all the best,
Petr

Note You need to log in before you can comment on or make changes to this bug.