Fix build errors in manual tests
various fixes like missing includes, linking, obsolete API usage, etc. Change-Id: I786bff396933b87cd39559ac8964d386ef368df1 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> (cherry picked from commit a375f2e2754b4f458358663ffafb009daa715b43) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
parent
47dfdc2c61
commit
312912b3a0
@ -2,6 +2,7 @@
|
||||
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
|
||||
|
||||
#include <QTest>
|
||||
#include <QtTest/qtesteventloop.h>
|
||||
#include <QtCore/QElapsedTimer>
|
||||
#include <QtCore/QList>
|
||||
#include <QtCore/QSemaphore>
|
||||
|
@ -2,6 +2,7 @@
|
||||
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
|
||||
|
||||
#include <QTest>
|
||||
#include <QtTest/qtesteventloop.h>
|
||||
#include <QtCore/QElapsedTimer>
|
||||
#include <QtCore/QList>
|
||||
#include <QtCore/QSemaphore>
|
||||
|
@ -5,6 +5,7 @@
|
||||
#include <QDebug>
|
||||
#include <qtest.h>
|
||||
#include <QTest>
|
||||
#include <QtTest/qtesteventloop.h>
|
||||
#include <QtNetwork/qnetworkreply.h>
|
||||
#include <QtNetwork/qnetworkrequest.h>
|
||||
#include <QtNetwork/qnetworkaccessmanager.h>
|
||||
|
@ -5,7 +5,7 @@
|
||||
#include <QDebug>
|
||||
|
||||
PropertyField::PropertyField(QObject* subject, const QMetaProperty& prop, QWidget *parent)
|
||||
: QLineEdit(parent), m_subject(subject), m_lastChangeTime(QTime::currentTime()), m_prop(prop)
|
||||
: QLineEdit(parent), m_subject(subject), m_lastChangeTime(), m_prop(prop)
|
||||
, m_defaultBrush(palette().brush(QPalette::Active, QPalette::Text))
|
||||
{
|
||||
setReadOnly(true);
|
||||
@ -57,7 +57,6 @@ void PropertyField::propertyChanged()
|
||||
if (m_lastText.isEmpty()) {
|
||||
m_lastText = text;
|
||||
m_lastTextShowing = text;
|
||||
m_lastChangeTime = QTime::currentTime().addSecs(-5);
|
||||
}
|
||||
|
||||
qDebug() << " " << QString::fromUtf8(m_prop.name()) << ':' << val;
|
||||
|
@ -6,7 +6,7 @@
|
||||
|
||||
#include <QLineEdit>
|
||||
#include <QMetaProperty>
|
||||
#include <QTime>
|
||||
#include <QElapsedTimer>
|
||||
|
||||
/*!
|
||||
A QLineEdit for viewing the text form of a property on an object.
|
||||
@ -31,7 +31,7 @@ private:
|
||||
QObject* m_subject;
|
||||
QString m_lastText;
|
||||
QString m_lastTextShowing;
|
||||
QTime m_lastChangeTime;
|
||||
QElapsedTimer m_lastChangeTime;
|
||||
const QMetaProperty m_prop;
|
||||
QBrush m_defaultBrush;
|
||||
};
|
||||
|
@ -4,6 +4,7 @@
|
||||
#include <QApplication>
|
||||
#include <QFileDialog>
|
||||
#include <QPainter>
|
||||
#include <QPainterPath>
|
||||
#include <QPdfWriter>
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
|
@ -68,7 +68,7 @@ void Widget::onPrint()
|
||||
QPrinter printer(QPrinter::HighResolution);
|
||||
QPrintDialog dlg(&printer, this);
|
||||
if (ui->htmlEdit->textCursor().hasSelection())
|
||||
dlg.addEnabledOption(QAbstractPrintDialog::PrintSelection);
|
||||
dlg.setOption(QAbstractPrintDialog::PrintSelection, true);
|
||||
dlg.setWindowTitle(tr("Print Document"));
|
||||
if (dlg.exec() == QDialog::Accepted) {
|
||||
ui->htmlEdit->print(&printer);
|
||||
|
@ -3,6 +3,7 @@
|
||||
|
||||
#include <QApplication>
|
||||
#include <QTest>
|
||||
#include <QTimer>
|
||||
|
||||
#include "ui_form.h"
|
||||
#include "touchwidget.h"
|
||||
|
@ -71,9 +71,11 @@ int main(int argc, char **argv)
|
||||
MainWindow *mainWindow = new MainWindow;
|
||||
mainWindow->setGeometry(screen->geometry());
|
||||
mainWindow->winId();
|
||||
#ifdef Q_OS_WIN
|
||||
using namespace QNativeInterface::Private;
|
||||
if (auto *windowsWindow = dynamic_cast<QWindowsWindow *>(mainWindow->windowHandle()->handle()))
|
||||
windowsWindow->setHasBorderInFullScreen(true);
|
||||
#endif
|
||||
mainWindow->showMaximized();
|
||||
}
|
||||
int ret = a.exec();
|
||||
|
@ -13,4 +13,5 @@ qt_internal_add_manual_test(windowtransparency
|
||||
LIBRARIES
|
||||
Qt::Gui
|
||||
Qt::Widgets
|
||||
Qt::OpenGL
|
||||
)
|
||||
|
@ -3,6 +3,7 @@
|
||||
|
||||
#include <QtGui>
|
||||
#include <QtWidgets>
|
||||
#include <QtOpenGL/QOpenGLShaderProgram>
|
||||
|
||||
class GLWindow : public QWindow
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user