diff options
author | Simon Rettberg | 2016-03-29 16:19:23 +0200 |
---|---|---|
committer | Simon Rettberg | 2016-03-29 16:19:23 +0200 |
commit | 49f3b953c49aa5b5130b57810f11ba69baf2b36e (patch) | |
tree | 24aeec7afdc12774140f435f84ece81ba0a5766c | |
parent | Feature: Show warning for 64bit VMs if no VT-x available (diff) | |
download | vmchooser2-49f3b953c49aa5b5130b57810f11ba69baf2b36e.tar.gz vmchooser2-49f3b953c49aa5b5130b57810f11ba69baf2b36e.tar.xz vmchooser2-49f3b953c49aa5b5130b57810f11ba69baf2b36e.zip |
Fix indentation
-rw-r--r-- | src/FileDownloader.h | 8 | ||||
-rw-r--r-- | src/choosersettings.cpp | 2 | ||||
-rw-r--r-- | src/dialog.cpp | 2 | ||||
-rw-r--r-- | src/vsession.cpp | 88 | ||||
-rw-r--r-- | src/xsession.cpp | 14 |
5 files changed, 57 insertions, 57 deletions
diff --git a/src/FileDownloader.h b/src/FileDownloader.h index f66f7f9..d64445f 100644 --- a/src/FileDownloader.h +++ b/src/FileDownloader.h @@ -28,10 +28,10 @@ public: signals: - /** - * Triggered when the download has finished. - * On error, downloadedData will be empty. - */ + /** + * Triggered when the download has finished. + * On error, downloadedData will be empty. + */ void downloaded(const QUrl& url, const QByteArray& downloadedData); private slots: diff --git a/src/choosersettings.cpp b/src/choosersettings.cpp index ecaa6e7..a67897e 100644 --- a/src/choosersettings.cpp +++ b/src/choosersettings.cpp @@ -21,7 +21,7 @@ ChooserSettings::ChooserSettings() { } settings = new QSettings(previousSessionFile, QSettings::IniFormat); - settings->setIniCodec("UTF-8"); + settings->setIniCodec("UTF-8"); if (settings->status() != QSettings::NoError) { if (debugMode) { diff --git a/src/dialog.cpp b/src/dialog.cpp index 0e6b747..0b7fa48 100644 --- a/src/dialog.cpp +++ b/src/dialog.cpp @@ -69,7 +69,7 @@ Dialog::Dialog(int defaultTab, QWidget *parent) // TODO: Implement bug report dialog :) ui->buttonBugReport->setEnabled(false); QObject::connect(SessionsIconHolder::get(), SIGNAL(iconDownloaded(const QUrl&, const QIcon&)), - this, SLOT(iconDownloaded(const QUrl&, const QIcon&))); + this, SLOT(iconDownloaded(const QUrl&, const QIcon&))); } Dialog::~Dialog() { diff --git a/src/vsession.cpp b/src/vsession.cpp index 3720bb7..ef0e191 100644 --- a/src/vsession.cpp +++ b/src/vsession.cpp @@ -44,53 +44,53 @@ QIcon VSession::icon() const { QString icon(getAttribute("icon")); SessionsIconHolder *iconHolder = SessionsIconHolder::get(); if (icon.startsWith("http://")) { - // try to load icon from url - QIcon url_icon(iconHolder->getIcon(QUrl(icon))); - if (!url_icon.isNull()) { - return url_icon; - } + // try to load icon from url + QIcon url_icon(iconHolder->getIcon(QUrl(icon))); + if (!url_icon.isNull()) { + return url_icon; + } } if (!icon.isEmpty()) { - QIcon res_icon(iconHolder->getIcon(icon)); - if (!res_icon.isNull()) { - return res_icon; - } + QIcon res_icon(iconHolder->getIcon(icon)); + if (!res_icon.isNull()) { + return res_icon; + } + } + // Everything failed, try to guess the OS + QString os(getAttribute("os", "param").toLower()); + if (!os.isEmpty()) { + QIcon osi = iconHolder->getIcon(os); + if (!osi.isNull()) + return osi; + // These match vmware guestOS keywords mostly, extend for vbox... + if (os == "dos") + return iconHolder->getIcon("dos"); + if (os.startsWith("windows7")) + return iconHolder->getIcon("win7"); + if (os.startsWith("win31")) + return iconHolder->getIcon("win311"); + if (os.startsWith("windows8")) + return iconHolder->getIcon("win8"); + if (os.startsWith("win2000")) + return iconHolder->getIcon("win2000"); + if (os.startsWith("winxp")) + return iconHolder->getIcon("winxp"); + if (os.startsWith("debian")) + return iconHolder->getIcon("debian"); + if (os.startsWith("ubuntu")) + return iconHolder->getIcon("ubuntu"); + if (os.startsWith("win")) + return iconHolder->getIcon("windows"); + if (os.contains("linux")) + return iconHolder->getIcon("linux"); } - // Everything failed, try to guess the OS - QString os(getAttribute("os", "param").toLower()); - if (!os.isEmpty()) { - QIcon osi = iconHolder->getIcon(os); - if (!osi.isNull()) - return osi; - // These match vmware guestOS keywords mostly, extend for vbox... - if (os == "dos") - return iconHolder->getIcon("dos"); - if (os.startsWith("windows7")) - return iconHolder->getIcon("win7"); - if (os.startsWith("win31")) - return iconHolder->getIcon("win311"); - if (os.startsWith("windows8")) - return iconHolder->getIcon("win8"); - if (os.startsWith("win2000")) - return iconHolder->getIcon("win2000"); - if (os.startsWith("winxp")) - return iconHolder->getIcon("winxp"); - if (os.startsWith("debian")) - return iconHolder->getIcon("debian"); - if (os.startsWith("ubuntu")) - return iconHolder->getIcon("ubuntu"); - if (os.startsWith("win")) - return iconHolder->getIcon("windows"); - if (os.contains("linux")) - return iconHolder->getIcon("linux"); - } - // TODO: Maybe parse title of entry for an OS guess? - // Fallback to generic virtualizer icon - if (imgtype() == VMWARE) - return iconHolder->getIcon("vmware"); - if (imgtype() == VBOX) - return iconHolder->getIcon("virtualbox"); - return QIcon(); + // TODO: Maybe parse title of entry for an OS guess? + // Fallback to generic virtualizer icon + if (imgtype() == VMWARE) + return iconHolder->getIcon("vmware"); + if (imgtype() == VBOX) + return iconHolder->getIcon("virtualbox"); + return QIcon(); } QString VSession::toXml() const { diff --git a/src/xsession.cpp b/src/xsession.cpp index 7e19e76..34593e1 100644 --- a/src/xsession.cpp +++ b/src/xsession.cpp @@ -76,7 +76,7 @@ bool XSession::isActive() const { } bool XSession::isValid() const { - return true; + return true; } bool XSession::isLocked() const { @@ -88,12 +88,12 @@ int XSession::priority() const { } QIcon XSession::icon() const { - QIcon retIcon; + QIcon retIcon; if (!this->icon_.isEmpty()) { - retIcon = SessionsIconHolder::get()->getIcon(this->icon_); - } - if (retIcon.isNull()) { - QString icon; + retIcon = SessionsIconHolder::get()->getIcon(this->icon_); + } + if (retIcon.isNull()) { + QString icon; if (this->exec_.contains("kde", Qt::CaseInsensitive)) { icon = "kde"; } else if (this->exec_.contains("gnome", Qt::CaseInsensitive)) { @@ -109,7 +109,7 @@ QIcon XSession::icon() const { } retIcon = SessionsIconHolder::get()->getIcon(icon); } - return retIcon; + return retIcon; } bool XSession::run() const { |