Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Qt 5.11 updates #19

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ ui_
massif.out.*
ms_print.*
doc/

.qmake.stash
5 changes: 3 additions & 2 deletions arora.pro
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
lessThan(QT_VERSION, 4.5) {
error("Arora requires Qt 4.5 or greater")
lessThan(QT_VERSION, 5.0) {
error("Arora requires Qt 5.0 or greater")
}

TEMPLATE = subdirs
Expand All @@ -13,3 +13,4 @@ unix {
doxygen.depends = Doxyfile
QMAKE_EXTRA_TARGETS += doxygen
}

6 changes: 4 additions & 2 deletions autotests/adblock/adblockmanager/tst_adblockmanager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,17 @@
* SUCH DAMAGE.
*/

#include <qtest.h>
#include <qsignalspy.h>
#include <qtry.h>

#include "adblockdialog.h"
#include "adblockmanager.h"
#include "adblocksubscription.h"

#include <qdebug.h>
#include <QSignalSpy>
#include <QTest>
#include <QUrl>


class tst_AdBlockManager : public QObject
{
Expand Down
32 changes: 16 additions & 16 deletions autotests/cookiejar/tst_cookiejar.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ void tst_CookieJar::cookiejar()
jar.call_cookiesChanged();
QCOMPARE(jar.call_isOnDomainList(QStringList(), QString()), false);
#endif
QSKIP("Test is not implemented.", SkipAll);
QSKIP("Test is not implemented.");
}

Q_DECLARE_METATYPE(CookieJar::AcceptPolicy)
Expand All @@ -152,7 +152,7 @@ void tst_CookieJar::acceptPolicy()

QCOMPARE(spy0.count(), 0);
#endif
QSKIP("Test is not implemented.", SkipAll);
QSKIP("Test is not implemented.");
}

void tst_CookieJar::allowedCookies_data()
Expand All @@ -177,7 +177,7 @@ void tst_CookieJar::allowedCookies()

QCOMPARE(spy0.count(), 0);
#endif
QSKIP("Test is not implemented.", SkipAll);
QSKIP("Test is not implemented.");
}

void tst_CookieJar::allowForSessionCookies_data()
Expand All @@ -202,7 +202,7 @@ void tst_CookieJar::allowForSessionCookies()

QCOMPARE(spy0.count(), 0);
#endif
QSKIP("Test is not implemented.", SkipAll);
QSKIP("Test is not implemented.");
}

void tst_CookieJar::blockedCookies_data()
Expand All @@ -227,7 +227,7 @@ void tst_CookieJar::blockedCookies()

QCOMPARE(spy0.count(), 0);
#endif
QSKIP("Test is not implemented.", SkipAll);
QSKIP("Test is not implemented.");
}

void tst_CookieJar::clear_data()
Expand All @@ -251,7 +251,7 @@ void tst_CookieJar::clear()

QCOMPARE(spy0.count(), 0);
#endif
QSKIP("Test is not implemented.", SkipAll);
QSKIP("Test is not implemented.");
}

void tst_CookieJar::cookiesForUrl_data()
Expand All @@ -278,7 +278,7 @@ void tst_CookieJar::cookiesForUrl()

QCOMPARE(spy0.count(), 0);
#endif
QSKIP("Test is not implemented.", SkipAll);
QSKIP("Test is not implemented.");
}

Q_DECLARE_METATYPE(CookieJar::KeepPolicy)
Expand All @@ -304,7 +304,7 @@ void tst_CookieJar::keepPolicy()

QCOMPARE(spy0.count(), 0);
#endif
QSKIP("Test is not implemented.", SkipAll);
QSKIP("Test is not implemented.");
}

void tst_CookieJar::loadSettings_data()
Expand All @@ -328,7 +328,7 @@ void tst_CookieJar::loadSettings()

QCOMPARE(spy0.count(), 0);
#endif
QSKIP("Test is not implemented.", SkipAll);
QSKIP("Test is not implemented.");
}

void tst_CookieJar::setAcceptPolicy_data()
Expand All @@ -353,7 +353,7 @@ void tst_CookieJar::setAcceptPolicy()

QCOMPARE(spy0.count(), 0);
#endif
QSKIP("Test is not implemented.", SkipAll);
QSKIP("Test is not implemented.");
}

void tst_CookieJar::setAllowedCookies_data()
Expand All @@ -378,7 +378,7 @@ void tst_CookieJar::setAllowedCookies()

QCOMPARE(spy0.count(), 0);
#endif
QSKIP("Test is not implemented.", SkipAll);
QSKIP("Test is not implemented.");
}

void tst_CookieJar::setAllowForSessionCookies_data()
Expand All @@ -403,7 +403,7 @@ void tst_CookieJar::setAllowForSessionCookies()

QCOMPARE(spy0.count(), 0);
#endif
QSKIP("Test is not implemented.", SkipAll);
QSKIP("Test is not implemented.");
}

void tst_CookieJar::setBlockedCookies_data()
Expand All @@ -428,7 +428,7 @@ void tst_CookieJar::setBlockedCookies()

QCOMPARE(spy0.count(), 0);
#endif
QSKIP("Test is not implemented.", SkipAll);
QSKIP("Test is not implemented.");
}

void tst_CookieJar::setCookiesFromUrl_data()
Expand Down Expand Up @@ -457,7 +457,7 @@ void tst_CookieJar::setCookiesFromUrl()

QCOMPARE(spy0.count(), 0);
#endif
QSKIP("Test is not implemented.", SkipAll);
QSKIP("Test is not implemented.");
}

void tst_CookieJar::setKeepPolicy_data()
Expand All @@ -482,7 +482,7 @@ void tst_CookieJar::setKeepPolicy()

QCOMPARE(spy0.count(), 0);
#endif
QSKIP("Test is not implemented.", SkipAll);
QSKIP("Test is not implemented.");
}

void tst_CookieJar::cookiesChanged_data()
Expand All @@ -506,7 +506,7 @@ void tst_CookieJar::cookiesChanged()

QCOMPARE(spy0.count(), 0);
#endif
QSKIP("Test is not implemented.", SkipAll);
QSKIP("Test is not implemented.");
}

void tst_CookieJar::isOnDomainList_data()
Expand Down
8 changes: 4 additions & 4 deletions autotests/downloadmanager/tst_downloadmanager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ void tst_DownloadManager::init()
QSettings settings;
settings.clear();

QFile file(QDesktopServices::storageLocation(QDesktopServices::DesktopLocation) + '/' + BIGFILENAME);
QFile file(QStandardPaths::writableLocation(QStandardPaths::DesktopLocation) + '/' + BIGFILENAME);
file.remove();
}

Expand Down Expand Up @@ -149,7 +149,7 @@ void tst_DownloadManager::cleanupButton()
}
}

QFile file(QDesktopServices::storageLocation(QDesktopServices::DesktopLocation) + '/' + BIGFILENAME);
QFile file(QStandardPaths::writableLocation(QStandardPaths::DesktopLocation) + '/' + BIGFILENAME);
QCOMPARE(file.exists(), true);
file.remove();
}
Expand Down Expand Up @@ -200,7 +200,7 @@ void tst_DownloadManager::download()
}

for (int i = 0; i < requestfilename.count(); ++i) {
QFile file(QDesktopServices::storageLocation(QDesktopServices::DesktopLocation) + '/' + requestfilename[i]);
QFile file(QStandardPaths::writableLocation(QStandardPaths::DesktopLocation) + '/' + requestfilename[i]);
// bad file stil returns a 404 webpage
QVERIFY(file.exists());
file.remove();
Expand Down Expand Up @@ -237,7 +237,7 @@ void tst_DownloadManager::removePolicy()
QCOMPARE(view->model()->rowCount(), (removePolicy == DownloadManager::SuccessFullDownload) ? 0 : 1);
}

QFile file(QDesktopServices::storageLocation(QDesktopServices::DesktopLocation) + '/' + BIGFILENAME);
QFile file(QStandardPaths::writableLocation(QStandardPaths::DesktopLocation) + '/' + BIGFILENAME);
file.remove();

SubDownloadManager manager;
Expand Down
28 changes: 16 additions & 12 deletions autotests/opensearchengine/tst_opensearchengine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
* Boston, MA 02110-1301 USA
*/

#include <qtest.h>
#include <QtTest/QtTest>
#include "qtry.h"
#include "opensearchengine.h"
#include "opensearchenginedelegate.h"
Expand All @@ -29,7 +29,6 @@
#include <qnetworkaccessmanager.h>
#include <qnetworkreply.h>
#include <qnetworkrequest.h>
#include <qsignalspy.h>
#include <qtimer.h>

typedef OpenSearchEngine::Parameters Parameters;
Expand Down Expand Up @@ -866,8 +865,10 @@ void tst_OpenSearchEngine::delegate()
QCOMPARE(delegate.lastData, QByteArray());
QNetworkRequest request(QUrl(engine.call_parseTemplate(QString("baz"), engine.searchUrlTemplate())));
QCOMPARE(delegate.lastRequest, request);
QVERIFY(delegate.lastRequest.url().hasQueryItem("q"));
QCOMPARE(delegate.lastRequest.url().queryItemValue("q"), QString("baz"));

QUrlQuery urlQuery(delegate.lastRequest.url().query());
QVERIFY(urlQuery.hasQueryItem("q"));
QCOMPARE(urlQuery.queryItemValue("q"), QString("baz"));

engine.setSearchParameters(Parameters() << Parameter("a", "b") << Parameter("b", "c"));
engine.requestSearchResults(QString("baz"));
Expand All @@ -876,12 +877,13 @@ void tst_OpenSearchEngine::delegate()
QCOMPARE(delegate.lastOperation, QNetworkAccessManager::GetOperation);
QCOMPARE(delegate.lastData, QByteArray());

QVERIFY(delegate.lastRequest.url().hasQueryItem("a"));
QCOMPARE(delegate.lastRequest.url().queryItemValue("a"), QString("b"));
QVERIFY(delegate.lastRequest.url().hasQueryItem("b"));
QCOMPARE(delegate.lastRequest.url().queryItemValue("b"), QString("c"));
QVERIFY(delegate.lastRequest.url().hasQueryItem("q"));
QCOMPARE(delegate.lastRequest.url().queryItemValue("q"), QString("baz"));
QUrlQuery q2(delegate.lastRequest.url().query());
QVERIFY(q2.hasQueryItem("a"));
QCOMPARE(q2.queryItemValue("a"), QString("b"));
QVERIFY(q2.hasQueryItem("b"));
QCOMPARE(q2.queryItemValue("b"), QString("c"));
QVERIFY(q2.hasQueryItem("q"));
QCOMPARE(q2.queryItemValue("q"), QString("baz"));

QUrl url(engine.call_parseTemplate(QString("baz"), engine.searchUrlTemplate()));
QCOMPARE(delegate.lastRequest.url().toString(QUrl::RemoveQuery), url.toString(QUrl::RemoveQuery));
Expand All @@ -893,8 +895,10 @@ void tst_OpenSearchEngine::delegate()
QCOMPARE(delegate.lastOperation, QNetworkAccessManager::PostOperation);
request = QNetworkRequest(QUrl(engine.call_parseTemplate(QString("baz"), engine.searchUrlTemplate())));
QCOMPARE(delegate.lastRequest, request);
QVERIFY(delegate.lastRequest.url().hasQueryItem("q"));
QCOMPARE(delegate.lastRequest.url().queryItemValue("q"), QString("baz"));

QUrlQuery q3(delegate.lastRequest.url().query());
QVERIFY(q3.hasQueryItem("q"));
QCOMPARE(q3.queryItemValue("q"), QString("baz"));

QVERIFY(!delegate.lastData.isEmpty());
QStringList query = QString(delegate.lastData).split('&');
Expand Down
2 changes: 1 addition & 1 deletion autotests/qtest_arora.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
#ifndef QTEST_ARORA_H
#define QTEST_ARORA_H

#include <qtest.h>
#include <QtTest/QtTest>

#include <browserapplication.h>

Expand Down
2 changes: 0 additions & 2 deletions autotests/qtry.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,6 @@
#ifndef QTRY_H
#define QTRY_H

#include <qtest.h>

#ifndef QTRY_COMPARE

#define __TRY_TIMEOUT__ 5000
Expand Down
1 change: 1 addition & 0 deletions autotests/tabbar/tst_tabbar.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@

#include <QtGui/QtGui>
#include <QtTest/QtTest>
#include <QAction>
#include <tabbar.h>

class tst_TabBar : public QObject
Expand Down
Loading