Merge "Merge remote-tracking branch 'origin/5.9' into dev" into refs/staging/dev
This commit is contained in:
commit
678ff94ff2
@ -43,4 +43,6 @@
|
||||
# error "__cplusplus must be > 201402L (the value for C++14)"
|
||||
#endif
|
||||
|
||||
#include <map> // https://bugs.llvm.org//show_bug.cgi?id=33117
|
||||
|
||||
int main(int, char **) { return 0; }
|
||||
|
46
config.tests/qpa/integrityfb/integrityfb.cpp
Normal file
46
config.tests/qpa/integrityfb/integrityfb.cpp
Normal 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;
|
||||
}
|
3
config.tests/qpa/integrityfb/integrityfb.pro
Normal file
3
config.tests/qpa/integrityfb/integrityfb.pro
Normal file
@ -0,0 +1,3 @@
|
||||
SOURCES = integrityfb.cpp
|
||||
|
||||
CONFIG -= qt
|
52
config.tests/qpa/integrityhid/integrityhid.cpp
Normal file
52
config.tests/qpa/integrityhid/integrityhid.cpp
Normal 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;
|
||||
}
|
2
config.tests/qpa/integrityhid/integrityhid.pro
Normal file
2
config.tests/qpa/integrityhid/integrityhid.pro
Normal file
@ -0,0 +1,2 @@
|
||||
SOURCES = integrityhid.cpp
|
||||
CONFIG -= qt
|
@ -137,7 +137,7 @@ defineReplace(qtConfFunc_licenseCheck) {
|
||||
export(config.input.qt_edition)
|
||||
} else {
|
||||
equals(QMAKE_HOST.os, Linux) {
|
||||
equals(QMAKE_HOST.arch, x86): \
|
||||
!equals(QMAKE_HOST.arch, x86_64): \
|
||||
Licheck = licheck32
|
||||
else: \
|
||||
Licheck = licheck64
|
||||
@ -150,10 +150,10 @@ defineReplace(qtConfFunc_licenseCheck) {
|
||||
}
|
||||
|
||||
!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) \
|
||||
$$[QMAKE_SPEC] $$[QMAKE_XSPEC]", \
|
||||
LicheckOutput): \
|
||||
LicheckOutput, false): \
|
||||
return(false)
|
||||
logn()
|
||||
for (o, LicheckOutput) {
|
||||
|
@ -49,10 +49,13 @@
|
||||
****************************************************************************/
|
||||
|
||||
#include <QtWidgets>
|
||||
#ifndef QT_NO_PRINTER
|
||||
#if defined(QT_PRINTSUPPORT_LIB)
|
||||
#include <QtPrintSupport/qtprintsupportglobal.h>
|
||||
#if QT_CONFIG(printdialog)
|
||||
#include <QPrinter>
|
||||
#include <QPrintDialog>
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#include "scribblearea.h"
|
||||
|
||||
@ -167,7 +170,7 @@ void ScribbleArea::resizeImage(QImage *image, const QSize &newSize)
|
||||
//! [21]
|
||||
void ScribbleArea::print()
|
||||
{
|
||||
#if !defined(QT_NO_PRINTER) && !defined(QT_NO_PRINTDIALOG)
|
||||
#if QT_CONFIG(printdialog)
|
||||
QPrinter printer(QPrinter::HighResolution);
|
||||
|
||||
QPrintDialog printDialog(&printer, this);
|
||||
@ -181,7 +184,7 @@ void ScribbleArea::print()
|
||||
painter.setWindow(image.rect());
|
||||
painter.drawImage(0, 0, image);
|
||||
}
|
||||
#endif // QT_NO_PRINTER
|
||||
#endif // QT_CONFIG(printdialog)
|
||||
}
|
||||
//! [22]
|
||||
|
||||
|
@ -49,8 +49,13 @@
|
||||
****************************************************************************/
|
||||
|
||||
#include <QtWidgets>
|
||||
#if defined(QT_PRINTSUPPORT_LIB)
|
||||
#include <QtPrintSupport/qtprintsupportglobal.h>
|
||||
#if QT_CONFIG(printdialog)
|
||||
#include <QPrinter>
|
||||
#include <QPrintDialog>
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#include "licensewizard.h"
|
||||
|
||||
@ -364,7 +369,7 @@ void ConclusionPage::setVisible(bool visible)
|
||||
|
||||
void ConclusionPage::printButtonClicked()
|
||||
{
|
||||
#if !defined(QT_NO_PRINTER) && !defined(QT_NO_PRINTDIALOG)
|
||||
#if QT_CONFIG(printdialog)
|
||||
QPrinter printer;
|
||||
QPrintDialog dialog(&printer, this);
|
||||
if (dialog.exec())
|
||||
|
@ -50,8 +50,13 @@
|
||||
|
||||
#include "view.h"
|
||||
|
||||
#if defined(QT_PRINTSUPPORT_LIB)
|
||||
#include <QtPrintSupport/qtprintsupportglobal.h>
|
||||
#if QT_CONFIG(printdialog)
|
||||
#include <QPrinter>
|
||||
#include <QPrintDialog>
|
||||
#endif
|
||||
#endif
|
||||
#ifndef QT_NO_OPENGL
|
||||
#include <QtOpenGL>
|
||||
#else
|
||||
@ -259,7 +264,7 @@ void View::toggleAntialiasing()
|
||||
|
||||
void View::print()
|
||||
{
|
||||
#if !defined(QT_NO_PRINTER) && !defined(QT_NO_PRINTDIALOG)
|
||||
#if QT_CONFIG(printdialog)
|
||||
QPrinter printer;
|
||||
QPrintDialog dialog(&printer, this);
|
||||
if (dialog.exec() == QDialog::Accepted) {
|
||||
|
@ -53,10 +53,13 @@
|
||||
#include "pixeldelegate.h"
|
||||
|
||||
#include <QtWidgets>
|
||||
#ifndef QT_NO_PRINTER
|
||||
#if defined(QT_PRINTSUPPORT_LIB)
|
||||
#include <QtPrintSupport/qtprintsupportglobal.h>
|
||||
#if QT_CONFIG(printdialog)
|
||||
#include <QPrinter>
|
||||
#include <QPrintDialog>
|
||||
#endif
|
||||
#endif
|
||||
|
||||
//! [0]
|
||||
MainWindow::MainWindow()
|
||||
@ -164,7 +167,7 @@ void MainWindow::openImage(const QString &fileName)
|
||||
|
||||
void MainWindow::printImage()
|
||||
{
|
||||
#if !defined(QT_NO_PRINTER) && !defined(QT_NO_PRINTDIALOG)
|
||||
#if QT_CONFIG(printdialog)
|
||||
if (model->rowCount(QModelIndex())*model->columnCount(QModelIndex()) > 90000) {
|
||||
QMessageBox::StandardButton answer;
|
||||
answer = QMessageBox::question(this, tr("Large Image Size"),
|
||||
|
@ -49,11 +49,16 @@
|
||||
****************************************************************************/
|
||||
|
||||
#include <QtWidgets>
|
||||
#ifndef QT_NO_PRINTER
|
||||
#if defined(QT_PRINTSUPPORT_LIB)
|
||||
#include <QtPrintSupport/qtprintsupportglobal.h>
|
||||
#if QT_CONFIG(printdialog)
|
||||
#include <QPrinter>
|
||||
#include <QPrintDialog>
|
||||
#endif
|
||||
#if QT_CONFIG(printpreviewdialog)
|
||||
#include <QPrintPreviewDialog>
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#include "spreadsheet.h"
|
||||
#include "spreadsheetdelegate.h"
|
||||
@ -637,7 +642,7 @@ QString encode_pos(int row, int col)
|
||||
|
||||
void SpreadSheet::print()
|
||||
{
|
||||
#if !defined(QT_NO_PRINTER) && !defined(QT_NO_PRINTDIALOG)
|
||||
#if QT_CONFIG(printpreviewdialog)
|
||||
QPrinter printer(QPrinter::ScreenResolution);
|
||||
QPrintPreviewDialog dlg(&printer);
|
||||
PrintView view;
|
||||
|
@ -50,9 +50,12 @@
|
||||
|
||||
//! [0]
|
||||
#include <QtWidgets>
|
||||
#ifndef QT_NO_PRINTDIALOG
|
||||
#if defined(QT_PRINTSUPPORT_LIB)
|
||||
#include <QtPrintSupport/qtprintsupportglobal.h>
|
||||
#if QT_CONFIG(printdialog)
|
||||
#include <QtPrintSupport>
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#include "mainwindow.h"
|
||||
//! [0]
|
||||
@ -125,7 +128,7 @@ void MainWindow::newLetter()
|
||||
//! [3]
|
||||
void MainWindow::print()
|
||||
{
|
||||
#ifndef QT_NO_PRINTDIALOG
|
||||
#if QT_CONFIG(printdialog)
|
||||
QTextDocument *document = textEdit->document();
|
||||
QPrinter printer;
|
||||
|
||||
|
@ -50,8 +50,15 @@
|
||||
|
||||
#include <QtWidgets>
|
||||
#if defined(QT_PRINTSUPPORT_LIB)
|
||||
#include <QtPrintSupport/qtprintsupportglobal.h>
|
||||
#if QT_CONFIG(printdialog)
|
||||
#include <QPrinter>
|
||||
#include <QPrintDialog>
|
||||
#if QT_CONFIG(printpreviewdialog)
|
||||
#include <QPrintPreviewDialog>
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#include "mainwindow.h"
|
||||
|
||||
@ -270,7 +277,7 @@ void MainWindow::printDocument(QPrinter *printer)
|
||||
|
||||
void MainWindow::on_printPreviewAction_triggered()
|
||||
{
|
||||
#if defined(QT_PRINTSUPPORT_LIB) && QT_CONFIG(printdialog)
|
||||
#if defined(QT_PRINTSUPPORT_LIB) && QT_CONFIG(printpreviewdialog)
|
||||
pageMap = currentPageMap();
|
||||
|
||||
if (pageMap.count() == 0)
|
||||
|
@ -52,8 +52,6 @@
|
||||
#define MAINWINDOW_H
|
||||
|
||||
#include "ui_mainwindowbase.h"
|
||||
#include <QPrinter>
|
||||
#include <QPrintDialog>
|
||||
|
||||
#if defined(QT_PRINTSUPPORT_LIB)
|
||||
#include <QtPrintSupport/qtprintsupportglobal.h>
|
||||
|
@ -49,10 +49,13 @@
|
||||
****************************************************************************/
|
||||
|
||||
#include <QtWidgets>
|
||||
#ifndef QT_NO_PRINTER
|
||||
#if defined(QT_PRINTSUPPORT_LIB)
|
||||
#include <QtPrintSupport/qtprintsupportglobal.h>
|
||||
#if QT_CONFIG(printdialog)
|
||||
#include <QPrinter>
|
||||
#include <QPrintDialog>
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#include "detailsdialog.h"
|
||||
#include "mainwindow.h"
|
||||
@ -245,7 +248,7 @@ void MainWindow::openDialog()
|
||||
//! [17]
|
||||
void MainWindow::printFile()
|
||||
{
|
||||
#if !defined(QT_NO_PRINTER) && !defined(QT_NO_PRINTDIALOG)
|
||||
#if QT_CONFIG(printdialog)
|
||||
QTextEdit *editor = static_cast<QTextEdit*>(letters->currentWidget());
|
||||
//! [18]
|
||||
QPrinter printer;
|
||||
|
@ -71,11 +71,18 @@
|
||||
#include <QCloseEvent>
|
||||
#include <QMessageBox>
|
||||
#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>
|
||||
#endif
|
||||
#include <QPrinter>
|
||||
#if QT_CONFIG(printpreviewdialog)
|
||||
#include <QPrintPreviewDialog>
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#include "textedit.h"
|
||||
|
||||
@ -474,7 +481,7 @@ bool TextEdit::fileSaveAs()
|
||||
|
||||
void TextEdit::filePrint()
|
||||
{
|
||||
#if !defined(QT_NO_PRINTER) && !defined(QT_NO_PRINTDIALOG)
|
||||
#if QT_CONFIG(printdialog)
|
||||
QPrinter printer(QPrinter::HighResolution);
|
||||
QPrintDialog *dlg = new QPrintDialog(&printer, this);
|
||||
if (textEdit->textCursor().hasSelection())
|
||||
@ -488,7 +495,7 @@ void TextEdit::filePrint()
|
||||
|
||||
void TextEdit::filePrintPreview()
|
||||
{
|
||||
#if !defined(QT_NO_PRINTER) && !defined(QT_NO_PRINTDIALOG)
|
||||
#if QT_CONFIG(printpreviewdialog)
|
||||
QPrinter printer(QPrinter::HighResolution);
|
||||
QPrintPreviewDialog preview(&printer, this);
|
||||
connect(&preview, &QPrintPreviewDialog::paintRequested, this, &TextEdit::printPreview);
|
||||
|
@ -49,9 +49,12 @@
|
||||
****************************************************************************/
|
||||
|
||||
#include <QtWidgets>
|
||||
#ifndef QT_NO_PRINTER
|
||||
#if defined(QT_PRINTSUPPORT_LIB)
|
||||
#include <QtPrintSupport/qtprintsupportglobal.h>
|
||||
#if QT_CONFIG(printdialog)
|
||||
#include <QPrintDialog>
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#include "imageviewer.h"
|
||||
|
||||
@ -180,7 +183,7 @@ void ImageViewer::print()
|
||||
//! [5] //! [6]
|
||||
{
|
||||
Q_ASSERT(imageLabel->pixmap());
|
||||
#if !defined(QT_NO_PRINTER) && !defined(QT_NO_PRINTDIALOG)
|
||||
#if QT_CONFIG(printdialog)
|
||||
//! [6] //! [7]
|
||||
QPrintDialog dialog(&printer, this);
|
||||
//! [7] //! [8]
|
||||
|
@ -49,10 +49,13 @@
|
||||
****************************************************************************/
|
||||
|
||||
#include <QtWidgets>
|
||||
#ifndef QT_NO_PRINTER
|
||||
#if defined(QT_PRINTSUPPORT_LIB)
|
||||
#include <QtPrintSupport/qtprintsupportglobal.h>
|
||||
#if QT_CONFIG(printdialog)
|
||||
#include <QPrinter>
|
||||
#include <QPrintDialog>
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#include "scribblearea.h"
|
||||
|
||||
@ -210,7 +213,7 @@ void ScribbleArea::resizeImage(QImage *image, const QSize &newSize)
|
||||
//! [21]
|
||||
void ScribbleArea::print()
|
||||
{
|
||||
#if !defined(QT_NO_PRINTER) && !defined(QT_NO_PRINTDIALOG)
|
||||
#if QT_CONFIG(printdialog)
|
||||
QPrinter printer(QPrinter::HighResolution);
|
||||
|
||||
QPrintDialog printDialog(&printer, this);
|
||||
@ -224,6 +227,6 @@ void ScribbleArea::print()
|
||||
painter.setWindow(image.rect());
|
||||
painter.drawImage(0, 0, image);
|
||||
}
|
||||
#endif // QT_NO_PRINTER
|
||||
#endif // QT_CONFIG(printdialog)
|
||||
}
|
||||
//! [22]
|
||||
|
@ -74,8 +74,8 @@ else: \
|
||||
|
||||
LIBGCC_PATH = $$dirname(LIBGCC_PATH_FULL)
|
||||
|
||||
QMAKE_INCDIR = $$ANDROID_SOURCES_CXX_STL_INCDIR $$QMAKE_ANDROID_PLATFORM_INCDIR
|
||||
QMAKE_LIBDIR = $$ANDROID_SOURCES_CXX_STL_LIBDIR $$QMAKE_ANDROID_PLATFORM_LIBDIR $$LIBGCC_PATH
|
||||
QMAKE_INCDIR_POST = $$ANDROID_SOURCES_CXX_STL_INCDIR $$QMAKE_ANDROID_PLATFORM_INCDIR
|
||||
QMAKE_LIBDIR_POST = $$ANDROID_SOURCES_CXX_STL_LIBDIR $$QMAKE_ANDROID_PLATFORM_LIBDIR $$LIBGCC_PATH
|
||||
QMAKE_INCDIR_X11 =
|
||||
QMAKE_LIBDIR_X11 =
|
||||
QMAKE_INCDIR_OPENGL = $$QMAKE_ANDROID_PLATFORM_INCDIR
|
||||
|
27
mkspecs/common/ghs-integrity-armv8.conf
Normal file
27
mkspecs/common/ghs-integrity-armv8.conf
Normal 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
|
@ -81,6 +81,10 @@ greaterThan(QMAKE_MSC_VER, 1909) {
|
||||
MSVC_VER = 15.0
|
||||
COMPAT_MKSPEC = win32-msvc2017
|
||||
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) {
|
||||
|
@ -38,9 +38,9 @@ isEmpty(QNX_DIR) {
|
||||
error("QNX_TARGET environment variable not set")
|
||||
}
|
||||
|
||||
QMAKE_INCDIR = $${QNX_DIR}/usr/include $${QNX_DIR}/usr/include/freetype2
|
||||
QMAKE_LIBDIR = $${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_INCDIR_POST = $${QNX_DIR}/usr/include $${QNX_DIR}/usr/include/freetype2
|
||||
QMAKE_LIBDIR_POST = $${QNX_DIR}/$${QNX_CPUDIR}/lib $${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_CXX14 = -Wc,-std=gnu++1y
|
||||
|
@ -24,4 +24,4 @@ QMAKE_STRIP = $${CROSS_COMPILE}strip
|
||||
# it messes up system include order. --sysroot is
|
||||
# sufficient. See link for details:
|
||||
# https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=213217
|
||||
QMAKE_LIBDIR = $$[QT_SYSROOT]/usr/lib
|
||||
QMAKE_LIBDIR_POST = $$[QT_SYSROOT]/usr/lib
|
||||
|
@ -3,8 +3,9 @@ defineTest(qtConfSanitizeMkspec) {
|
||||
}
|
||||
|
||||
contains(DISTRO_OPTS, deb-multi-arch) {
|
||||
QMAKE_LFLAGS += -Wl,-rpath-link,$$[QT_SYSROOT]/usr/lib/$${GCC_MACHINE_DUMP} \
|
||||
-Wl,-rpath-link,$$[QT_SYSROOT]/lib/$${GCC_MACHINE_DUMP}
|
||||
QMAKE_RPATHLINKDIR_POST += \
|
||||
$$[QT_SYSROOT]/usr/lib/$${GCC_MACHINE_DUMP} \
|
||||
$$[QT_SYSROOT]/lib/$${GCC_MACHINE_DUMP}
|
||||
}
|
||||
|
||||
contains(DISTRO_OPTS, boot2qt) {
|
||||
|
39
mkspecs/devices/integrity-armv8-drive-cx/qmake.conf
Normal file
39
mkspecs/devices/integrity-armv8-drive-cx/qmake.conf
Normal 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)
|
45
mkspecs/devices/integrity-armv8-drive-cx/qplatformdefs.h
Normal file
45
mkspecs/devices/integrity-armv8-drive-cx/qplatformdefs.h
Normal 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
|
@ -19,8 +19,8 @@
|
||||
|
||||
include(../common/linux_device_pre.conf)
|
||||
|
||||
QMAKE_INCDIR += /usr/arm-linux-gnueabihf/include
|
||||
QMAKE_LIBDIR += /usr/arm-linux-gnueabihf/lib
|
||||
QMAKE_INCDIR_POST += /usr/arm-linux-gnueabihf/include
|
||||
QMAKE_LIBDIR_POST += /usr/arm-linux-gnueabihf/lib
|
||||
|
||||
QMAKE_LIBS += -lrt
|
||||
|
||||
|
@ -50,9 +50,9 @@ QMAKE_OBJCOPY = $${CROSS_COMPILE}objcopy
|
||||
QMAKE_NM = $${CROSS_COMPILE}nm -P
|
||||
QMAKE_STRIP = $${CROSS_COMPILE}strip
|
||||
|
||||
QMAKE_INCDIR += $${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 += $${TRIDENT_SHINER_SDK_BUILDTREE}/target/output/objs/$${TRIDENT_SHINER_SDK_BUILDSPEC}/comps/generated/lib/armgnu_linux_el_cortex-a9
|
||||
QMAKE_INCDIR_POST += $${TRIDENT_SHINER_SDK_BUILDTREE}/target/output/objs/$${TRIDENT_SHINER_SDK_BUILDSPEC}/comps/generic_apps/usr/include
|
||||
QMAKE_LIBDIR_POST += $${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/generated/lib/armgnu_linux_el_cortex-a9
|
||||
|
||||
QMAKE_INCDIR_EGL = $${TRIDENT_SHINER_SDK_INCDIR_EGL_OPENGL_ES2}
|
||||
QMAKE_LIBDIR_EGL = $${TRIDENT_SHINER_SDK_LIBDIR_EGL_OPENGL_ES2}
|
||||
|
@ -16,21 +16,21 @@
|
||||
|
||||
include(../common/linux_device_pre.conf)
|
||||
|
||||
QMAKE_INCDIR += \
|
||||
QMAKE_INCDIR_POST += \
|
||||
$${VIBRANTE_SDK_TOPDIR}/include \
|
||||
$$[QT_SYSROOT]/usr/include
|
||||
|
||||
QMAKE_LIBDIR += \
|
||||
QMAKE_LIBDIR_POST += \
|
||||
$${VIBRANTE_SDK_TOPDIR}/lib-target \
|
||||
$$[QT_SYSROOT]/usr/lib \
|
||||
$$[QT_SYSROOT]/lib/aarch64-linux-gnu \
|
||||
$$[QT_SYSROOT]/usr/lib/aarch64-linux-gnu
|
||||
|
||||
QMAKE_LFLAGS += \
|
||||
-Wl,-rpath-link,$${VIBRANTE_SDK_TOPDIR}/lib-target \
|
||||
-Wl,-rpath-link,$$[QT_SYSROOT]/usr/lib \
|
||||
-Wl,-rpath-link,$$[QT_SYSROOT]/usr/lib/aarch64-linux-gnu \
|
||||
-Wl,-rpath-link,$$[QT_SYSROOT]/lib/aarch64-linux-gnu
|
||||
QMAKE_RPATHLINKDIR_POST += \
|
||||
$${VIBRANTE_SDK_TOPDIR}/lib-target \
|
||||
$$[QT_SYSROOT]/usr/lib \
|
||||
$$[QT_SYSROOT]/usr/lib/aarch64-linux-gnu \
|
||||
$$[QT_SYSROOT]/lib/aarch64-linux-gnu
|
||||
|
||||
DISTRO_OPTS += aarch64
|
||||
|
||||
|
@ -11,19 +11,19 @@
|
||||
|
||||
include(../common/linux_device_pre.conf)
|
||||
|
||||
QMAKE_INCDIR += \
|
||||
QMAKE_INCDIR_POST += \
|
||||
$$[QT_SYSROOT]/usr/include \
|
||||
$$[QT_SYSROOT]/usr/include/arm-linux-gnueabihf
|
||||
|
||||
QMAKE_LIBDIR += \
|
||||
QMAKE_LIBDIR_POST += \
|
||||
$$[QT_SYSROOT]/usr/lib \
|
||||
$$[QT_SYSROOT]/lib/arm-linux-gnueabihf \
|
||||
$$[QT_SYSROOT]/usr/lib/arm-linux-gnueabihf
|
||||
|
||||
QMAKE_LFLAGS += \
|
||||
-Wl,-rpath-link,$$[QT_SYSROOT]/usr/lib \
|
||||
-Wl,-rpath-link,$$[QT_SYSROOT]/usr/lib/arm-linux-gnueabihf \
|
||||
-Wl,-rpath-link,$$[QT_SYSROOT]/lib/arm-linux-gnueabihf
|
||||
QMAKE_RPATHLINKDIR_POST += \
|
||||
$$[QT_SYSROOT]/usr/lib \
|
||||
$$[QT_SYSROOT]/usr/lib/arm-linux-gnueabihf \
|
||||
$$[QT_SYSROOT]/lib/arm-linux-gnueabihf
|
||||
|
||||
DISTRO_OPTS += hard-float
|
||||
COMPILER_FLAGS += -mtune=cortex-a15 -march=armv7-a -mfpu=neon-vfpv4
|
||||
|
@ -14,21 +14,21 @@
|
||||
|
||||
include(../common/linux_device_pre.conf)
|
||||
|
||||
QMAKE_INCDIR += \
|
||||
QMAKE_INCDIR_POST += \
|
||||
$${VIBRANTE_SDK_TOPDIR}/include \
|
||||
$$[QT_SYSROOT]/usr/include
|
||||
|
||||
QMAKE_LIBDIR += \
|
||||
QMAKE_LIBDIR_POST += \
|
||||
$${VIBRANTE_SDK_TOPDIR}/lib-target \
|
||||
$$[QT_SYSROOT]/usr/lib \
|
||||
$$[QT_SYSROOT]/lib/arm-linux-gnueabihf \
|
||||
$$[QT_SYSROOT]/usr/lib/arm-linux-gnueabihf
|
||||
|
||||
QMAKE_LFLAGS += \
|
||||
-Wl,-rpath-link,$${VIBRANTE_SDK_TOPDIR}/lib-target \
|
||||
-Wl,-rpath-link,$$[QT_SYSROOT]/usr/lib \
|
||||
-Wl,-rpath-link,$$[QT_SYSROOT]/usr/lib/arm-linux-gnueabihf \
|
||||
-Wl,-rpath-link,$$[QT_SYSROOT]/lib/arm-linux-gnueabihf
|
||||
QMAKE_RPATHLINKDIR_POST += \
|
||||
$${VIBRANTE_SDK_TOPDIR}/lib-target \
|
||||
$$[QT_SYSROOT]/usr/lib \
|
||||
$$[QT_SYSROOT]/usr/lib/arm-linux-gnueabihf \
|
||||
$$[QT_SYSROOT]/lib/arm-linux-gnueabihf
|
||||
|
||||
DISTRO_OPTS += hard-float
|
||||
COMPILER_FLAGS += -mtune=cortex-a15 -march=armv7-a -mfpu=neon-vfpv4 -DWIN_INTERFACE_CUSTOM
|
||||
|
@ -25,20 +25,20 @@
|
||||
|
||||
include(../common/linux_device_pre.conf)
|
||||
|
||||
QMAKE_INCDIR += \
|
||||
QMAKE_INCDIR_POST += \
|
||||
$$[QT_SYSROOT]/usr/include \
|
||||
$$[QT_SYSROOT]/usr/include/aarch64-linux-gnu
|
||||
|
||||
QMAKE_LIBDIR += \
|
||||
QMAKE_LIBDIR_POST += \
|
||||
$$[QT_SYSROOT]/usr/lib \
|
||||
$$[QT_SYSROOT]/lib/aarch64-linux-gnu \
|
||||
$$[QT_SYSROOT]/usr/lib/aarch64-linux-gnu
|
||||
|
||||
QMAKE_LFLAGS += \
|
||||
-Wl,-rpath-link,$$[QT_SYSROOT]/usr/lib \
|
||||
-Wl,-rpath-link,$$[QT_SYSROOT]/usr/lib/aarch64-linux-gnu \
|
||||
-Wl,-rpath-link,$$[QT_SYSROOT]/usr/lib/aarch64-linux-gnu/tegra \
|
||||
-Wl,-rpath-link,$$[QT_SYSROOT]/lib/aarch64-linux-gnu
|
||||
QMAKE_RPATHLINKDIR_POST += \
|
||||
$$[QT_SYSROOT]/usr/lib \
|
||||
$$[QT_SYSROOT]/usr/lib/aarch64-linux-gnu \
|
||||
$$[QT_SYSROOT]/usr/lib/aarch64-linux-gnu/tegra \
|
||||
$$[QT_SYSROOT]/lib/aarch64-linux-gnu
|
||||
|
||||
DISTRO_OPTS += aarch64
|
||||
COMPILER_FLAGS += -mtune=cortex-a57.cortex-a53 -march=armv8-a
|
||||
|
@ -52,10 +52,9 @@ QMAKE_LIBDIR_OPENGL_ES2 = $${BRCM_ROCKFORD_PATH}/middleware/v3d/lib_$${BRCM_PLAT
|
||||
QMAKE_LIBS_OPENGL_ES2 = -lv3ddriver -lrt
|
||||
QMAKE_LIBS_EGL =
|
||||
|
||||
INCLUDEPATH += $${BRCM_APPLIBS_PATH}/opensource/zlib/zlib-1.2.3
|
||||
QMAKE_LIBDIR += $${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
|
||||
QMAKE_INCDIR_POST += $${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
|
||||
|
||||
# DirectFB platform hooks for this hardware
|
||||
QT_CONFIG += directfb_egl egl
|
||||
|
@ -5,7 +5,7 @@
|
||||
|
||||
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_EGL = $$QMAKE_LIBDIR_OPENGL_ES2
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
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_EGL = $$QMAKE_LIBDIR_OPENGL_ES2
|
||||
|
@ -8,13 +8,12 @@ include(../common/linux_device_pre.conf)
|
||||
# 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
|
||||
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_INCLUDE_PATH = =/opt/vc/include
|
||||
|
||||
# terrible, they do not appear to resolve "=" in rpath!
|
||||
VC_LINK_LINE = -L=$${VC_LIBRARY_PATH} -Wl,-rpath-link,$$[QT_SYSROOT]$${VC_LIBRARY_PATH}
|
||||
VC_LINK_LINE = -L=$${VC_LIBRARY_PATH}
|
||||
|
||||
QMAKE_LIBDIR_OPENGL_ES2 = =$${VC_LIBRARY_PATH}
|
||||
QMAKE_LIBDIR_EGL = $$QMAKE_LIBDIR_OPENGL_ES2
|
||||
|
@ -27,7 +27,8 @@ QMAKE_OBJCOPY = $${CROSS_COMPILE}objcopy
|
||||
QMAKE_NM = $${CROSS_COMPILE}nm -P
|
||||
QMAKE_STRIP = $${CROSS_COMPILE}strip
|
||||
|
||||
QMAKE_LFLAGS += -Wl,-rpath-link,$$[QT_SYSROOT]/usr/lib/arm-linux-gnueabihf \
|
||||
-Wl,-rpath-link,$$[QT_SYSROOT]/lib/arm-linux-gnueabihf
|
||||
QMAKE_RPATHLINKDIR_POST += \
|
||||
$$[QT_SYSROOT]/usr/lib/arm-linux-gnueabihf \
|
||||
$$[QT_SYSROOT]/lib/arm-linux-gnueabihf
|
||||
|
||||
load(qt_config)
|
||||
|
@ -10,15 +10,16 @@
|
||||
|
||||
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]/usr/lib/arm-linux-gnueabi
|
||||
|
||||
QMAKE_LFLAGS += -Wl,-rpath-link,$$[QT_SYSROOT]/usr/lib \
|
||||
-Wl,-rpath-link,$$[QT_SYSROOT]/usr/lib/arm-linux-gnueabi \
|
||||
-Wl,-rpath-link,$$[QT_SYSROOT]/lib/arm-linux-gnueabi
|
||||
QMAKE_RPATHLINKDIR_POST += \
|
||||
$$[QT_SYSROOT]/usr/lib \
|
||||
$$[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
|
||||
QMAKE_CFLAGS += $$TEGRA2_CFLAGS
|
||||
|
@ -31,7 +31,9 @@ defineTest(qtLog) {
|
||||
defineTest(qtRunLoggedCommand) {
|
||||
qtLog("+ $$1")
|
||||
|
||||
output = $$system("( $$1 ) 2>&1", lines, result)
|
||||
!equals(3, false): \
|
||||
1 = "( $$1 ) 2>&1"
|
||||
output = $$system("$$1", lines, result)
|
||||
lg =
|
||||
for (l, output): \
|
||||
lg += "> $$l"
|
||||
|
@ -35,7 +35,7 @@ set(_qt5$${CMAKE_MODULE_NAME}_install_prefix \"$$[QT_INSTALL_PREFIX]\")
|
||||
|
||||
!!IF !equals(TEMPLATE, aux)
|
||||
# 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})
|
||||
!!ENDIF // TEMPLATE != aux
|
||||
|
@ -124,8 +124,12 @@ c++11|c++14|c++1z {
|
||||
cxxstd = CXX11
|
||||
}
|
||||
|
||||
# Check if we should disable the GNU extensions or not
|
||||
!strict_c++:!isEmpty(QMAKE_CXXFLAGS_GNU$$cxxstd): cxxstd = GNU$$cxxstd
|
||||
# Check if we should disable compiler extensions or not
|
||||
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_LFLAGS += $$eval(QMAKE_LFLAGS_$$cxxstd)
|
||||
@ -139,6 +143,3 @@ utf8_source {
|
||||
}
|
||||
|
||||
!precompile_header: SOURCES += $$NO_PCH_SOURCES
|
||||
|
||||
QMAKE_INCDIR += $$QMAKE_INCDIR_POST
|
||||
QMAKE_LIBDIR += $$QMAKE_LIBDIR_POST
|
||||
|
@ -581,7 +581,8 @@ defineTest(qtConfLibrary_pkgConfig) {
|
||||
version ~= s/[^0-9.].*$//
|
||||
$${1}.version = $$first(version)
|
||||
export($${1}.version)
|
||||
$${1}.libs = $$libpaths $$libs
|
||||
libpaths += $$libs
|
||||
$${1}.libs = "$$libpaths"
|
||||
export($${1}.libs)
|
||||
return(true)
|
||||
}
|
||||
|
@ -8,8 +8,8 @@ QMAKE_PLATFORM = freebsd
|
||||
include(../common/bsd/bsd.conf)
|
||||
|
||||
# Addon software goes into /usr/local on FreeBSD, by default we will look there
|
||||
QMAKE_INCDIR = /usr/local/include
|
||||
QMAKE_LIBDIR = /usr/local/lib
|
||||
QMAKE_INCDIR_POST = /usr/local/include
|
||||
QMAKE_LIBDIR_POST = /usr/local/lib
|
||||
|
||||
QMAKE_LFLAGS_NOUNDEF = -Wl,--no-undefined
|
||||
|
||||
|
@ -8,8 +8,8 @@ QMAKE_PLATFORM = freebsd
|
||||
include(../common/bsd/bsd.conf)
|
||||
|
||||
# Addon software goes into /usr/local on FreeBSD, by default we will look there
|
||||
QMAKE_INCDIR = /usr/local/include
|
||||
QMAKE_LIBDIR = /usr/local/lib
|
||||
QMAKE_INCDIR_POST = /usr/local/include
|
||||
QMAKE_LIBDIR_POST = /usr/local/lib
|
||||
|
||||
include(../common/gcc-base-unix.conf)
|
||||
include(../common/g++-unix.conf)
|
||||
|
@ -8,8 +8,8 @@ QMAKE_PLATFORM = netbsd
|
||||
include(../common/bsd/bsd.conf)
|
||||
|
||||
# Addon software goes into /usr/pkg on NetBSD, by default we will look there
|
||||
QMAKE_INCDIR = /usr/pkg/include
|
||||
QMAKE_LIBDIR = /usr/pkg/lib
|
||||
QMAKE_INCDIR_POST = /usr/pkg/include
|
||||
QMAKE_LIBDIR_POST = /usr/pkg/lib
|
||||
|
||||
# System provided X11 defaults to X11R7 path on NetBSD since 5.0
|
||||
QMAKE_INCDIR_X11 = /usr/X11R7/include
|
||||
|
@ -8,8 +8,8 @@ QMAKE_PLATFORM = openbsd
|
||||
include(../common/bsd/bsd.conf)
|
||||
|
||||
# Addon software goes into /usr/local on OpenBSD, by default we will look there
|
||||
QMAKE_INCDIR = /usr/local/include
|
||||
QMAKE_LIBDIR = /usr/local/lib
|
||||
QMAKE_INCDIR_POST = /usr/local/include
|
||||
QMAKE_LIBDIR_POST = /usr/local/lib
|
||||
|
||||
# System provided X11 defaults to X11R6 path on OpenBSD
|
||||
QMAKE_INCDIR_X11 = /usr/X11R6/include
|
||||
|
@ -94,6 +94,10 @@ UnixMakefileGenerator::init()
|
||||
!project->values("QMAKE_LIB_FLAG").isEmpty() &&
|
||||
project->isActiveConfig("dll"))
|
||||
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"))
|
||||
project->values("INCLUDEPATH") += project->values("QMAKE_INCDIR");
|
||||
ProStringList ldadd;
|
||||
|
@ -174,6 +174,9 @@ void Win32MakefileGenerator::processVars()
|
||||
else if (project->first("TEMPLATE").startsWith("vc"))
|
||||
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())
|
||||
project->values("INCLUDEPATH") += project->values("QMAKE_INCDIR");
|
||||
|
||||
|
@ -1246,6 +1246,11 @@
|
||||
#else
|
||||
# define QT_HAS_INCLUDE_NEXT(x) 0
|
||||
#endif
|
||||
#ifdef __has_feature
|
||||
# define QT_HAS_FEATURE(x) __has_feature(x)
|
||||
#else
|
||||
# define QT_HAS_FEATURE(x) 0
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Warning/diagnostic handling
|
||||
|
@ -86,6 +86,12 @@
|
||||
# include <sys/systeminfo.h>
|
||||
#endif
|
||||
|
||||
#if defined(Q_OS_DARWIN)
|
||||
# include <mach/machine.h>
|
||||
# include <sys/sysctl.h>
|
||||
# include <sys/types.h>
|
||||
#endif
|
||||
|
||||
#ifdef Q_OS_UNIX
|
||||
#include <sys/utsname.h>
|
||||
#include <private/qcore_unix_p.h>
|
||||
@ -2484,6 +2490,20 @@ QString QSysInfo::currentCpuArchitecture()
|
||||
case PROCESSOR_ARCHITECTURE_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)
|
||||
long ret = -1;
|
||||
struct utsname u;
|
||||
@ -3306,20 +3326,26 @@ bool qEnvironmentVariableIsEmpty(const char *varName) Q_DECL_NOEXCEPT
|
||||
|
||||
Equivalent to
|
||||
\code
|
||||
qgetenv(varName).toInt()
|
||||
qgetenv(varName).toInt(ok, 0)
|
||||
\endcode
|
||||
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()
|
||||
*/
|
||||
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 MaxDigitsForOctalInt =
|
||||
(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 '-'
|
||||
size_t dummy;
|
||||
if (getenv_s(&dummy, buffer, sizeof buffer, varName) != 0) {
|
||||
@ -3329,15 +3355,16 @@ int qEnvironmentVariableIntValue(const char *varName, bool *ok) Q_DECL_NOEXCEPT
|
||||
}
|
||||
#else
|
||||
const char * const buffer = ::getenv(varName);
|
||||
if (!buffer || !*buffer) {
|
||||
if (!buffer || strlen(buffer) > MaxDigitsForOctalInt + 2) {
|
||||
if (ok)
|
||||
*ok = false;
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
bool ok_ = true;
|
||||
const qlonglong value = qstrtoll(buffer, Q_NULLPTR, 0, &ok_);
|
||||
if (int(value) != value) { // this is the check in QByteArray::toInt(), keep it in sync
|
||||
const char *endptr;
|
||||
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)
|
||||
*ok = false;
|
||||
return 0;
|
||||
|
@ -647,7 +647,12 @@ inline void qt_noop(void) {}
|
||||
*/
|
||||
|
||||
#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
|
||||
# endif
|
||||
#endif
|
||||
|
@ -94,8 +94,8 @@
|
||||
ARM is bi-endian, detect using __ARMEL__ or __ARMEB__, falling back to
|
||||
auto-detection implemented below.
|
||||
*/
|
||||
#if defined(__arm__) || defined(__TARGET_ARCH_ARM) || defined(_M_ARM) || defined(__aarch64__)
|
||||
# if defined(__aarch64__)
|
||||
#if defined(__arm__) || defined(__TARGET_ARCH_ARM) || defined(_M_ARM) || defined(__aarch64__) || defined(__ARM64__)
|
||||
# if defined(__aarch64__) || defined(__ARM64__)
|
||||
# define Q_PROCESSOR_ARM_64
|
||||
# define Q_PROCESSOR_WORDSIZE 8
|
||||
# else
|
||||
@ -109,7 +109,8 @@
|
||||
# define Q_PROCESSOR_ARM _M_ARM
|
||||
# elif defined(__ARM64_ARCH_8__) \
|
||||
|| defined(__aarch64__) \
|
||||
|| defined(__CORE_CORTEXAV8__) // GHS-specific for INTEGRITY
|
||||
|| defined(__ARMv8__) \
|
||||
|| defined(__ARMv8_A__)
|
||||
# define Q_PROCESSOR_ARM 8
|
||||
# elif defined(__ARM_ARCH_7__) \
|
||||
|| defined(__ARM_ARCH_7A__) \
|
||||
@ -117,7 +118,7 @@
|
||||
|| defined(__ARM_ARCH_7M__) \
|
||||
|| defined(__ARM_ARCH_7S__) \
|
||||
|| defined(_ARM_ARCH_7) \
|
||||
|| defined(__CORE_CORTEXA__) // GHS-specific for INTEGRITY
|
||||
|| defined(__CORE_CORTEXA__)
|
||||
# define Q_PROCESSOR_ARM 7
|
||||
# elif defined(__ARM_ARCH_6__) \
|
||||
|| defined(__ARM_ARCH_6J__) \
|
||||
|
@ -195,8 +195,12 @@ static bool shouldIncludeFs(const QStorageIterator &it)
|
||||
|
||||
#if defined(Q_OS_BSD4)
|
||||
|
||||
#ifndef MNT_NOWAIT
|
||||
# define MNT_NOWAIT 0
|
||||
#endif
|
||||
|
||||
inline QStorageIterator::QStorageIterator()
|
||||
: entryCount(::getmntinfo(&stat_buf, 0)),
|
||||
: entryCount(::getmntinfo(&stat_buf, MNT_NOWAIT)),
|
||||
currentIndex(-1)
|
||||
{
|
||||
}
|
||||
|
@ -2044,7 +2044,7 @@ Qt::DropActions QAbstractItemModel::supportedDropActions() const
|
||||
Qt::DropActions QAbstractItemModel::supportedDragActions() const
|
||||
{
|
||||
Q_D(const QAbstractItemModel);
|
||||
if (d->supportedDragActions != Qt::IgnoreAction)
|
||||
if (int(d->supportedDragActions) != -1)
|
||||
return d->supportedDragActions;
|
||||
return supportedDropActions();
|
||||
}
|
||||
|
@ -198,6 +198,7 @@ public:
|
||||
static QObjectPrivate *get(QObject *o) {
|
||||
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;
|
||||
inline bool isSignalConnected(uint signalIdx, bool checkDeclarative = true) const;
|
||||
|
@ -2363,7 +2363,7 @@ QByteArray QVariant::toByteArray() const
|
||||
\fn QPoint QVariant::toPoint() const
|
||||
|
||||
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.
|
||||
|
||||
\sa canConvert(), convert()
|
||||
|
@ -49,6 +49,11 @@ QT_BEGIN_NAMESPACE
|
||||
|
||||
namespace QtPrivate {
|
||||
|
||||
QT_WARNING_PUSH
|
||||
#if defined(Q_CC_GNU) && Q_CC_GNU >= 700
|
||||
QT_WARNING_DISABLE_GCC("-Wstringop-overflow")
|
||||
#endif
|
||||
|
||||
template <class T>
|
||||
struct QPodArrayOps
|
||||
: QTypedArrayData<T>
|
||||
@ -131,6 +136,7 @@ struct QPodArrayOps
|
||||
this->size -= (e - b);
|
||||
}
|
||||
};
|
||||
QT_WARNING_POP
|
||||
|
||||
template <class T>
|
||||
struct QGenericArrayOps
|
||||
|
@ -4791,4 +4791,26 @@ QByteArray QByteArray::toPercentEncoding(const QByteArray &exclude, const QByteA
|
||||
\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
|
||||
|
@ -11576,52 +11576,47 @@ QString QString::toHtmlEscaped() const
|
||||
\macro QStringLiteral(str)
|
||||
\relates QString
|
||||
|
||||
The macro generates the data for a QString out of \a str at compile time if the compiler supports it.
|
||||
Creating a QString from it is free in this case, and the generated string data is stored in
|
||||
the read-only segment of the compiled object file.
|
||||
The macro generates the data for a QString out of the string literal \a str
|
||||
at compile time. Creating a QString from it is free in this case, and the
|
||||
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
|
||||
QString::fromUtf8().
|
||||
If you have code that looks like this:
|
||||
|
||||
If you have code looking like:
|
||||
\code
|
||||
// hasAttribute takes a QString argument
|
||||
if (node.hasAttribute("http-contents-length")) //...
|
||||
\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
|
||||
if (node.hasAttribute(QStringLiteral("http-contents-length"))) //...
|
||||
\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
|
||||
of QString's from data known at compile time.
|
||||
In this case, QString's internal data will be generated at compile time; no
|
||||
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
|
||||
if (attribute.name() == QLatin1String("http-contents-length")) //...
|
||||
\endcode
|
||||
|
||||
\note There are some restrictions when using the MSVC 2010 or 2012 compilers. The example snippets
|
||||
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
|
||||
\sa QByteArrayLiteral
|
||||
*/
|
||||
|
||||
/*!
|
||||
|
@ -87,7 +87,8 @@
|
||||
"test": "qpa/kms",
|
||||
"sources": [
|
||||
{ "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": {
|
||||
@ -150,6 +151,13 @@
|
||||
{ "type": "pkgConfig", "args": "libinput" }
|
||||
]
|
||||
},
|
||||
"integrityhid": {
|
||||
"label": "integrityhid",
|
||||
"test": "qpa/integrityhid",
|
||||
"sources": [
|
||||
{ "libs": "-lhiddev -lusbhid -lusb" }
|
||||
]
|
||||
},
|
||||
"libjpeg": {
|
||||
"label": "libjpeg",
|
||||
"test": "unix/libjpeg",
|
||||
@ -379,6 +387,11 @@
|
||||
"type": "compile",
|
||||
"test": "unix/evdev"
|
||||
},
|
||||
"integrityfb": {
|
||||
"label": "INTEGRITY framebuffer",
|
||||
"type": "compile",
|
||||
"test": "qpa/integrityfb"
|
||||
},
|
||||
"libinput_axis_api": {
|
||||
"label": "axis API in libinput",
|
||||
"type": "compile",
|
||||
@ -447,7 +460,6 @@
|
||||
"combined-angle-lib": {
|
||||
"label": "Combined ANGLE Library",
|
||||
"autoDetect": false,
|
||||
"enable": "features.angle",
|
||||
"condition": "features.angle",
|
||||
"output": [ "publicFeature" ]
|
||||
},
|
||||
@ -526,7 +538,7 @@
|
||||
"integrityfb": {
|
||||
"label": "INTEGRITY framebuffer",
|
||||
"section": "Platform plugins",
|
||||
"condition": "config.integrity",
|
||||
"condition": "config.integrity && tests.integrityfb",
|
||||
"output": [ "privateFeature" ]
|
||||
},
|
||||
"kms": {
|
||||
@ -539,6 +551,11 @@
|
||||
"condition": "features.libudev && libs.libinput",
|
||||
"output": [ "privateFeature" ]
|
||||
},
|
||||
"integrityhid": {
|
||||
"label": "INTEGRITY HID",
|
||||
"condition": "config.integrity && libs.integrityhid",
|
||||
"output": [ "privateFeature" ]
|
||||
},
|
||||
"libinput-axis-api": {
|
||||
"label": "axis API in libinput",
|
||||
"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": [
|
||||
"evdev",
|
||||
"libinput",
|
||||
"integrityhid",
|
||||
"mtdev",
|
||||
"tslib",
|
||||
"xkbcommon-evdev"
|
||||
|
@ -10,7 +10,6 @@ HEADERS += \
|
||||
image/qimageiohandler.h \
|
||||
image/qimagereader.h \
|
||||
image/qimagewriter.h \
|
||||
image/qmovie.h \
|
||||
image/qpaintengine_pic_p.h \
|
||||
image/qpicture.h \
|
||||
image/qpicture_p.h \
|
||||
@ -41,7 +40,6 @@ SOURCES += \
|
||||
image/qpixmap.cpp \
|
||||
image/qpixmapcache.cpp \
|
||||
image/qplatformpixmap.cpp \
|
||||
image/qmovie.cpp \
|
||||
image/qpixmap_raster.cpp \
|
||||
image/qpixmap_blitter.cpp \
|
||||
image/qimagepixmapcleanuphooks.cpp \
|
||||
@ -50,6 +48,10 @@ SOURCES += \
|
||||
image/qiconengine.cpp \
|
||||
image/qiconengineplugin.cpp \
|
||||
|
||||
qtConfig(movie) {
|
||||
HEADERS += image/qmovie.h
|
||||
SOURCES += image/qmovie.cpp
|
||||
}
|
||||
|
||||
win32:!winrt: SOURCES += image/qpixmap_win.cpp
|
||||
|
||||
|
@ -174,8 +174,6 @@
|
||||
|
||||
#include "qmovie.h"
|
||||
|
||||
#ifndef QT_NO_MOVIE
|
||||
|
||||
#include "qglobal.h"
|
||||
#include "qimage.h"
|
||||
#include "qimagereader.h"
|
||||
@ -1062,5 +1060,3 @@ void QMovie::setCacheMode(CacheMode cacheMode)
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#include "moc_qmovie.cpp"
|
||||
|
||||
#endif // QT_NO_MOVIE
|
||||
|
@ -42,15 +42,14 @@
|
||||
|
||||
#include <QtGui/qtguiglobal.h>
|
||||
|
||||
#ifndef QT_NO_MOVIE
|
||||
|
||||
#include <QtCore/qobject.h>
|
||||
#include <QtCore/qbytearray.h>
|
||||
#include <QtCore/qlist.h>
|
||||
#include <QtGui/qimagereader.h>
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
QT_REQUIRE_CONFIG(movie);
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
class QByteArray;
|
||||
class QColor;
|
||||
@ -146,6 +145,4 @@ private:
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif // QT_NO_MOVIE
|
||||
|
||||
#endif // QMOVIE_H
|
||||
|
@ -6013,7 +6013,7 @@ DrawHelper qDrawHelper[QImage::NImageFormats] =
|
||||
// Format_ARGB32,
|
||||
{
|
||||
blend_color_generic,
|
||||
qt_gradient_argb32,
|
||||
blend_src_generic,
|
||||
qt_bitmapblit_argb32,
|
||||
qt_alphamapblit_argb32,
|
||||
qt_alphargbblit_argb32,
|
||||
|
@ -1250,20 +1250,22 @@ void QNativeSocketEngine::handleConnectOpFinished(bool success, QAbstractSocket:
|
||||
void QNativeSocketEngine::handleNewDatagrams(const QList<WinRtDatagram> &datagrams)
|
||||
{
|
||||
Q_D(QNativeSocketEngine);
|
||||
// Defer putting the datagrams into the list until the next event loop iteration
|
||||
// (where the readyRead signal is emitted as well)
|
||||
QMetaObject::invokeMethod(this, "putIntoPendingDatagramsList", Qt::QueuedConnection,
|
||||
Q_ARG(QList<WinRtDatagram>, datagrams));
|
||||
QMutexLocker locker(&d->readMutex);
|
||||
d->pendingDatagrams.append(datagrams);
|
||||
if (d->notifyOnRead)
|
||||
emit readReady();
|
||||
}
|
||||
|
||||
void QNativeSocketEngine::handleNewData(const QVector<QByteArray> &data)
|
||||
{
|
||||
// Defer putting the data into the list until the next event loop iteration
|
||||
// (where the readyRead signal is emitted as well)
|
||||
QMetaObject::invokeMethod(this, "putIntoPendingData", Qt::QueuedConnection,
|
||||
Q_ARG(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();
|
||||
}
|
||||
|
||||
void QNativeSocketEngine::handleTcpError(QAbstractSocket::SocketError error)
|
||||
@ -1284,25 +1286,6 @@ void QNativeSocketEngine::handleTcpError(QAbstractSocket::SocketError error)
|
||||
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)
|
||||
{
|
||||
Q_UNUSED(socketProtocol);
|
||||
|
@ -183,9 +183,6 @@ private slots:
|
||||
void handleTcpError(QAbstractSocket::SocketError error);
|
||||
|
||||
private:
|
||||
Q_INVOKABLE void putIntoPendingDatagramsList(const QList<WinRtDatagram> &datagrams);
|
||||
Q_INVOKABLE void putIntoPendingData(const QVector<QByteArray> &data);
|
||||
|
||||
Q_DECLARE_PRIVATE(QNativeSocketEngine)
|
||||
Q_DISABLE_COPY(QNativeSocketEngine)
|
||||
};
|
||||
|
@ -143,7 +143,7 @@ QSslCertificate::QSslCertificate(QIODevice *device, QSsl::EncodingFormat format)
|
||||
: d(new QSslCertificatePrivate)
|
||||
{
|
||||
QSslSocketPrivate::ensureInitialized();
|
||||
if (device)
|
||||
if (device && QSslSocket::supportsSsl())
|
||||
d->init(device->readAll(), format);
|
||||
}
|
||||
|
||||
@ -157,7 +157,8 @@ QSslCertificate::QSslCertificate(const QByteArray &data, QSsl::EncodingFormat fo
|
||||
: d(new QSslCertificatePrivate)
|
||||
{
|
||||
QSslSocketPrivate::ensureInitialized();
|
||||
d->init(data, format);
|
||||
if (QSslSocket::supportsSsl())
|
||||
d->init(data, format);
|
||||
}
|
||||
|
||||
/*!
|
||||
|
@ -1226,9 +1226,32 @@ bool QSslSocketBackendPrivate::verifyPeerTrust()
|
||||
QCFType<SecCertificateRef> certRef = SecCertificateCreateWithData(NULL, certData);
|
||||
CFArrayAppendValue(certArray, certRef);
|
||||
}
|
||||
|
||||
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;
|
||||
SecTrustEvaluate(trust, &trustResult);
|
||||
|
@ -53,8 +53,10 @@
|
||||
|
||||
#ifdef QT_EGL_NO_X11
|
||||
# define MESA_EGL_NO_X11_HEADERS // MESA
|
||||
# define WIN_INTERFACE_CUSTOM // NV
|
||||
#endif // QT_EGL_NO_X11
|
||||
# if !defined(Q_OS_INTEGRITY)
|
||||
# define WIN_INTERFACE_CUSTOM // NV
|
||||
# endif // Q_OS_INTEGRITY
|
||||
#endif // QT_EGL_NO_X11
|
||||
|
||||
#ifdef QT_EGL_WAYLAND
|
||||
# define WAYLAND // NV
|
||||
|
@ -967,15 +967,10 @@ int QFontEngineFT::loadFlags(QGlyphSet *set, GlyphFormat format, int flags,
|
||||
if (format == Format_Mono) {
|
||||
load_target = FT_LOAD_TARGET_MONO;
|
||||
} else if (format == Format_A32) {
|
||||
if (subpixelType == Subpixel_RGB || subpixelType == Subpixel_BGR) {
|
||||
if (default_hint_style == HintFull)
|
||||
load_target = FT_LOAD_TARGET_LCD;
|
||||
if (subpixelType == Subpixel_RGB || subpixelType == Subpixel_BGR)
|
||||
hsubpixel = true;
|
||||
} else if (subpixelType == Subpixel_VRGB || subpixelType == Subpixel_VBGR) {
|
||||
if (default_hint_style == HintFull)
|
||||
load_target = FT_LOAD_TARGET_LCD_V;
|
||||
else if (subpixelType == Subpixel_VRGB || subpixelType == Subpixel_VBGR)
|
||||
vfactor = 3;
|
||||
}
|
||||
} else if (format == Format_ARGB) {
|
||||
#ifdef FT_LOAD_COLOR
|
||||
load_flags |= FT_LOAD_COLOR;
|
||||
|
@ -448,19 +448,41 @@ QFontEngine *QWinRTFontDatabase::fontEngine(const QFontDef &fontDef, void *handl
|
||||
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,
|
||||
QFont::StyleHint styleHint,
|
||||
QChar::Script script) const
|
||||
{
|
||||
Q_UNUSED(style)
|
||||
Q_UNUSED(styleHint)
|
||||
Q_UNUSED(script)
|
||||
|
||||
qCDebug(lcQpaFonts) << __FUNCTION__ << family;
|
||||
|
||||
QStringList result;
|
||||
if (family == QLatin1String("Helvetica"))
|
||||
result.append(QStringLiteral("Arial"));
|
||||
result.append(QWinRTFontDatabase::familyForStyleHint(styleHint));
|
||||
result.append(QFreeTypeFontDatabase::fallbacksForFamily(family, style, styleHint, script));
|
||||
return result;
|
||||
}
|
||||
|
@ -80,6 +80,8 @@ public:
|
||||
QStringList fallbacksForFamily(const QString &family, QFont::Style style,
|
||||
QFont::StyleHint styleHint, QChar::Script script) const override;
|
||||
void releaseHandle(void *handle) override;
|
||||
|
||||
static QString familyForStyleHint(QFont::StyleHint styleHint);
|
||||
private:
|
||||
QHash<IDWriteFontFile *, FontDescription> m_fonts;
|
||||
QHash<QString, IDWriteFontFamily *> m_fontFamilies;
|
||||
|
@ -28,4 +28,8 @@ qtConfig(evdev)|qtConfig(libinput) {
|
||||
include($$PWD/shared/shared.pri)
|
||||
}
|
||||
|
||||
qtConfig(integrityhid) {
|
||||
include($$PWD/integrityhid/integrityhid.pri)
|
||||
}
|
||||
|
||||
load(qt_module)
|
||||
|
7
src/platformsupport/input/integrityhid/integrityhid.pri
Normal file
7
src/platformsupport/input/integrityhid/integrityhid.pri
Normal file
@ -0,0 +1,7 @@
|
||||
HEADERS += \
|
||||
$$PWD/qintegrityhidmanager.h
|
||||
|
||||
SOURCES += \
|
||||
$$PWD/qintegrityhidmanager.cpp
|
||||
|
||||
QMAKE_USE_PRIVATE += integrityhid
|
263
src/platformsupport/input/integrityhid/qintegrityhidmanager.cpp
Normal file
263
src/platformsupport/input/integrityhid/qintegrityhidmanager.cpp
Normal 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 *)¬ifier);
|
||||
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
|
@ -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
|
@ -11,7 +11,7 @@ SUBDIRS = \
|
||||
qtConfig(freetype)|darwin|win32: \
|
||||
SUBDIRS += fontdatabases
|
||||
|
||||
qtConfig(evdev)|qtConfig(tslib)|qtConfig(libinput) {
|
||||
qtConfig(evdev)|qtConfig(tslib)|qtConfig(libinput)|qtConfig(integrityhid) {
|
||||
SUBDIRS += input
|
||||
input.depends += devicediscovery
|
||||
}
|
||||
|
@ -92,6 +92,10 @@
|
||||
#include <QtInputSupport/private/qtslib_p.h>
|
||||
#endif
|
||||
|
||||
#if QT_CONFIG(integrityhid)
|
||||
#include <QtInputSupport/qintegrityhidmanager.h>
|
||||
#endif
|
||||
|
||||
#include <QtPlatformHeaders/qeglfsfunctions.h>
|
||||
|
||||
static void initResources()
|
||||
@ -466,6 +470,10 @@ void QEglFSIntegration::createInputHandlers()
|
||||
#endif
|
||||
new QEvdevTouchManager(QLatin1String("EvdevTouch"), QString() /* spec */, this);
|
||||
#endif
|
||||
|
||||
#if QT_CONFIG(integrityhid)
|
||||
new QIntegrityHIDManager("HID", "", this);
|
||||
#endif
|
||||
}
|
||||
|
||||
EGLNativeDisplayType QEglFSIntegration::nativeDisplay() const
|
||||
|
@ -56,6 +56,13 @@ QEglFSKmsEglDeviceIntegration::QEglFSKmsEglDeviceIntegration()
|
||||
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
|
||||
{
|
||||
return EGL_STREAM_BIT_KHR;
|
||||
|
@ -55,6 +55,7 @@ class QEglFSKmsEglDeviceIntegration : public QEglFSKmsIntegration
|
||||
public:
|
||||
QEglFSKmsEglDeviceIntegration();
|
||||
|
||||
QSurfaceFormat surfaceFormatFor(const QSurfaceFormat &inputFormat) const override;
|
||||
EGLint surfaceType() const override;
|
||||
EGLDisplay createDisplay(EGLNativeDisplayType nativeDisplay) override;
|
||||
bool supportsSurfacelessContexts() const override;
|
||||
|
@ -977,8 +977,7 @@ bool QWindowsKeyMapper::translateKeyEventInternal(QWindow *window, const MSG &ms
|
||||
state = state ^ Qt::ShiftModifier;
|
||||
else if (code == Qt::Key_Alt)
|
||||
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,
|
||||
// otherwise a Return. (This is the extended key bit)
|
||||
if ((code == Qt::Key_Return) && (msg.lParam & 0x1000000))
|
||||
|
@ -156,6 +156,14 @@ QXcbScreen *QXcbWindow::parentScreen()
|
||||
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
|
||||
static inline bool isTransient(const QWindow *w)
|
||||
{
|
||||
@ -356,8 +364,8 @@ void QXcbWindow::create()
|
||||
Qt::WindowType type = window()->type();
|
||||
|
||||
QXcbScreen *currentScreen = xcbScreen();
|
||||
QRect rect = windowGeometry();
|
||||
QXcbScreen *platformScreen = parent() ? parentScreen() : static_cast<QXcbScreen*>(screenForGeometry(rect));
|
||||
QXcbScreen *platformScreen = parent() ? parentScreen() : initialScreen();
|
||||
QRect rect = QHighDpi::toNativePixels(window()->geometry(), platformScreen);
|
||||
|
||||
if (type == Qt::Desktop) {
|
||||
m_window = platformScreen->root();
|
||||
|
@ -191,6 +191,7 @@ protected:
|
||||
|
||||
QXcbScreen *parentScreen();
|
||||
|
||||
QXcbScreen *initialScreen() const;
|
||||
void changeNetWmState(bool set, xcb_atom_t one, xcb_atom_t two = 0);
|
||||
NetWmStates netWmStates();
|
||||
void setNetWmStates(NetWmStates);
|
||||
|
@ -1,40 +1,46 @@
|
||||
# Qt dialogs module
|
||||
|
||||
HEADERS += \
|
||||
INCLUDEPATH += $$PWD
|
||||
|
||||
qtConfig(printdialog) {
|
||||
HEADERS += \
|
||||
dialogs/qabstractprintdialog.h \
|
||||
dialogs/qabstractprintdialog_p.h \
|
||||
dialogs/qpagesetupdialog_p.h \
|
||||
dialogs/qpagesetupdialog.h \
|
||||
dialogs/qprintdialog.h \
|
||||
dialogs/qprintpreviewdialog.h
|
||||
dialogs/qprintdialog.h
|
||||
|
||||
osx {
|
||||
OBJECTIVE_SOURCES += dialogs/qpagesetupdialog_mac.mm \
|
||||
dialogs/qprintdialog_mac.mm
|
||||
LIBS_PRIVATE += -framework AppKit
|
||||
}
|
||||
macos {
|
||||
OBJECTIVE_SOURCES += dialogs/qpagesetupdialog_mac.mm \
|
||||
dialogs/qprintdialog_mac.mm
|
||||
LIBS_PRIVATE += -framework AppKit
|
||||
}
|
||||
|
||||
win32 {
|
||||
SOURCES += dialogs/qpagesetupdialog_win.cpp \
|
||||
dialogs/qprintdialog_win.cpp
|
||||
}
|
||||
win32 {
|
||||
SOURCES += dialogs/qpagesetupdialog_win.cpp \
|
||||
dialogs/qprintdialog_win.cpp
|
||||
}
|
||||
|
||||
unix:!mac {
|
||||
INCLUDEPATH += $$QT_SOURCE_TREE/src/plugins/printsupport/cups
|
||||
HEADERS += dialogs/qpagesetupdialog_unix_p.h
|
||||
SOURCES += dialogs/qprintdialog_unix.cpp \
|
||||
dialogs/qpagesetupdialog_unix.cpp
|
||||
FORMS += dialogs/qprintsettingsoutput.ui \
|
||||
dialogs/qprintwidget.ui \
|
||||
dialogs/qprintpropertieswidget.ui
|
||||
}
|
||||
unix:!darwin {
|
||||
INCLUDEPATH += $$QT_SOURCE_TREE/src/plugins/printsupport/cups
|
||||
HEADERS += dialogs/qpagesetupdialog_unix_p.h
|
||||
SOURCES += dialogs/qprintdialog_unix.cpp \
|
||||
dialogs/qpagesetupdialog_unix.cpp
|
||||
FORMS += dialogs/qprintsettingsoutput.ui \
|
||||
dialogs/qprintwidget.ui \
|
||||
dialogs/qprintpropertieswidget.ui
|
||||
}
|
||||
|
||||
INCLUDEPATH += $$PWD
|
||||
|
||||
SOURCES += \
|
||||
SOURCES += \
|
||||
dialogs/qabstractprintdialog.cpp \
|
||||
dialogs/qpagesetupdialog.cpp \
|
||||
dialogs/qprintpreviewdialog.cpp
|
||||
dialogs/qpagesetupdialog.cpp
|
||||
|
||||
FORMS += dialogs/qpagesetupwidget.ui
|
||||
RESOURCES += dialogs/qprintdialog.qrc
|
||||
}
|
||||
|
||||
qtConfig(printpreviewdialog) {
|
||||
HEADERS += dialogs/qprintpreviewdialog.h
|
||||
SOURCES += dialogs/qprintpreviewdialog.cpp
|
||||
}
|
||||
|
||||
FORMS += dialogs/qpagesetupwidget.ui
|
||||
RESOURCES += dialogs/qprintdialog.qrc
|
||||
|
@ -43,8 +43,6 @@
|
||||
#include "qprinter.h"
|
||||
#include "private/qprinter_p.h"
|
||||
|
||||
#ifndef QT_NO_PRINTDIALOG
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
// hack
|
||||
@ -497,5 +495,3 @@ void QPrintDialog::open(QObject *receiver, const char *member)
|
||||
}
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif // QT_NO_PRINTDIALOG
|
||||
|
@ -42,12 +42,11 @@
|
||||
|
||||
#include <QtPrintSupport/qtprintsupportglobal.h>
|
||||
|
||||
#if QT_CONFIG(printdialog)
|
||||
|
||||
#include <QtWidgets/qdialog.h>
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
QT_REQUIRE_CONFIG(printdialog);
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
class QAbstractPrintDialogPrivate;
|
||||
class QPrinter;
|
||||
@ -120,6 +119,4 @@ Q_DECLARE_OPERATORS_FOR_FLAGS(QAbstractPrintDialog::PrintDialogOptions)
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif // QT_NO_PRINTDIALOG
|
||||
|
||||
#endif // QABSTRACTPRINTDIALOG_H
|
||||
|
@ -53,14 +53,12 @@
|
||||
|
||||
#include <QtPrintSupport/private/qtprintsupportglobal_p.h>
|
||||
|
||||
#ifndef QT_NO_PRINTDIALOG
|
||||
|
||||
#include "private/qdialog_p.h"
|
||||
#include "QtPrintSupport/qabstractprintdialog.h"
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
QT_REQUIRE_CONFIG(printdialog);
|
||||
|
||||
#ifndef QT_NO_PRINTER
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
class QPrinter;
|
||||
class QPrinterPrivate;
|
||||
@ -92,10 +90,6 @@ public:
|
||||
int maxPage;
|
||||
};
|
||||
|
||||
#endif //QT_NO_PRINTER
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif // QT_NO_PRINTDIALOG
|
||||
|
||||
#endif // QABSTRACTPRINTDIALOG_P_H
|
||||
|
@ -42,8 +42,6 @@
|
||||
|
||||
#include <QtPrintSupport/qprinter.h>
|
||||
|
||||
#ifndef QT_NO_PRINTDIALOG
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
/*!
|
||||
@ -183,5 +181,3 @@ void QPageSetupDialog::done(int result)
|
||||
}
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif
|
||||
|
@ -42,12 +42,11 @@
|
||||
|
||||
#include <QtPrintSupport/qtprintsupportglobal.h>
|
||||
|
||||
#ifndef QT_NO_PRINTDIALOG
|
||||
|
||||
#include <QtWidgets/qdialog.h>
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
QT_REQUIRE_CONFIG(printdialog);
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
class QPrinter;
|
||||
class QPageSetupDialogPrivate;
|
||||
@ -77,6 +76,4 @@ public:
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif // QT_NO_PRINTDIALOG
|
||||
|
||||
#endif // QPAGESETUPDIALOG_H
|
||||
|
@ -42,7 +42,6 @@
|
||||
|
||||
#include "qpagesetupdialog.h"
|
||||
|
||||
#ifndef QT_NO_PRINTDIALOG
|
||||
#include "qpagesetupdialog_p.h"
|
||||
|
||||
#include <qpa/qplatformnativeinterface.h>
|
||||
@ -222,5 +221,3 @@ int QPageSetupDialog::exec()
|
||||
}
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif /* QT_NO_PRINTDIALOG */
|
||||
|
@ -54,14 +54,14 @@
|
||||
|
||||
#include <QtPrintSupport/private/qtprintsupportglobal_p.h>
|
||||
|
||||
#ifndef QT_NO_PRINTDIALOG
|
||||
|
||||
#include "private/qdialog_p.h"
|
||||
|
||||
#include "qbytearray.h"
|
||||
#include "qpagesetupdialog.h"
|
||||
#include "qpointer.h"
|
||||
|
||||
QT_REQUIRE_CONFIG(printdialog);
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
class QPrinter;
|
||||
@ -83,6 +83,4 @@ public:
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif // QT_NO_PRINTDIALOG
|
||||
|
||||
#endif // QPAGESETUPDIALOG_P_H
|
||||
|
@ -39,12 +39,13 @@
|
||||
|
||||
#include "qpagesetupdialog.h"
|
||||
|
||||
#ifndef QT_NO_PRINTDIALOG
|
||||
#include "qpagesetupdialog_unix_p.h"
|
||||
|
||||
#include <private/qpagesetupdialog_p.h>
|
||||
#include <private/qprintdevice_p.h>
|
||||
#if QT_CONFIG(cups)
|
||||
#include <private/qcups_p.h>
|
||||
#endif
|
||||
|
||||
#include "qpainter.h"
|
||||
#include "qprintdialog.h"
|
||||
@ -294,7 +295,7 @@ void QPageSetupWidget::initUnits()
|
||||
// Init the Pages Per Sheet (n-up) combo boxes if using CUPS
|
||||
void QPageSetupWidget::initPagesPerSheet()
|
||||
{
|
||||
#if !defined(QT_NO_CUPS)
|
||||
#if QT_CONFIG(cups)
|
||||
m_ui.pagesPerSheetLayoutCombo->addItem(QPrintDialog::tr("Left to Right, Top to Bottom"),
|
||||
QVariant::fromValue(QCUPSSupport::LeftToRightTopToBottom));
|
||||
m_ui.pagesPerSheetLayoutCombo->addItem(QPrintDialog::tr("Left to Right, Bottom to Top"),
|
||||
@ -498,7 +499,7 @@ void QPageSetupWidget::updateWidget()
|
||||
void QPageSetupWidget::setupPrinter() const
|
||||
{
|
||||
m_printer->setPageLayout(m_pageLayout);
|
||||
#if !defined(QT_NO_CUPS)
|
||||
#if QT_CONFIG(cups)
|
||||
QCUPSSupport::PagesPerSheet pagesPerSheet = m_ui.pagesPerSheetCombo->currentData()
|
||||
.value<QCUPSSupport::PagesPerSheet>();
|
||||
QCUPSSupport::PagesPerSheetLayout pagesPerSheetLayout = m_ui.pagesPerSheetLayoutCombo->currentData()
|
||||
@ -545,7 +546,7 @@ void QPageSetupWidget::pageOrientationChanged()
|
||||
|
||||
void QPageSetupWidget::pagesPerSheetChanged()
|
||||
{
|
||||
#if !defined(QT_NO_CUPS)
|
||||
#if QT_CONFIG(cups)
|
||||
switch (m_ui.pagesPerSheetCombo->currentData().toInt()) {
|
||||
case QCUPSSupport::OnePagePerSheet:
|
||||
m_pagePreview->setPagePreviewLayout(1, 1);
|
||||
@ -642,5 +643,3 @@ int QPageSetupDialog::exec()
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#include "moc_qpagesetupdialog.cpp"
|
||||
|
||||
#endif // QT_NO_PRINTDIALOG
|
||||
|
@ -53,14 +53,14 @@
|
||||
|
||||
#include <QtPrintSupport/private/qtprintsupportglobal_p.h>
|
||||
|
||||
#ifndef QT_NO_PRINTDIALOG
|
||||
|
||||
#include "qprinter.h"
|
||||
|
||||
#include <QtGui/qpagelayout.h>
|
||||
|
||||
#include <ui_qpagesetupwidget.h>
|
||||
|
||||
QT_REQUIRE_CONFIG(printdialog);
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
class QPrinter;
|
||||
@ -106,5 +106,4 @@ private:
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif // QT_NO_PRINTDIALOG
|
||||
#endif
|
||||
|
@ -39,7 +39,6 @@
|
||||
|
||||
#include "qpagesetupdialog.h"
|
||||
|
||||
#ifndef QT_NO_PRINTDIALOG
|
||||
#include <qapplication.h>
|
||||
|
||||
#include "../kernel/qprintengine_win_p.h"
|
||||
@ -168,4 +167,3 @@ void QPageSetupDialog::setVisible(bool visible)
|
||||
}
|
||||
|
||||
QT_END_NAMESPACE
|
||||
#endif
|
||||
|
@ -42,12 +42,11 @@
|
||||
|
||||
#include <QtPrintSupport/qtprintsupportglobal.h>
|
||||
|
||||
#ifndef QT_NO_PRINTDIALOG
|
||||
|
||||
#include <QtPrintSupport/qabstractprintdialog.h>
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
QT_REQUIRE_CONFIG(printdialog);
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
class QPrintDialogPrivate;
|
||||
class QPushButton;
|
||||
@ -104,6 +103,4 @@ private:
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif // QT_NO_PRINTDIALOG
|
||||
|
||||
#endif // QPRINTDIALOG_H
|
||||
|
@ -48,8 +48,6 @@
|
||||
#include <QtPrintSupport/qprintengine.h>
|
||||
#include <qpa/qplatformprintdevice.h>
|
||||
|
||||
#ifndef QT_NO_PRINTDIALOG
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
extern qreal qt_pointMultiplier(QPageLayout::Unit unit);
|
||||
@ -358,5 +356,3 @@ void QPrintDialog::setVisible(bool visible)
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#include "moc_qprintdialog.cpp"
|
||||
|
||||
#endif // QT_NO_PRINTDIALOG
|
||||
|
@ -40,8 +40,6 @@
|
||||
#include "qplatformdefs.h"
|
||||
#include <QtPrintSupport/private/qtprintsupportglobal_p.h>
|
||||
|
||||
#ifndef QT_NO_PRINTDIALOG
|
||||
|
||||
#include "private/qabstractprintdialog_p.h"
|
||||
#include <QtWidgets/qmessagebox.h>
|
||||
#include "qprintdialog.h"
|
||||
@ -64,7 +62,7 @@
|
||||
#include "ui_qprintsettingsoutput.h"
|
||||
#include "ui_qprintwidget.h"
|
||||
|
||||
#ifndef QT_NO_CUPS
|
||||
#if QT_CONFIG(cups)
|
||||
#include <private/qcups_p.h>
|
||||
#if QT_CONFIG(cupsjobwidget)
|
||||
#include "qcupsjobwidget_p.h"
|
||||
@ -313,7 +311,7 @@ void QPrintDialogPrivate::init()
|
||||
options.grayscale->setIconSize(QSize(32, 32));
|
||||
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
|
||||
options.pageSetCombo->addItem(tr("All Pages"), QVariant::fromValue(QCUPSSupport::AllPages));
|
||||
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
|
||||
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
|
||||
@ -518,7 +516,7 @@ void QPrintDialogPrivate::updateWidgets()
|
||||
options.printCurrentPage->setVisible(q->isOptionEnabled(QPrintDialog::PrintCurrentPage));
|
||||
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
|
||||
if (!q->isOptionEnabled(QPrintDialog::PrintPageRange)
|
||||
&& (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) {
|
||||
QCUPSSupport::PagesPerSheet pagesPerSheet = propertiesDialog->widget.pageSetup->m_ui.pagesPerSheetCombo
|
||||
->currentData().value<QCUPSSupport::PagesPerSheet>();
|
||||
@ -983,6 +981,3 @@ QT_END_NAMESPACE
|
||||
|
||||
#include "moc_qprintdialog.cpp"
|
||||
#include "qprintdialog_unix.moc"
|
||||
|
||||
#endif // QT_NO_PRINTDIALOG
|
||||
|
||||
|
@ -39,8 +39,6 @@
|
||||
|
||||
#include <QtPrintSupport/qtprintsupportglobal.h>
|
||||
|
||||
#ifndef QT_NO_PRINTDIALOG
|
||||
|
||||
#include "qprintdialog.h"
|
||||
|
||||
#include <qwidget.h>
|
||||
@ -308,5 +306,3 @@ void QPrintDialog::setVisible(bool visible)
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#include "moc_qprintdialog.cpp"
|
||||
|
||||
#endif // QT_NO_PRINTDIALOG
|
||||
|
@ -56,8 +56,6 @@
|
||||
#include <QtWidgets/qtoolbar.h>
|
||||
#include <QtCore/QCoreApplication>
|
||||
|
||||
#ifndef QT_NO_PRINTPREVIEWDIALOG
|
||||
|
||||
#include "private/qdialog_p.h"
|
||||
|
||||
#include <QtWidgets/qformlayout.h>
|
||||
@ -787,7 +785,3 @@ QT_END_NAMESPACE
|
||||
|
||||
#include "moc_qprintpreviewdialog.cpp"
|
||||
#include "qprintpreviewdialog.moc"
|
||||
|
||||
#endif // QT_NO_PRINTPREVIEWDIALOG
|
||||
|
||||
|
||||
|
@ -42,12 +42,11 @@
|
||||
|
||||
#include <QtPrintSupport/qtprintsupportglobal.h>
|
||||
|
||||
#ifndef QT_NO_PRINTPREVIEWDIALOG
|
||||
|
||||
#include <QtWidgets/qdialog.h>
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
QT_REQUIRE_CONFIG(printpreviewdialog);
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
class QGraphicsView;
|
||||
class QPrintPreviewDialogPrivate;
|
||||
@ -91,6 +90,4 @@ private:
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif // QT_NO_PRINTPREVIEWDIALOG
|
||||
|
||||
#endif // QPRINTPREVIEWDIALOG_H
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user