1
mirror of https://invent.kde.org/network/falkon.git synced 2024-09-21 09:42: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 AdBlockRule
class QT_QUPZILLA_EXPORT AdBlockRule
{
public:
AdBlockRule(const QString &filter = QString(), AdBlockSubscription* subscription = 0);

View File

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

View File

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

View File

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

View File

@ -21,6 +21,8 @@
#include <QObject>
#include <QScriptValue>
#include "qz_namespace.h"
class QScriptContext;
class QScriptEngine;
@ -29,7 +31,7 @@ class QScriptEngine;
*
* 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

View File

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

View File

@ -11,10 +11,11 @@ TARGET = autotests
!mac:unix: LIBS += $$PWD/../../bin/libQupZilla.so
# Link plugins for PasswordBackends
!win32 {
!unix|mac: LIBS += -L$$PWD/../../bin/plugins -lGnomeKeyringPasswords -lKWalletPasswords
!mac:unix: LIBS += $$PWD/../../bin/plugins/libGnomeKeyringPasswords.so \
$$PWD/../../bin/plugins/libKWalletPasswords.so
}
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(DatabaseEncryptedPasswordBackendTest)
#ifndef Q_OS_WIN
RUN_TEST(KWalletPasswordBackendTest)
RUN_TEST(GnomeKeyringPasswordBackendTest)
#endif
return 0;
}

View File

@ -23,7 +23,11 @@
#include <QSqlQuery>
#include <QDebug>
#ifdef Q_OS_WIN
#include "qt_windows.h"
#else
#include "unistd.h"
#endif
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";
m_backend->addEntry(entry);
#ifdef Q_OS_WIN
Sleep(1000);
#else
sleep(1);
#endif
entry.username.append("s");
m_backend->addEntry(entry);
@ -259,6 +267,7 @@ void DatabaseEncryptedPasswordBackendTest::cleanup()
QSqlDatabase::removeDatabase(QSqlDatabase::database().databaseName());
}
#ifndef Q_OS_WIN
// KWalletPassswordBackendTest
void KWalletPasswordBackendTest::reloadBackend()
{
@ -273,3 +282,4 @@ void GnomeKeyringPasswordBackendTest::reloadBackend()
delete m_backend;
m_backend = new GnomeKeyringPasswordBackend;
}
#endif

View File

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