diff --git a/launcher/Application.cpp b/launcher/Application.cpp index a546d0a85..7f03b4d10 100644 --- a/launcher/Application.cpp +++ b/launcher/Application.cpp @@ -49,7 +49,7 @@ #include "pathmatcher/MultiMatcher.h" #include "pathmatcher/SimplePrefixMatcher.h" #include "settings/INIFile.h" -#include "tools/WaitProfiler.h" +#include "tools/GenericProfiler.h" #include "ui/InstanceWindow.h" #include "ui/MainWindow.h" @@ -817,7 +817,7 @@ Application::Application(int& argc, char** argv) : QApplication(argc, argv) // FIXME: what to do with these? m_profilers.insert("jprofiler", std::shared_ptr(new JProfilerFactory())); m_profilers.insert("jvisualvm", std::shared_ptr(new JVisualVMFactory())); - m_profilers.insert("waitprofiler", std::shared_ptr(new WaitProfilerFactory())); + m_profilers.insert("generic", std::shared_ptr(new GenericProfilerFactory())); for (auto profiler : m_profilers.values()) { profiler->registerSettings(m_settings); } diff --git a/launcher/CMakeLists.txt b/launcher/CMakeLists.txt index 28359a4b1..a14f279e7 100644 --- a/launcher/CMakeLists.txt +++ b/launcher/CMakeLists.txt @@ -457,8 +457,8 @@ set(TOOLS_SOURCES tools/JVisualVM.h tools/MCEditTool.cpp tools/MCEditTool.h - tools/WaitProfiler.cpp - tools/WaitProfiler.h + tools/GenericProfiler.cpp + tools/GenericProfiler.h ) set(META_SOURCES diff --git a/launcher/tools/WaitProfiler.cpp b/launcher/tools/GenericProfiler.cpp similarity index 63% rename from launcher/tools/WaitProfiler.cpp rename to launcher/tools/GenericProfiler.cpp index c43af0a89..594024a7d 100644 --- a/launcher/tools/WaitProfiler.cpp +++ b/launcher/tools/GenericProfiler.cpp @@ -15,30 +15,32 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -#include "WaitProfiler.h" +#include "GenericProfiler.h" #include "BaseInstance.h" #include "launch/LaunchTask.h" #include "settings/SettingsObject.h" -class WaitProfiler : public BaseProfiler { +class GenericProfiler : public BaseProfiler { Q_OBJECT public: - WaitProfiler(SettingsObjectPtr settings, InstancePtr instance, QObject* parent = 0); + GenericProfiler(SettingsObjectPtr settings, InstancePtr instance, QObject* parent = 0); protected: void beginProfilingImpl(shared_qobject_ptr process); }; -WaitProfiler::WaitProfiler(SettingsObjectPtr settings, InstancePtr instance, QObject* parent) : BaseProfiler(settings, instance, parent) {} +GenericProfiler::GenericProfiler(SettingsObjectPtr settings, InstancePtr instance, QObject* parent) + : BaseProfiler(settings, instance, parent) +{} -void WaitProfiler::beginProfilingImpl(shared_qobject_ptr process) +void GenericProfiler::beginProfilingImpl(shared_qobject_ptr process) { emit readyToLaunch(tr("Started process: %1").arg(process->pid())); } -BaseExternalTool* WaitProfilerFactory::createTool(InstancePtr instance, QObject* parent) +BaseExternalTool* GenericProfilerFactory::createTool(InstancePtr instance, QObject* parent) { - return new WaitProfiler(globalSettings, instance, parent); + return new GenericProfiler(globalSettings, instance, parent); } -#include "WaitProfiler.moc" \ No newline at end of file +#include "GenericProfiler.moc" \ No newline at end of file diff --git a/launcher/tools/WaitProfiler.h b/launcher/tools/GenericProfiler.h similarity index 90% rename from launcher/tools/WaitProfiler.h rename to launcher/tools/GenericProfiler.h index fe813402c..e99fc059f 100644 --- a/launcher/tools/WaitProfiler.h +++ b/launcher/tools/GenericProfiler.h @@ -19,9 +19,9 @@ #include "BaseProfiler.h" -class WaitProfilerFactory : public BaseProfilerFactory { +class GenericProfilerFactory : public BaseProfilerFactory { public: - QString name() const override { return "WaitProfiler"; } + QString name() const override { return "Generic"; } void registerSettings([[maybe_unused]] SettingsObjectPtr settings) override{}; BaseExternalTool* createTool(InstancePtr instance, QObject* parent = 0) override; bool check([[maybe_unused]] QString* error) override { return true; };