forked from qt-creator/qt-creator
Squish: Use setup function for remaining plugin pimpl items
Change-Id: I5d74b0b0c4b25d580566a1d8687279990d3e9675 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -385,4 +385,10 @@ void SquishOutputPane::enableAllFiltersTriggered()
|
||||
m_filterModel->enableAllResultTypes();
|
||||
}
|
||||
|
||||
void setupSquishOutputPane(QObject *guard)
|
||||
{
|
||||
m_instance = new SquishOutputPane;
|
||||
m_instance->setParent(guard);
|
||||
}
|
||||
|
||||
} // namespace Squish::Internal
|
||||
|
@@ -74,4 +74,6 @@ private:
|
||||
QMenu *m_filterMenu;
|
||||
};
|
||||
|
||||
void setupSquishOutputPane(QObject *guard);
|
||||
|
||||
} // namespace Squish::Internal
|
||||
|
@@ -38,9 +38,6 @@ public:
|
||||
SquishPluginPrivate();
|
||||
|
||||
bool initializeGlobalScripts();
|
||||
|
||||
SquishOutputPane m_outputPane;
|
||||
SquishTools m_squishTools;
|
||||
};
|
||||
|
||||
SquishPluginPrivate::SquishPluginPrivate()
|
||||
@@ -84,7 +81,7 @@ bool SquishPluginPrivate::initializeGlobalScripts()
|
||||
if (!squishserver.isExecutableFile())
|
||||
return false;
|
||||
|
||||
m_squishTools.queryGlobalScripts([](const QString &output, const QString &error) {
|
||||
SquishTools::instance()->queryGlobalScripts([](const QString &output, const QString &error) {
|
||||
if (output.isEmpty() || !error.isEmpty())
|
||||
return; // ignore (for now?)
|
||||
|
||||
@@ -106,6 +103,9 @@ private:
|
||||
{
|
||||
setupObjectsMapEditor();
|
||||
|
||||
setupSquishOutputPane(this);
|
||||
setupSquishTools(this);
|
||||
|
||||
d.reset(new SquishPluginPrivate);
|
||||
|
||||
setupSquishWizardPages();
|
||||
@@ -124,9 +124,9 @@ private:
|
||||
|
||||
ShutdownFlag aboutToShutdown() final
|
||||
{
|
||||
if (d->m_squishTools.shutdown())
|
||||
if (SquishTools::instance()->shutdown())
|
||||
return SynchronousShutdown;
|
||||
connect(&d->m_squishTools, &SquishTools::shutdownFinished,
|
||||
connect(SquishTools::instance(), &SquishTools::shutdownFinished,
|
||||
this, &ExtensionSystem::IPlugin::asynchronousShutdownFinished);
|
||||
return AsynchronousShutdown;
|
||||
}
|
||||
|
@@ -1327,4 +1327,10 @@ void SquishTools::setupRunnerForRun()
|
||||
this, &SquishTools::logOutputReceived);
|
||||
}
|
||||
|
||||
void setupSquishTools(QObject *guard)
|
||||
{
|
||||
s_instance = new SquishTools;
|
||||
s_instance->setParent(guard);
|
||||
}
|
||||
|
||||
} // namespace Squish::Internal
|
||||
|
@@ -21,8 +21,7 @@ class QFile;
|
||||
class QFileSystemWatcher;
|
||||
QT_END_NAMESPACE
|
||||
|
||||
namespace Squish {
|
||||
namespace Internal {
|
||||
namespace Squish::Internal {
|
||||
|
||||
class SquishXmlOutputHandler;
|
||||
|
||||
@@ -172,5 +171,6 @@ private:
|
||||
bool m_closeRunnerOnEndRecord = false;
|
||||
};
|
||||
|
||||
} // namespace Internal
|
||||
} // namespace Squish
|
||||
void setupSquishTools(QObject *guard);
|
||||
|
||||
} // Squish::Internal
|
||||
|
Reference in New Issue
Block a user