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");
|
methods.append("arg0");
|
||||||
// We only want slots starting with "test"
|
// We only want slots starting with "test"
|
||||||
for (int i = mo->methodOffset(); i < mo->methodCount(); ++i) {
|
for (int i = mo->methodOffset(); i < mo->methodCount(); ++i) {
|
||||||
if (QByteArray(mo->method(i).signature()).startsWith("test") &&
|
#if QT_VERSION >= 0x050000
|
||||||
!QByteArray(mo->method(i).signature()).endsWith("_data()")) {
|
const QByteArray signature = mo->method(i).methodSignature();
|
||||||
QString method = QString::fromLatin1(mo->method(i).signature());
|
#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));
|
methods.append(method.left(method.size()-2));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,6 +6,10 @@ SOURCES += $$PWD/easinggraph.cpp \
|
|||||||
HEADERS += $$PWD/easinggraph.h \
|
HEADERS += $$PWD/easinggraph.h \
|
||||||
$$PWD/easingcontextpane.h
|
$$PWD/easingcontextpane.h
|
||||||
|
|
||||||
QT += declarative
|
greaterThan(QT_MAJOR_VERSION, 4) {
|
||||||
|
QT += quick1
|
||||||
|
} else {
|
||||||
|
QT += declarative
|
||||||
|
}
|
||||||
RESOURCES += $$PWD/easingpane.qrc
|
RESOURCES += $$PWD/easingpane.qrc
|
||||||
FORMS += $$PWD/easingcontextpane.ui
|
FORMS += $$PWD/easingcontextpane.ui
|
||||||
|
|||||||
@@ -158,11 +158,6 @@ QTextCodec *CodecSelector::selectedCodec() const
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
CodecSelector::Result CodecSelector::exec()
|
|
||||||
{
|
|
||||||
return (Result) QDialog::exec();
|
|
||||||
}
|
|
||||||
|
|
||||||
void CodecSelector::buttonClicked(QAbstractButton *button)
|
void CodecSelector::buttonClicked(QAbstractButton *button)
|
||||||
{
|
{
|
||||||
Result result = Cancel;
|
Result result = Cancel;
|
||||||
|
|||||||
@@ -55,12 +55,11 @@ public:
|
|||||||
|
|
||||||
QTextCodec *selectedCodec() const;
|
QTextCodec *selectedCodec() const;
|
||||||
|
|
||||||
|
// Enumeration returned from QDialog::exec()
|
||||||
enum Result {
|
enum Result {
|
||||||
Cancel, Reload, Save
|
Cancel, Reload, Save
|
||||||
};
|
};
|
||||||
|
|
||||||
Result exec();
|
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void updateButtons();
|
void updateButtons();
|
||||||
void buttonClicked(QAbstractButton *button);
|
void buttonClicked(QAbstractButton *button);
|
||||||
|
|||||||
Reference in New Issue
Block a user