1
mirror of https://invent.kde.org/network/falkon.git synced 2024-09-21 17:52:10 +02:00

[Windows][Tests] Fixed compile issues on Windows.

This commit is contained in:
S. Razi Alavizadeh 2013-06-08 23:33:49 +04:30
parent 2abf37ed37
commit 5ea3572368
10 changed files with 26 additions and 7 deletions

View File

@ -57,7 +57,7 @@ class QUrl;
class AdBlockSubscription; class AdBlockSubscription;
class AdBlockRule class QT_QUPZILLA_EXPORT AdBlockRule
{ {
public: public:
AdBlockRule(const QString &filter = QString(), AdBlockSubscription* subscription = 0); AdBlockRule(const QString &filter = QString(), AdBlockSubscription* subscription = 0);

View File

@ -38,7 +38,7 @@ struct PageFormData {
} }
}; };
class PageFormCompleter class QT_QUPZILLA_EXPORT PageFormCompleter
{ {
public: public:
explicit PageFormCompleter(QWebPage* page); explicit PageFormCompleter(QWebPage* page);

View File

@ -19,8 +19,9 @@
#define DATABASEPASSWORDBACKEND_H #define DATABASEPASSWORDBACKEND_H
#include "passwordbackend.h" #include "passwordbackend.h"
#include "qz_namespace.h"
class DatabasePasswordBackend : public PasswordBackend class QT_QUPZILLA_EXPORT DatabasePasswordBackend : public PasswordBackend
{ {
public: public:
explicit DatabasePasswordBackend(); explicit DatabasePasswordBackend();

View File

@ -19,10 +19,11 @@
#define PASSWORDBACKEND_H #define PASSWORDBACKEND_H
#include "passwordmanager.h" #include "passwordmanager.h"
#include "qz_namespace.h"
class QWidget; class QWidget;
class PasswordBackend class QT_QUPZILLA_EXPORT PasswordBackend
{ {
public: public:
explicit PasswordBackend(); explicit PasswordBackend();

View File

@ -21,6 +21,8 @@
#include <QObject> #include <QObject>
#include <QScriptValue> #include <QScriptValue>
#include "qz_namespace.h"
class QScriptContext; class QScriptContext;
class QScriptEngine; class QScriptEngine;
@ -29,7 +31,7 @@ class QScriptEngine;
* *
* Based on qt-examples: https://gitorious.org/qt-examples/qt-examples/blobs/master/pac-files * Based on qt-examples: https://gitorious.org/qt-examples/qt-examples/blobs/master/pac-files
*/ */
class ProxyAutoConfig : public QObject class QT_QUPZILLA_EXPORT ProxyAutoConfig : public QObject
{ {
Q_OBJECT Q_OBJECT

View File

@ -34,7 +34,7 @@ public:
explicit Updater(QupZilla* mainClass, QObject* parent = 0); explicit Updater(QupZilla* mainClass, QObject* parent = 0);
~Updater(); ~Updater();
struct Version { struct QT_QUPZILLA_EXPORT Version {
bool isValid; bool isValid;
int majorVersion; int majorVersion;
int minorVersion; int minorVersion;

View File

@ -11,10 +11,11 @@ TARGET = autotests
!mac:unix: LIBS += $$PWD/../../bin/libQupZilla.so !mac:unix: LIBS += $$PWD/../../bin/libQupZilla.so
# Link plugins for PasswordBackends # Link plugins for PasswordBackends
!win32 {
!unix|mac: LIBS += -L$$PWD/../../bin/plugins -lGnomeKeyringPasswords -lKWalletPasswords !unix|mac: LIBS += -L$$PWD/../../bin/plugins -lGnomeKeyringPasswords -lKWalletPasswords
!mac:unix: LIBS += $$PWD/../../bin/plugins/libGnomeKeyringPasswords.so \ !mac:unix: LIBS += $$PWD/../../bin/plugins/libGnomeKeyringPasswords.so \
$$PWD/../../bin/plugins/libKWalletPasswords.so $$PWD/../../bin/plugins/libKWalletPasswords.so
}
unix:contains(DEFINES, "NO_SYSTEM_DATAPATH"): QMAKE_LFLAGS+=$${QMAKE_LFLAGS_RPATH}\\$\$ORIGIN unix:contains(DEFINES, "NO_SYSTEM_DATAPATH"): QMAKE_LFLAGS+=$${QMAKE_LFLAGS_RPATH}\\$\$ORIGIN

View File

@ -49,8 +49,10 @@ int main(int argc, char *argv[])
RUN_TEST(DatabasePasswordBackendTest) RUN_TEST(DatabasePasswordBackendTest)
RUN_TEST(DatabaseEncryptedPasswordBackendTest) RUN_TEST(DatabaseEncryptedPasswordBackendTest)
#ifndef Q_OS_WIN
RUN_TEST(KWalletPasswordBackendTest) RUN_TEST(KWalletPasswordBackendTest)
RUN_TEST(GnomeKeyringPasswordBackendTest) RUN_TEST(GnomeKeyringPasswordBackendTest)
#endif
return 0; return 0;
} }

View File

@ -23,7 +23,11 @@
#include <QSqlQuery> #include <QSqlQuery>
#include <QDebug> #include <QDebug>
#ifdef Q_OS_WIN
#include "qt_windows.h"
#else
#include "unistd.h" #include "unistd.h"
#endif
static bool compareEntries(const PasswordEntry &value, const PasswordEntry &ref) static bool compareEntries(const PasswordEntry &value, const PasswordEntry &ref)
{ {
@ -186,7 +190,11 @@ void PasswordBackendTest::updateLastUsedTest()
entry.data = "entry1-data=23&username=user1&password=pass1"; entry.data = "entry1-data=23&username=user1&password=pass1";
m_backend->addEntry(entry); m_backend->addEntry(entry);
#ifdef Q_OS_WIN
Sleep(1000);
#else
sleep(1); sleep(1);
#endif
entry.username.append("s"); entry.username.append("s");
m_backend->addEntry(entry); m_backend->addEntry(entry);
@ -259,6 +267,7 @@ void DatabaseEncryptedPasswordBackendTest::cleanup()
QSqlDatabase::removeDatabase(QSqlDatabase::database().databaseName()); QSqlDatabase::removeDatabase(QSqlDatabase::database().databaseName());
} }
#ifndef Q_OS_WIN
// KWalletPassswordBackendTest // KWalletPassswordBackendTest
void KWalletPasswordBackendTest::reloadBackend() void KWalletPasswordBackendTest::reloadBackend()
{ {
@ -273,3 +282,4 @@ void GnomeKeyringPasswordBackendTest::reloadBackend()
delete m_backend; delete m_backend;
m_backend = new GnomeKeyringPasswordBackend; m_backend = new GnomeKeyringPasswordBackend;
} }
#endif

View File

@ -75,6 +75,7 @@ protected:
void cleanup(); void cleanup();
}; };
#ifndef Q_OS_WIN
#include "../../src/plugins/KWalletPasswords/kwalletpasswordbackend.h" #include "../../src/plugins/KWalletPasswords/kwalletpasswordbackend.h"
class KWalletPasswordBackendTest : public PasswordBackendTest class KWalletPasswordBackendTest : public PasswordBackendTest
@ -94,5 +95,6 @@ class GnomeKeyringPasswordBackendTest : public PasswordBackendTest
protected: protected:
void reloadBackend(); void reloadBackend();
}; };
#endif
#endif // PASSWORDBACKENDTEST_H #endif // PASSWORDBACKENDTEST_H