diff options
author | Nils Schwabe | 2014-03-06 16:02:08 +0100 |
---|---|---|
committer | Nils Schwabe | 2014-03-06 16:02:08 +0100 |
commit | b1117bb9e31018460b5adc05428842555d47c1b9 (patch) | |
tree | c472454b3e795bf2a3712899653a5d166dfb8645 /src/main.cpp | |
parent | - included the --url commandline options for a xml url (diff) | |
download | vmchooser2-b1117bb9e31018460b5adc05428842555d47c1b9.tar.gz vmchooser2-b1117bb9e31018460b5adc05428842555d47c1b9.tar.xz vmchooser2-b1117bb9e31018460b5adc05428842555d47c1b9.zip |
vmchooser is now able to get vsessions from a given url
Diffstat (limited to 'src/main.cpp')
-rw-r--r-- | src/main.cpp | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/src/main.cpp b/src/main.cpp index 365287e..3c16e17 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -187,18 +187,16 @@ int main(int argc, char *argv[]) { QList<Session*> xsessions(XSession::readSessions(xSessionPath)); QList<Session*> vsessions(VSession::readXmlDir(vSessionPath)); - /* add sessions from remote xml if possible */ + Dialog w; + httpxmldownloader httpxmldownloader; + httpxmldownloader.connectSlot(&w, SLOT(addSessionsAfterDownload(QNetworkReply*))); + if (!vSessionUrl.isEmpty()) { - vsessions.append(VSession::readXmlUrl(vSessionUrl, httpxmldownloader)); - } else { - if (debugMode) { - qDebug() << "empty URl given"; - } + // read xml and add items later + httpxmldownloader.makeRequest(vSessionUrl); } - Dialog w; - w.setTheme(); w.setWindowFlags(Qt::FramelessWindowHint); |