Fix building of the manual tests.

Adapt to API-changes, exclude network/SSL-tests for Windows.

Change-Id: I80d5ef1bd81e149a2f04fa7644376a8a88b1f7b9
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
This commit is contained in:
Friedemann Kleint 2013-03-12 14:38:21 +01:00 committed by The Qt Project
parent 3372b0faa7
commit 74494ea29e
4 changed files with 20 additions and 15 deletions

View File

@ -40,7 +40,8 @@ dialogs
!contains(QT_CONFIG, openssl):!contains(QT_CONFIG, openssl-linked):SUBDIRS -= qssloptions
# disable some tests on wince because of missing dependencies
wince*:SUBDIRS -= \
lance windowmodality \
network_remote_stresstest network_stresstest
win32 {
SUBDIRS -= network_remote_stresstest network_stresstest
# disable some tests on wince because of missing dependencies
wince*:SUBDIRS -= lance windowmodality
}

View File

@ -397,9 +397,9 @@ void CalendarWidget::createTextFormatsGroupBox()
QComboBox *CalendarWidget::createColorComboBox()
{
QComboBox *comboBox = new QComboBox;
comboBox->addItem(tr("Red"), Qt::red);
comboBox->addItem(tr("Blue"), Qt::blue);
comboBox->addItem(tr("Black"), Qt::black);
comboBox->addItem(tr("Magenta"), Qt::magenta);
comboBox->addItem(tr("Red"), QColor(Qt::red));
comboBox->addItem(tr("Blue"), QColor(Qt::blue));
comboBox->addItem(tr("Black"), QColor(Qt::black));
comboBox->addItem(tr("Magenta"), QColor(Qt::magenta));
return comboBox;
}

View File

@ -49,7 +49,7 @@
#include <QtNetwork/qsslconfiguration.h>
#include "../../auto/network-settings.h"
#ifdef QT_BUILD_INTERNAL
#if defined(QT_BUILD_INTERNAL) && !defined(QT_NO_SSL)
#include "private/qsslsocket_p.h"
#endif
@ -147,6 +147,9 @@ void tst_qnetworkreply::setSslConfiguration_data()
void tst_qnetworkreply::setSslConfiguration()
{
#ifdef QT_NO_SSL
QSKIP("SSL is not enabled.");
#else
QFETCH(QUrl, url);
QNetworkRequest request(url);
QSslConfiguration conf = request.sslConfiguration();
@ -171,6 +174,7 @@ void tst_qnetworkreply::setSslConfiguration()
QCOMPARE(reply->error(), QNetworkReply::SslHandshakeFailedError);
}
#endif
#endif // QT_NO_SSL
}
QTEST_MAIN(tst_qnetworkreply)

View File

@ -311,7 +311,7 @@ public:
, m_backingStore(new QBackingStore(this))
{
setObjectName(QStringLiteral("window"));
setWindowTitle(tr("TestWindow"));
setTitle(tr("TestWindow"));
}
protected:
@ -363,9 +363,9 @@ private:
virtual QPoint objectMapToGlobal(const QObject *o, const QPoint &p) const
{ return static_cast<const QWindow *>(o)->mapToGlobal(p); }
virtual Qt::WindowFlags objectWindowFlags(const QObject *o) const
{ return static_cast<const QWindow *>(o)->windowFlags(); }
{ return static_cast<const QWindow *>(o)->flags(); }
virtual void setObjectWindowFlags(QObject *o, Qt::WindowFlags f)
{ static_cast<QWindow *>(o)->setWindowFlags(f); }
{ static_cast<QWindow *>(o)->setFlags(f); }
WindowStateControl *m_stateControl;
};
@ -374,7 +374,7 @@ WindowControl::WindowControl(QWindow *w )
: BaseWindowControl(w)
, m_stateControl(new WindowStateControl(WindowStateControl::WantVisibleCheckBox | WindowStateControl::WantMinimizeRadioButton))
{
setTitle(w->windowTitle());
setTitle(w->title());
QGroupBox *stateGroupBox = new QGroupBox(tr("State"));
QVBoxLayout *l = new QVBoxLayout(stateGroupBox);
l->addWidget(m_stateControl);
@ -454,7 +454,7 @@ ControllerWidget::ControllerWidget(QWidget *parent)
#if QT_VERSION >= 0x050000
x += 300;
m_testWindow->setWindowFlags(Qt::Window | Qt::WindowSystemMenuHint | Qt::WindowCloseButtonHint
m_testWindow->setFlags(Qt::Window | Qt::WindowSystemMenuHint | Qt::WindowCloseButtonHint
| Qt::WindowMinimizeButtonHint | Qt::WindowMaximizeButtonHint
| Qt::WindowTitleHint | Qt::WindowFullscreenButtonHint);
m_testWindow->setFramePosition(QPoint(x, y));
@ -467,7 +467,7 @@ ControllerWidget::ControllerWidget(QWidget *parent)
m_testWindow->showFullScreen();
else
m_testWindow->show();
m_testWindow->setWindowTitle(tr("TestWindow"));
m_testWindow->setTitle(tr("TestWindow"));
#endif
QWidget *central = new QWidget ;