diff options
Diffstat (limited to 'tools')
-rw-r--r-- | tools/qml/qml.pro | 2 | ||||
-rw-r--r-- | tools/qmleasing/mainwindow.cpp | 1 | ||||
-rw-r--r-- | tools/qmljs/qmljs.cpp | 8 | ||||
-rw-r--r-- | tools/qmlprofiler/commandlistener.h | 2 | ||||
-rw-r--r-- | tools/qmlprofiler/main.cpp | 6 | ||||
-rw-r--r-- | tools/qmlprofiler/qmlprofilerapplication.cpp | 28 | ||||
-rw-r--r-- | tools/qmlprofiler/qmlprofilerapplication.h | 11 | ||||
-rw-r--r-- | tools/qmlprofiler/qmlprofilerdata.h | 11 | ||||
-rw-r--r-- | tools/qmlscene/main.cpp | 8 | ||||
-rw-r--r-- | tools/qmlscene/qmlscene.pro | 3 |
10 files changed, 44 insertions, 36 deletions
diff --git a/tools/qml/qml.pro b/tools/qml/qml.pro index fe90916980..5f05054d04 100644 --- a/tools/qml/qml.pro +++ b/tools/qml/qml.pro @@ -12,6 +12,6 @@ mac { ICON = qml.icns } -DEFINES += QT_QML_DEBUG_NO_WARNING +!contains(QT_CONFIG, no-qml-debug): DEFINES += QT_QML_DEBUG_NO_WARNING load(qt_tool) diff --git a/tools/qmleasing/mainwindow.cpp b/tools/qmleasing/mainwindow.cpp index e45feea76e..5a5f651396 100644 --- a/tools/qmleasing/mainwindow.cpp +++ b/tools/qmleasing/mainwindow.cpp @@ -29,7 +29,6 @@ #include "mainwindow.h" #include "splineeditor.h" #include <QtQuick/QQuickView> -#include <QtQuick> #include <QtQml/QQmlContext> #include <QEasingCurve> #include <QHBoxLayout> diff --git a/tools/qmljs/qmljs.cpp b/tools/qmljs/qmljs.cpp index 68aa52ce91..4f79546bcc 100644 --- a/tools/qmljs/qmljs.cpp +++ b/tools/qmljs/qmljs.cpp @@ -68,7 +68,7 @@ struct Print: FunctionObject }; V4_OBJECT(FunctionObject) - static ReturnedValue call(const Managed *, CallData *callData) + static void call(const Managed *, Scope &scope, CallData *callData) { for (int i = 0; i < callData->argc; ++i) { QString s = callData->args[i].toQStringNoThrow(); @@ -77,7 +77,7 @@ struct Print: FunctionObject std::cout << qPrintable(s); } std::cout << std::endl; - return Encode::undefined(); + scope.result = Encode::undefined(); } }; @@ -94,10 +94,10 @@ struct GC: public FunctionObject }; V4_OBJECT(FunctionObject) - static ReturnedValue call(const Managed *m, CallData *) + static void call(const Managed *m, Scope &scope, CallData *) { static_cast<const GC *>(m)->engine()->memoryManager->runGC(); - return Encode::undefined(); + scope.result = Encode::undefined(); } }; diff --git a/tools/qmlprofiler/commandlistener.h b/tools/qmlprofiler/commandlistener.h index c10b199daa..2a994bf449 100644 --- a/tools/qmlprofiler/commandlistener.h +++ b/tools/qmlprofiler/commandlistener.h @@ -33,7 +33,7 @@ class CommandListener : public QObject { Q_OBJECT -public slots: +public: void readCommand(); signals: diff --git a/tools/qmlprofiler/main.cpp b/tools/qmlprofiler/main.cpp index d3e2beb83f..c7cb979ff8 100644 --- a/tools/qmlprofiler/main.cpp +++ b/tools/qmlprofiler/main.cpp @@ -39,8 +39,10 @@ int main(int argc, char *argv[]) QThread listenerThread; CommandListener listener; listener.moveToThread(&listenerThread); - QObject::connect(&listener, SIGNAL(command(QString)), &app, SLOT(userCommand(QString))); - QObject::connect(&app, SIGNAL(readyForCommand()), &listener, SLOT(readCommand())); + QObject::connect(&listener, &CommandListener::command, + &app, &QmlProfilerApplication::userCommand); + QObject::connect(&app, &QmlProfilerApplication::readyForCommand, + &listener, &CommandListener::readCommand); listenerThread.start(); int exitValue = app.exec(); listenerThread.quit(); diff --git a/tools/qmlprofiler/qmlprofilerapplication.cpp b/tools/qmlprofiler/qmlprofilerapplication.cpp index b04ff7e558..063e5e2961 100644 --- a/tools/qmlprofiler/qmlprofilerapplication.cpp +++ b/tools/qmlprofiler/qmlprofilerapplication.cpp @@ -87,17 +87,21 @@ QmlProfilerApplication::QmlProfilerApplication(int &argc, char **argv) : m_connectionAttempts(0) { m_connectTimer.setInterval(1000); - connect(&m_connectTimer, SIGNAL(timeout()), this, SLOT(tryToConnect())); + connect(&m_connectTimer, &QTimer::timeout, this, &QmlProfilerApplication::tryToConnect); - connect(&m_connection, SIGNAL(connected()), this, SLOT(connected())); + connect(&m_connection, &QQmlDebugConnection::connected, + this, &QmlProfilerApplication::connected); - connect(&m_qmlProfilerClient, SIGNAL(enabledChanged(bool)), - this, SLOT(traceClientEnabledChanged(bool))); - connect(&m_qmlProfilerClient, SIGNAL(recordingStarted()), this, SLOT(notifyTraceStarted())); - connect(&m_qmlProfilerClient, SIGNAL(error(QString)), this, SLOT(logError(QString))); + connect(&m_qmlProfilerClient, &QmlProfilerClient::enabledChanged, + this, &QmlProfilerApplication::traceClientEnabledChanged); + connect(&m_qmlProfilerClient, &QmlProfilerClient::recordingStarted, + this, &QmlProfilerApplication::notifyTraceStarted); + connect(&m_qmlProfilerClient, &QmlProfilerClient::error, + this, &QmlProfilerApplication::logError); - connect(&m_profilerData, SIGNAL(error(QString)), this, SLOT(logError(QString))); - connect(&m_profilerData, SIGNAL(dataReady()), this, SLOT(traceFinished())); + connect(&m_profilerData, &QmlProfilerData::error, this, &QmlProfilerApplication::logError); + connect(&m_profilerData, &QmlProfilerData::dataReady, + this, &QmlProfilerApplication::traceFinished); } @@ -257,7 +261,7 @@ void QmlProfilerApplication::parseArguments() int QmlProfilerApplication::exec() { - QTimer::singleShot(0, this, SLOT(run())); + QTimer::singleShot(0, this, &QmlProfilerApplication::run); return QCoreApplication::exec(); } @@ -460,9 +464,9 @@ void QmlProfilerApplication::run() arguments << m_programArguments; m_process->setProcessChannelMode(QProcess::MergedChannels); - connect(m_process, SIGNAL(readyRead()), this, SLOT(processHasOutput())); - connect(m_process, SIGNAL(finished(int,QProcess::ExitStatus)), this, - SLOT(processFinished())); + connect(m_process, &QIODevice::readyRead, this, &QmlProfilerApplication::processHasOutput); + connect(m_process, static_cast<void(QProcess::*)(int)>(&QProcess::finished), + this, [this](int){ processFinished(); }); logStatus(QString("Starting '%1 %2' ...").arg(m_programPath, arguments.join(QLatin1Char(' ')))); m_process->start(m_programPath, arguments); diff --git a/tools/qmlprofiler/qmlprofilerapplication.h b/tools/qmlprofiler/qmlprofilerapplication.h index 04f9d43c87..13f0f041f0 100644 --- a/tools/qmlprofiler/qmlprofilerapplication.h +++ b/tools/qmlprofiler/qmlprofilerapplication.h @@ -58,16 +58,14 @@ public: void parseArguments(); int exec(); bool isInteractive() const; - -signals: - void readyForCommand(); - -public slots: void userCommand(const QString &command); void notifyTraceStarted(); void outputData(); -private slots: +signals: + void readyForCommand(); + +private: void run(); void tryToConnect(); void connected(); @@ -81,7 +79,6 @@ private slots: void logError(const QString &error); void logStatus(const QString &status); -private: quint64 parseFeatures(const QStringList &featureList, const QString &values, bool exclude); bool checkOutputFile(PendingRequest pending); void flush(); diff --git a/tools/qmlprofiler/qmlprofilerdata.h b/tools/qmlprofiler/qmlprofilerdata.h index 2570513d93..00ef037071 100644 --- a/tools/qmlprofiler/qmlprofilerdata.h +++ b/tools/qmlprofiler/qmlprofilerdata.h @@ -58,12 +58,6 @@ public: bool isEmpty() const; -signals: - void error(QString); - void stateChanged(); - void dataReady(); - -public slots: void clear(); void setTraceEndTime(qint64 time); void setTraceStartTime(qint64 time); @@ -83,6 +77,11 @@ public slots: void complete(); bool save(const QString &filename); +signals: + void error(QString); + void stateChanged(); + void dataReady(); + private: void sortStartTimes(); void computeQmlTime(); diff --git a/tools/qmlscene/main.cpp b/tools/qmlscene/main.cpp index c892f60680..1185a8e7ae 100644 --- a/tools/qmlscene/main.cpp +++ b/tools/qmlscene/main.cpp @@ -361,7 +361,7 @@ static void usage() puts(" "); exit(1); } - +#ifndef QT_NO_OPENGL // Listen on GL context creation of the QQuickWindow in order to print diagnostic output. class DiagnosticGlContextCreationListener : public QObject { Q_OBJECT @@ -389,7 +389,9 @@ private slots: context->doneCurrent(); deleteLater(); } + }; +#endif static void setWindowTitle(bool verbose, const QObject *topLevel, QWindow *window) { @@ -403,8 +405,10 @@ static void setWindowTitle(bool verbose, const QObject *topLevel, QWindow *windo if (verbose) { newTitle += QLatin1String(" [Qt ") + QLatin1String(QT_VERSION_STR) + QLatin1Char(' ') + QGuiApplication::platformName() + QLatin1Char(' '); +#ifndef QT_NO_OPENGL newTitle += QOpenGLContext::openGLModuleType() == QOpenGLContext::LibGL ? QLatin1String("GL") : QLatin1String("GLES"); +#endif newTitle += QLatin1Char(']'); } if (oldTitle != newTitle) @@ -592,8 +596,10 @@ int main(int argc, char ** argv) if (window) { setWindowTitle(options.verbose, topLevel, window.data()); +#ifndef QT_NO_OPENGL if (options.verbose) new DiagnosticGlContextCreationListener(window.data()); +#endif QSurfaceFormat surfaceFormat = window->requestedFormat(); if (options.multisample) surfaceFormat.setSamples(16); diff --git a/tools/qmlscene/qmlscene.pro b/tools/qmlscene/qmlscene.pro index 0411fd8e31..b1267612c5 100644 --- a/tools/qmlscene/qmlscene.pro +++ b/tools/qmlscene/qmlscene.pro @@ -4,6 +4,7 @@ CONFIG += no_import_scan SOURCES += main.cpp -DEFINES += QML_RUNTIME_TESTING QT_QML_DEBUG_NO_WARNING +DEFINES += QML_RUNTIME_TESTING +!contains(QT_CONFIG, no-qml-debug): DEFINES += QT_QML_DEBUG_NO_WARNING load(qt_tool) |