diff options
author | Ken Moore <ken@ixsystems.com> | 2017-04-27 23:46:38 -0400 |
---|---|---|
committer | Ken Moore <ken@ixsystems.com> | 2017-04-27 23:46:38 -0400 |
commit | a7c84ffef7e3cd653c179034551003cb150dc204 (patch) | |
tree | d3f0b768c25ad396e8e43b758cd56343cad9b8b5 | |
parent | Fix up the battery icons when charging. (diff) | |
parent | update qnotify for variable output (diff) | |
download | lumina-a7c84ffef7e3cd653c179034551003cb150dc204.tar.gz lumina-a7c84ffef7e3cd653c179034551003cb150dc204.tar.bz2 lumina-a7c84ffef7e3cd653c179034551003cb150dc204.zip |
Merge branch 'master' of github.com:trueos/lumina
-rw-r--r-- | src-qt5/core/lumina-desktop/desktop-plugins/rssreader/RSSObjects.cpp | 8 | ||||
-rw-r--r-- | src-qt5/desktop-utils/lumina-notify/main.cpp | 15 |
2 files changed, 15 insertions, 8 deletions
diff --git a/src-qt5/core/lumina-desktop/desktop-plugins/rssreader/RSSObjects.cpp b/src-qt5/core/lumina-desktop/desktop-plugins/rssreader/RSSObjects.cpp index 0a805252..cd29d5f0 100644 --- a/src-qt5/core/lumina-desktop/desktop-plugins/rssreader/RSSObjects.cpp +++ b/src-qt5/core/lumina-desktop/desktop-plugins/rssreader/RSSObjects.cpp @@ -79,6 +79,7 @@ void RSSReader::removeUrl(QString ID){ // PUBLIC SLOTS //================= void RSSReader::syncNow(){ + outstandingURLS.clear(); QStringList urls = hash.keys(); for(int i=0; i<urls.length(); i++){ requestRSS(hash[urls[i]].originalURL); @@ -245,11 +246,12 @@ void RSSReader::replyFinished(QNetworkReply *reply){ //RSS reply RSSchannel info = readRSS(data); //QNetworkReply can be used as QIODevice reply->deleteLater(); //clean up - //Validate the info and announce any changes - if(info.title.isEmpty() || info.link.isEmpty() || info.description.isEmpty()){ - qDebug() << "Missing XML Information:" << url << info.title << info.link << info.description; + //Validate the info and announce any changes (4/21/17 - make the description optional even if RSS format requires it - Ken Moore) + if(info.title.isEmpty() || info.link.isEmpty() ){ + qDebug() << "Missing XML Information:" << url << info.title << info.link; return; } //bad info/read + //Update the bookkeeping elements of the info if(info.timetolive<=0){ info.timetolive = LSession::handle()->DesktopPluginSettings()->value(setprefix+"default_interval_minutes", 60).toInt(); } if(info.timetolive <=0){ info.timetolive = 60; } //error in integer conversion from settings? diff --git a/src-qt5/desktop-utils/lumina-notify/main.cpp b/src-qt5/desktop-utils/lumina-notify/main.cpp index f9d76f28..c0e3bd05 100644 --- a/src-qt5/desktop-utils/lumina-notify/main.cpp +++ b/src-qt5/desktop-utils/lumina-notify/main.cpp @@ -1,19 +1,24 @@ //------------------------------------------------- -// Created by q5sys +// Created by q5sys (JT) // Released under MIT License 2017-03-08 // A Simple GUI Dialog Program //------------------------------------------------- #include <QApplication> #include <QMessageBox> +#include <QDebug> +#include <QTextStream> int main(int argc, char *argv[]) { QApplication a(argc, argv); + int answer; QMessageBox *messageBox = new QMessageBox; messageBox->setText(argv[1]); - QPushButton *pushButtonOk = messageBox->addButton(argv[2], QMessageBox::YesRole); - messageBox->QDialog::setWindowTitle(argv[3]); - messageBox->show(); - return a.exec(); + QPushButton *pushButtonOk = messageBox->addButton(argv[2], QMessageBox::AcceptRole); + QPushButton *pushButtonNo = messageBox->addButton(argv[3], QMessageBox::RejectRole); + messageBox->QDialog::setWindowTitle(argv[4]); + messageBox->show(); + if(messageBox->exec() == QMessageBox::AcceptRole){ answer = 0; QTextStream cout(stdout); cout << answer;} + else { answer = 1; QTextStream cout(stdout); cout << answer;} } |