summaryrefslogtreecommitdiffstats
path: root/src/main.cpp
diff options
context:
space:
mode:
authorSimon Rettberg2016-01-19 16:25:04 +0100
committerSimon Rettberg2016-01-19 16:25:04 +0100
commitfa7744f11f110ed4ed24a6270cc963abfa99a2b0 (patch)
tree715b458b24d0c673897bab07666fb12403105eb5 /src/main.cpp
parentFix selection of last session if session was a VM (diff)
downloadvmchooser2-fa7744f11f110ed4ed24a6270cc963abfa99a2b0.tar.gz
vmchooser2-fa7744f11f110ed4ed24a6270cc963abfa99a2b0.tar.xz
vmchooser2-fa7744f11f110ed4ed24a6270cc963abfa99a2b0.zip
Add support for locations query
Diffstat (limited to 'src/main.cpp')
-rw-r--r--src/main.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/main.cpp b/src/main.cpp
index 83c93de..4d0053e 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -34,6 +34,7 @@ int main(int argc, char *argv[]) {
" -b --base base directory where VM images are accessible\n"
" -d, --default name of default session\n"
" -c, --config alternative config file\n"
+ " -l, --location location id(s), space separated\n"
" -P, --pool one or more pool names to display (comma separated)\n"
" -f, --file direct boot .desktop file\n"
" -x, --xpath path of X Session .desktop files\n"
@@ -204,6 +205,11 @@ int main(int argc, char *argv[]) {
defaultTab = cmdOptions.value("tab").toInt();
}
+ QString locationIds;
+ if (cmdOptions.contains("locations")) {
+ locationIds = cmdOptions.value("locations");
+ }
+
/* read session files */
QList<Session*> xsessions(XSession::readSessions(xSessionPath));
@@ -215,7 +221,7 @@ int main(int argc, char *argv[]) {
SLOT(addSessionsAfterDownload(QNetworkReply*)));
// read xml and add items later
- httpxmldownloader.makeRequest(urlBase + "list.php");
+ httpxmldownloader.makeRequest(urlBase + "list.php", locationIds);
/* DOWNLOAD NEWS */
HttpXmlDownloader news_downloader;