You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To facilitate that, sprinkle a bunch of QStringLiteral() around string
literals and QLatin1Char() around char literals. In some places, I used
QLatin1String() instead of QStringLiteral() when the expression is used
as an argument to a function that has a QLatin1String overload (this is
advised by the Qt docs).
I also replaced empty strings like
QString x = "";
QString x { "" };
funcWithQStringArg("");
funcWithQStringArg(QString(""));
by the QString() default constructor, which yields an empty string more
efficiently:
QString x;
funcWithQStringArg(QString());
QString::fromLocal8Bit() was used whenever strings were read from C
libraries (e.g. PAM). For SDDM's own configuration files, I used
QString::fromUtf8(), under the assumption that most text editors today
default to UTF-8.
In some places, I also used the chance to optimize single-char string
literals to char literals, e.g.
str << list.join(","); //before
str << list.join(QLatin1Char(',')); //after
Testing done: It compiles and the ConfigurationTest passes. I don't have
a test setup for actually running a compiled SDDM, so if someone could
check that I didn't break anything, that would be highly appreciated.
Closes: #469
Entry(Session, QString, QString(), _S("Name of the session file of the last session selected. This session will be preselected when the login screen shows up."));
95
95
Entry(User, QString, QString(), _S("Name of the last logged-in user. This username will be preselected/shown when the login screen shows up"));
0 commit comments