solid
This commit is contained in:
parent
90e8d81f5d
commit
2ee6f108d6
49
solid/wrong_argument_qchar.diff
Normal file
49
solid/wrong_argument_qchar.diff
Normal file
@ -0,0 +1,49 @@
|
||||
diff --git a/src/solid/power/backends/freedesktop/logindinhibitionargument.cpp b/src/solid/power/backends/freedesktop/logindinhibitionargument.cpp
|
||||
index 83e4425e..a85e5f0a 100644
|
||||
--- a/src/solid/power/backends/freedesktop/logindinhibitionargument.cpp
|
||||
+++ b/src/solid/power/backends/freedesktop/logindinhibitionargument.cpp
|
||||
@@ -19,5 +19,5 @@ QString LogindInhibitionArgument::fromPowerState(Power::InhibitionTypes states)
|
||||
if (states | Power::Shutdown) {
|
||||
args << QStringLiteral("shutdown");
|
||||
}
|
||||
- return args.join(QChar(':'));
|
||||
+ return args.join(QLatin1Char(':'));
|
||||
}
|
||||
diff --git a/src/tools/solid-power/main.cpp b/src/tools/solid-power/main.cpp
|
||||
index 497a3d84..03dc58e7 100644
|
||||
--- a/src/tools/solid-power/main.cpp
|
||||
+++ b/src/tools/solid-power/main.cpp
|
||||
@@ -21,9 +21,9 @@ int main(int argc, char **argv)
|
||||
QCommandLineParser parser;
|
||||
parser.setApplicationDescription(QCoreApplication::translate("solid-power", "Tool to know and set the power management state of your device"));
|
||||
parser.addHelpOption();
|
||||
- parser.addPositionalArgument("command", QCoreApplication::translate("solid-power", "Command to execute"));
|
||||
+ parser.addPositionalArgument(QStringLiteral("command"), QCoreApplication::translate("solid-power", "Command to execute"));
|
||||
|
||||
- QCommandLineOption commands("commands", QCoreApplication::translate("solid-power", "Show available commands"));
|
||||
+ QCommandLineOption commands(QStringLiteral("commands"), QCoreApplication::translate("solid-power", "Show available commands"));
|
||||
parser.addOption(commands);
|
||||
|
||||
parser.process(app);
|
||||
diff --git a/src/tools/solid-power/solid-power.cpp b/src/tools/solid-power/solid-power.cpp
|
||||
index 8fe0d8c2..257a19ba 100644
|
||||
--- a/src/tools/solid-power/solid-power.cpp
|
||||
+++ b/src/tools/solid-power/solid-power.cpp
|
||||
@@ -26,7 +26,7 @@ void SolidPower::show()
|
||||
auto job = Solid::Power::isAcPlugged(this);
|
||||
job->exec();
|
||||
|
||||
- QString status = job->isPlugged() ? "yes" : "no";
|
||||
+ QString status = job->isPlugged() ? tr("yes") : tr("no");
|
||||
|
||||
sCout << "is AC plugged:\t" << status << Qt::endl;
|
||||
}
|
||||
@@ -37,7 +37,7 @@ void SolidPower::listen()
|
||||
|
||||
connect(power, &Power::acPluggedChanged, [](bool plugged) {
|
||||
QTextStream lOut(stdout);
|
||||
- QString status = plugged ? "yes" : "no";
|
||||
+ QString status = plugged ? tr("yes") : tr("no");
|
||||
lOut << "\tAC plugged changed:\t" << status << Qt::endl;
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user