summaryrefslogtreecommitdiffstats
path: root/src/vsession.h
diff options
context:
space:
mode:
authorSimon Rettberg2019-07-08 16:00:30 +0200
committerSimon Rettberg2019-07-08 16:00:30 +0200
commit4eb0886e94a130e631e5bf97b9a634847541b6a5 (patch)
tree01b3eee86a18fad3ab94a3147c9fe43556adb979 /src/vsession.h
parentGet rid of ImgType, use string directly (diff)
downloadvmchooser2-4eb0886e94a130e631e5bf97b9a634847541b6a5.tar.gz
vmchooser2-4eb0886e94a130e631e5bf97b9a634847541b6a5.tar.xz
vmchooser2-4eb0886e94a130e631e5bf97b9a634847541b6a5.zip
vsession.*: Use QStringLiteral for most C-Strings
Some things like searching feel a bit sluggish; try to get rid of repeated QString creation and destruction.
Diffstat (limited to 'src/vsession.h')
-rw-r--r--src/vsession.h20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/vsession.h b/src/vsession.h
index ad81833..609884e 100644
--- a/src/vsession.h
+++ b/src/vsession.h
@@ -19,37 +19,37 @@ class VSession : public Session {
int priority() const;
bool isTemplate() const {
- return getAttribute("is_template").toInt() != 0;
+ return getAttribute(QStringLiteral("is_template")).toInt() != 0;
}
bool isForLocation() const {
- return getAttribute("for_location").toInt() != 0;
+ return getAttribute(QStringLiteral("for_location")).toInt() != 0;
}
bool canEdit() const {
- return getAttribute("allow_edit").toInt() != 0;
+ return getAttribute(QStringLiteral("allow_edit")).toInt() != 0;
}
QString virtualizer() const {
- return getAttribute(QLatin1String("virtualmachine"));
+ return getAttribute(QStringLiteral("virtualmachine"));
}
QString shortDescription() const {
- return getAttribute("short_description");
+ return getAttribute(QStringLiteral("short_description"));
}
QString description() const {
- return getAttribute("long_description");
+ return getAttribute(QStringLiteral("long_description"));
}
QIcon icon() const;
QString os() const {
- return getAttribute("os");
+ return getAttribute(QStringLiteral("os"));
}
QString uuid() const {
- return getAttribute("uuid");
+ return getAttribute(QStringLiteral("uuid"));
}
SectionType section() const {
@@ -66,14 +66,14 @@ class VSession : public Session {
QVariant foregroundRole() const;
QString getAttribute(const QString& nodeName,
- const QString& attribute = "param") const;
+ const QString& attribute = QStringLiteral("param")) const;
QList<QString> keywords() const;
bool containsKeywords(const QList<QString>& keywords) const;
QString getNodeText(const QString& nodeName) const;
void addNodeWithAttribute(const QString& nodeName,
const QString& value,
- const QString& attribute = "param",
+ const QString& attribute = QStringLiteral("param"),
bool replace = true);
QString toXml() const;