summaryrefslogtreecommitdiffhomepage
path: root/gui/process_detector.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'gui/process_detector.cpp')
-rw-r--r--gui/process_detector.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/gui/process_detector.cpp b/gui/process_detector.cpp
index 0ff05f93..b17d5dd0 100644
--- a/gui/process_detector.cpp
+++ b/gui/process_detector.cpp
@@ -20,8 +20,8 @@
#include <QSettings>
#include <QtEvents>
-static constexpr inline auto RECORD_SEPARATOR = QChar(char(0x1e)); // RS ^]
-static constexpr inline auto UNIT_SEPARATOR = QChar(char(0x1f)); // US ^_
+static constexpr auto RECORD_SEPARATOR = QChar(char(0x1e)); // RS ^]
+static constexpr auto UNIT_SEPARATOR = QChar(char(0x1f)); // US ^_
using namespace options;
using namespace options::globals;
@@ -106,7 +106,7 @@ int process_detector::add_row(QString const& exe_name, QString const& profile)
{
BrowseButton* b = new BrowseButton(twi);
b->setText("...");
- QObject::connect(b, SIGNAL(clicked()), b, SLOT(browse()));
+ QObject::connect(b, &BrowseButton::clicked, b, &BrowseButton::browse);
ui.tableWidget->setCellWidget(i, 2, b);
}
@@ -174,14 +174,14 @@ void process_detector::remove()
bool process_detector_worker::should_stop()
{
- if (last_exe_name == "")
+ if (last_exe_name == QString())
return false;
proc_detector_settings s;
if (!s.is_enabled())
{
- last_exe_name = "";
+ last_exe_name = QString{};
return false;
}
@@ -190,17 +190,17 @@ bool process_detector_worker::should_stop()
if (exe_list.contains(last_exe_name))
return false;
- last_exe_name = "";
+ last_exe_name = QString{};
return true;
}
-bool process_detector_worker::config_to_start(QString& str)
+bool process_detector_worker::profile_to_start(QString& str)
{
proc_detector_settings s;
if (!s.is_enabled())
{
- last_exe_name = "";
+ last_exe_name = QString{};
return false;
}
@@ -218,9 +218,9 @@ bool process_detector_worker::config_to_start(QString& str)
{
if (filenames.contains(name))
{
- last_exe_name = name;
str = filenames[name];
- return str != "";
+ last_exe_name = std::move(name);
+ return str != QString{};
}
}