qstring ambigous error ...
Verfasst: 19. November 2012 16:19
Hallo,
Ich probiere eine qt4 app von 2006 zum laufen zu bringen, und zwar mit qt4.8 : bekomme einen qstring ambigous error
reveal is ein exif metadata viewer. Er kompiliert ja auch, bis auf ein paar Kleinigkeiten, durch, aber hier haengts dann:
die .h
das Komische ist, wenn ichs mit qt4.7 kompiliere, und vorher die NULL rausloesche, kompilierts durch und rennt auch.
Mit qt 4.8, kompilierts auch durch, aber ich krieg einen segmentation fault, gdb sagt was von ".... in Qstring::fromLocal8Bit(char const*, int) ()"
weiss da jemand rat?
kenn mich leider nicht wirklich mit qt aus..
Ich probiere eine qt4 app von 2006 zum laufen zu bringen, und zwar mit qt4.8 : bekomme einen qstring ambigous error
reveal is ein exif metadata viewer. Er kompiliert ja auch, bis auf ein paar Kleinigkeiten, durch, aber hier haengts dann:
Code: Alles auswählen
g++ -c -pipe -O2 -O2 -I/usr/include -D_REENTRANT -Wall -W -DBIN_DIR=\""/usr/bin\"" -DRESOURCE_DIR=\""/usr/share/Reveal\"" -DTARGET=\""Reveal\"" -DNEEDED_TRANSLATIONS=\""Reveal commonDialogs generalTools qt\"" -DQT_NO_DEBUG -DQT_XML_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/share/qt4/mkspecs/linux-g++ -I. -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtNetwork -I/usr/include/qt4/QtGui -I/usr/include/qt4/QtXml -I/usr/include/qt4 -Itmp -o tmp/dynamicSlider.o ../src/_commonWidgets/dynamicSlider.cpp
../src/_commonWidgets/dynamicSlider.cpp: In member function 'void DynamicSlider::setPrefix(QString)':
../src/_commonWidgets/dynamicSlider.cpp:54:27: error: call of overloaded 'QString(NULL)' is ambiguous
/usr/include/qt4/QtCore/qstring.h:428:43: note: candidates are: QString::QString(const QByteArray&)
/usr/include/qt4/QtCore/qstring.h:426:43: note: QString::QString(const char*)
/usr/include/qt4/QtCore/qstring.h:727:8: note: QString::QString(const QString&)
/usr/include/qt4/QtCore/qstring.h:106:5: note: QString::QString(QChar)
/usr/include/qt4/QtCore/qstring.h:105:14: note: QString::QString(const QChar*)
../src/_commonWidgets/dynamicSlider.cpp: In member function 'void DynamicSlider::setSuffix(QString)':
../src/_commonWidgets/dynamicSlider.cpp:68:27: error: call of overloaded 'QString(NULL)' is ambiguous
/usr/include/qt4/QtCore/qstring.h:428:43: note: candidates are: QString::QString(const QByteArray&)
/usr/include/qt4/QtCore/qstring.h:426:43: note: QString::QString(const char*)
/usr/include/qt4/QtCore/qstring.h:727:8: note: QString::QString(const QString&)
/usr/include/qt4/QtCore/qstring.h:106:5: note: QString::QString(QChar)
/usr/include/qt4/QtCore/qstring.h:105:14: note: QString::QString(const QChar*)
make: *** [tmp/dynamicSlider.o] Error 1
Code: Alles auswählen
void DynamicSlider::setPrefix( QString val )
{
prefix1 = val;
prefix2 = QString( NULL );
updateTooltipLabel();
}
//==========================================
void DynamicSlider::setPrefixes( QString v1, QString v2 )
{
prefix1 = v1;
prefix2 = v2;
updateTooltipLabel();
}
//==========================================
void DynamicSlider::setSuffix( QString val )
{
suffix1 = val;
suffix2 = QString( NULL );
updateTooltipLabel();
}
die .h
Code: Alles auswählen
///set two prefix values, one for when the value is positive and one for when the value is negative.
void setPrefixes( QString prefix1, QString prefix2 );
///set the suffix that is displayed after the current slider value
void setSuffix( QString val );
///set two suffix values, one for when the value is positive and one for when the value is negative.
void setSuffixes( QString suffix1, QString suffix2 );
Mit qt 4.8, kompilierts auch durch, aber ich krieg einen segmentation fault, gdb sagt was von ".... in Qstring::fromLocal8Bit(char const*, int) ()"
weiss da jemand rat?
kenn mich leider nicht wirklich mit qt aus..