From 96213bebe45837ef7e6175106cb48c4a186fc001 Mon Sep 17 00:00:00 2001 From: Willem Liu Date: Sun, 6 Nov 2011 01:15:48 +0100 Subject: [PATCH] Added prompt for deleting list. --- changelog.txt | 6 ++++++ debian/changelog | 6 +++--- debian/copyright | 2 +- mainform.cpp | 23 ++++++++++++++--------- qtc_packaging/debian_fremantle/changelog | 6 +++--- qtc_packaging/debian_fremantle/copyright | 2 +- systemsettings.cpp | 4 ++-- 7 files changed, 30 insertions(+), 19 deletions(-) diff --git a/changelog.txt b/changelog.txt index 5691991..e82015e 100755 --- a/changelog.txt +++ b/changelog.txt @@ -1,3 +1,9 @@ +easylist (0.3.27) unstable; urgency=low + + * Added confirmation prompt when deleting List. + + -- Willem Liu Thu, 05 May 2011 10:43:11 +0200 + easylist (0.3.26) unstable; urgency=low * Changed default sync website to http://easylist.willemliu.nl diff --git a/debian/changelog b/debian/changelog index 8b9869c..174ac1d 100755 --- a/debian/changelog +++ b/debian/changelog @@ -1,5 +1,5 @@ -easylist (0.3.27) unstable; urgency=low +easylist (0.3.28) unstable; urgency=low - * Added confirmation prompt when deleting List. + * Added confirmation prompt when syncing List. - -- Willem Liu Thu, 05 May 2011 10:43:11 +0200 + -- Willem Liu Fri, 06 May 2011 10:42:28 +0200 diff --git a/debian/copyright b/debian/copyright index d4df08b..393cd8e 100755 --- a/debian/copyright +++ b/debian/copyright @@ -1,5 +1,5 @@ This package was debianized by Willem Liu on -Thu, 05 May 2011 10:43:11 +0200. +Fri, 06 May 2011 10:42:28 +0200. It was downloaded from diff --git a/mainform.cpp b/mainform.cpp index 0c61735..1be0d42 100755 --- a/mainform.cpp +++ b/mainform.cpp @@ -198,7 +198,7 @@ void MainForm::on_actionAuto_Orientation_triggered() qDebug() << "Auto orientation" << ui->actionAuto_Orientation->isChecked(); if(ui->actionAuto_Orientation->isChecked()) { -#ifdef Q_WS_MAEMO_5 +#if defined(Q_WS_MAEMO_5) || defined(Q_WS_HILDON) setAttribute(Qt::WA_Maemo5PortraitOrientation, false); setAttribute(Qt::WA_Maemo5LandscapeOrientation, false); setAttribute(Qt::WA_Maemo5AutoOrientation, true); @@ -224,14 +224,19 @@ void MainForm::on_actionLists_triggered() void MainForm::on_actionSync_triggered() { - QString username = settings->value(USERNAME, "").toString(); - QString password = settings->value(PASSWORD, "").toString(); - QString url = settings->value(SYNC_URL, DEFAULT_SYNC_URL).toString(); - url.append("?username=" + username); - url.append("&password=" + password); - qDebug() << url; - requestWebpage->post(url,settings->value(LIST_TEXT,"").toString().toUtf8()); - //requestWebpage->fetch(url); + int res = QMessageBox::warning(this, "Synchronize list", "If you haven't saved your current list under a list name other than SyncList then it will be overwritten by the items on the website.", QMessageBox::Ok, QMessageBox::Cancel); + + if(res == QMessageBox::Ok) + { + QString username = settings->value(USERNAME, "").toString(); + QString password = settings->value(PASSWORD, "").toString(); + QString url = settings->value(SYNC_URL, DEFAULT_SYNC_URL).toString(); + url.append("?username=" + username); + url.append("&password=" + password); + qDebug() << url; + requestWebpage->post(url,settings->value(LIST_TEXT,"").toString().toUtf8()); + //requestWebpage->fetch(url); + } } void MainForm::slotSyncList(QNetworkReply* pReply) diff --git a/qtc_packaging/debian_fremantle/changelog b/qtc_packaging/debian_fremantle/changelog index 8b9869c..174ac1d 100755 --- a/qtc_packaging/debian_fremantle/changelog +++ b/qtc_packaging/debian_fremantle/changelog @@ -1,5 +1,5 @@ -easylist (0.3.27) unstable; urgency=low +easylist (0.3.28) unstable; urgency=low - * Added confirmation prompt when deleting List. + * Added confirmation prompt when syncing List. - -- Willem Liu Thu, 05 May 2011 10:43:11 +0200 + -- Willem Liu Fri, 06 May 2011 10:42:28 +0200 diff --git a/qtc_packaging/debian_fremantle/copyright b/qtc_packaging/debian_fremantle/copyright index d4df08b..393cd8e 100755 --- a/qtc_packaging/debian_fremantle/copyright +++ b/qtc_packaging/debian_fremantle/copyright @@ -1,5 +1,5 @@ This package was debianized by Willem Liu on -Thu, 05 May 2011 10:43:11 +0200. +Fri, 06 May 2011 10:42:28 +0200. It was downloaded from diff --git a/systemsettings.cpp b/systemsettings.cpp index 5cd7d88..b8c1b4f 100755 --- a/systemsettings.cpp +++ b/systemsettings.cpp @@ -7,7 +7,7 @@ SystemSettings::SystemSettings() { ++instances; settings = new QSettings(WILLEM_LIU, EASY_LIST); -#ifdef Q_WS_MAEMO_5 +#if defined(Q_WS_MAEMO_5) || defined(Q_WS_HILDON) || defined(MEEGO_EDITION_HARMATTAN) // Connect to DBUS of keyboard slider. QDBusConnection::systemBus().connect(QString("org.freedesktop.Hal"), DBUS_KEYBOARD_SLIDE, @@ -34,7 +34,7 @@ void SystemSettings::slotKeyboardSlide() bool SystemSettings::getKeyboardClosed() { bool closed = false; -#ifdef Q_WS_MAEMO_5 +#if defined(Q_WS_MAEMO_5) || defined(Q_WS_HILDON) || defined(MEEGO_EDITION_HARMATTAN) QDBusInterface propertyInterface("org.freedesktop.Hal", DBUS_KEYBOARD_SLIDE, "org.freedesktop.Hal.Device", -- 1.7.9.5