aboutsummaryrefslogtreecommitdiffstats
path: root/tools/qmlprofiler/qmlprofilerapplication.h
diff options
context:
space:
mode:
Diffstat (limited to 'tools/qmlprofiler/qmlprofilerapplication.h')
-rw-r--r--tools/qmlprofiler/qmlprofilerapplication.h35
1 files changed, 27 insertions, 8 deletions
diff --git a/tools/qmlprofiler/qmlprofilerapplication.h b/tools/qmlprofiler/qmlprofilerapplication.h
index 7e7cebfcf1..f1bf6c3e93 100644
--- a/tools/qmlprofiler/qmlprofilerapplication.h
+++ b/tools/qmlprofiler/qmlprofilerapplication.h
@@ -41,6 +41,15 @@
#include "qmlprofilerclient.h"
#include "qmlprofilerdata.h"
+enum PendingRequest {
+ REQUEST_QUIT,
+ REQUEST_FLUSH_FILE,
+ REQUEST_FLUSH,
+ REQUEST_OUTPUT_FILE,
+ REQUEST_TOGGLE_RECORDING,
+ REQUEST_NONE
+};
+
class QmlProfilerApplication : public QCoreApplication
{
Q_OBJECT
@@ -48,12 +57,17 @@ public:
QmlProfilerApplication(int &argc, char **argv);
~QmlProfilerApplication();
- bool parseArguments();
- void printUsage();
+ void parseArguments();
int exec();
+ bool isInteractive() const;
+
+signals:
+ void readyForCommand();
public slots:
void userCommand(const QString &command);
+ void notifyTraceStarted();
+ void outputData();
private slots:
void run();
@@ -67,9 +81,8 @@ private slots:
void traceClientEnabled();
void profilerClientEnabled();
void traceFinished();
- void recordingChanged();
- void print(const QString &line);
+ void prompt(const QString &line = QString(), bool ready = true);
void logError(const QString &error);
void logStatus(const QString &status);
@@ -77,8 +90,10 @@ private slots:
void v8Complete();
private:
- void printCommands();
- QString traceFileName() const;
+ quint64 parseFeatures(const QStringList &featureList, const QString &values, bool exclude);
+ bool checkOutputFile(PendingRequest pending);
+ void flush();
+ void output();
enum ApplicationMode {
LaunchMode,
@@ -89,12 +104,16 @@ private:
QString m_programPath;
QStringList m_programArguments;
QProcess *m_process;
- QString m_tracePrefix;
QString m_hostName;
quint16 m_port;
+ QString m_outputFile;
+ QString m_interactiveOutputFile;
+
+ PendingRequest m_pendingRequest;
bool m_verbose;
- bool m_quitAfterSave;
+ bool m_recording;
+ bool m_interactive;
QQmlDebugConnection m_connection;
QmlProfilerClient m_qmlProfilerClient;