forked from qt-creator/qt-creator
Fix compilation with Qt 5.
Account for api_changes. Change-Id: I9ac9738be9364bbb291c4870c5df1c24818065b8 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
This commit is contained in:
@@ -675,9 +675,13 @@ void PluginManager::startTests()
|
||||
methods.append("arg0");
|
||||
// We only want slots starting with "test"
|
||||
for (int i = mo->methodOffset(); i < mo->methodCount(); ++i) {
|
||||
if (QByteArray(mo->method(i).signature()).startsWith("test") &&
|
||||
!QByteArray(mo->method(i).signature()).endsWith("_data()")) {
|
||||
QString method = QString::fromLatin1(mo->method(i).signature());
|
||||
#if QT_VERSION >= 0x050000
|
||||
const QByteArray signature = mo->method(i).methodSignature();
|
||||
#else
|
||||
const QByteArray signature = mo->method(i).signature();
|
||||
#endif
|
||||
if (signature.startsWith("test") && !signature.endsWith("_data()")) {
|
||||
const QString method = QString::fromLatin1(signature);
|
||||
methods.append(method.left(method.size()-2));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,6 +6,10 @@ SOURCES += $$PWD/easinggraph.cpp \
|
||||
HEADERS += $$PWD/easinggraph.h \
|
||||
$$PWD/easingcontextpane.h
|
||||
|
||||
greaterThan(QT_MAJOR_VERSION, 4) {
|
||||
QT += quick1
|
||||
} else {
|
||||
QT += declarative
|
||||
}
|
||||
RESOURCES += $$PWD/easingpane.qrc
|
||||
FORMS += $$PWD/easingcontextpane.ui
|
||||
|
||||
@@ -158,11 +158,6 @@ QTextCodec *CodecSelector::selectedCodec() const
|
||||
return 0;
|
||||
}
|
||||
|
||||
CodecSelector::Result CodecSelector::exec()
|
||||
{
|
||||
return (Result) QDialog::exec();
|
||||
}
|
||||
|
||||
void CodecSelector::buttonClicked(QAbstractButton *button)
|
||||
{
|
||||
Result result = Cancel;
|
||||
|
||||
@@ -55,12 +55,11 @@ public:
|
||||
|
||||
QTextCodec *selectedCodec() const;
|
||||
|
||||
// Enumeration returned from QDialog::exec()
|
||||
enum Result {
|
||||
Cancel, Reload, Save
|
||||
};
|
||||
|
||||
Result exec();
|
||||
|
||||
private slots:
|
||||
void updateButtons();
|
||||
void buttonClicked(QAbstractButton *button);
|
||||
|
||||
Reference in New Issue
Block a user