Merge remote-tracking branch 'origin/5.9' into dev

Conflicts:
	src/widgets/widgets/qmenu.cpp

Change-Id: I6d3baf56eb24501cddb129a3cb6b958ccc25a308
This commit is contained in:
Liang Qi 2017-06-07 12:05:33 +02:00
commit 7cbee56296
171 changed files with 1391 additions and 658 deletions

View File

@ -43,4 +43,6 @@
# error "__cplusplus must be > 201402L (the value for C++14)" # error "__cplusplus must be > 201402L (the value for C++14)"
#endif #endif
#include <map> // https://bugs.llvm.org//show_bug.cgi?id=33117
int main(int, char **) { return 0; } int main(int, char **) { return 0; }

View File

@ -0,0 +1,46 @@
/****************************************************************************
**
** Copyright (C) 2017 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the config.tests of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and The Qt Company. For licensing terms
** and conditions see https://www.qt.io/terms-conditions. For further
** information use the contact form at https://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 3 as published by the Free Software
** Foundation and appearing in the file LICENSE.LGPL3 included in the
** packaging of this file. Please review the following information to
** ensure the GNU Lesser General Public License version 3 requirements
** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU
** General Public License version 2.0 or (at your option) the GNU General
** Public license version 3 or any later version approved by the KDE Free
** Qt Foundation. The licenses are as published by the Free Software
** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
** included in the packaging of this file. Please review the following
** information to ensure the GNU General Public License requirements will
** be met: https://www.gnu.org/licenses/gpl-2.0.html and
** https://www.gnu.org/licenses/gpl-3.0.html.
**
** $QT_END_LICENSE$
**
****************************************************************************/
#include <device/fbdriver.h>
int main(int, char **)
{
FBDriver *driver = 0;
return 0;
}

View File

@ -0,0 +1,3 @@
SOURCES = integrityfb.cpp
CONFIG -= qt

View File

@ -0,0 +1,52 @@
/****************************************************************************
**
** Copyright (C) 2016 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the config.tests of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and The Qt Company. For licensing terms
** and conditions see https://www.qt.io/terms-conditions. For further
** information use the contact form at https://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 3 as published by the Free Software
** Foundation and appearing in the file LICENSE.LGPL3 included in the
** packaging of this file. Please review the following information to
** ensure the GNU Lesser General Public License version 3 requirements
** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU
** General Public License version 2.0 or (at your option) the GNU General
** Public license version 3 or any later version approved by the KDE Free
** Qt Foundation. The licenses are as published by the Free Software
** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
** included in the packaging of this file. Please review the following
** information to ensure the GNU General Public License requirements will
** be met: https://www.gnu.org/licenses/gpl-2.0.html and
** https://www.gnu.org/licenses/gpl-3.0.html.
**
** $QT_END_LICENSE$
**
****************************************************************************/
#include <stdlib.h>
#include <stdint.h>
#include <device/hiddriver.h>
int main(int, char **)
{
HIDDriver *driver;
uintptr_t devicecontext;
uint32_t device_id;
gh_hid_enum_devices(driver, &device_id, &devicecontext);
return 0;
}

View File

@ -0,0 +1,2 @@
SOURCES = integrityhid.cpp
CONFIG -= qt

View File

@ -137,7 +137,7 @@ defineReplace(qtConfFunc_licenseCheck) {
export(config.input.qt_edition) export(config.input.qt_edition)
} else { } else {
equals(QMAKE_HOST.os, Linux) { equals(QMAKE_HOST.os, Linux) {
equals(QMAKE_HOST.arch, x86): \ !equals(QMAKE_HOST.arch, x86_64): \
Licheck = licheck32 Licheck = licheck32
else: \ else: \
Licheck = licheck64 Licheck = licheck64
@ -150,10 +150,10 @@ defineReplace(qtConfFunc_licenseCheck) {
} }
!qtRunLoggedCommand("$$system_quote($$QT_SOURCE_TREE/bin/$$Licheck) \ !qtRunLoggedCommand("$$system_quote($$QT_SOURCE_TREE/bin/$$Licheck) \
$$eval(config.input.confirm-license) \ $$system_quote($$eval(config.input.confirm-license)) \
$$system_quote($$QT_SOURCE_TREE) $$system_quote($$QT_BUILD_TREE) \ $$system_quote($$QT_SOURCE_TREE) $$system_quote($$QT_BUILD_TREE) \
$$[QMAKE_SPEC] $$[QMAKE_XSPEC]", \ $$[QMAKE_SPEC] $$[QMAKE_XSPEC]", \
LicheckOutput): \ LicheckOutput, false): \
return(false) return(false)
logn() logn()
for (o, LicheckOutput) { for (o, LicheckOutput) {

View File

@ -49,10 +49,13 @@
****************************************************************************/ ****************************************************************************/
#include <QtWidgets> #include <QtWidgets>
#ifndef QT_NO_PRINTER #if defined(QT_PRINTSUPPORT_LIB)
#include <QtPrintSupport/qtprintsupportglobal.h>
#if QT_CONFIG(printdialog)
#include <QPrinter> #include <QPrinter>
#include <QPrintDialog> #include <QPrintDialog>
#endif #endif
#endif
#include "scribblearea.h" #include "scribblearea.h"
@ -167,7 +170,7 @@ void ScribbleArea::resizeImage(QImage *image, const QSize &newSize)
//! [21] //! [21]
void ScribbleArea::print() void ScribbleArea::print()
{ {
#if !defined(QT_NO_PRINTER) && !defined(QT_NO_PRINTDIALOG) #if QT_CONFIG(printdialog)
QPrinter printer(QPrinter::HighResolution); QPrinter printer(QPrinter::HighResolution);
QPrintDialog printDialog(&printer, this); QPrintDialog printDialog(&printer, this);
@ -181,7 +184,7 @@ void ScribbleArea::print()
painter.setWindow(image.rect()); painter.setWindow(image.rect());
painter.drawImage(0, 0, image); painter.drawImage(0, 0, image);
} }
#endif // QT_NO_PRINTER #endif // QT_CONFIG(printdialog)
} }
//! [22] //! [22]

View File

@ -49,8 +49,13 @@
****************************************************************************/ ****************************************************************************/
#include <QtWidgets> #include <QtWidgets>
#if defined(QT_PRINTSUPPORT_LIB)
#include <QtPrintSupport/qtprintsupportglobal.h>
#if QT_CONFIG(printdialog)
#include <QPrinter> #include <QPrinter>
#include <QPrintDialog> #include <QPrintDialog>
#endif
#endif
#include "licensewizard.h" #include "licensewizard.h"
@ -364,7 +369,7 @@ void ConclusionPage::setVisible(bool visible)
void ConclusionPage::printButtonClicked() void ConclusionPage::printButtonClicked()
{ {
#if !defined(QT_NO_PRINTER) && !defined(QT_NO_PRINTDIALOG) #if QT_CONFIG(printdialog)
QPrinter printer; QPrinter printer;
QPrintDialog dialog(&printer, this); QPrintDialog dialog(&printer, this);
if (dialog.exec()) if (dialog.exec())

View File

@ -50,8 +50,13 @@
#include "view.h" #include "view.h"
#if defined(QT_PRINTSUPPORT_LIB)
#include <QtPrintSupport/qtprintsupportglobal.h>
#if QT_CONFIG(printdialog)
#include <QPrinter> #include <QPrinter>
#include <QPrintDialog> #include <QPrintDialog>
#endif
#endif
#ifndef QT_NO_OPENGL #ifndef QT_NO_OPENGL
#include <QtOpenGL> #include <QtOpenGL>
#else #else
@ -259,7 +264,7 @@ void View::toggleAntialiasing()
void View::print() void View::print()
{ {
#if !defined(QT_NO_PRINTER) && !defined(QT_NO_PRINTDIALOG) #if QT_CONFIG(printdialog)
QPrinter printer; QPrinter printer;
QPrintDialog dialog(&printer, this); QPrintDialog dialog(&printer, this);
if (dialog.exec() == QDialog::Accepted) { if (dialog.exec() == QDialog::Accepted) {

View File

@ -53,10 +53,13 @@
#include "pixeldelegate.h" #include "pixeldelegate.h"
#include <QtWidgets> #include <QtWidgets>
#ifndef QT_NO_PRINTER #if defined(QT_PRINTSUPPORT_LIB)
#include <QtPrintSupport/qtprintsupportglobal.h>
#if QT_CONFIG(printdialog)
#include <QPrinter> #include <QPrinter>
#include <QPrintDialog> #include <QPrintDialog>
#endif #endif
#endif
//! [0] //! [0]
MainWindow::MainWindow() MainWindow::MainWindow()
@ -164,7 +167,7 @@ void MainWindow::openImage(const QString &fileName)
void MainWindow::printImage() void MainWindow::printImage()
{ {
#if !defined(QT_NO_PRINTER) && !defined(QT_NO_PRINTDIALOG) #if QT_CONFIG(printdialog)
if (model->rowCount(QModelIndex())*model->columnCount(QModelIndex()) > 90000) { if (model->rowCount(QModelIndex())*model->columnCount(QModelIndex()) > 90000) {
QMessageBox::StandardButton answer; QMessageBox::StandardButton answer;
answer = QMessageBox::question(this, tr("Large Image Size"), answer = QMessageBox::question(this, tr("Large Image Size"),

View File

@ -49,11 +49,16 @@
****************************************************************************/ ****************************************************************************/
#include <QtWidgets> #include <QtWidgets>
#ifndef QT_NO_PRINTER #if defined(QT_PRINTSUPPORT_LIB)
#include <QtPrintSupport/qtprintsupportglobal.h>
#if QT_CONFIG(printdialog)
#include <QPrinter> #include <QPrinter>
#include <QPrintDialog> #include <QPrintDialog>
#endif
#if QT_CONFIG(printpreviewdialog)
#include <QPrintPreviewDialog> #include <QPrintPreviewDialog>
#endif #endif
#endif
#include "spreadsheet.h" #include "spreadsheet.h"
#include "spreadsheetdelegate.h" #include "spreadsheetdelegate.h"
@ -637,7 +642,7 @@ QString encode_pos(int row, int col)
void SpreadSheet::print() void SpreadSheet::print()
{ {
#if !defined(QT_NO_PRINTER) && !defined(QT_NO_PRINTDIALOG) #if QT_CONFIG(printpreviewdialog)
QPrinter printer(QPrinter::ScreenResolution); QPrinter printer(QPrinter::ScreenResolution);
QPrintPreviewDialog dlg(&printer); QPrintPreviewDialog dlg(&printer);
PrintView view; PrintView view;

View File

@ -50,9 +50,12 @@
//! [0] //! [0]
#include <QtWidgets> #include <QtWidgets>
#ifndef QT_NO_PRINTDIALOG #if defined(QT_PRINTSUPPORT_LIB)
#include <QtPrintSupport/qtprintsupportglobal.h>
#if QT_CONFIG(printdialog)
#include <QtPrintSupport> #include <QtPrintSupport>
#endif #endif
#endif
#include "mainwindow.h" #include "mainwindow.h"
//! [0] //! [0]
@ -125,7 +128,7 @@ void MainWindow::newLetter()
//! [3] //! [3]
void MainWindow::print() void MainWindow::print()
{ {
#ifndef QT_NO_PRINTDIALOG #if QT_CONFIG(printdialog)
QTextDocument *document = textEdit->document(); QTextDocument *document = textEdit->document();
QPrinter printer; QPrinter printer;

View File

@ -50,8 +50,15 @@
#include <QtWidgets> #include <QtWidgets>
#if defined(QT_PRINTSUPPORT_LIB) #if defined(QT_PRINTSUPPORT_LIB)
#include <QtPrintSupport/qtprintsupportglobal.h>
#if QT_CONFIG(printdialog)
#include <QPrinter>
#include <QPrintDialog>
#if QT_CONFIG(printpreviewdialog)
#include <QPrintPreviewDialog> #include <QPrintPreviewDialog>
#endif #endif
#endif
#endif
#include "mainwindow.h" #include "mainwindow.h"
@ -270,7 +277,7 @@ void MainWindow::printDocument(QPrinter *printer)
void MainWindow::on_printPreviewAction_triggered() void MainWindow::on_printPreviewAction_triggered()
{ {
#if defined(QT_PRINTSUPPORT_LIB) && QT_CONFIG(printdialog) #if defined(QT_PRINTSUPPORT_LIB) && QT_CONFIG(printpreviewdialog)
pageMap = currentPageMap(); pageMap = currentPageMap();
if (pageMap.count() == 0) if (pageMap.count() == 0)

View File

@ -52,8 +52,6 @@
#define MAINWINDOW_H #define MAINWINDOW_H
#include "ui_mainwindowbase.h" #include "ui_mainwindowbase.h"
#include <QPrinter>
#include <QPrintDialog>
#if defined(QT_PRINTSUPPORT_LIB) #if defined(QT_PRINTSUPPORT_LIB)
#include <QtPrintSupport/qtprintsupportglobal.h> #include <QtPrintSupport/qtprintsupportglobal.h>

View File

@ -49,10 +49,13 @@
****************************************************************************/ ****************************************************************************/
#include <QtWidgets> #include <QtWidgets>
#ifndef QT_NO_PRINTER #if defined(QT_PRINTSUPPORT_LIB)
#include <QtPrintSupport/qtprintsupportglobal.h>
#if QT_CONFIG(printdialog)
#include <QPrinter> #include <QPrinter>
#include <QPrintDialog> #include <QPrintDialog>
#endif #endif
#endif
#include "detailsdialog.h" #include "detailsdialog.h"
#include "mainwindow.h" #include "mainwindow.h"
@ -245,7 +248,7 @@ void MainWindow::openDialog()
//! [17] //! [17]
void MainWindow::printFile() void MainWindow::printFile()
{ {
#if !defined(QT_NO_PRINTER) && !defined(QT_NO_PRINTDIALOG) #if QT_CONFIG(printdialog)
QTextEdit *editor = static_cast<QTextEdit*>(letters->currentWidget()); QTextEdit *editor = static_cast<QTextEdit*>(letters->currentWidget());
//! [18] //! [18]
QPrinter printer; QPrinter printer;

View File

@ -71,11 +71,18 @@
#include <QCloseEvent> #include <QCloseEvent>
#include <QMessageBox> #include <QMessageBox>
#include <QMimeData> #include <QMimeData>
#ifndef QT_NO_PRINTER #if defined(QT_PRINTSUPPORT_LIB)
#include <QtPrintSupport/qtprintsupportglobal.h>
#if QT_CONFIG(printer)
#if QT_CONFIG(printdialog)
#include <QPrintDialog> #include <QPrintDialog>
#endif
#include <QPrinter> #include <QPrinter>
#if QT_CONFIG(printpreviewdialog)
#include <QPrintPreviewDialog> #include <QPrintPreviewDialog>
#endif #endif
#endif
#endif
#include "textedit.h" #include "textedit.h"
@ -474,7 +481,7 @@ bool TextEdit::fileSaveAs()
void TextEdit::filePrint() void TextEdit::filePrint()
{ {
#if !defined(QT_NO_PRINTER) && !defined(QT_NO_PRINTDIALOG) #if QT_CONFIG(printdialog)
QPrinter printer(QPrinter::HighResolution); QPrinter printer(QPrinter::HighResolution);
QPrintDialog *dlg = new QPrintDialog(&printer, this); QPrintDialog *dlg = new QPrintDialog(&printer, this);
if (textEdit->textCursor().hasSelection()) if (textEdit->textCursor().hasSelection())
@ -488,7 +495,7 @@ void TextEdit::filePrint()
void TextEdit::filePrintPreview() void TextEdit::filePrintPreview()
{ {
#if !defined(QT_NO_PRINTER) && !defined(QT_NO_PRINTDIALOG) #if QT_CONFIG(printpreviewdialog)
QPrinter printer(QPrinter::HighResolution); QPrinter printer(QPrinter::HighResolution);
QPrintPreviewDialog preview(&printer, this); QPrintPreviewDialog preview(&printer, this);
connect(&preview, &QPrintPreviewDialog::paintRequested, this, &TextEdit::printPreview); connect(&preview, &QPrintPreviewDialog::paintRequested, this, &TextEdit::printPreview);

View File

@ -49,9 +49,12 @@
****************************************************************************/ ****************************************************************************/
#include <QtWidgets> #include <QtWidgets>
#ifndef QT_NO_PRINTER #if defined(QT_PRINTSUPPORT_LIB)
#include <QtPrintSupport/qtprintsupportglobal.h>
#if QT_CONFIG(printdialog)
#include <QPrintDialog> #include <QPrintDialog>
#endif #endif
#endif
#include "imageviewer.h" #include "imageviewer.h"
@ -180,7 +183,7 @@ void ImageViewer::print()
//! [5] //! [6] //! [5] //! [6]
{ {
Q_ASSERT(imageLabel->pixmap()); Q_ASSERT(imageLabel->pixmap());
#if !defined(QT_NO_PRINTER) && !defined(QT_NO_PRINTDIALOG) #if QT_CONFIG(printdialog)
//! [6] //! [7] //! [6] //! [7]
QPrintDialog dialog(&printer, this); QPrintDialog dialog(&printer, this);
//! [7] //! [8] //! [7] //! [8]

View File

@ -49,10 +49,13 @@
****************************************************************************/ ****************************************************************************/
#include <QtWidgets> #include <QtWidgets>
#ifndef QT_NO_PRINTER #if defined(QT_PRINTSUPPORT_LIB)
#include <QtPrintSupport/qtprintsupportglobal.h>
#if QT_CONFIG(printdialog)
#include <QPrinter> #include <QPrinter>
#include <QPrintDialog> #include <QPrintDialog>
#endif #endif
#endif
#include "scribblearea.h" #include "scribblearea.h"
@ -210,7 +213,7 @@ void ScribbleArea::resizeImage(QImage *image, const QSize &newSize)
//! [21] //! [21]
void ScribbleArea::print() void ScribbleArea::print()
{ {
#if !defined(QT_NO_PRINTER) && !defined(QT_NO_PRINTDIALOG) #if QT_CONFIG(printdialog)
QPrinter printer(QPrinter::HighResolution); QPrinter printer(QPrinter::HighResolution);
QPrintDialog printDialog(&printer, this); QPrintDialog printDialog(&printer, this);
@ -224,6 +227,6 @@ void ScribbleArea::print()
painter.setWindow(image.rect()); painter.setWindow(image.rect());
painter.drawImage(0, 0, image); painter.drawImage(0, 0, image);
} }
#endif // QT_NO_PRINTER #endif // QT_CONFIG(printdialog)
} }
//! [22] //! [22]

View File

@ -74,8 +74,8 @@ else: \
LIBGCC_PATH = $$dirname(LIBGCC_PATH_FULL) LIBGCC_PATH = $$dirname(LIBGCC_PATH_FULL)
QMAKE_INCDIR = $$ANDROID_SOURCES_CXX_STL_INCDIR $$QMAKE_ANDROID_PLATFORM_INCDIR QMAKE_INCDIR_POST = $$ANDROID_SOURCES_CXX_STL_INCDIR $$QMAKE_ANDROID_PLATFORM_INCDIR
QMAKE_LIBDIR = $$ANDROID_SOURCES_CXX_STL_LIBDIR $$QMAKE_ANDROID_PLATFORM_LIBDIR $$LIBGCC_PATH QMAKE_LIBDIR_POST = $$ANDROID_SOURCES_CXX_STL_LIBDIR $$QMAKE_ANDROID_PLATFORM_LIBDIR $$LIBGCC_PATH
QMAKE_INCDIR_X11 = QMAKE_INCDIR_X11 =
QMAKE_LIBDIR_X11 = QMAKE_LIBDIR_X11 =
QMAKE_INCDIR_OPENGL = $$QMAKE_ANDROID_PLATFORM_INCDIR QMAKE_INCDIR_OPENGL = $$QMAKE_ANDROID_PLATFORM_INCDIR

View File

@ -0,0 +1,27 @@
#
# Base qmake configuration for INTEGRITY armv8 targets
#
MAKEFILE_GENERATOR = UNIX
QMAKE_PLATFORM = integrity
include(unix.conf)
include(ghs-base.conf)
bsp_name = $$(INTEGRITY_BSP)
isEmpty(bsp_name): \
error("This qmakespec requires $INTEGRITY_BSP to be set")
os_directory = $$(INTEGRITY_DIR)
isEmpty(os_directory): \
error("This qmakespec requires $INTEGRITY_DIR to be set")
QMAKE_CC = cxintarm64 -bsp $$bsp_name -os_dir $$os_directory -non_shared
QMAKE_CXX = cxintarm64 -bsp $$bsp_name -os_dir $$os_directory -non_shared
QMAKE_LINK = $$QMAKE_CXX
QMAKE_AR = $$QMAKE_CXX -archive -o
QMAKE_CFLAGS += -bigswitch
QMAKE_CXXFLAGS += -bigswitch
QMAKE_LFLAGS += -bigswitch

View File

@ -81,6 +81,10 @@ greaterThan(QMAKE_MSC_VER, 1909) {
MSVC_VER = 15.0 MSVC_VER = 15.0
COMPAT_MKSPEC = win32-msvc2017 COMPAT_MKSPEC = win32-msvc2017
QMAKE_CXXFLAGS += -Zc:referenceBinding QMAKE_CXXFLAGS += -Zc:referenceBinding
# For now permissive fails as soon as UWP API comes into play. In qtbase this
# API is used in direct2d, but also in multimedia, positioning and sensors.
# We can try again with a later version of Visual Studio.
# QMAKE_CXXFLAGS_STRICTCXX = -permissive-
} }
greaterThan(QMAKE_MSC_VER, 1910) { greaterThan(QMAKE_MSC_VER, 1910) {

View File

@ -38,9 +38,9 @@ isEmpty(QNX_DIR) {
error("QNX_TARGET environment variable not set") error("QNX_TARGET environment variable not set")
} }
QMAKE_INCDIR = $${QNX_DIR}/usr/include $${QNX_DIR}/usr/include/freetype2 QMAKE_INCDIR_POST = $${QNX_DIR}/usr/include $${QNX_DIR}/usr/include/freetype2
QMAKE_LIBDIR = $${QNX_DIR}/$${QNX_CPUDIR}/lib $${QNX_DIR}/$${QNX_CPUDIR}/usr/lib QMAKE_LIBDIR_POST = $${QNX_DIR}/$${QNX_CPUDIR}/lib $${QNX_DIR}/$${QNX_CPUDIR}/usr/lib
QMAKE_LFLAGS += -Wl,-rpath-link,$${QNX_DIR}/$${QNX_CPUDIR}/lib -Wl,-rpath-link,$${QNX_DIR}/$${QNX_CPUDIR}/usr/lib QMAKE_RPATHLINKDIR_POST += $${QNX_DIR}/$${QNX_CPUDIR}/lib $${QNX_DIR}/$${QNX_CPUDIR}/usr/lib
QMAKE_CXXFLAGS_CXX11 = -Wc,-std=gnu++11 QMAKE_CXXFLAGS_CXX11 = -Wc,-std=gnu++11
QMAKE_CXXFLAGS_CXX14 = -Wc,-std=gnu++1y QMAKE_CXXFLAGS_CXX14 = -Wc,-std=gnu++1y

View File

@ -24,4 +24,4 @@ QMAKE_STRIP = $${CROSS_COMPILE}strip
# it messes up system include order. --sysroot is # it messes up system include order. --sysroot is
# sufficient. See link for details: # sufficient. See link for details:
# https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=213217 # https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=213217
QMAKE_LIBDIR = $$[QT_SYSROOT]/usr/lib QMAKE_LIBDIR_POST = $$[QT_SYSROOT]/usr/lib

View File

@ -3,8 +3,9 @@ defineTest(qtConfSanitizeMkspec) {
} }
contains(DISTRO_OPTS, deb-multi-arch) { contains(DISTRO_OPTS, deb-multi-arch) {
QMAKE_LFLAGS += -Wl,-rpath-link,$$[QT_SYSROOT]/usr/lib/$${GCC_MACHINE_DUMP} \ QMAKE_RPATHLINKDIR_POST += \
-Wl,-rpath-link,$$[QT_SYSROOT]/lib/$${GCC_MACHINE_DUMP} $$[QT_SYSROOT]/usr/lib/$${GCC_MACHINE_DUMP} \
$$[QT_SYSROOT]/lib/$${GCC_MACHINE_DUMP}
} }
contains(DISTRO_OPTS, boot2qt) { contains(DISTRO_OPTS, boot2qt) {

View File

@ -0,0 +1,39 @@
#
# qmake configuration for 64-bit Tegra X1 boards, like the DRIVE CX, using Vibrante Integrity
#
# A typical configure line might look like:
# configure \
# -device integrity-armv8-drive-cx \
# -device-option VIBRANTE_INTEGRITY_PDK_TOPDIR=/opt/nvidia/vibrante-t186ref-integrity
# -static \
# -opengl es2
load(device_config)
include(../../common/ghs-integrity-armv8.conf)
DEFINES += WIN_INTERFACE_CUSTOM
QT_QPA_DEFAULT_PLATFORM = eglfs
QMAKE_LIBS_EGL += -lEGL -lGLESv2 -lnvidia-glsi -lnvidia-eglcore -lnvidia-rmapi-tegra -lposix -livfs -ldrm-nvdc -lnvll -lnvdc -lnvrm -lnvrm_gpu -lnvrm_graphics -lnvos -lsocket -lnet -lnvtegrahv
QMAKE_LIBS_OPENGL_ES2 += $${QMAKE_LIBS_EGL}
EGLFS_DEVICE_INTEGRATION = eglfs_kms_egldevice
# Vibrante Integrity PDK headers & libraries
QMAKE_INCDIR += $${VIBRANTE_INTEGRITY_PDK_TOPDIR}/include
QMAKE_LIBDIR += $${VIBRANTE_INTEGRITY_PDK_TOPDIR}/libs
# OpenGL libraries have a dependency on libEGL
QMAKE_INCDIR_EGL = $${VIBRANTE_INTEGRITY_PDK_TOPDIR}/include
QMAKE_LIBDIR_EGL = $${VIBRANTE_INTEGRITY_PDK_TOPDIR}/libs
QMAKE_INCDIR_OPENGL_ES2 = $${VIBRANTE_INTEGRITY_PDK_TOPDIR}/include
QMAKE_LIBDIR_OPENGL_ES2 = $${VIBRANTE_INTEGRITY_PDK_TOPDIR}/libs
defineTest(qtConfSanitizeMkspec) {
isEmpty(VIBRANTE_INTEGRITY_PDK_TOPDIR): \
error("You must pass -device-option VIBRANTE_INTEGRITY_PDK_TOPDIR=/path/to/pdk")
}
load(qt_config)

View File

@ -0,0 +1,45 @@
/****************************************************************************
**
** Copyright (C) 2017 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the qmake spec of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and The Qt Company. For licensing terms
** and conditions see https://www.qt.io/terms-conditions. For further
** information use the contact form at https://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 3 as published by the Free Software
** Foundation and appearing in the file LICENSE.LGPL3 included in the
** packaging of this file. Please review the following information to
** ensure the GNU Lesser General Public License version 3 requirements
** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU
** General Public License version 2.0 or (at your option) the GNU General
** Public license version 3 or any later version approved by the KDE Free
** Qt Foundation. The licenses are as published by the Free Software
** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
** included in the packaging of this file. Please review the following
** information to ensure the GNU General Public License requirements will
** be met: https://www.gnu.org/licenses/gpl-2.0.html and
** https://www.gnu.org/licenses/gpl-3.0.html.
**
** $QT_END_LICENSE$
**
****************************************************************************/
#ifndef QPLATFORMDEFS_H
#define QPLATFORMDEFS_H
#include "../../common/integrity/qplatformdefs.h"
#endif // QPLATFORMDEFS_H

View File

@ -19,8 +19,8 @@
include(../common/linux_device_pre.conf) include(../common/linux_device_pre.conf)
QMAKE_INCDIR += /usr/arm-linux-gnueabihf/include QMAKE_INCDIR_POST += /usr/arm-linux-gnueabihf/include
QMAKE_LIBDIR += /usr/arm-linux-gnueabihf/lib QMAKE_LIBDIR_POST += /usr/arm-linux-gnueabihf/lib
QMAKE_LIBS += -lrt QMAKE_LIBS += -lrt

View File

@ -50,9 +50,9 @@ QMAKE_OBJCOPY = $${CROSS_COMPILE}objcopy
QMAKE_NM = $${CROSS_COMPILE}nm -P QMAKE_NM = $${CROSS_COMPILE}nm -P
QMAKE_STRIP = $${CROSS_COMPILE}strip QMAKE_STRIP = $${CROSS_COMPILE}strip
QMAKE_INCDIR += $${TRIDENT_SHINER_SDK_BUILDTREE}/target/output/objs/$${TRIDENT_SHINER_SDK_BUILDSPEC}/comps/generic_apps/usr/include QMAKE_INCDIR_POST += $${TRIDENT_SHINER_SDK_BUILDTREE}/target/output/objs/$${TRIDENT_SHINER_SDK_BUILDSPEC}/comps/generic_apps/usr/include
QMAKE_LIBDIR += $${TRIDENT_SHINER_SDK_BUILDTREE}/target/output/objs/$${TRIDENT_SHINER_SDK_BUILDSPEC}/comps/generic_apps/usr/lib QMAKE_LIBDIR_POST += $${TRIDENT_SHINER_SDK_BUILDTREE}/target/output/objs/$${TRIDENT_SHINER_SDK_BUILDSPEC}/comps/generic_apps/usr/lib
QMAKE_LIBDIR += $${TRIDENT_SHINER_SDK_BUILDTREE}/target/output/objs/$${TRIDENT_SHINER_SDK_BUILDSPEC}/comps/generated/lib/armgnu_linux_el_cortex-a9 QMAKE_LIBDIR_POST += $${TRIDENT_SHINER_SDK_BUILDTREE}/target/output/objs/$${TRIDENT_SHINER_SDK_BUILDSPEC}/comps/generated/lib/armgnu_linux_el_cortex-a9
QMAKE_INCDIR_EGL = $${TRIDENT_SHINER_SDK_INCDIR_EGL_OPENGL_ES2} QMAKE_INCDIR_EGL = $${TRIDENT_SHINER_SDK_INCDIR_EGL_OPENGL_ES2}
QMAKE_LIBDIR_EGL = $${TRIDENT_SHINER_SDK_LIBDIR_EGL_OPENGL_ES2} QMAKE_LIBDIR_EGL = $${TRIDENT_SHINER_SDK_LIBDIR_EGL_OPENGL_ES2}

View File

@ -16,21 +16,21 @@
include(../common/linux_device_pre.conf) include(../common/linux_device_pre.conf)
QMAKE_INCDIR += \ QMAKE_INCDIR_POST += \
$${VIBRANTE_SDK_TOPDIR}/include \ $${VIBRANTE_SDK_TOPDIR}/include \
$$[QT_SYSROOT]/usr/include $$[QT_SYSROOT]/usr/include
QMAKE_LIBDIR += \ QMAKE_LIBDIR_POST += \
$${VIBRANTE_SDK_TOPDIR}/lib-target \ $${VIBRANTE_SDK_TOPDIR}/lib-target \
$$[QT_SYSROOT]/usr/lib \ $$[QT_SYSROOT]/usr/lib \
$$[QT_SYSROOT]/lib/aarch64-linux-gnu \ $$[QT_SYSROOT]/lib/aarch64-linux-gnu \
$$[QT_SYSROOT]/usr/lib/aarch64-linux-gnu $$[QT_SYSROOT]/usr/lib/aarch64-linux-gnu
QMAKE_LFLAGS += \ QMAKE_RPATHLINKDIR_POST += \
-Wl,-rpath-link,$${VIBRANTE_SDK_TOPDIR}/lib-target \ $${VIBRANTE_SDK_TOPDIR}/lib-target \
-Wl,-rpath-link,$$[QT_SYSROOT]/usr/lib \ $$[QT_SYSROOT]/usr/lib \
-Wl,-rpath-link,$$[QT_SYSROOT]/usr/lib/aarch64-linux-gnu \ $$[QT_SYSROOT]/usr/lib/aarch64-linux-gnu \
-Wl,-rpath-link,$$[QT_SYSROOT]/lib/aarch64-linux-gnu $$[QT_SYSROOT]/lib/aarch64-linux-gnu
DISTRO_OPTS += aarch64 DISTRO_OPTS += aarch64

View File

@ -11,19 +11,19 @@
include(../common/linux_device_pre.conf) include(../common/linux_device_pre.conf)
QMAKE_INCDIR += \ QMAKE_INCDIR_POST += \
$$[QT_SYSROOT]/usr/include \ $$[QT_SYSROOT]/usr/include \
$$[QT_SYSROOT]/usr/include/arm-linux-gnueabihf $$[QT_SYSROOT]/usr/include/arm-linux-gnueabihf
QMAKE_LIBDIR += \ QMAKE_LIBDIR_POST += \
$$[QT_SYSROOT]/usr/lib \ $$[QT_SYSROOT]/usr/lib \
$$[QT_SYSROOT]/lib/arm-linux-gnueabihf \ $$[QT_SYSROOT]/lib/arm-linux-gnueabihf \
$$[QT_SYSROOT]/usr/lib/arm-linux-gnueabihf $$[QT_SYSROOT]/usr/lib/arm-linux-gnueabihf
QMAKE_LFLAGS += \ QMAKE_RPATHLINKDIR_POST += \
-Wl,-rpath-link,$$[QT_SYSROOT]/usr/lib \ $$[QT_SYSROOT]/usr/lib \
-Wl,-rpath-link,$$[QT_SYSROOT]/usr/lib/arm-linux-gnueabihf \ $$[QT_SYSROOT]/usr/lib/arm-linux-gnueabihf \
-Wl,-rpath-link,$$[QT_SYSROOT]/lib/arm-linux-gnueabihf $$[QT_SYSROOT]/lib/arm-linux-gnueabihf
DISTRO_OPTS += hard-float DISTRO_OPTS += hard-float
COMPILER_FLAGS += -mtune=cortex-a15 -march=armv7-a -mfpu=neon-vfpv4 COMPILER_FLAGS += -mtune=cortex-a15 -march=armv7-a -mfpu=neon-vfpv4

View File

@ -14,21 +14,21 @@
include(../common/linux_device_pre.conf) include(../common/linux_device_pre.conf)
QMAKE_INCDIR += \ QMAKE_INCDIR_POST += \
$${VIBRANTE_SDK_TOPDIR}/include \ $${VIBRANTE_SDK_TOPDIR}/include \
$$[QT_SYSROOT]/usr/include $$[QT_SYSROOT]/usr/include
QMAKE_LIBDIR += \ QMAKE_LIBDIR_POST += \
$${VIBRANTE_SDK_TOPDIR}/lib-target \ $${VIBRANTE_SDK_TOPDIR}/lib-target \
$$[QT_SYSROOT]/usr/lib \ $$[QT_SYSROOT]/usr/lib \
$$[QT_SYSROOT]/lib/arm-linux-gnueabihf \ $$[QT_SYSROOT]/lib/arm-linux-gnueabihf \
$$[QT_SYSROOT]/usr/lib/arm-linux-gnueabihf $$[QT_SYSROOT]/usr/lib/arm-linux-gnueabihf
QMAKE_LFLAGS += \ QMAKE_RPATHLINKDIR_POST += \
-Wl,-rpath-link,$${VIBRANTE_SDK_TOPDIR}/lib-target \ $${VIBRANTE_SDK_TOPDIR}/lib-target \
-Wl,-rpath-link,$$[QT_SYSROOT]/usr/lib \ $$[QT_SYSROOT]/usr/lib \
-Wl,-rpath-link,$$[QT_SYSROOT]/usr/lib/arm-linux-gnueabihf \ $$[QT_SYSROOT]/usr/lib/arm-linux-gnueabihf \
-Wl,-rpath-link,$$[QT_SYSROOT]/lib/arm-linux-gnueabihf $$[QT_SYSROOT]/lib/arm-linux-gnueabihf
DISTRO_OPTS += hard-float DISTRO_OPTS += hard-float
COMPILER_FLAGS += -mtune=cortex-a15 -march=armv7-a -mfpu=neon-vfpv4 -DWIN_INTERFACE_CUSTOM COMPILER_FLAGS += -mtune=cortex-a15 -march=armv7-a -mfpu=neon-vfpv4 -DWIN_INTERFACE_CUSTOM

View File

@ -25,20 +25,20 @@
include(../common/linux_device_pre.conf) include(../common/linux_device_pre.conf)
QMAKE_INCDIR += \ QMAKE_INCDIR_POST += \
$$[QT_SYSROOT]/usr/include \ $$[QT_SYSROOT]/usr/include \
$$[QT_SYSROOT]/usr/include/aarch64-linux-gnu $$[QT_SYSROOT]/usr/include/aarch64-linux-gnu
QMAKE_LIBDIR += \ QMAKE_LIBDIR_POST += \
$$[QT_SYSROOT]/usr/lib \ $$[QT_SYSROOT]/usr/lib \
$$[QT_SYSROOT]/lib/aarch64-linux-gnu \ $$[QT_SYSROOT]/lib/aarch64-linux-gnu \
$$[QT_SYSROOT]/usr/lib/aarch64-linux-gnu $$[QT_SYSROOT]/usr/lib/aarch64-linux-gnu
QMAKE_LFLAGS += \ QMAKE_RPATHLINKDIR_POST += \
-Wl,-rpath-link,$$[QT_SYSROOT]/usr/lib \ $$[QT_SYSROOT]/usr/lib \
-Wl,-rpath-link,$$[QT_SYSROOT]/usr/lib/aarch64-linux-gnu \ $$[QT_SYSROOT]/usr/lib/aarch64-linux-gnu \
-Wl,-rpath-link,$$[QT_SYSROOT]/usr/lib/aarch64-linux-gnu/tegra \ $$[QT_SYSROOT]/usr/lib/aarch64-linux-gnu/tegra \
-Wl,-rpath-link,$$[QT_SYSROOT]/lib/aarch64-linux-gnu $$[QT_SYSROOT]/lib/aarch64-linux-gnu
DISTRO_OPTS += aarch64 DISTRO_OPTS += aarch64
COMPILER_FLAGS += -mtune=cortex-a57.cortex-a53 -march=armv8-a COMPILER_FLAGS += -mtune=cortex-a57.cortex-a53 -march=armv8-a

View File

@ -52,10 +52,9 @@ QMAKE_LIBDIR_OPENGL_ES2 = $${BRCM_ROCKFORD_PATH}/middleware/v3d/lib_$${BRCM_PLAT
QMAKE_LIBS_OPENGL_ES2 = -lv3ddriver -lrt QMAKE_LIBS_OPENGL_ES2 = -lv3ddriver -lrt
QMAKE_LIBS_EGL = QMAKE_LIBS_EGL =
INCLUDEPATH += $${BRCM_APPLIBS_PATH}/opensource/zlib/zlib-1.2.3 QMAKE_INCDIR_POST += $${BRCM_APPLIBS_PATH}/opensource/zlib/zlib-1.2.3
QMAKE_LIBDIR += $${BRCM_APPLIBS_PATH}/opensource/zlib/zlib-1.2.3 QMAKE_LIBDIR_POST += $${BRCM_APPLIBS_PATH}/opensource/zlib/zlib-1.2.3
QMAKE_RPATHLINKDIR_POST += $$QMAKE_LIBDIR_OPENGL_ES2 $${BRCM_APPLIBS_PATH}/opensource/zlib/zlib-1.2.3
QMAKE_LFLAGS += -Wl,-rpath-link,$$QMAKE_LIBDIR_OPENGL_ES2 -Wl,-rpath-link,$${BRCM_APPLIBS_PATH}/opensource/zlib/zlib-1.2.3
# DirectFB platform hooks for this hardware # DirectFB platform hooks for this hardware
QT_CONFIG += directfb_egl egl QT_CONFIG += directfb_egl egl

View File

@ -5,7 +5,7 @@
include(../common/linux_device_pre.conf) include(../common/linux_device_pre.conf)
QMAKE_LFLAGS += -Wl,-rpath-link,$$[QT_SYSROOT]/opt/vc/lib QMAKE_RPATHLINKDIR_POST += $$[QT_SYSROOT]/opt/vc/lib
QMAKE_LIBDIR_OPENGL_ES2 = $$[QT_SYSROOT]/opt/vc/lib QMAKE_LIBDIR_OPENGL_ES2 = $$[QT_SYSROOT]/opt/vc/lib
QMAKE_LIBDIR_EGL = $$QMAKE_LIBDIR_OPENGL_ES2 QMAKE_LIBDIR_EGL = $$QMAKE_LIBDIR_OPENGL_ES2

View File

@ -2,7 +2,7 @@
include(../common/linux_device_pre.conf) include(../common/linux_device_pre.conf)
QMAKE_LFLAGS += -Wl,-rpath-link,$$[QT_SYSROOT]/opt/vc/lib QMAKE_RPATHLINKDIR_POST += $$[QT_SYSROOT]/opt/vc/lib
QMAKE_LIBDIR_OPENGL_ES2 = $$[QT_SYSROOT]/opt/vc/lib QMAKE_LIBDIR_OPENGL_ES2 = $$[QT_SYSROOT]/opt/vc/lib
QMAKE_LIBDIR_EGL = $$QMAKE_LIBDIR_OPENGL_ES2 QMAKE_LIBDIR_EGL = $$QMAKE_LIBDIR_OPENGL_ES2

View File

@ -8,13 +8,12 @@ include(../common/linux_device_pre.conf)
# and possibly no pkg-config, have some static values as well: # and possibly no pkg-config, have some static values as well:
# I consider it a bug that this is required, but our EGL config.test _requires_ it # I consider it a bug that this is required, but our EGL config.test _requires_ it
QMAKE_LFLAGS += -Wl,-rpath-link,$$[QT_SYSROOT]/opt/vc/lib QMAKE_RPATHLINKDIR_POST += $$[QT_SYSROOT]/opt/vc/lib
VC_LIBRARY_PATH = /opt/vc/lib VC_LIBRARY_PATH = /opt/vc/lib
VC_INCLUDE_PATH = =/opt/vc/include VC_INCLUDE_PATH = =/opt/vc/include
# terrible, they do not appear to resolve "=" in rpath! VC_LINK_LINE = -L=$${VC_LIBRARY_PATH}
VC_LINK_LINE = -L=$${VC_LIBRARY_PATH} -Wl,-rpath-link,$$[QT_SYSROOT]$${VC_LIBRARY_PATH}
QMAKE_LIBDIR_OPENGL_ES2 = =$${VC_LIBRARY_PATH} QMAKE_LIBDIR_OPENGL_ES2 = =$${VC_LIBRARY_PATH}
QMAKE_LIBDIR_EGL = $$QMAKE_LIBDIR_OPENGL_ES2 QMAKE_LIBDIR_EGL = $$QMAKE_LIBDIR_OPENGL_ES2

View File

@ -27,7 +27,8 @@ QMAKE_OBJCOPY = $${CROSS_COMPILE}objcopy
QMAKE_NM = $${CROSS_COMPILE}nm -P QMAKE_NM = $${CROSS_COMPILE}nm -P
QMAKE_STRIP = $${CROSS_COMPILE}strip QMAKE_STRIP = $${CROSS_COMPILE}strip
QMAKE_LFLAGS += -Wl,-rpath-link,$$[QT_SYSROOT]/usr/lib/arm-linux-gnueabihf \ QMAKE_RPATHLINKDIR_POST += \
-Wl,-rpath-link,$$[QT_SYSROOT]/lib/arm-linux-gnueabihf $$[QT_SYSROOT]/usr/lib/arm-linux-gnueabihf \
$$[QT_SYSROOT]/lib/arm-linux-gnueabihf
load(qt_config) load(qt_config)

View File

@ -10,15 +10,16 @@
include(../common/linux_device_pre.conf) include(../common/linux_device_pre.conf)
QMAKE_INCDIR += $$[QT_SYSROOT]/usr/include QMAKE_INCDIR_POST += $$[QT_SYSROOT]/usr/include
QMAKE_LIBDIR += $$[QT_SYSROOT]/usr/lib \ QMAKE_LIBDIR_POST += $$[QT_SYSROOT]/usr/lib \
$$[QT_SYSROOT]/lib/arm-linux-gnueabi \ $$[QT_SYSROOT]/lib/arm-linux-gnueabi \
$$[QT_SYSROOT]/usr/lib/arm-linux-gnueabi $$[QT_SYSROOT]/usr/lib/arm-linux-gnueabi
QMAKE_LFLAGS += -Wl,-rpath-link,$$[QT_SYSROOT]/usr/lib \ QMAKE_RPATHLINKDIR_POST += \
-Wl,-rpath-link,$$[QT_SYSROOT]/usr/lib/arm-linux-gnueabi \ $$[QT_SYSROOT]/usr/lib \
-Wl,-rpath-link,$$[QT_SYSROOT]/lib/arm-linux-gnueabi $$[QT_SYSROOT]/usr/lib/arm-linux-gnueabi \
$$[QT_SYSROOT]/lib/arm-linux-gnueabi
TEGRA2_CFLAGS = -mtune=cortex-a9 -march=armv7-a -mhard-float -mfloat-abi=softfp -mfpu=vfpv3-d16 TEGRA2_CFLAGS = -mtune=cortex-a9 -march=armv7-a -mhard-float -mfloat-abi=softfp -mfpu=vfpv3-d16
QMAKE_CFLAGS += $$TEGRA2_CFLAGS QMAKE_CFLAGS += $$TEGRA2_CFLAGS

View File

@ -31,7 +31,9 @@ defineTest(qtLog) {
defineTest(qtRunLoggedCommand) { defineTest(qtRunLoggedCommand) {
qtLog("+ $$1") qtLog("+ $$1")
output = $$system("( $$1 ) 2>&1", lines, result) !equals(3, false): \
1 = "( $$1 ) 2>&1"
output = $$system("$$1", lines, result)
lg = lg =
for (l, output): \ for (l, output): \
lg += "> $$l" lg += "> $$l"

View File

@ -35,7 +35,7 @@ set(_qt5$${CMAKE_MODULE_NAME}_install_prefix \"$$[QT_INSTALL_PREFIX]\")
!!IF !equals(TEMPLATE, aux) !!IF !equals(TEMPLATE, aux)
# For backwards compatibility only. Use Qt5$${CMAKE_MODULE_NAME}_VERSION instead. # For backwards compatibility only. Use Qt5$${CMAKE_MODULE_NAME}_VERSION instead.
set(Qt5$${CMAKE_MODULE_NAME}_VERSION_STRING "$$eval(QT.$${MODULE}.MAJOR_VERSION).$$eval(QT.$${MODULE}.MINOR_VERSION).$$eval(QT.$${MODULE}.PATCH_VERSION)") set(Qt5$${CMAKE_MODULE_NAME}_VERSION_STRING "$$eval(QT.$${MODULE}.VERSION)")
set(Qt5$${CMAKE_MODULE_NAME}_LIBRARIES Qt5::$${CMAKE_MODULE_NAME}) set(Qt5$${CMAKE_MODULE_NAME}_LIBRARIES Qt5::$${CMAKE_MODULE_NAME})
!!ENDIF // TEMPLATE != aux !!ENDIF // TEMPLATE != aux

View File

@ -124,8 +124,12 @@ c++11|c++14|c++1z {
cxxstd = CXX11 cxxstd = CXX11
} }
# Check if we should disable the GNU extensions or not # Check if we should disable compiler extensions or not
!strict_c++:!isEmpty(QMAKE_CXXFLAGS_GNU$$cxxstd): cxxstd = GNU$$cxxstd isEmpty(QMAKE_CXXFLAGS_GNU$$cxxstd) {
strict_c++: QMAKE_CXXFLAGS += $$QMAKE_CXXFLAGS_STRICTCXX
} else {
!strict_c++: cxxstd = GNU$$cxxstd
}
QMAKE_CXXFLAGS += $$eval(QMAKE_CXXFLAGS_$$cxxstd) QMAKE_CXXFLAGS += $$eval(QMAKE_CXXFLAGS_$$cxxstd)
QMAKE_LFLAGS += $$eval(QMAKE_LFLAGS_$$cxxstd) QMAKE_LFLAGS += $$eval(QMAKE_LFLAGS_$$cxxstd)
@ -139,6 +143,3 @@ utf8_source {
} }
!precompile_header: SOURCES += $$NO_PCH_SOURCES !precompile_header: SOURCES += $$NO_PCH_SOURCES
QMAKE_INCDIR += $$QMAKE_INCDIR_POST
QMAKE_LIBDIR += $$QMAKE_LIBDIR_POST

View File

@ -581,7 +581,8 @@ defineTest(qtConfLibrary_pkgConfig) {
version ~= s/[^0-9.].*$// version ~= s/[^0-9.].*$//
$${1}.version = $$first(version) $${1}.version = $$first(version)
export($${1}.version) export($${1}.version)
$${1}.libs = $$libpaths $$libs libpaths += $$libs
$${1}.libs = "$$libpaths"
export($${1}.libs) export($${1}.libs)
return(true) return(true)
} }

View File

@ -8,8 +8,8 @@ QMAKE_PLATFORM = freebsd
include(../common/bsd/bsd.conf) include(../common/bsd/bsd.conf)
# Addon software goes into /usr/local on FreeBSD, by default we will look there # Addon software goes into /usr/local on FreeBSD, by default we will look there
QMAKE_INCDIR = /usr/local/include QMAKE_INCDIR_POST = /usr/local/include
QMAKE_LIBDIR = /usr/local/lib QMAKE_LIBDIR_POST = /usr/local/lib
QMAKE_LFLAGS_NOUNDEF = -Wl,--no-undefined QMAKE_LFLAGS_NOUNDEF = -Wl,--no-undefined

View File

@ -8,8 +8,8 @@ QMAKE_PLATFORM = freebsd
include(../common/bsd/bsd.conf) include(../common/bsd/bsd.conf)
# Addon software goes into /usr/local on FreeBSD, by default we will look there # Addon software goes into /usr/local on FreeBSD, by default we will look there
QMAKE_INCDIR = /usr/local/include QMAKE_INCDIR_POST = /usr/local/include
QMAKE_LIBDIR = /usr/local/lib QMAKE_LIBDIR_POST = /usr/local/lib
include(../common/gcc-base-unix.conf) include(../common/gcc-base-unix.conf)
include(../common/g++-unix.conf) include(../common/g++-unix.conf)

View File

@ -8,8 +8,8 @@ QMAKE_PLATFORM = netbsd
include(../common/bsd/bsd.conf) include(../common/bsd/bsd.conf)
# Addon software goes into /usr/pkg on NetBSD, by default we will look there # Addon software goes into /usr/pkg on NetBSD, by default we will look there
QMAKE_INCDIR = /usr/pkg/include QMAKE_INCDIR_POST = /usr/pkg/include
QMAKE_LIBDIR = /usr/pkg/lib QMAKE_LIBDIR_POST = /usr/pkg/lib
# System provided X11 defaults to X11R7 path on NetBSD since 5.0 # System provided X11 defaults to X11R7 path on NetBSD since 5.0
QMAKE_INCDIR_X11 = /usr/X11R7/include QMAKE_INCDIR_X11 = /usr/X11R7/include

View File

@ -8,8 +8,8 @@ QMAKE_PLATFORM = openbsd
include(../common/bsd/bsd.conf) include(../common/bsd/bsd.conf)
# Addon software goes into /usr/local on OpenBSD, by default we will look there # Addon software goes into /usr/local on OpenBSD, by default we will look there
QMAKE_INCDIR = /usr/local/include QMAKE_INCDIR_POST = /usr/local/include
QMAKE_LIBDIR = /usr/local/lib QMAKE_LIBDIR_POST = /usr/local/lib
# System provided X11 defaults to X11R6 path on OpenBSD # System provided X11 defaults to X11R6 path on OpenBSD
QMAKE_INCDIR_X11 = /usr/X11R6/include QMAKE_INCDIR_X11 = /usr/X11R6/include

View File

@ -94,6 +94,10 @@ UnixMakefileGenerator::init()
!project->values("QMAKE_LIB_FLAG").isEmpty() && !project->values("QMAKE_LIB_FLAG").isEmpty() &&
project->isActiveConfig("dll")) project->isActiveConfig("dll"))
project->values("QMAKE_LFLAGS") += project->values("QMAKE_LFLAGS_PREBIND"); project->values("QMAKE_LFLAGS") += project->values("QMAKE_LFLAGS_PREBIND");
project->values("QMAKE_INCDIR") += project->values("QMAKE_INCDIR_POST");
project->values("QMAKE_LIBDIR") += project->values("QMAKE_LIBDIR_POST");
project->values("QMAKE_RPATHDIR") += project->values("QMAKE_RPATHDIR_POST");
project->values("QMAKE_RPATHLINKDIR") += project->values("QMAKE_RPATHLINKDIR_POST");
if(!project->isEmpty("QMAKE_INCDIR")) if(!project->isEmpty("QMAKE_INCDIR"))
project->values("INCLUDEPATH") += project->values("QMAKE_INCDIR"); project->values("INCLUDEPATH") += project->values("QMAKE_INCDIR");
ProStringList ldadd; ProStringList ldadd;

View File

@ -174,6 +174,9 @@ void Win32MakefileGenerator::processVars()
else if (project->first("TEMPLATE").startsWith("vc")) else if (project->first("TEMPLATE").startsWith("vc"))
project->values("MAKEFILE") = project->values("QMAKE_PROJECT_NAME"); project->values("MAKEFILE") = project->values("QMAKE_PROJECT_NAME");
project->values("QMAKE_INCDIR") += project->values("QMAKE_INCDIR_POST");
project->values("QMAKE_LIBDIR") += project->values("QMAKE_LIBDIR_POST");
if (!project->values("QMAKE_INCDIR").isEmpty()) if (!project->values("QMAKE_INCDIR").isEmpty())
project->values("INCLUDEPATH") += project->values("QMAKE_INCDIR"); project->values("INCLUDEPATH") += project->values("QMAKE_INCDIR");

View File

@ -1246,6 +1246,11 @@
#else #else
# define QT_HAS_INCLUDE_NEXT(x) 0 # define QT_HAS_INCLUDE_NEXT(x) 0
#endif #endif
#ifdef __has_feature
# define QT_HAS_FEATURE(x) __has_feature(x)
#else
# define QT_HAS_FEATURE(x) 0
#endif
/* /*
* Warning/diagnostic handling * Warning/diagnostic handling

View File

@ -86,6 +86,12 @@
# include <sys/systeminfo.h> # include <sys/systeminfo.h>
#endif #endif
#if defined(Q_OS_DARWIN)
# include <mach/machine.h>
# include <sys/sysctl.h>
# include <sys/types.h>
#endif
#ifdef Q_OS_UNIX #ifdef Q_OS_UNIX
#include <sys/utsname.h> #include <sys/utsname.h>
#include <private/qcore_unix_p.h> #include <private/qcore_unix_p.h>
@ -2484,6 +2490,20 @@ QString QSysInfo::currentCpuArchitecture()
case PROCESSOR_ARCHITECTURE_IA64: case PROCESSOR_ARCHITECTURE_IA64:
return QStringLiteral("ia64"); return QStringLiteral("ia64");
} }
#elif defined(Q_OS_DARWIN)
cpu_type_t type;
size_t size = sizeof(type);
sysctlbyname("hw.cputype", &type, &size, NULL, 0);
switch (type) {
case CPU_TYPE_X86:
return QStringLiteral("i386");
case CPU_TYPE_X86_64:
return QStringLiteral("x86_64");
case CPU_TYPE_ARM:
return QStringLiteral("arm");
case CPU_TYPE_ARM64:
return QStringLiteral("arm64");
}
#elif defined(Q_OS_UNIX) #elif defined(Q_OS_UNIX)
long ret = -1; long ret = -1;
struct utsname u; struct utsname u;
@ -3306,20 +3326,26 @@ bool qEnvironmentVariableIsEmpty(const char *varName) Q_DECL_NOEXCEPT
Equivalent to Equivalent to
\code \code
qgetenv(varName).toInt() qgetenv(varName).toInt(ok, 0)
\endcode \endcode
except that it's much faster, and can't throw exceptions. except that it's much faster, and can't throw exceptions.
\note there's a limit on the length of the value, which is sufficient for
all valid values of int, not counting leading zeroes or spaces. Values that
are too long will either be truncated or this function will set \a ok to \c
false.
\sa qgetenv(), qEnvironmentVariableIsSet() \sa qgetenv(), qEnvironmentVariableIsSet()
*/ */
int qEnvironmentVariableIntValue(const char *varName, bool *ok) Q_DECL_NOEXCEPT int qEnvironmentVariableIntValue(const char *varName, bool *ok) Q_DECL_NOEXCEPT
{ {
QMutexLocker locker(&environmentMutex);
#if defined(_MSC_VER) && _MSC_VER >= 1400
// we provide a buffer that can hold any int value:
static const int NumBinaryDigitsPerOctalDigit = 3; static const int NumBinaryDigitsPerOctalDigit = 3;
static const int MaxDigitsForOctalInt = static const int MaxDigitsForOctalInt =
(std::numeric_limits<uint>::digits + NumBinaryDigitsPerOctalDigit - 1) / NumBinaryDigitsPerOctalDigit; (std::numeric_limits<uint>::digits + NumBinaryDigitsPerOctalDigit - 1) / NumBinaryDigitsPerOctalDigit;
QMutexLocker locker(&environmentMutex);
#if defined(_MSC_VER) && _MSC_VER >= 1400
// we provide a buffer that can hold any int value:
char buffer[MaxDigitsForOctalInt + 2]; // +1 for NUL +1 for optional '-' char buffer[MaxDigitsForOctalInt + 2]; // +1 for NUL +1 for optional '-'
size_t dummy; size_t dummy;
if (getenv_s(&dummy, buffer, sizeof buffer, varName) != 0) { if (getenv_s(&dummy, buffer, sizeof buffer, varName) != 0) {
@ -3329,15 +3355,16 @@ int qEnvironmentVariableIntValue(const char *varName, bool *ok) Q_DECL_NOEXCEPT
} }
#else #else
const char * const buffer = ::getenv(varName); const char * const buffer = ::getenv(varName);
if (!buffer || !*buffer) { if (!buffer || strlen(buffer) > MaxDigitsForOctalInt + 2) {
if (ok) if (ok)
*ok = false; *ok = false;
return 0; return 0;
} }
#endif #endif
bool ok_ = true; bool ok_ = true;
const qlonglong value = qstrtoll(buffer, Q_NULLPTR, 0, &ok_); const char *endptr;
if (int(value) != value) { // this is the check in QByteArray::toInt(), keep it in sync const qlonglong value = qstrtoll(buffer, &endptr, 0, &ok_);
if (int(value) != value || *endptr != '\0') { // this is the check in QByteArray::toInt(), keep it in sync
if (ok) if (ok)
*ok = false; *ok = false;
return 0; return 0;

View File

@ -647,7 +647,12 @@ inline void qt_noop(void) {}
*/ */
#if !defined(QT_NO_EXCEPTIONS) #if !defined(QT_NO_EXCEPTIONS)
# if defined(QT_BOOTSTRAPPED) || (defined(Q_CC_GNU) && !defined (__EXCEPTIONS) && !defined(Q_MOC_RUN)) # if !defined(Q_MOC_RUN)
# if (defined(Q_CC_CLANG) && !defined(Q_CC_INTEL) && !QT_HAS_FEATURE(cxx_exceptions)) || \
(defined(Q_CC_GNU) && !defined(__EXCEPTIONS))
# define QT_NO_EXCEPTIONS
# endif
# elif defined(QT_BOOTSTRAPPED)
# define QT_NO_EXCEPTIONS # define QT_NO_EXCEPTIONS
# endif # endif
#endif #endif

View File

@ -94,8 +94,8 @@
ARM is bi-endian, detect using __ARMEL__ or __ARMEB__, falling back to ARM is bi-endian, detect using __ARMEL__ or __ARMEB__, falling back to
auto-detection implemented below. auto-detection implemented below.
*/ */
#if defined(__arm__) || defined(__TARGET_ARCH_ARM) || defined(_M_ARM) || defined(__aarch64__) #if defined(__arm__) || defined(__TARGET_ARCH_ARM) || defined(_M_ARM) || defined(__aarch64__) || defined(__ARM64__)
# if defined(__aarch64__) # if defined(__aarch64__) || defined(__ARM64__)
# define Q_PROCESSOR_ARM_64 # define Q_PROCESSOR_ARM_64
# define Q_PROCESSOR_WORDSIZE 8 # define Q_PROCESSOR_WORDSIZE 8
# else # else
@ -109,7 +109,8 @@
# define Q_PROCESSOR_ARM _M_ARM # define Q_PROCESSOR_ARM _M_ARM
# elif defined(__ARM64_ARCH_8__) \ # elif defined(__ARM64_ARCH_8__) \
|| defined(__aarch64__) \ || defined(__aarch64__) \
|| defined(__CORE_CORTEXAV8__) // GHS-specific for INTEGRITY || defined(__ARMv8__) \
|| defined(__ARMv8_A__)
# define Q_PROCESSOR_ARM 8 # define Q_PROCESSOR_ARM 8
# elif defined(__ARM_ARCH_7__) \ # elif defined(__ARM_ARCH_7__) \
|| defined(__ARM_ARCH_7A__) \ || defined(__ARM_ARCH_7A__) \
@ -117,7 +118,7 @@
|| defined(__ARM_ARCH_7M__) \ || defined(__ARM_ARCH_7M__) \
|| defined(__ARM_ARCH_7S__) \ || defined(__ARM_ARCH_7S__) \
|| defined(_ARM_ARCH_7) \ || defined(_ARM_ARCH_7) \
|| defined(__CORE_CORTEXA__) // GHS-specific for INTEGRITY || defined(__CORE_CORTEXA__)
# define Q_PROCESSOR_ARM 7 # define Q_PROCESSOR_ARM 7
# elif defined(__ARM_ARCH_6__) \ # elif defined(__ARM_ARCH_6__) \
|| defined(__ARM_ARCH_6J__) \ || defined(__ARM_ARCH_6J__) \

View File

@ -195,8 +195,12 @@ static bool shouldIncludeFs(const QStorageIterator &it)
#if defined(Q_OS_BSD4) #if defined(Q_OS_BSD4)
#ifndef MNT_NOWAIT
# define MNT_NOWAIT 0
#endif
inline QStorageIterator::QStorageIterator() inline QStorageIterator::QStorageIterator()
: entryCount(::getmntinfo(&stat_buf, 0)), : entryCount(::getmntinfo(&stat_buf, MNT_NOWAIT)),
currentIndex(-1) currentIndex(-1)
{ {
} }

View File

@ -2044,7 +2044,7 @@ Qt::DropActions QAbstractItemModel::supportedDropActions() const
Qt::DropActions QAbstractItemModel::supportedDragActions() const Qt::DropActions QAbstractItemModel::supportedDragActions() const
{ {
Q_D(const QAbstractItemModel); Q_D(const QAbstractItemModel);
if (d->supportedDragActions != Qt::IgnoreAction) if (int(d->supportedDragActions) != -1)
return d->supportedDragActions; return d->supportedDragActions;
return supportedDropActions(); return supportedDropActions();
} }

View File

@ -198,6 +198,7 @@ public:
static QObjectPrivate *get(QObject *o) { static QObjectPrivate *get(QObject *o) {
return o->d_func(); return o->d_func();
} }
static const QObjectPrivate *get(const QObject *o) { return o->d_func(); }
int signalIndex(const char *signalName, const QMetaObject **meta = 0) const; int signalIndex(const char *signalName, const QMetaObject **meta = 0) const;
inline bool isSignalConnected(uint signalIdx, bool checkDeclarative = true) const; inline bool isSignalConnected(uint signalIdx, bool checkDeclarative = true) const;

View File

@ -2363,7 +2363,7 @@ QByteArray QVariant::toByteArray() const
\fn QPoint QVariant::toPoint() const \fn QPoint QVariant::toPoint() const
Returns the variant as a QPoint if the variant has userType() Returns the variant as a QPoint if the variant has userType()
\l QMetaType::QPointF or \l QMetaType::QPointF; otherwise returns a null \l QMetaType::QPoint or \l QMetaType::QPointF; otherwise returns a null
QPoint. QPoint.
\sa canConvert(), convert() \sa canConvert(), convert()

View File

@ -49,6 +49,11 @@ QT_BEGIN_NAMESPACE
namespace QtPrivate { namespace QtPrivate {
QT_WARNING_PUSH
#if defined(Q_CC_GNU) && Q_CC_GNU >= 700
QT_WARNING_DISABLE_GCC("-Wstringop-overflow")
#endif
template <class T> template <class T>
struct QPodArrayOps struct QPodArrayOps
: QTypedArrayData<T> : QTypedArrayData<T>
@ -131,6 +136,7 @@ struct QPodArrayOps
this->size -= (e - b); this->size -= (e - b);
} }
}; };
QT_WARNING_POP
template <class T> template <class T>
struct QGenericArrayOps struct QGenericArrayOps

View File

@ -4791,4 +4791,26 @@ QByteArray QByteArray::toPercentEncoding(const QByteArray &exclude, const QByteA
\internal \internal
*/ */
/*!
\macro QByteArrayLiteral(ba)
\relates QByteArray
The macro generates the data for a QByteArray out of the string literal
\a ba at compile time. Creating a QByteArray from it is free in this case, and
the generated byte array data is stored in the read-only segment of the
compiled object file.
For instance:
\code
QByteArray ba = QByteArrayLiteral("byte array contents");
\endcode
Using QByteArrayLiteral instead of a double quoted plain C++ string literal
can significantly speed up creation of QByteArray instances from data known
at compile time.
\sa QStringLiteral
*/
QT_END_NAMESPACE QT_END_NAMESPACE

View File

@ -11576,52 +11576,47 @@ QString QString::toHtmlEscaped() const
\macro QStringLiteral(str) \macro QStringLiteral(str)
\relates QString \relates QString
The macro generates the data for a QString out of \a str at compile time if the compiler supports it. The macro generates the data for a QString out of the string literal \a str
Creating a QString from it is free in this case, and the generated string data is stored in at compile time. Creating a QString from it is free in this case, and the
the read-only segment of the compiled object file. generated string data is stored in the read-only segment of the compiled
object file.
For compilers not supporting the creation of compile time strings, QStringLiteral will fall back to If you have code that looks like this:
QString::fromUtf8().
If you have code looking like:
\code \code
// hasAttribute takes a QString argument
if (node.hasAttribute("http-contents-length")) //... if (node.hasAttribute("http-contents-length")) //...
\endcode \endcode
One temporary QString will be created to be passed as the hasAttribute function parameter.
This can be quite expensive, as it involves a memory allocation and the copy and the conversion
of the data into QString's internal encoding.
This can be avoided by doing then a temporary QString will be created to be passed as the \c{hasAttribute}
function parameter. This can be quite expensive, as it involves a memory
allocation and the copy/conversion of the data into QString's internal
encoding.
This cost can be avoided by using QStringLiteral instead:
\code \code
if (node.hasAttribute(QStringLiteral("http-contents-length"))) //... if (node.hasAttribute(QStringLiteral("http-contents-length"))) //...
\endcode \endcode
Then the QString's internal data will be generated at compile time and no conversion or allocation
will occur at runtime
Using QStringLiteral instead of a double quoted ascii literal can significantly speed up creation In this case, QString's internal data will be generated at compile time; no
of QString's from data known at compile time. conversion or allocation will occur at runtime.
If the compiler is C++11 enabled the string \a str can actually contain unicode data. Using QStringLiteral instead of a double quoted plain C++ string literal can
significantly speed up creation of QString instances from data known at
compile time.
\note QLatin1String can still be more efficient than QStringLiteral
when the string is passed to a function that has an overload taking
QLatin1String and this overload avoids conversion to QString. For
instance, QString::operator==() can compare to a QLatin1String
directly:
\note There are still a few cases in which QLatin1String is more efficient than QStringLiteral:
If it is passed to a function that has an overload that takes the QLatin1String directly, without
conversion to QString. For instance, this is the case of QString::operator==
\code \code
if (attribute.name() == QLatin1String("http-contents-length")) //... if (attribute.name() == QLatin1String("http-contents-length")) //...
\endcode \endcode
\note There are some restrictions when using the MSVC 2010 or 2012 compilers. The example snippets \sa QByteArrayLiteral
provided here fail to compile with them.
\list
\li Concatenated string literals cannot be used with QStringLiteral.
\code
QString s = QStringLiteral("a" "b");
\endcode
\li QStringLiteral cannot be used to initialize lists or arrays of QString.
\code
QString a[] = { QStringLiteral("a"), QStringLiteral("b") };
\endcode
\endlist
*/ */
/*! /*!

View File

@ -87,7 +87,8 @@
"test": "qpa/kms", "test": "qpa/kms",
"sources": [ "sources": [
{ "type": "pkgConfig", "args": "libdrm" }, { "type": "pkgConfig", "args": "libdrm" },
"-ldrm" { "libs": "-ldrm", "condition": "!config.integrity" },
{ "libs": "-ldrm-nvdc -lposix -livfs -lnvll -lnvdc -lnvrm -lnvrm_graphics -lnvos -lnvtegrahv", "condition": "config.integrity" }
] ]
}, },
"egl": { "egl": {
@ -150,6 +151,13 @@
{ "type": "pkgConfig", "args": "libinput" } { "type": "pkgConfig", "args": "libinput" }
] ]
}, },
"integrityhid": {
"label": "integrityhid",
"test": "qpa/integrityhid",
"sources": [
{ "libs": "-lhiddev -lusbhid -lusb" }
]
},
"libjpeg": { "libjpeg": {
"label": "libjpeg", "label": "libjpeg",
"test": "unix/libjpeg", "test": "unix/libjpeg",
@ -379,6 +387,11 @@
"type": "compile", "type": "compile",
"test": "unix/evdev" "test": "unix/evdev"
}, },
"integrityfb": {
"label": "INTEGRITY framebuffer",
"type": "compile",
"test": "qpa/integrityfb"
},
"libinput_axis_api": { "libinput_axis_api": {
"label": "axis API in libinput", "label": "axis API in libinput",
"type": "compile", "type": "compile",
@ -447,7 +460,6 @@
"combined-angle-lib": { "combined-angle-lib": {
"label": "Combined ANGLE Library", "label": "Combined ANGLE Library",
"autoDetect": false, "autoDetect": false,
"enable": "features.angle",
"condition": "features.angle", "condition": "features.angle",
"output": [ "publicFeature" ] "output": [ "publicFeature" ]
}, },
@ -526,7 +538,7 @@
"integrityfb": { "integrityfb": {
"label": "INTEGRITY framebuffer", "label": "INTEGRITY framebuffer",
"section": "Platform plugins", "section": "Platform plugins",
"condition": "config.integrity", "condition": "config.integrity && tests.integrityfb",
"output": [ "privateFeature" ] "output": [ "privateFeature" ]
}, },
"kms": { "kms": {
@ -539,6 +551,11 @@
"condition": "features.libudev && libs.libinput", "condition": "features.libudev && libs.libinput",
"output": [ "privateFeature" ] "output": [ "privateFeature" ]
}, },
"integrityhid": {
"label": "INTEGRITY HID",
"condition": "config.integrity && libs.integrityhid",
"output": [ "privateFeature" ]
},
"libinput-axis-api": { "libinput-axis-api": {
"label": "axis API in libinput", "label": "axis API in libinput",
"condition": "features.libinput && tests.libinput_axis_api", "condition": "features.libinput && tests.libinput_axis_api",
@ -1144,6 +1161,7 @@ QMAKE_LIBDIR_OPENGL[_ES2] and QMAKE_LIBS_OPENGL[_ES2] in the mkspec for your pla
"entries": [ "entries": [
"evdev", "evdev",
"libinput", "libinput",
"integrityhid",
"mtdev", "mtdev",
"tslib", "tslib",
"xkbcommon-evdev" "xkbcommon-evdev"

View File

@ -10,7 +10,6 @@ HEADERS += \
image/qimageiohandler.h \ image/qimageiohandler.h \
image/qimagereader.h \ image/qimagereader.h \
image/qimagewriter.h \ image/qimagewriter.h \
image/qmovie.h \
image/qpaintengine_pic_p.h \ image/qpaintengine_pic_p.h \
image/qpicture.h \ image/qpicture.h \
image/qpicture_p.h \ image/qpicture_p.h \
@ -41,7 +40,6 @@ SOURCES += \
image/qpixmap.cpp \ image/qpixmap.cpp \
image/qpixmapcache.cpp \ image/qpixmapcache.cpp \
image/qplatformpixmap.cpp \ image/qplatformpixmap.cpp \
image/qmovie.cpp \
image/qpixmap_raster.cpp \ image/qpixmap_raster.cpp \
image/qpixmap_blitter.cpp \ image/qpixmap_blitter.cpp \
image/qimagepixmapcleanuphooks.cpp \ image/qimagepixmapcleanuphooks.cpp \
@ -50,6 +48,10 @@ SOURCES += \
image/qiconengine.cpp \ image/qiconengine.cpp \
image/qiconengineplugin.cpp \ image/qiconengineplugin.cpp \
qtConfig(movie) {
HEADERS += image/qmovie.h
SOURCES += image/qmovie.cpp
}
win32:!winrt: SOURCES += image/qpixmap_win.cpp win32:!winrt: SOURCES += image/qpixmap_win.cpp

View File

@ -174,8 +174,6 @@
#include "qmovie.h" #include "qmovie.h"
#ifndef QT_NO_MOVIE
#include "qglobal.h" #include "qglobal.h"
#include "qimage.h" #include "qimage.h"
#include "qimagereader.h" #include "qimagereader.h"
@ -1062,5 +1060,3 @@ void QMovie::setCacheMode(CacheMode cacheMode)
QT_END_NAMESPACE QT_END_NAMESPACE
#include "moc_qmovie.cpp" #include "moc_qmovie.cpp"
#endif // QT_NO_MOVIE

View File

@ -42,15 +42,14 @@
#include <QtGui/qtguiglobal.h> #include <QtGui/qtguiglobal.h>
#ifndef QT_NO_MOVIE
#include <QtCore/qobject.h> #include <QtCore/qobject.h>
#include <QtCore/qbytearray.h> #include <QtCore/qbytearray.h>
#include <QtCore/qlist.h> #include <QtCore/qlist.h>
#include <QtGui/qimagereader.h> #include <QtGui/qimagereader.h>
QT_BEGIN_NAMESPACE QT_REQUIRE_CONFIG(movie);
QT_BEGIN_NAMESPACE
class QByteArray; class QByteArray;
class QColor; class QColor;
@ -146,6 +145,4 @@ private:
QT_END_NAMESPACE QT_END_NAMESPACE
#endif // QT_NO_MOVIE
#endif // QMOVIE_H #endif // QMOVIE_H

View File

@ -6010,7 +6010,7 @@ DrawHelper qDrawHelper[QImage::NImageFormats] =
// Format_ARGB32, // Format_ARGB32,
{ {
blend_color_generic, blend_color_generic,
qt_gradient_argb32, blend_src_generic,
qt_bitmapblit_argb32, qt_bitmapblit_argb32,
qt_alphamapblit_argb32, qt_alphamapblit_argb32,
qt_alphargbblit_argb32, qt_alphargbblit_argb32,

View File

@ -1250,20 +1250,22 @@ void QNativeSocketEngine::handleConnectOpFinished(bool success, QAbstractSocket:
void QNativeSocketEngine::handleNewDatagrams(const QList<WinRtDatagram> &datagrams) void QNativeSocketEngine::handleNewDatagrams(const QList<WinRtDatagram> &datagrams)
{ {
Q_D(QNativeSocketEngine); Q_D(QNativeSocketEngine);
// Defer putting the datagrams into the list until the next event loop iteration QMutexLocker locker(&d->readMutex);
// (where the readyRead signal is emitted as well) d->pendingDatagrams.append(datagrams);
QMetaObject::invokeMethod(this, "putIntoPendingDatagramsList", Qt::QueuedConnection,
Q_ARG(QList<WinRtDatagram>, datagrams));
if (d->notifyOnRead) if (d->notifyOnRead)
emit readReady(); emit readReady();
} }
void QNativeSocketEngine::handleNewData(const QVector<QByteArray> &data) void QNativeSocketEngine::handleNewData(const QVector<QByteArray> &data)
{ {
// Defer putting the data into the list until the next event loop iteration Q_D(QNativeSocketEngine);
// (where the readyRead signal is emitted as well) QMutexLocker locker(&d->readMutex);
QMetaObject::invokeMethod(this, "putIntoPendingData", Qt::QueuedConnection, d->pendingData.append(data);
Q_ARG(QVector<QByteArray>, data)); for (const QByteArray &newData : data)
d->bytesAvailable += newData.length();
locker.unlock();
if (d->notifyOnRead)
readNotification();
} }
void QNativeSocketEngine::handleTcpError(QAbstractSocket::SocketError error) void QNativeSocketEngine::handleTcpError(QAbstractSocket::SocketError error)
@ -1284,25 +1286,6 @@ void QNativeSocketEngine::handleTcpError(QAbstractSocket::SocketError error)
emit readReady(); emit readReady();
} }
void QNativeSocketEngine::putIntoPendingDatagramsList(const QList<WinRtDatagram> &datagrams)
{
Q_D(QNativeSocketEngine);
QMutexLocker locker(&d->readMutex);
d->pendingDatagrams.append(datagrams);
}
void QNativeSocketEngine::putIntoPendingData(const QVector<QByteArray> &data)
{
Q_D(QNativeSocketEngine);
QMutexLocker locker(&d->readMutex);
d->pendingData.append(data);
for (const QByteArray &newData : data)
d->bytesAvailable += newData.length();
locker.unlock();
if (d->notifyOnRead)
readNotification();
}
bool QNativeSocketEnginePrivate::createNewSocket(QAbstractSocket::SocketType socketType, QAbstractSocket::NetworkLayerProtocol &socketProtocol) bool QNativeSocketEnginePrivate::createNewSocket(QAbstractSocket::SocketType socketType, QAbstractSocket::NetworkLayerProtocol &socketProtocol)
{ {
Q_UNUSED(socketProtocol); Q_UNUSED(socketProtocol);

View File

@ -183,9 +183,6 @@ private slots:
void handleTcpError(QAbstractSocket::SocketError error); void handleTcpError(QAbstractSocket::SocketError error);
private: private:
Q_INVOKABLE void putIntoPendingDatagramsList(const QList<WinRtDatagram> &datagrams);
Q_INVOKABLE void putIntoPendingData(const QVector<QByteArray> &data);
Q_DECLARE_PRIVATE(QNativeSocketEngine) Q_DECLARE_PRIVATE(QNativeSocketEngine)
Q_DISABLE_COPY(QNativeSocketEngine) Q_DISABLE_COPY(QNativeSocketEngine)
}; };

View File

@ -143,7 +143,7 @@ QSslCertificate::QSslCertificate(QIODevice *device, QSsl::EncodingFormat format)
: d(new QSslCertificatePrivate) : d(new QSslCertificatePrivate)
{ {
QSslSocketPrivate::ensureInitialized(); QSslSocketPrivate::ensureInitialized();
if (device) if (device && QSslSocket::supportsSsl())
d->init(device->readAll(), format); d->init(device->readAll(), format);
} }
@ -157,6 +157,7 @@ QSslCertificate::QSslCertificate(const QByteArray &data, QSsl::EncodingFormat fo
: d(new QSslCertificatePrivate) : d(new QSslCertificatePrivate)
{ {
QSslSocketPrivate::ensureInitialized(); QSslSocketPrivate::ensureInitialized();
if (QSslSocket::supportsSsl())
d->init(data, format); d->init(data, format);
} }

View File

@ -1226,9 +1226,32 @@ bool QSslSocketBackendPrivate::verifyPeerTrust()
QCFType<SecCertificateRef> certRef = SecCertificateCreateWithData(NULL, certData); QCFType<SecCertificateRef> certRef = SecCertificateCreateWithData(NULL, certData);
CFArrayAppendValue(certArray, certRef); CFArrayAppendValue(certArray, certRef);
} }
SecTrustSetAnchorCertificates(trust, certArray); SecTrustSetAnchorCertificates(trust, certArray);
// Secure Transport should use anchors only from our QSslConfiguration:
SecTrustSetAnchorCertificatesOnly(trust, true); // By default SecTrustEvaluate uses both CA certificates provided in
// QSslConfiguration and the ones from the system database. This behavior can
// be unexpected if a user's code tries to limit the trusted CAs to those
// explicitly set in QSslConfiguration.
// Since on macOS we initialize the default QSslConfiguration copying the
// system CA certificates (using SecTrustSettingsCopyCertificates) we can
// call SecTrustSetAnchorCertificatesOnly(trust, true) to force SecTrustEvaluate
// to use anchors only from our QSslConfiguration.
// Unfortunately, SecTrustSettingsCopyCertificates is not available on iOS
// and the default QSslConfiguration always has an empty list of system CA
// certificates. This leaves no way to provide client code with access to the
// actual system CA certificate list (which most use-cases need) other than
// by letting SecTrustEvaluate fall through to the system list; so, in this case
// (even though the client code may have provided its own certs), we retain
// the default behavior.
#ifdef Q_OS_MACOS
const bool anchorsFromConfigurationOnly = true;
#else
const bool anchorsFromConfigurationOnly = false;
#endif
SecTrustSetAnchorCertificatesOnly(trust, anchorsFromConfigurationOnly);
SecTrustResultType trustResult = kSecTrustResultInvalid; SecTrustResultType trustResult = kSecTrustResultInvalid;
SecTrustEvaluate(trust, &trustResult); SecTrustEvaluate(trust, &trustResult);

View File

@ -53,7 +53,9 @@
#ifdef QT_EGL_NO_X11 #ifdef QT_EGL_NO_X11
# define MESA_EGL_NO_X11_HEADERS // MESA # define MESA_EGL_NO_X11_HEADERS // MESA
# if !defined(Q_OS_INTEGRITY)
# define WIN_INTERFACE_CUSTOM // NV # define WIN_INTERFACE_CUSTOM // NV
# endif // Q_OS_INTEGRITY
#endif // QT_EGL_NO_X11 #endif // QT_EGL_NO_X11
#ifdef QT_EGL_WAYLAND #ifdef QT_EGL_WAYLAND

View File

@ -967,15 +967,10 @@ int QFontEngineFT::loadFlags(QGlyphSet *set, GlyphFormat format, int flags,
if (format == Format_Mono) { if (format == Format_Mono) {
load_target = FT_LOAD_TARGET_MONO; load_target = FT_LOAD_TARGET_MONO;
} else if (format == Format_A32) { } else if (format == Format_A32) {
if (subpixelType == Subpixel_RGB || subpixelType == Subpixel_BGR) { if (subpixelType == Subpixel_RGB || subpixelType == Subpixel_BGR)
if (default_hint_style == HintFull)
load_target = FT_LOAD_TARGET_LCD;
hsubpixel = true; hsubpixel = true;
} else if (subpixelType == Subpixel_VRGB || subpixelType == Subpixel_VBGR) { else if (subpixelType == Subpixel_VRGB || subpixelType == Subpixel_VBGR)
if (default_hint_style == HintFull)
load_target = FT_LOAD_TARGET_LCD_V;
vfactor = 3; vfactor = 3;
}
} else if (format == Format_ARGB) { } else if (format == Format_ARGB) {
#ifdef FT_LOAD_COLOR #ifdef FT_LOAD_COLOR
load_flags |= FT_LOAD_COLOR; load_flags |= FT_LOAD_COLOR;

View File

@ -448,19 +448,41 @@ QFontEngine *QWinRTFontDatabase::fontEngine(const QFontDef &fontDef, void *handl
return QFontEngineFT::create(fontDef, faceId, fontData); return QFontEngineFT::create(fontDef, faceId, fontData);
} }
QString QWinRTFontDatabase::familyForStyleHint(QFont::StyleHint styleHint)
{
switch (styleHint) {
case QFont::Times:
return QStringLiteral("Times New Roman");
case QFont::Courier:
return QStringLiteral("Courier New");
case QFont::Monospace:
return QStringLiteral("Courier New");
case QFont::Cursive:
return QStringLiteral("Comic Sans MS");
case QFont::Fantasy:
return QStringLiteral("Impact");
case QFont::Decorative:
return QStringLiteral("Old English");
case QFont::Helvetica:
return QStringLiteral("Segoe UI");
case QFont::System:
default:
break;
}
return QStringLiteral("Segoe UI");
}
QStringList QWinRTFontDatabase::fallbacksForFamily(const QString &family, QFont::Style style, QStringList QWinRTFontDatabase::fallbacksForFamily(const QString &family, QFont::Style style,
QFont::StyleHint styleHint, QFont::StyleHint styleHint,
QChar::Script script) const QChar::Script script) const
{ {
Q_UNUSED(style) Q_UNUSED(style)
Q_UNUSED(styleHint)
Q_UNUSED(script) Q_UNUSED(script)
qCDebug(lcQpaFonts) << __FUNCTION__ << family; qCDebug(lcQpaFonts) << __FUNCTION__ << family;
QStringList result; QStringList result;
if (family == QLatin1String("Helvetica")) result.append(QWinRTFontDatabase::familyForStyleHint(styleHint));
result.append(QStringLiteral("Arial"));
result.append(QFreeTypeFontDatabase::fallbacksForFamily(family, style, styleHint, script)); result.append(QFreeTypeFontDatabase::fallbacksForFamily(family, style, styleHint, script));
return result; return result;
} }

View File

@ -80,6 +80,8 @@ public:
QStringList fallbacksForFamily(const QString &family, QFont::Style style, QStringList fallbacksForFamily(const QString &family, QFont::Style style,
QFont::StyleHint styleHint, QChar::Script script) const override; QFont::StyleHint styleHint, QChar::Script script) const override;
void releaseHandle(void *handle) override; void releaseHandle(void *handle) override;
static QString familyForStyleHint(QFont::StyleHint styleHint);
private: private:
QHash<IDWriteFontFile *, FontDescription> m_fonts; QHash<IDWriteFontFile *, FontDescription> m_fonts;
QHash<QString, IDWriteFontFamily *> m_fontFamilies; QHash<QString, IDWriteFontFamily *> m_fontFamilies;

View File

@ -28,4 +28,8 @@ qtConfig(evdev)|qtConfig(libinput) {
include($$PWD/shared/shared.pri) include($$PWD/shared/shared.pri)
} }
qtConfig(integrityhid) {
include($$PWD/integrityhid/integrityhid.pri)
}
load(qt_module) load(qt_module)

View File

@ -0,0 +1,7 @@
HEADERS += \
$$PWD/qintegrityhidmanager.h
SOURCES += \
$$PWD/qintegrityhidmanager.cpp
QMAKE_USE_PRIVATE += integrityhid

View File

@ -0,0 +1,263 @@
/****************************************************************************
**
** Copyright (C) 2015 Green Hills Software
** Contact: https://www.qt.io/licensing/
**
** This file is part of the plugins of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and The Qt Company. For licensing terms
** and conditions see https://www.qt.io/terms-conditions. For further
** information use the contact form at https://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 3 as published by the Free Software
** Foundation and appearing in the file LICENSE.LGPL3 included in the
** packaging of this file. Please review the following information to
** ensure the GNU Lesser General Public License version 3 requirements
** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU
** General Public License version 2.0 or (at your option) the GNU General
** Public license version 3 or any later version approved by the KDE Free
** Qt Foundation. The licenses are as published by the Free Software
** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
** included in the packaging of this file. Please review the following
** information to ensure the GNU General Public License requirements will
** be met: https://www.gnu.org/licenses/gpl-2.0.html and
** https://www.gnu.org/licenses/gpl-3.0.html.
**
** $QT_END_LICENSE$
**
****************************************************************************/
#include "qintegrityhidmanager.h"
#include <QList>
#include <QPoint>
#include <QGuiApplication>
#include <qpa/qwindowsysteminterface.h>
#include <device/hiddriver.h>
#include <private/qguiapplication_p.h>
#include <private/qinputdevicemanager_p_p.h>
QT_BEGIN_NAMESPACE
class IntNotifier
{
static const Value ActivityPriority = 2;
protected:
Activity act;
public:
IntNotifier()
{
CheckSuccess(CreateActivity(CurrentTask(), ActivityPriority, false, (Value)this, &act));
};
~IntNotifier()
{
CheckSuccess(CloseActivity(act));
};
virtual void process_event() = 0;
virtual void async_wait() = 0;
};
class HIDDeviceHandler : IntNotifier
{
public:
HIDDeviceHandler(HIDDriver *hidd, HIDHandle hidh)
: driver(hidd), handle(hidh), currentPos(0, 0) { }
~HIDDeviceHandler()
{
CheckSuccess(gh_hid_close(handle));
};
void process_event(void) Q_DECL_OVERRIDE;
void async_wait(void) Q_DECL_OVERRIDE;
HIDDriver *get_driver(void) { return driver; };
HIDHandle get_handle(void) { return handle; };
private:
HIDDriver *driver;
HIDHandle handle;
QPoint currentPos;
Qt::MouseButtons buttons;
};
class HIDDriverHandler : IntNotifier
{
public:
HIDDriverHandler(HIDDriver *hidd) : IntNotifier(), driver(hidd) { }
~HIDDriverHandler()
{
qDeleteAll(devices);
};
void process_event(void) Q_DECL_OVERRIDE;
void async_wait(void) Q_DECL_OVERRIDE;
void find_devices(void);
private:
QHash<Value, HIDDeviceHandler *> devices;
HIDDriver *driver;
};
void HIDDriverHandler::process_event()
{
find_devices();
}
void HIDDriverHandler::async_wait()
{
gh_hid_wait_for_new_device(driver, act);
}
void HIDDriverHandler::find_devices()
{
Error err;
uintptr_t devicecontext;
uint32_t device_id;
HIDHandle handle;
HIDDeviceHandler *hidnot;
int deviceCount = 0;
devicecontext = 0;
forever {
err = gh_hid_enum_devices(driver, &device_id, &devicecontext);
if (err == OperationNotImplemented)
break;
else if (err == Failure)
break;
if (!devices.contains(device_id)) {
err = gh_hid_init_device(driver, device_id, &handle);
if (err == Success) {
hidnot = new HIDDeviceHandler(driver, handle);
devices.insert(device_id, hidnot);
QInputDeviceManagerPrivate::get(QGuiApplicationPrivate::inputDeviceManager())->setDeviceCount(
QInputDeviceManager::DeviceTypePointer,++deviceCount);
hidnot->async_wait();
}
}
}
if (err == OperationNotImplemented) {
/* fallback on legacy enumeration where we assume 0-based
* contiguous indexes */
device_id = 0;
err = Success;
do {
if (!devices.contains(device_id)) {
err = gh_hid_init_device(driver, device_id, &handle);
if (err != Success)
break;
hidnot = new HIDDeviceHandler(driver, handle);
devices.insert(device_id, hidnot);
hidnot->async_wait();
}
device_id++;
} while (err == Success);
}
async_wait();
}
void HIDDeviceHandler::process_event()
{
HIDEvent event;
uint32_t num_events = 1;
while (gh_hid_get_event(handle, &event, &num_events) == Success) {
if (event.type == HID_TYPE_AXIS) {
switch (event.index) {
case HID_AXIS_ABSX:
currentPos.setX(event.value);
break;
case HID_AXIS_ABSY:
currentPos.setY(event.value);
break;
case HID_AXIS_RELX:
currentPos.setX(currentPos.x() + event.value);
break;
case HID_AXIS_RELY:
currentPos.setY(currentPos.y() + event.value);
break;
default:
/* ignore the rest for now */
break;
}
} else if (event.type == HID_TYPE_KEY) {
switch (event.index) {
case HID_BUTTON_LEFT:
if (event.value)
buttons |= Qt::LeftButton;
else
buttons &= ~Qt::LeftButton;
break;
case HID_BUTTON_MIDDLE:
if (event.value)
buttons |= Qt::MiddleButton;
else
buttons &= ~Qt::MiddleButton;
break;
case HID_BUTTON_RIGHT:
if (event.value)
buttons |= Qt::RightButton;
else
buttons &= ~Qt::RightButton;
break;
default:
/* ignore the rest for now */
break;
}
} else if (event.type == HID_TYPE_SYNC) {
QWindowSystemInterface::handleMouseEvent(0, currentPos, currentPos, buttons,
QGuiApplication::keyboardModifiers());
} else if (event.type == HID_TYPE_DISCONNECT) {
/* FIXME */
}
}
async_wait();
}
void HIDDeviceHandler::async_wait()
{
CheckSuccess(gh_hid_async_wait_for_event(handle, act));
}
void QIntegrityHIDManager::open_devices()
{
HIDDriver *hidd;
uintptr_t context = 0;
HIDDriverHandler *hidnot;
while (gh_hid_enum_drivers(&hidd, &context) == Success) {
hidnot = new HIDDriverHandler(hidd);
m_drivers.append(hidnot);
hidnot->find_devices();
}
}
void QIntegrityHIDManager::run()
{
IntNotifier *notifier;
open_devices();
/* main loop */
forever {
WaitForActivity((Value *)&notifier);
notifier->process_event();
}
}
QIntegrityHIDManager::QIntegrityHIDManager(const QString &key, const QString &spec, QObject *parent)
: QThread(parent)
{
start();
}
QIntegrityHIDManager::~QIntegrityHIDManager()
{
terminate();
qDeleteAll(m_drivers);
}
QT_END_NAMESPACE

View File

@ -0,0 +1,69 @@
/****************************************************************************
**
** Copyright (C) 2015 Green Hills Software
** Contact: https://www.qt.io/licensing/
**
** This file is part of the plugins of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and The Qt Company. For licensing terms
** and conditions see https://www.qt.io/terms-conditions. For further
** information use the contact form at https://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 3 as published by the Free Software
** Foundation and appearing in the file LICENSE.LGPL3 included in the
** packaging of this file. Please review the following information to
** ensure the GNU Lesser General Public License version 3 requirements
** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU
** General Public License version 2.0 or (at your option) the GNU General
** Public license version 3 or any later version approved by the KDE Free
** Qt Foundation. The licenses are as published by the Free Software
** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
** included in the packaging of this file. Please review the following
** information to ensure the GNU General Public License requirements will
** be met: https://www.gnu.org/licenses/gpl-2.0.html and
** https://www.gnu.org/licenses/gpl-3.0.html.
**
** $QT_END_LICENSE$
**
****************************************************************************/
#ifndef QINTEGRITYHIDMANAGER_P_H
#define QINTEGRITYHIDMANAGER_P_H
#include <QObject>
#include <QList>
#include <QThread>
QT_BEGIN_NAMESPACE
class HIDDriverHandler;
class QIntegrityHIDManager : public QThread
{
Q_OBJECT
public:
QIntegrityHIDManager(const QString &key, const QString &specification, QObject *parent = 0);
~QIntegrityHIDManager();
void run(void);
private:
void open_devices(void);
QString m_spec;
QList<HIDDriverHandler *> m_drivers;
};
QT_END_NAMESPACE
#endif // QINTEGRITYHIDMANAGER_P_H

View File

@ -11,7 +11,7 @@ SUBDIRS = \
qtConfig(freetype)|darwin|win32: \ qtConfig(freetype)|darwin|win32: \
SUBDIRS += fontdatabases SUBDIRS += fontdatabases
qtConfig(evdev)|qtConfig(tslib)|qtConfig(libinput) { qtConfig(evdev)|qtConfig(tslib)|qtConfig(libinput)|qtConfig(integrityhid) {
SUBDIRS += input SUBDIRS += input
input.depends += devicediscovery input.depends += devicediscovery
} }

View File

@ -92,6 +92,10 @@
#include <QtInputSupport/private/qtslib_p.h> #include <QtInputSupport/private/qtslib_p.h>
#endif #endif
#if QT_CONFIG(integrityhid)
#include <QtInputSupport/qintegrityhidmanager.h>
#endif
#include <QtPlatformHeaders/qeglfsfunctions.h> #include <QtPlatformHeaders/qeglfsfunctions.h>
static void initResources() static void initResources()
@ -466,6 +470,10 @@ void QEglFSIntegration::createInputHandlers()
#endif #endif
new QEvdevTouchManager(QLatin1String("EvdevTouch"), QString() /* spec */, this); new QEvdevTouchManager(QLatin1String("EvdevTouch"), QString() /* spec */, this);
#endif #endif
#if QT_CONFIG(integrityhid)
new QIntegrityHIDManager("HID", "", this);
#endif
} }
EGLNativeDisplayType QEglFSIntegration::nativeDisplay() const EGLNativeDisplayType QEglFSIntegration::nativeDisplay() const

View File

@ -56,6 +56,13 @@ QEglFSKmsEglDeviceIntegration::QEglFSKmsEglDeviceIntegration()
qCDebug(qLcEglfsKmsDebug, "New DRM/KMS on EGLDevice integration created"); qCDebug(qLcEglfsKmsDebug, "New DRM/KMS on EGLDevice integration created");
} }
QSurfaceFormat QEglFSKmsEglDeviceIntegration::surfaceFormatFor(const QSurfaceFormat &inputFormat) const
{
QSurfaceFormat format = QEglFSKmsIntegration::surfaceFormatFor(inputFormat);
format.setAlphaBufferSize(8);
return format;
}
EGLint QEglFSKmsEglDeviceIntegration::surfaceType() const EGLint QEglFSKmsEglDeviceIntegration::surfaceType() const
{ {
return EGL_STREAM_BIT_KHR; return EGL_STREAM_BIT_KHR;

View File

@ -55,6 +55,7 @@ class QEglFSKmsEglDeviceIntegration : public QEglFSKmsIntegration
public: public:
QEglFSKmsEglDeviceIntegration(); QEglFSKmsEglDeviceIntegration();
QSurfaceFormat surfaceFormatFor(const QSurfaceFormat &inputFormat) const override;
EGLint surfaceType() const override; EGLint surfaceType() const override;
EGLDisplay createDisplay(EGLNativeDisplayType nativeDisplay) override; EGLDisplay createDisplay(EGLNativeDisplayType nativeDisplay) override;
bool supportsSurfacelessContexts() const override; bool supportsSurfacelessContexts() const override;

View File

@ -977,8 +977,7 @@ bool QWindowsKeyMapper::translateKeyEventInternal(QWindow *window, const MSG &ms
state = state ^ Qt::ShiftModifier; state = state ^ Qt::ShiftModifier;
else if (code == Qt::Key_Alt) else if (code == Qt::Key_Alt)
state = state ^ Qt::AltModifier; state = state ^ Qt::AltModifier;
else if (code == 0 && modifiersIndex != 0)
code = keyLayout[vk_key].qtKey[0];
// If the bit 24 of lParm is set you received a enter, // If the bit 24 of lParm is set you received a enter,
// otherwise a Return. (This is the extended key bit) // otherwise a Return. (This is the extended key bit)
if ((code == Qt::Key_Return) && (msg.lParam & 0x1000000)) if ((code == Qt::Key_Return) && (msg.lParam & 0x1000000))

View File

@ -156,6 +156,14 @@ QXcbScreen *QXcbWindow::parentScreen()
return parent() ? static_cast<QXcbWindow*>(parent())->parentScreen() : xcbScreen(); return parent() ? static_cast<QXcbWindow*>(parent())->parentScreen() : xcbScreen();
} }
//QPlatformWindow::screenForGeometry version that uses deviceIndependentGeometry
QXcbScreen *QXcbWindow::initialScreen() const
{
QWindowPrivate *windowPrivate = qt_window_private(window());
QScreen *screen = windowPrivate->screenForGeometry(window()->geometry());
return static_cast<QXcbScreen*>(screen->handle());
}
// Returns \c true if we should set WM_TRANSIENT_FOR on \a w // Returns \c true if we should set WM_TRANSIENT_FOR on \a w
static inline bool isTransient(const QWindow *w) static inline bool isTransient(const QWindow *w)
{ {
@ -356,8 +364,8 @@ void QXcbWindow::create()
Qt::WindowType type = window()->type(); Qt::WindowType type = window()->type();
QXcbScreen *currentScreen = xcbScreen(); QXcbScreen *currentScreen = xcbScreen();
QRect rect = windowGeometry(); QXcbScreen *platformScreen = parent() ? parentScreen() : initialScreen();
QXcbScreen *platformScreen = parent() ? parentScreen() : static_cast<QXcbScreen*>(screenForGeometry(rect)); QRect rect = QHighDpi::toNativePixels(window()->geometry(), platformScreen);
if (type == Qt::Desktop) { if (type == Qt::Desktop) {
m_window = platformScreen->root(); m_window = platformScreen->root();

View File

@ -191,6 +191,7 @@ protected:
QXcbScreen *parentScreen(); QXcbScreen *parentScreen();
QXcbScreen *initialScreen() const;
void changeNetWmState(bool set, xcb_atom_t one, xcb_atom_t two = 0); void changeNetWmState(bool set, xcb_atom_t one, xcb_atom_t two = 0);
NetWmStates netWmStates(); NetWmStates netWmStates();
void setNetWmStates(NetWmStates); void setNetWmStates(NetWmStates);

View File

@ -1,25 +1,27 @@
# Qt dialogs module # Qt dialogs module
HEADERS += \ INCLUDEPATH += $$PWD
qtConfig(printdialog) {
HEADERS += \
dialogs/qabstractprintdialog.h \ dialogs/qabstractprintdialog.h \
dialogs/qabstractprintdialog_p.h \ dialogs/qabstractprintdialog_p.h \
dialogs/qpagesetupdialog_p.h \ dialogs/qpagesetupdialog_p.h \
dialogs/qpagesetupdialog.h \ dialogs/qpagesetupdialog.h \
dialogs/qprintdialog.h \ dialogs/qprintdialog.h
dialogs/qprintpreviewdialog.h
osx { macos {
OBJECTIVE_SOURCES += dialogs/qpagesetupdialog_mac.mm \ OBJECTIVE_SOURCES += dialogs/qpagesetupdialog_mac.mm \
dialogs/qprintdialog_mac.mm dialogs/qprintdialog_mac.mm
LIBS_PRIVATE += -framework AppKit LIBS_PRIVATE += -framework AppKit
} }
win32 { win32 {
SOURCES += dialogs/qpagesetupdialog_win.cpp \ SOURCES += dialogs/qpagesetupdialog_win.cpp \
dialogs/qprintdialog_win.cpp dialogs/qprintdialog_win.cpp
} }
unix:!mac { unix:!darwin {
INCLUDEPATH += $$QT_SOURCE_TREE/src/plugins/printsupport/cups INCLUDEPATH += $$QT_SOURCE_TREE/src/plugins/printsupport/cups
HEADERS += dialogs/qpagesetupdialog_unix_p.h HEADERS += dialogs/qpagesetupdialog_unix_p.h
SOURCES += dialogs/qprintdialog_unix.cpp \ SOURCES += dialogs/qprintdialog_unix.cpp \
@ -27,14 +29,18 @@ unix:!mac {
FORMS += dialogs/qprintsettingsoutput.ui \ FORMS += dialogs/qprintsettingsoutput.ui \
dialogs/qprintwidget.ui \ dialogs/qprintwidget.ui \
dialogs/qprintpropertieswidget.ui dialogs/qprintpropertieswidget.ui
}
SOURCES += \
dialogs/qabstractprintdialog.cpp \
dialogs/qpagesetupdialog.cpp
FORMS += dialogs/qpagesetupwidget.ui
RESOURCES += dialogs/qprintdialog.qrc
} }
INCLUDEPATH += $$PWD qtConfig(printpreviewdialog) {
HEADERS += dialogs/qprintpreviewdialog.h
SOURCES += dialogs/qprintpreviewdialog.cpp
}
SOURCES += \
dialogs/qabstractprintdialog.cpp \
dialogs/qpagesetupdialog.cpp \
dialogs/qprintpreviewdialog.cpp
FORMS += dialogs/qpagesetupwidget.ui
RESOURCES += dialogs/qprintdialog.qrc

View File

@ -43,8 +43,6 @@
#include "qprinter.h" #include "qprinter.h"
#include "private/qprinter_p.h" #include "private/qprinter_p.h"
#ifndef QT_NO_PRINTDIALOG
QT_BEGIN_NAMESPACE QT_BEGIN_NAMESPACE
// hack // hack
@ -497,5 +495,3 @@ void QPrintDialog::open(QObject *receiver, const char *member)
} }
QT_END_NAMESPACE QT_END_NAMESPACE
#endif // QT_NO_PRINTDIALOG

View File

@ -42,12 +42,11 @@
#include <QtPrintSupport/qtprintsupportglobal.h> #include <QtPrintSupport/qtprintsupportglobal.h>
#if QT_CONFIG(printdialog)
#include <QtWidgets/qdialog.h> #include <QtWidgets/qdialog.h>
QT_BEGIN_NAMESPACE QT_REQUIRE_CONFIG(printdialog);
QT_BEGIN_NAMESPACE
class QAbstractPrintDialogPrivate; class QAbstractPrintDialogPrivate;
class QPrinter; class QPrinter;
@ -120,6 +119,4 @@ Q_DECLARE_OPERATORS_FOR_FLAGS(QAbstractPrintDialog::PrintDialogOptions)
QT_END_NAMESPACE QT_END_NAMESPACE
#endif // QT_NO_PRINTDIALOG
#endif // QABSTRACTPRINTDIALOG_H #endif // QABSTRACTPRINTDIALOG_H

View File

@ -53,14 +53,12 @@
#include <QtPrintSupport/private/qtprintsupportglobal_p.h> #include <QtPrintSupport/private/qtprintsupportglobal_p.h>
#ifndef QT_NO_PRINTDIALOG
#include "private/qdialog_p.h" #include "private/qdialog_p.h"
#include "QtPrintSupport/qabstractprintdialog.h" #include "QtPrintSupport/qabstractprintdialog.h"
QT_BEGIN_NAMESPACE QT_REQUIRE_CONFIG(printdialog);
#ifndef QT_NO_PRINTER QT_BEGIN_NAMESPACE
class QPrinter; class QPrinter;
class QPrinterPrivate; class QPrinterPrivate;
@ -92,10 +90,6 @@ public:
int maxPage; int maxPage;
}; };
#endif //QT_NO_PRINTER
QT_END_NAMESPACE QT_END_NAMESPACE
#endif // QT_NO_PRINTDIALOG
#endif // QABSTRACTPRINTDIALOG_P_H #endif // QABSTRACTPRINTDIALOG_P_H

View File

@ -42,8 +42,6 @@
#include <QtPrintSupport/qprinter.h> #include <QtPrintSupport/qprinter.h>
#ifndef QT_NO_PRINTDIALOG
QT_BEGIN_NAMESPACE QT_BEGIN_NAMESPACE
/*! /*!
@ -183,5 +181,3 @@ void QPageSetupDialog::done(int result)
} }
QT_END_NAMESPACE QT_END_NAMESPACE
#endif

View File

@ -42,12 +42,11 @@
#include <QtPrintSupport/qtprintsupportglobal.h> #include <QtPrintSupport/qtprintsupportglobal.h>
#ifndef QT_NO_PRINTDIALOG
#include <QtWidgets/qdialog.h> #include <QtWidgets/qdialog.h>
QT_BEGIN_NAMESPACE QT_REQUIRE_CONFIG(printdialog);
QT_BEGIN_NAMESPACE
class QPrinter; class QPrinter;
class QPageSetupDialogPrivate; class QPageSetupDialogPrivate;
@ -77,6 +76,4 @@ public:
QT_END_NAMESPACE QT_END_NAMESPACE
#endif // QT_NO_PRINTDIALOG
#endif // QPAGESETUPDIALOG_H #endif // QPAGESETUPDIALOG_H

View File

@ -42,7 +42,6 @@
#include "qpagesetupdialog.h" #include "qpagesetupdialog.h"
#ifndef QT_NO_PRINTDIALOG
#include "qpagesetupdialog_p.h" #include "qpagesetupdialog_p.h"
#include <qpa/qplatformnativeinterface.h> #include <qpa/qplatformnativeinterface.h>
@ -222,5 +221,3 @@ int QPageSetupDialog::exec()
} }
QT_END_NAMESPACE QT_END_NAMESPACE
#endif /* QT_NO_PRINTDIALOG */

View File

@ -54,14 +54,14 @@
#include <QtPrintSupport/private/qtprintsupportglobal_p.h> #include <QtPrintSupport/private/qtprintsupportglobal_p.h>
#ifndef QT_NO_PRINTDIALOG
#include "private/qdialog_p.h" #include "private/qdialog_p.h"
#include "qbytearray.h" #include "qbytearray.h"
#include "qpagesetupdialog.h" #include "qpagesetupdialog.h"
#include "qpointer.h" #include "qpointer.h"
QT_REQUIRE_CONFIG(printdialog);
QT_BEGIN_NAMESPACE QT_BEGIN_NAMESPACE
class QPrinter; class QPrinter;
@ -83,6 +83,4 @@ public:
QT_END_NAMESPACE QT_END_NAMESPACE
#endif // QT_NO_PRINTDIALOG
#endif // QPAGESETUPDIALOG_P_H #endif // QPAGESETUPDIALOG_P_H

View File

@ -39,12 +39,13 @@
#include "qpagesetupdialog.h" #include "qpagesetupdialog.h"
#ifndef QT_NO_PRINTDIALOG
#include "qpagesetupdialog_unix_p.h" #include "qpagesetupdialog_unix_p.h"
#include <private/qpagesetupdialog_p.h> #include <private/qpagesetupdialog_p.h>
#include <private/qprintdevice_p.h> #include <private/qprintdevice_p.h>
#if QT_CONFIG(cups)
#include <private/qcups_p.h> #include <private/qcups_p.h>
#endif
#include "qpainter.h" #include "qpainter.h"
#include "qprintdialog.h" #include "qprintdialog.h"
@ -294,7 +295,7 @@ void QPageSetupWidget::initUnits()
// Init the Pages Per Sheet (n-up) combo boxes if using CUPS // Init the Pages Per Sheet (n-up) combo boxes if using CUPS
void QPageSetupWidget::initPagesPerSheet() void QPageSetupWidget::initPagesPerSheet()
{ {
#if !defined(QT_NO_CUPS) #if QT_CONFIG(cups)
m_ui.pagesPerSheetLayoutCombo->addItem(QPrintDialog::tr("Left to Right, Top to Bottom"), m_ui.pagesPerSheetLayoutCombo->addItem(QPrintDialog::tr("Left to Right, Top to Bottom"),
QVariant::fromValue(QCUPSSupport::LeftToRightTopToBottom)); QVariant::fromValue(QCUPSSupport::LeftToRightTopToBottom));
m_ui.pagesPerSheetLayoutCombo->addItem(QPrintDialog::tr("Left to Right, Bottom to Top"), m_ui.pagesPerSheetLayoutCombo->addItem(QPrintDialog::tr("Left to Right, Bottom to Top"),
@ -498,7 +499,7 @@ void QPageSetupWidget::updateWidget()
void QPageSetupWidget::setupPrinter() const void QPageSetupWidget::setupPrinter() const
{ {
m_printer->setPageLayout(m_pageLayout); m_printer->setPageLayout(m_pageLayout);
#if !defined(QT_NO_CUPS) #if QT_CONFIG(cups)
QCUPSSupport::PagesPerSheet pagesPerSheet = m_ui.pagesPerSheetCombo->currentData() QCUPSSupport::PagesPerSheet pagesPerSheet = m_ui.pagesPerSheetCombo->currentData()
.value<QCUPSSupport::PagesPerSheet>(); .value<QCUPSSupport::PagesPerSheet>();
QCUPSSupport::PagesPerSheetLayout pagesPerSheetLayout = m_ui.pagesPerSheetLayoutCombo->currentData() QCUPSSupport::PagesPerSheetLayout pagesPerSheetLayout = m_ui.pagesPerSheetLayoutCombo->currentData()
@ -545,7 +546,7 @@ void QPageSetupWidget::pageOrientationChanged()
void QPageSetupWidget::pagesPerSheetChanged() void QPageSetupWidget::pagesPerSheetChanged()
{ {
#if !defined(QT_NO_CUPS) #if QT_CONFIG(cups)
switch (m_ui.pagesPerSheetCombo->currentData().toInt()) { switch (m_ui.pagesPerSheetCombo->currentData().toInt()) {
case QCUPSSupport::OnePagePerSheet: case QCUPSSupport::OnePagePerSheet:
m_pagePreview->setPagePreviewLayout(1, 1); m_pagePreview->setPagePreviewLayout(1, 1);
@ -642,5 +643,3 @@ int QPageSetupDialog::exec()
QT_END_NAMESPACE QT_END_NAMESPACE
#include "moc_qpagesetupdialog.cpp" #include "moc_qpagesetupdialog.cpp"
#endif // QT_NO_PRINTDIALOG

View File

@ -53,14 +53,14 @@
#include <QtPrintSupport/private/qtprintsupportglobal_p.h> #include <QtPrintSupport/private/qtprintsupportglobal_p.h>
#ifndef QT_NO_PRINTDIALOG
#include "qprinter.h" #include "qprinter.h"
#include <QtGui/qpagelayout.h> #include <QtGui/qpagelayout.h>
#include <ui_qpagesetupwidget.h> #include <ui_qpagesetupwidget.h>
QT_REQUIRE_CONFIG(printdialog);
QT_BEGIN_NAMESPACE QT_BEGIN_NAMESPACE
class QPrinter; class QPrinter;
@ -106,5 +106,4 @@ private:
QT_END_NAMESPACE QT_END_NAMESPACE
#endif // QT_NO_PRINTDIALOG
#endif #endif

View File

@ -39,7 +39,6 @@
#include "qpagesetupdialog.h" #include "qpagesetupdialog.h"
#ifndef QT_NO_PRINTDIALOG
#include <qapplication.h> #include <qapplication.h>
#include "../kernel/qprintengine_win_p.h" #include "../kernel/qprintengine_win_p.h"
@ -168,4 +167,3 @@ void QPageSetupDialog::setVisible(bool visible)
} }
QT_END_NAMESPACE QT_END_NAMESPACE
#endif

View File

@ -42,12 +42,11 @@
#include <QtPrintSupport/qtprintsupportglobal.h> #include <QtPrintSupport/qtprintsupportglobal.h>
#ifndef QT_NO_PRINTDIALOG
#include <QtPrintSupport/qabstractprintdialog.h> #include <QtPrintSupport/qabstractprintdialog.h>
QT_BEGIN_NAMESPACE QT_REQUIRE_CONFIG(printdialog);
QT_BEGIN_NAMESPACE
class QPrintDialogPrivate; class QPrintDialogPrivate;
class QPushButton; class QPushButton;
@ -104,6 +103,4 @@ private:
QT_END_NAMESPACE QT_END_NAMESPACE
#endif // QT_NO_PRINTDIALOG
#endif // QPRINTDIALOG_H #endif // QPRINTDIALOG_H

View File

@ -48,8 +48,6 @@
#include <QtPrintSupport/qprintengine.h> #include <QtPrintSupport/qprintengine.h>
#include <qpa/qplatformprintdevice.h> #include <qpa/qplatformprintdevice.h>
#ifndef QT_NO_PRINTDIALOG
QT_BEGIN_NAMESPACE QT_BEGIN_NAMESPACE
extern qreal qt_pointMultiplier(QPageLayout::Unit unit); extern qreal qt_pointMultiplier(QPageLayout::Unit unit);
@ -358,5 +356,3 @@ void QPrintDialog::setVisible(bool visible)
QT_END_NAMESPACE QT_END_NAMESPACE
#include "moc_qprintdialog.cpp" #include "moc_qprintdialog.cpp"
#endif // QT_NO_PRINTDIALOG

View File

@ -40,8 +40,6 @@
#include "qplatformdefs.h" #include "qplatformdefs.h"
#include <QtPrintSupport/private/qtprintsupportglobal_p.h> #include <QtPrintSupport/private/qtprintsupportglobal_p.h>
#ifndef QT_NO_PRINTDIALOG
#include "private/qabstractprintdialog_p.h" #include "private/qabstractprintdialog_p.h"
#include <QtWidgets/qmessagebox.h> #include <QtWidgets/qmessagebox.h>
#include "qprintdialog.h" #include "qprintdialog.h"
@ -64,7 +62,7 @@
#include "ui_qprintsettingsoutput.h" #include "ui_qprintsettingsoutput.h"
#include "ui_qprintwidget.h" #include "ui_qprintwidget.h"
#ifndef QT_NO_CUPS #if QT_CONFIG(cups)
#include <private/qcups_p.h> #include <private/qcups_p.h>
#if QT_CONFIG(cupsjobwidget) #if QT_CONFIG(cupsjobwidget)
#include "qcupsjobwidget_p.h" #include "qcupsjobwidget_p.h"
@ -313,7 +311,7 @@ void QPrintDialogPrivate::init()
options.grayscale->setIconSize(QSize(32, 32)); options.grayscale->setIconSize(QSize(32, 32));
options.grayscale->setIcon(QIcon(QLatin1String(":/qt-project.org/dialogs/qprintdialog/images/status-gray-scale.png"))); options.grayscale->setIcon(QIcon(QLatin1String(":/qt-project.org/dialogs/qprintdialog/images/status-gray-scale.png")));
#ifndef QT_NO_CUPS #if QT_CONFIG(cups)
// Add Page Set widget if CUPS is available // Add Page Set widget if CUPS is available
options.pageSetCombo->addItem(tr("All Pages"), QVariant::fromValue(QCUPSSupport::AllPages)); options.pageSetCombo->addItem(tr("All Pages"), QVariant::fromValue(QCUPSSupport::AllPages));
options.pageSetCombo->addItem(tr("Odd Pages"), QVariant::fromValue(QCUPSSupport::OddPages)); options.pageSetCombo->addItem(tr("Odd Pages"), QVariant::fromValue(QCUPSSupport::OddPages));
@ -435,7 +433,7 @@ void QPrintDialogPrivate::setupPrinter()
} }
} }
#ifndef QT_NO_CUPS #if QT_CONFIG(cups)
// page set // page set
if (p->printRange() == QPrinter::AllPages || p->printRange() == QPrinter::PageRange) { if (p->printRange() == QPrinter::AllPages || p->printRange() == QPrinter::PageRange) {
//If the application is selecting pages and the first page number is even then need to adjust the odd-even accordingly //If the application is selecting pages and the first page number is even then need to adjust the odd-even accordingly
@ -518,7 +516,7 @@ void QPrintDialogPrivate::updateWidgets()
options.printCurrentPage->setVisible(q->isOptionEnabled(QPrintDialog::PrintCurrentPage)); options.printCurrentPage->setVisible(q->isOptionEnabled(QPrintDialog::PrintCurrentPage));
options.collate->setVisible(q->isOptionEnabled(QPrintDialog::PrintCollateCopies)); options.collate->setVisible(q->isOptionEnabled(QPrintDialog::PrintCollateCopies));
#ifndef QT_NO_CUPS #if QT_CONFIG(cups)
// Don't display Page Set if only Selection or Current Page are enabled // Don't display Page Set if only Selection or Current Page are enabled
if (!q->isOptionEnabled(QPrintDialog::PrintPageRange) if (!q->isOptionEnabled(QPrintDialog::PrintPageRange)
&& (q->isOptionEnabled(QPrintDialog::PrintSelection) || q->isOptionEnabled(QPrintDialog::PrintCurrentPage))) { && (q->isOptionEnabled(QPrintDialog::PrintSelection) || q->isOptionEnabled(QPrintDialog::PrintCurrentPage))) {
@ -867,7 +865,7 @@ bool QUnixPrintWidgetPrivate::checkFields()
} }
} }
#ifndef QT_NO_CUPS #if QT_CONFIG(cups)
if (propertiesDialogShown) { if (propertiesDialogShown) {
QCUPSSupport::PagesPerSheet pagesPerSheet = propertiesDialog->widget.pageSetup->m_ui.pagesPerSheetCombo QCUPSSupport::PagesPerSheet pagesPerSheet = propertiesDialog->widget.pageSetup->m_ui.pagesPerSheetCombo
->currentData().value<QCUPSSupport::PagesPerSheet>(); ->currentData().value<QCUPSSupport::PagesPerSheet>();
@ -983,6 +981,3 @@ QT_END_NAMESPACE
#include "moc_qprintdialog.cpp" #include "moc_qprintdialog.cpp"
#include "qprintdialog_unix.moc" #include "qprintdialog_unix.moc"
#endif // QT_NO_PRINTDIALOG

View File

@ -39,8 +39,6 @@
#include <QtPrintSupport/qtprintsupportglobal.h> #include <QtPrintSupport/qtprintsupportglobal.h>
#ifndef QT_NO_PRINTDIALOG
#include "qprintdialog.h" #include "qprintdialog.h"
#include <qwidget.h> #include <qwidget.h>
@ -308,5 +306,3 @@ void QPrintDialog::setVisible(bool visible)
QT_END_NAMESPACE QT_END_NAMESPACE
#include "moc_qprintdialog.cpp" #include "moc_qprintdialog.cpp"
#endif // QT_NO_PRINTDIALOG

View File

@ -56,8 +56,6 @@
#include <QtWidgets/qtoolbar.h> #include <QtWidgets/qtoolbar.h>
#include <QtCore/QCoreApplication> #include <QtCore/QCoreApplication>
#ifndef QT_NO_PRINTPREVIEWDIALOG
#include "private/qdialog_p.h" #include "private/qdialog_p.h"
#include <QtWidgets/qformlayout.h> #include <QtWidgets/qformlayout.h>
@ -787,7 +785,3 @@ QT_END_NAMESPACE
#include "moc_qprintpreviewdialog.cpp" #include "moc_qprintpreviewdialog.cpp"
#include "qprintpreviewdialog.moc" #include "qprintpreviewdialog.moc"
#endif // QT_NO_PRINTPREVIEWDIALOG

View File

@ -42,12 +42,11 @@
#include <QtPrintSupport/qtprintsupportglobal.h> #include <QtPrintSupport/qtprintsupportglobal.h>
#ifndef QT_NO_PRINTPREVIEWDIALOG
#include <QtWidgets/qdialog.h> #include <QtWidgets/qdialog.h>
QT_BEGIN_NAMESPACE QT_REQUIRE_CONFIG(printpreviewdialog);
QT_BEGIN_NAMESPACE
class QGraphicsView; class QGraphicsView;
class QPrintPreviewDialogPrivate; class QPrintPreviewDialogPrivate;
@ -91,6 +90,4 @@ private:
QT_END_NAMESPACE QT_END_NAMESPACE
#endif // QT_NO_PRINTPREVIEWDIALOG
#endif // QPRINTPREVIEWDIALOG_H #endif // QPRINTPREVIEWDIALOG_H

Some files were not shown because too many files have changed in this diff Show More