{\r
qDebug() << "About";\r
QString aboutText;\r
- aboutText.append("<html>");\r
+ aboutText.append("<html><body>");\r
aboutText.append("EasyList (c) 2010-");\r
aboutText.append(QDate::currentDate().toString("yyyy"));\r
aboutText.append("<br><br>");\r
aboutText.append("Created by Willem Liu.<br>");\r
aboutText.append("Created with QtCreator.<br><br>");\r
aboutText.append("Please <a href='http://www.willemliu.nl/donate'>donate</a> any amount you deem this app is worthy to keep me going on.<br><br>");\r
- aboutText.append("</html>");\r
+ aboutText.append("</body></html>");\r
QMessageBox::about(this, "EasyList", aboutText);\r
}\r
\r
qDebug() << "Auto orientation" << ui->actionAuto_Orientation->isChecked();\r
if(ui->actionAuto_Orientation->isChecked())\r
{\r
-#ifdef Q_WS_MAEMO_5\r
+#if defined(Q_WS_MAEMO_5) || defined(Q_WS_HILDON)\r
setAttribute(Qt::WA_Maemo5PortraitOrientation, false);\r
setAttribute(Qt::WA_Maemo5LandscapeOrientation, false);\r
setAttribute(Qt::WA_Maemo5AutoOrientation, true);\r
\r
void MainForm::on_actionSync_triggered()\r
{\r
- QString username = settings->value(USERNAME, "").toString();\r
- QString password = settings->value(PASSWORD, "").toString();\r
- QString url = settings->value(SYNC_URL, DEFAULT_SYNC_URL).toString();\r
- url.append("?username=" + username);\r
- url.append("&password=" + password);\r
- qDebug() << url;\r
- requestWebpage->fetch(url);\r
+ 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);\r
+\r
+ if(res == QMessageBox::Ok)\r
+ {\r
+ QString username = settings->value(USERNAME, "").toString();\r
+ QString password = settings->value(PASSWORD, "").toString();\r
+ QString url = settings->value(SYNC_URL, DEFAULT_SYNC_URL).toString();\r
+ url.append("?username=" + username);\r
+ url.append("&password=" + password);\r
+ qDebug() << url;\r
+ requestWebpage->post(url,settings->value(LIST_TEXT,"").toString().toUtf8());\r
+ //requestWebpage->fetch(url);\r
+ }\r
}\r
\r
void MainForm::slotSyncList(QNetworkReply* pReply)\r
{\r
+ settings->setValue(LIST_TEXT, MyCheckBoxContainer::getInstance()->getListText());\r
+ SystemSettings::getInstance()->saveCurrentList();\r
QByteArray data=pReply->readAll();\r
- QString list(data);\r
+ QString list = QString::fromUtf8(data);\r
settings->setValue(LIST_TEXT, list);\r
settings->setValue(SELECTED_LIST_NAME, SYNC_LIST_NAME);\r
settings->setValue(SYNC_LIST_NAME, settings->value(LIST_TEXT, ""));\r