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();
|
m_filterModel->enableAllResultTypes();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void setupSquishOutputPane(QObject *guard)
|
||||||
|
{
|
||||||
|
m_instance = new SquishOutputPane;
|
||||||
|
m_instance->setParent(guard);
|
||||||
|
}
|
||||||
|
|
||||||
} // namespace Squish::Internal
|
} // namespace Squish::Internal
|
||||||
|
@@ -74,4 +74,6 @@ private:
|
|||||||
QMenu *m_filterMenu;
|
QMenu *m_filterMenu;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
void setupSquishOutputPane(QObject *guard);
|
||||||
|
|
||||||
} // namespace Squish::Internal
|
} // namespace Squish::Internal
|
||||||
|
@@ -38,9 +38,6 @@ public:
|
|||||||
SquishPluginPrivate();
|
SquishPluginPrivate();
|
||||||
|
|
||||||
bool initializeGlobalScripts();
|
bool initializeGlobalScripts();
|
||||||
|
|
||||||
SquishOutputPane m_outputPane;
|
|
||||||
SquishTools m_squishTools;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
SquishPluginPrivate::SquishPluginPrivate()
|
SquishPluginPrivate::SquishPluginPrivate()
|
||||||
@@ -84,7 +81,7 @@ bool SquishPluginPrivate::initializeGlobalScripts()
|
|||||||
if (!squishserver.isExecutableFile())
|
if (!squishserver.isExecutableFile())
|
||||||
return false;
|
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())
|
if (output.isEmpty() || !error.isEmpty())
|
||||||
return; // ignore (for now?)
|
return; // ignore (for now?)
|
||||||
|
|
||||||
@@ -106,6 +103,9 @@ private:
|
|||||||
{
|
{
|
||||||
setupObjectsMapEditor();
|
setupObjectsMapEditor();
|
||||||
|
|
||||||
|
setupSquishOutputPane(this);
|
||||||
|
setupSquishTools(this);
|
||||||
|
|
||||||
d.reset(new SquishPluginPrivate);
|
d.reset(new SquishPluginPrivate);
|
||||||
|
|
||||||
setupSquishWizardPages();
|
setupSquishWizardPages();
|
||||||
@@ -124,9 +124,9 @@ private:
|
|||||||
|
|
||||||
ShutdownFlag aboutToShutdown() final
|
ShutdownFlag aboutToShutdown() final
|
||||||
{
|
{
|
||||||
if (d->m_squishTools.shutdown())
|
if (SquishTools::instance()->shutdown())
|
||||||
return SynchronousShutdown;
|
return SynchronousShutdown;
|
||||||
connect(&d->m_squishTools, &SquishTools::shutdownFinished,
|
connect(SquishTools::instance(), &SquishTools::shutdownFinished,
|
||||||
this, &ExtensionSystem::IPlugin::asynchronousShutdownFinished);
|
this, &ExtensionSystem::IPlugin::asynchronousShutdownFinished);
|
||||||
return AsynchronousShutdown;
|
return AsynchronousShutdown;
|
||||||
}
|
}
|
||||||
|
@@ -1327,4 +1327,10 @@ void SquishTools::setupRunnerForRun()
|
|||||||
this, &SquishTools::logOutputReceived);
|
this, &SquishTools::logOutputReceived);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void setupSquishTools(QObject *guard)
|
||||||
|
{
|
||||||
|
s_instance = new SquishTools;
|
||||||
|
s_instance->setParent(guard);
|
||||||
|
}
|
||||||
|
|
||||||
} // namespace Squish::Internal
|
} // namespace Squish::Internal
|
||||||
|
@@ -21,8 +21,7 @@ class QFile;
|
|||||||
class QFileSystemWatcher;
|
class QFileSystemWatcher;
|
||||||
QT_END_NAMESPACE
|
QT_END_NAMESPACE
|
||||||
|
|
||||||
namespace Squish {
|
namespace Squish::Internal {
|
||||||
namespace Internal {
|
|
||||||
|
|
||||||
class SquishXmlOutputHandler;
|
class SquishXmlOutputHandler;
|
||||||
|
|
||||||
@@ -172,5 +171,6 @@ private:
|
|||||||
bool m_closeRunnerOnEndRecord = false;
|
bool m_closeRunnerOnEndRecord = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace Internal
|
void setupSquishTools(QObject *guard);
|
||||||
} // namespace Squish
|
|
||||||
|
} // Squish::Internal
|
||||||
|
Reference in New Issue
Block a user