Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 602361 - qt 4.7: sqliteman fails to build
Summary: qt 4.7: sqliteman fails to build
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: sqliteman
Version: rawhide
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Terje Røsten
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: 599939
TreeView+ depends on / blocked
 
Reported: 2010-06-09 17:09 UTC by Terje Røsten
Modified: 2010-06-19 20:00 UTC (History)
9 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2010-06-16 21:09:22 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
Patch to make SQLiteman build against Qt 4.7 (deleted)
2010-06-16 19:42 UTC, Alec Moskvin
no flags Details | Diff

Description Terje Røsten 2010-06-09 17:09:41 UTC
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 18:15:33 UTC
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 18:16:39 UTC
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 18:52:28 UTC
That was my fear :-)

Thanks for the quick response!

Comment 4 Kevin Kofler 2010-06-09 21:53:01 UTC
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 21:53:55 UTC
(Actually, it's const char * and const QChar *.)

Comment 6 Alec Moskvin 2010-06-16 19:42:11 UTC
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 21:09:22 UTC
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 20:00:50 UTC
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.