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

Change-Id: I2532c7f7db5e6cc3ef09753d886279816dd662b2
This commit is contained in:
Simon Hausmann 2015-12-08 07:09:26 +01:00
commit 3ec31ef9c5
63 changed files with 623 additions and 308 deletions

View File

@ -357,7 +357,7 @@ sub check_header {
print STDERR "$lib: ERROR: $iheader includes private header $include\n" if ($include =~ /_p.h$/); print STDERR "$lib: ERROR: $iheader includes private header $include\n" if ($include =~ /_p.h$/);
for my $trylib (keys(%modules)) { for my $trylib (keys(%modules)) {
if (-e "$out_basedir/include/$trylib/$include") { if (-e "$out_basedir/include/$trylib/$include") {
print "$lib: WARNING: $iheader includes $include when it should include $trylib/$include\n"; print STDERR "$lib: WARNING: $iheader includes $include when it should include $trylib/$include\n";
} }
} }
} }
@ -376,15 +376,15 @@ sub check_header {
if ($public_header) { if ($public_header) {
if ($header_skip_qt_begin_namespace_test == 0 and $stop_processing == 0) { if ($header_skip_qt_begin_namespace_test == 0 and $stop_processing == 0) {
if ($qt_begin_namespace_found == 0) { if ($qt_begin_namespace_found == 0) {
print "$lib: WARNING: $iheader does not include QT_BEGIN_NAMESPACE\n"; print STDERR "$lib: WARNING: $iheader does not include QT_BEGIN_NAMESPACE\n";
} }
if ($qt_begin_namespace_found && $qt_end_namespace_found == 0) { if ($qt_begin_namespace_found && $qt_end_namespace_found == 0) {
print "$lib: WARNING: $iheader has QT_BEGIN_NAMESPACE$qt_namespace_suffix but no QT_END_NAMESPACE$qt_namespace_suffix\n"; print STDERR "$lib: WARNING: $iheader has QT_BEGIN_NAMESPACE$qt_namespace_suffix but no QT_END_NAMESPACE$qt_namespace_suffix\n";
} }
} }
} elsif ($private_header) { } elsif ($private_header) {
print "$lib: WARNING: $iheader does not have the \"We mean it.\" warning\n" if (!$we_mean_it); print STDERR "$lib: WARNING: $iheader does not have the \"We mean it.\" warning\n" if (!$we_mean_it);
} }
close(F); close(F);
@ -764,7 +764,7 @@ while ( @ARGV ) {
$var = "version"; $var = "version";
$val = shift @ARGV; $val = shift @ARGV;
} elsif($arg =~/^-/) { } elsif($arg =~/^-/) {
print "Unknown option: $arg\n\n" if(!$var); print STDERR "Unknown option: $arg\n\n" if (!$var);
showUsage(); showUsage();
} else { } else {
$basedir = locateSyncProfile($arg); $basedir = locateSyncProfile($arg);
@ -777,7 +777,7 @@ while ( @ARGV ) {
#do something #do something
if(!$var || $var eq "show_help") { if(!$var || $var eq "show_help") {
print "Unknown option: $arg\n\n" if(!$var); print STDERR "Unknown option: $arg\n\n" if (!$var);
showUsage(); showUsage();
} elsif ($var eq "copy") { } elsif ($var eq "copy") {
if($val eq "yes") { if($val eq "yes") {

View File

@ -595,6 +595,21 @@ ol.a > li{
margin-left: 15px margin-left: 15px
} }
.flowList {
padding: 25px
}
.flowList dd {
display: inline-block;
margin-left: 10px;
width: 255px;
line-height: 1.15em;
overflow-x: hidden;
text-overflow: ellipsis
}
.alphaChar {
font-size: 2em;
position: relative
}
/* /*
----------- -----------
Content table Content table

View File

@ -254,6 +254,13 @@
line-height:1.4; line-height:1.4;
font-size:0.875em font-size:0.875em
} }
@media (min-width: 1320px) {
.context .flowListDiv dl.flowList {
-webkit-column-count:3;
-moz-column-count:3;
column-count:3
}
}
@media (min-width: 1120px) { @media (min-width: 1120px) {
#navbar.fixed,#navbar.shadow_bottom { #navbar.fixed,#navbar.shadow_bottom {
-moz-box-shadow:0px 0px 8px rgba(0,0,0,0.2); -moz-box-shadow:0px 0px 8px rgba(0,0,0,0.2);
@ -293,6 +300,11 @@
#navbar.fixed #mainmenu li.current-menu-item a { #navbar.fixed #mainmenu li.current-menu-item a {
border-bottom:4px solid #80C342 border-bottom:4px solid #80C342
} }
.flowListDiv dl.flowList {
-webkit-column-count:2;
-moz-column-count:2;
column-count:2
}
} }
@media (max-width: 1120px) { @media (max-width: 1120px) {
#navbar { #navbar {
@ -1220,6 +1232,19 @@ li a.active {
.flowList { .flowList {
padding:25px padding:25px
} }
.flowListDiv dl {
-webkit-column-count:1;
-moz-column-count:1;
column-count:1
}
.flowList dd {
display:inline-block;
margin-left:10px;
width:90%;
line-height:1.15em;
overflow-x:hidden;
text-overflow:ellipsis
}
.alphaChar { .alphaChar {
font-size:2em; font-size:2em;
position:absolute position:absolute

View File

@ -45,13 +45,18 @@
//! [0] //! [0]
Client::Client(QWidget *parent) Client::Client(QWidget *parent)
: QDialog(parent), networkSession(0) : QDialog(parent)
, hostCombo(new QComboBox)
, portLineEdit(new QLineEdit)
, getFortuneButton(new QPushButton(tr("Get Fortune")))
//! [1]
, tcpSocket(new QTcpSocket(this))
//! [1]
, blockSize(0)
, networkSession(Q_NULLPTR)
{ {
setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint);
//! [0] //! [0]
hostLabel = new QLabel(tr("&Server name:"));
portLabel = new QLabel(tr("S&erver port:"));
hostCombo = new QComboBox;
hostCombo->setEditable(true); hostCombo->setEditable(true);
// find out name of this machine // find out name of this machine
QString name = QHostInfo::localHostName(); QString name = QHostInfo::localHostName();
@ -61,7 +66,7 @@ Client::Client(QWidget *parent)
if (!domain.isEmpty()) if (!domain.isEmpty())
hostCombo->addItem(name + QChar('.') + domain); hostCombo->addItem(name + QChar('.') + domain);
} }
if (name != QString("localhost")) if (name != QLatin1String("localhost"))
hostCombo->addItem(QString("localhost")); hostCombo->addItem(QString("localhost"));
// find out IP addresses of this machine // find out IP addresses of this machine
QList<QHostAddress> ipAddressesList = QNetworkInterface::allAddresses(); QList<QHostAddress> ipAddressesList = QNetworkInterface::allAddresses();
@ -76,54 +81,64 @@ Client::Client(QWidget *parent)
hostCombo->addItem(ipAddressesList.at(i).toString()); hostCombo->addItem(ipAddressesList.at(i).toString());
} }
portLineEdit = new QLineEdit;
portLineEdit->setValidator(new QIntValidator(1, 65535, this)); portLineEdit->setValidator(new QIntValidator(1, 65535, this));
QLabel *hostLabel = new QLabel(tr("&Server name:"));
hostLabel->setBuddy(hostCombo); hostLabel->setBuddy(hostCombo);
QLabel *portLabel = new QLabel(tr("S&erver port:"));
portLabel->setBuddy(portLineEdit); portLabel->setBuddy(portLineEdit);
statusLabel = new QLabel(tr("This examples requires that you run the " statusLabel = new QLabel(tr("This examples requires that you run the "
"Fortune Server example as well.")); "Fortune Server example as well."));
getFortuneButton = new QPushButton(tr("Get Fortune"));
getFortuneButton->setDefault(true); getFortuneButton->setDefault(true);
getFortuneButton->setEnabled(false); getFortuneButton->setEnabled(false);
quitButton = new QPushButton(tr("Quit")); QPushButton *quitButton = new QPushButton(tr("Quit"));
buttonBox = new QDialogButtonBox; QDialogButtonBox *buttonBox = new QDialogButtonBox;
buttonBox->addButton(getFortuneButton, QDialogButtonBox::ActionRole); buttonBox->addButton(getFortuneButton, QDialogButtonBox::ActionRole);
buttonBox->addButton(quitButton, QDialogButtonBox::RejectRole); buttonBox->addButton(quitButton, QDialogButtonBox::RejectRole);
//! [1] connect(hostCombo, &QComboBox::editTextChanged,
tcpSocket = new QTcpSocket(this); this, &Client::enableGetFortuneButton);
//! [1] connect(portLineEdit, &QLineEdit::textChanged,
this, &Client::enableGetFortuneButton);
connect(hostCombo, SIGNAL(editTextChanged(QString)), connect(getFortuneButton, &QAbstractButton::clicked,
this, SLOT(enableGetFortuneButton())); this, &Client::requestNewFortune);
connect(portLineEdit, SIGNAL(textChanged(QString)), connect(quitButton, &QAbstractButton::clicked, this, &QWidget::close);
this, SLOT(enableGetFortuneButton()));
connect(getFortuneButton, SIGNAL(clicked()),
this, SLOT(requestNewFortune()));
connect(quitButton, SIGNAL(clicked()), this, SLOT(close()));
//! [2] //! [3] //! [2] //! [3]
connect(tcpSocket, SIGNAL(readyRead()), this, SLOT(readFortune())); connect(tcpSocket, &QIODevice::readyRead, this, &Client::readFortune);
//! [2] //! [4] //! [2] //! [4]
connect(tcpSocket, SIGNAL(error(QAbstractSocket::SocketError)), typedef void (QAbstractSocket::*QAbstractSocketErrorSignal)(QAbstractSocket::SocketError);
connect(tcpSocket, static_cast<QAbstractSocketErrorSignal>(&QAbstractSocket::error),
//! [3] //! [3]
this, SLOT(displayError(QAbstractSocket::SocketError))); this, &Client::displayError);
//! [4] //! [4]
QGridLayout *mainLayout = new QGridLayout; QGridLayout *mainLayout = Q_NULLPTR;
if (QGuiApplication::styleHints()->showIsFullScreen()) {
QVBoxLayout *outerVerticalLayout = new QVBoxLayout(this);
outerVerticalLayout->addItem(new QSpacerItem(0, 0, QSizePolicy::Ignored, QSizePolicy::MinimumExpanding));
QHBoxLayout *outerHorizontalLayout = new QHBoxLayout;
outerHorizontalLayout->addItem(new QSpacerItem(0, 0, QSizePolicy::MinimumExpanding, QSizePolicy::Ignored));
QGroupBox *groupBox = new QGroupBox(QGuiApplication::applicationDisplayName());
mainLayout = new QGridLayout(groupBox);
outerHorizontalLayout->addWidget(groupBox);
outerHorizontalLayout->addItem(new QSpacerItem(0, 0, QSizePolicy::MinimumExpanding, QSizePolicy::Ignored));
outerVerticalLayout->addLayout(outerHorizontalLayout);
outerVerticalLayout->addItem(new QSpacerItem(0, 0, QSizePolicy::Ignored, QSizePolicy::MinimumExpanding));
} else {
mainLayout = new QGridLayout(this);
}
mainLayout->addWidget(hostLabel, 0, 0); mainLayout->addWidget(hostLabel, 0, 0);
mainLayout->addWidget(hostCombo, 0, 1); mainLayout->addWidget(hostCombo, 0, 1);
mainLayout->addWidget(portLabel, 1, 0); mainLayout->addWidget(portLabel, 1, 0);
mainLayout->addWidget(portLineEdit, 1, 1); mainLayout->addWidget(portLineEdit, 1, 1);
mainLayout->addWidget(statusLabel, 2, 0, 1, 2); mainLayout->addWidget(statusLabel, 2, 0, 1, 2);
mainLayout->addWidget(buttonBox, 3, 0, 1, 2); mainLayout->addWidget(buttonBox, 3, 0, 1, 2);
setLayout(mainLayout);
setWindowTitle(tr("Fortune Client")); setWindowTitle(QGuiApplication::applicationDisplayName());
portLineEdit->setFocus(); portLineEdit->setFocus();
QNetworkConfigurationManager manager; QNetworkConfigurationManager manager;
@ -142,7 +157,7 @@ Client::Client(QWidget *parent)
} }
networkSession = new QNetworkSession(config, this); networkSession = new QNetworkSession(config, this);
connect(networkSession, SIGNAL(opened()), this, SLOT(sessionOpened())); connect(networkSession, &QNetworkSession::opened, this, &Client::sessionOpened);
getFortuneButton->setEnabled(false); getFortuneButton->setEnabled(false);
statusLabel->setText(tr("Opening network session.")); statusLabel->setText(tr("Opening network session."));
@ -189,7 +204,7 @@ void Client::readFortune()
in >> nextFortune; in >> nextFortune;
if (nextFortune == currentFortune) { if (nextFortune == currentFortune) {
QTimer::singleShot(0, this, SLOT(requestNewFortune())); QTimer::singleShot(0, this, &Client::requestNewFortune);
return; return;
} }
//! [11] //! [11]

View File

@ -46,7 +46,6 @@
QT_BEGIN_NAMESPACE QT_BEGIN_NAMESPACE
class QComboBox; class QComboBox;
class QDialogButtonBox;
class QLabel; class QLabel;
class QLineEdit; class QLineEdit;
class QPushButton; class QPushButton;
@ -60,7 +59,7 @@ class Client : public QDialog
Q_OBJECT Q_OBJECT
public: public:
Client(QWidget *parent = 0); explicit Client(QWidget *parent = Q_NULLPTR);
private slots: private slots:
void requestNewFortune(); void requestNewFortune();
@ -70,14 +69,10 @@ private slots:
void sessionOpened(); void sessionOpened();
private: private:
QLabel *hostLabel;
QLabel *portLabel;
QComboBox *hostCombo; QComboBox *hostCombo;
QLineEdit *portLineEdit; QLineEdit *portLineEdit;
QLabel *statusLabel; QLabel *statusLabel;
QPushButton *getFortuneButton; QPushButton *getFortuneButton;
QPushButton *quitButton;
QDialogButtonBox *buttonBox;
QTcpSocket *tcpSocket; QTcpSocket *tcpSocket;
QString currentFortune; QString currentFortune;

View File

@ -44,6 +44,7 @@
int main(int argc, char *argv[]) int main(int argc, char *argv[])
{ {
QApplication app(argc, argv); QApplication app(argc, argv);
QGuiApplication::setApplicationDisplayName(Client::tr("Fortune Client"));
Client client; Client client;
client.show(); client.show();
return app.exec(); return app.exec();

View File

@ -48,6 +48,7 @@
int main(int argc, char *argv[]) int main(int argc, char *argv[])
{ {
QApplication app(argc, argv); QApplication app(argc, argv);
QGuiApplication::setApplicationDisplayName(Server::tr("Fortune Server"));
Server server; Server server;
server.show(); server.show();
qsrand(QTime(0,0,0).secsTo(QTime::currentTime())); qsrand(QTime(0,0,0).secsTo(QTime::currentTime()));

View File

@ -46,11 +46,13 @@
#include "server.h" #include "server.h"
Server::Server(QWidget *parent) Server::Server(QWidget *parent)
: QDialog(parent), tcpServer(0), networkSession(0) : QDialog(parent)
, statusLabel(new QLabel)
, tcpServer(Q_NULLPTR)
, networkSession(0)
{ {
statusLabel = new QLabel; setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint);
quitButton = new QPushButton(tr("Quit")); statusLabel->setTextInteractionFlags(Qt::TextBrowserInteraction);
quitButton->setAutoDefault(false);
QNetworkConfigurationManager manager; QNetworkConfigurationManager manager;
if (manager.capabilities() & QNetworkConfigurationManager::NetworkSessionRequired) { if (manager.capabilities() & QNetworkConfigurationManager::NetworkSessionRequired) {
@ -68,7 +70,7 @@ Server::Server(QWidget *parent)
} }
networkSession = new QNetworkSession(config, this); networkSession = new QNetworkSession(config, this);
connect(networkSession, SIGNAL(opened()), this, SLOT(sessionOpened())); connect(networkSession, &QNetworkSession::opened, this, &Server::sessionOpened);
statusLabel->setText(tr("Opening network session.")); statusLabel->setText(tr("Opening network session."));
networkSession->open(); networkSession->open();
@ -85,10 +87,11 @@ Server::Server(QWidget *parent)
<< tr("You cannot kill time without injuring eternity.") << tr("You cannot kill time without injuring eternity.")
<< tr("Computers are not intelligent. They only think they are."); << tr("Computers are not intelligent. They only think they are.");
//! [2] //! [2]
QPushButton *quitButton = new QPushButton(tr("Quit"));
connect(quitButton, SIGNAL(clicked()), this, SLOT(close())); quitButton->setAutoDefault(false);
connect(quitButton, &QAbstractButton::clicked, this, &QWidget::close);
//! [3] //! [3]
connect(tcpServer, SIGNAL(newConnection()), this, SLOT(sendFortune())); connect(tcpServer, &QTcpServer::newConnection, this, &Server::sendFortune);
//! [3] //! [3]
QHBoxLayout *buttonLayout = new QHBoxLayout; QHBoxLayout *buttonLayout = new QHBoxLayout;
@ -96,12 +99,26 @@ Server::Server(QWidget *parent)
buttonLayout->addWidget(quitButton); buttonLayout->addWidget(quitButton);
buttonLayout->addStretch(1); buttonLayout->addStretch(1);
QVBoxLayout *mainLayout = new QVBoxLayout; QVBoxLayout *mainLayout = Q_NULLPTR;
if (QGuiApplication::styleHints()->showIsFullScreen()) {
QVBoxLayout *outerVerticalLayout = new QVBoxLayout(this);
outerVerticalLayout->addItem(new QSpacerItem(0, 0, QSizePolicy::Ignored, QSizePolicy::MinimumExpanding));
QHBoxLayout *outerHorizontalLayout = new QHBoxLayout;
outerHorizontalLayout->addItem(new QSpacerItem(0, 0, QSizePolicy::MinimumExpanding, QSizePolicy::Ignored));
QGroupBox *groupBox = new QGroupBox(QGuiApplication::applicationDisplayName());
mainLayout = new QVBoxLayout(groupBox);
outerHorizontalLayout->addWidget(groupBox);
outerHorizontalLayout->addItem(new QSpacerItem(0, 0, QSizePolicy::MinimumExpanding, QSizePolicy::Ignored));
outerVerticalLayout->addLayout(outerHorizontalLayout);
outerVerticalLayout->addItem(new QSpacerItem(0, 0, QSizePolicy::Ignored, QSizePolicy::MinimumExpanding));
} else {
mainLayout = new QVBoxLayout(this);
}
mainLayout->addWidget(statusLabel); mainLayout->addWidget(statusLabel);
mainLayout->addLayout(buttonLayout); mainLayout->addLayout(buttonLayout);
setLayout(mainLayout);
setWindowTitle(tr("Fortune Server")); setWindowTitle(QGuiApplication::applicationDisplayName());
} }
void Server::sessionOpened() void Server::sessionOpened()
@ -165,8 +182,8 @@ void Server::sendFortune()
//! [6] //! [7] //! [6] //! [7]
QTcpSocket *clientConnection = tcpServer->nextPendingConnection(); QTcpSocket *clientConnection = tcpServer->nextPendingConnection();
connect(clientConnection, SIGNAL(disconnected()), connect(clientConnection, &QAbstractSocket::disconnected,
clientConnection, SLOT(deleteLater())); clientConnection, &QObject::deleteLater);
//! [7] //! [8] //! [7] //! [8]
clientConnection->write(block); clientConnection->write(block);

View File

@ -56,7 +56,7 @@ class Server : public QDialog
Q_OBJECT Q_OBJECT
public: public:
Server(QWidget *parent = 0); explicit Server(QWidget *parent = Q_NULLPTR);
private slots: private slots:
void sessionOpened(); void sessionOpened();
@ -64,7 +64,6 @@ private slots:
private: private:
QLabel *statusLabel; QLabel *statusLabel;
QPushButton *quitButton;
QTcpServer *tcpServer; QTcpServer *tcpServer;
QStringList fortunes; QStringList fortunes;
QNetworkSession *networkSession; QNetworkSession *networkSession;

View File

@ -5,11 +5,11 @@
include(../common/wince/qmake.conf) include(../common/wince/qmake.conf)
CE_SDK = Toradex_CE8_SDK # replace with actual SDK name CE_SDK = Toradex_CE800 # replace with actual SDK name
CE_ARCH = ARMV7 CE_ARCH = ARMV7
QT_CONFIG -= accessibility QT_CONFIG -= accessibility
DEFINES += QT_NO_CLIPBOARD QT_NO_ACCESSIBILITY QT_NO_NATIVE_GESTURES QT_NOSTANDARDSHELL_UI_MODEL _CRT_SECURE_NO_DEPRECATE _WIN32_WCE=0x800 $$CE_ARCH _AMRV7_ armv7 _ARM_ UNDER_CE WINCE ARM DEFINES += QT_NO_CLIPBOARD QT_NO_ACCESSIBILITY QT_NO_NATIVE_GESTURES QT_NOSTANDARDSHELL_UI_MODEL _CRT_SECURE_NO_DEPRECATE _WIN32_WCE=0x800 $$CE_ARCH _AMRV7_ armv7 _ARM_ UNDER_CE WINCE ARM QT_NO_WINCE_SHELLSDK QT_NO_WINCE_NUIOUSER
#QMAKE_CXXFLAGS += /P #QMAKE_CXXFLAGS += /P
QMAKE_CFLAGS_RELEASE += -O2 -MT QMAKE_CFLAGS_RELEASE += -O2 -MT
@ -25,7 +25,7 @@ QMAKE_CXXFLAGS_RELEASE_WITH_DEBUGINFO -= -MD
QMAKE_CXXFLAGS_DEBUG -= -MDd QMAKE_CXXFLAGS_DEBUG -= -MDd
QMAKE_CXXFLAGS_DEBUG += -MTd QMAKE_CXXFLAGS_DEBUG += -MTd
QMAKE_INCDIR_OPENGL_ES2 += $$(NV_WINCE_T2_PLAT)/include QMAKE_INCDIR_OPENGL_ES2 += $$(NV_WINCE_T2_PLAT)/include
QMAKE_LFLAGS_CONSOLE = /SUBSYSTEM:WINDOWSCE,8.00 /MACHINE:ARM /ENTRY:mainCRTStartup QMAKE_LFLAGS_CONSOLE = /SUBSYSTEM:WINDOWSCE,8.00 /MACHINE:ARM
QMAKE_LFLAGS_WINDOWS = /SUBSYSTEM:WINDOWSCE,8.00 /MACHINE:ARM QMAKE_LFLAGS_WINDOWS = /SUBSYSTEM:WINDOWSCE,8.00 /MACHINE:ARM
QMAKE_LFLAGS_DLL = /SUBSYSTEM:WINDOWSCE,8.00 /MACHINE:ARM /DLL /SAFESEH:NO QMAKE_LFLAGS_DLL = /SUBSYSTEM:WINDOWSCE,8.00 /MACHINE:ARM /DLL /SAFESEH:NO
QMAKE_LIBFLAGS_RELEASE = /LTCG QMAKE_LIBFLAGS_RELEASE = /LTCG
@ -33,13 +33,10 @@ QMAKE_LIBS = coredll.lib
QMAKE_LIBS_CORE = ole32.lib oleaut32.lib uuid.lib commctrl.lib coredll.lib winsock.lib QMAKE_LIBS_CORE = ole32.lib oleaut32.lib uuid.lib commctrl.lib coredll.lib winsock.lib
QMAKE_LIBS_GUI = ole32.lib $$QMAKE_LIBS_CORE QMAKE_LIBS_GUI = ole32.lib $$QMAKE_LIBS_CORE
QMAKE_LIBS_NETWORK = ws2.lib $$QMAKE_LIBS_GUI QMAKE_LIBS_NETWORK = ws2.lib $$QMAKE_LIBS_GUI
QMAKE_LIBS_OPENGL =
QMAKE_LIBS_COMPAT =
QMAKE_LIBS_OPENVG =
QMAKE_LIBS_OPENGL_ES2 = $${LIBEGL_NAME}.lib $${LIBGLESV2_NAME}.lib QMAKE_LIBS_OPENGL_ES2 = $${LIBEGL_NAME}.lib $${LIBGLESV2_NAME}.lib
QMAKE_LIBDIR_OPENGL_ES2 = $$(NV_WINCE_T2_PLAT)/lib/Test
QMAKE_INCDIR_EGL = $$(NV_WINCE_T2_PLAT)/include MAKEFILE_GENERATOR = MSBUILD
QMAKE_LIBDIR_EGL = $$(NV_WINCE_T2_PLAT)/lib/Test VCPROJ_EXTENSION = .vcxproj
QMAKE_RC = rc QMAKE_RC = rc

View File

@ -520,7 +520,6 @@ ProStringList VcprojGenerator::collectDependencies(QMakeProject *proj, QHash<QSt
ProStringList tmpList; ProStringList tmpList;
tmpList += subdir.second; tmpList += subdir.second;
tmpList += allDependencies; tmpList += allDependencies;
QPair<QString, ProStringList> val = qMakePair(fi.absoluteFilePath(), tmpList);
// Initialize a 'fake' project to get the correct variables // Initialize a 'fake' project to get the correct variables
// and to be able to extract all the dependencies // and to be able to extract all the dependencies
Option::QMAKE_MODE old_mode = Option::qmake_mode; Option::QMAKE_MODE old_mode = Option::qmake_mode;
@ -552,8 +551,8 @@ ProStringList VcprojGenerator::collectDependencies(QMakeProject *proj, QHash<QSt
newDep->target = newDep->target.left(newDep->target.length()-3) + "lib"; newDep->target = newDep->target.left(newDep->target.length()-3) + "lib";
projGuids.insert(newDep->orig_target, newDep->target); projGuids.insert(newDep->orig_target, newDep->target);
if (val.second.size()) { if (tmpList.size()) {
const ProStringList depends = val.second; const ProStringList depends = tmpList;
foreach (const ProString &dep, depends) { foreach (const ProString &dep, depends) {
QString depend = dep.toQString(); QString depend = dep.toQString();
if (!projGuids[depend].isEmpty()) { if (!projGuids[depend].isEmpty()) {
@ -565,8 +564,7 @@ ProStringList VcprojGenerator::collectDependencies(QMakeProject *proj, QHash<QSt
newDep->dependencies << projGuids[projLookup[tmpDep]]; newDep->dependencies << projGuids[projLookup[tmpDep]];
} }
} else { } else {
QStringList dependencies = val.second.toQStringList(); extraSubdirs.insert(newDep, tmpList.toQStringList());
extraSubdirs.insert(newDep, dependencies);
newDep->dependencies.clear(); newDep->dependencies.clear();
break; break;
} }
@ -585,7 +583,7 @@ ProStringList VcprojGenerator::collectDependencies(QMakeProject *proj, QHash<QSt
wit != where.end(); ++wit) { wit != where.end(); ++wit) {
const ProStringList &l = tmp_proj.values(ProKey(*wit)); const ProStringList &l = tmp_proj.values(ProKey(*wit));
for (ProStringList::ConstIterator it = l.begin(); it != l.end(); ++it) { for (ProStringList::ConstIterator it = l.begin(); it != l.end(); ++it) {
QString opt = (*it).toQString(); const QString opt = fixLibFlag(*it).toQString();
if (!opt.startsWith("/") && // Not a switch if (!opt.startsWith("/") && // Not a switch
opt != newDep->target && // Not self opt != newDep->target && // Not self
opt != "opengl32.lib" && // We don't care about these libs opt != "opengl32.lib" && // We don't care about these libs

View File

@ -671,7 +671,7 @@ public class ExtractStyle {
json.put("gradient",gradientStateClass.getField("mGradient").getInt(obj)); json.put("gradient",gradientStateClass.getField("mGradient").getInt(obj));
GradientDrawable.Orientation orientation=(Orientation) gradientStateClass.getField("mOrientation").get(obj); GradientDrawable.Orientation orientation=(Orientation) gradientStateClass.getField("mOrientation").get(obj);
json.put("orientation",orientation.name()); json.put("orientation",orientation.name());
int [] intArray=(int[]) gradientStateClass.getField("mColors").get(obj); int [] intArray=(int[]) gradientStateClass.getField((Build.VERSION.SDK_INT < 23) ? "mColors" : "mGradientColors").get(obj);
if (intArray != null) if (intArray != null)
json.put("colors",getJsonArray(intArray, 0, intArray.length)); json.put("colors",getJsonArray(intArray, 0, intArray.length));
json.put("positions",getJsonArray((float[]) gradientStateClass.getField("mPositions").get(obj))); json.put("positions",getJsonArray((float[]) gradientStateClass.getField("mPositions").get(obj)));
@ -707,7 +707,10 @@ public class ExtractStyle {
json.put("type", "rotate"); json.put("type", "rotate");
Object obj = drawable.getConstantState(); Object obj = drawable.getConstantState();
Class<?> rotateStateClass = obj.getClass(); Class<?> rotateStateClass = obj.getClass();
json.put("drawable", getDrawable(getAccessibleField(rotateStateClass, "mDrawable").get(obj), filename, null)); if (Build.VERSION.SDK_INT < 23)
json.put("drawable", getDrawable(getAccessibleField(rotateStateClass, "mDrawable").get(obj), filename, null));
else
json.put("drawable", getDrawable(drawable.getClass().getMethod("getDrawable").invoke(drawable), filename, null));
json.put("pivotX", getAccessibleField(rotateStateClass, "mPivotX").getFloat(obj)); json.put("pivotX", getAccessibleField(rotateStateClass, "mPivotX").getFloat(obj));
json.put("pivotXRel", getAccessibleField(rotateStateClass, "mPivotXRel").getBoolean(obj)); json.put("pivotXRel", getAccessibleField(rotateStateClass, "mPivotXRel").getBoolean(obj));
json.put("pivotY", getAccessibleField(rotateStateClass, "mPivotY").getFloat(obj)); json.put("pivotY", getAccessibleField(rotateStateClass, "mPivotY").getFloat(obj));

View File

@ -66,6 +66,8 @@ import android.view.ViewConfiguration;
import android.view.ViewGroup; import android.view.ViewGroup;
import android.view.WindowManager; import android.view.WindowManager;
import android.view.inputmethod.InputMethodManager; import android.view.inputmethod.InputMethodManager;
import android.view.ViewTreeObserver;
import android.graphics.Rect;
import java.io.BufferedReader; import java.io.BufferedReader;
import java.io.DataOutputStream; import java.io.DataOutputStream;
@ -859,6 +861,25 @@ public class QtActivityDelegate
QtNative.handleOrientationChanged(rotation, m_nativeOrientation); QtNative.handleOrientationChanged(rotation, m_nativeOrientation);
m_currentRotation = rotation; m_currentRotation = rotation;
m_layout.getViewTreeObserver().addOnPreDrawListener(new ViewTreeObserver.OnPreDrawListener() {
@Override
public boolean onPreDraw() {
if (!m_keyboardIsVisible)
return true;
Rect r = new Rect();
m_activity.getWindow().getDecorView().getWindowVisibleDisplayFrame(r);
DisplayMetrics metrics = new DisplayMetrics();
m_activity.getWindowManager().getDefaultDisplay().getMetrics(metrics);
final int kbHeight = metrics.heightPixels - r.bottom;
final int[] location = new int[2];
m_layout.getLocationOnScreen(location);
QtNative.keyboardGeometryChanged(location[0], r.bottom - location[1],
r.width(), kbHeight);
return true;
}
});
} }
public void initializeAccessibility() public void initializeAccessibility()

View File

@ -40,6 +40,9 @@ import android.view.inputmethod.CompletionInfo;
import android.view.inputmethod.ExtractedText; import android.view.inputmethod.ExtractedText;
import android.view.inputmethod.ExtractedTextRequest; import android.view.inputmethod.ExtractedTextRequest;
import android.view.inputmethod.InputMethodManager; import android.view.inputmethod.InputMethodManager;
import android.graphics.Rect;
import android.app.Activity;
import android.util.DisplayMetrics;
class QtExtractedText class QtExtractedText
{ {
@ -80,7 +83,15 @@ class HideKeyboardRunnable implements Runnable {
@Override @Override
public void run() { public void run() {
QtNative.activityDelegate().setKeyboardVisibility(false, m_hideTimeStamp); // Check that the keyboard is really no longer there.
Activity activity = QtNative.activity();
Rect r = new Rect();
activity.getWindow().getDecorView().getWindowVisibleDisplayFrame(r);
DisplayMetrics metrics = new DisplayMetrics();
activity.getWindowManager().getDefaultDisplay().getMetrics(metrics);
final int kbHeight = metrics.heightPixels - r.bottom;
if (kbHeight < 100)
QtNative.activityDelegate().setKeyboardVisibility(false, m_hideTimeStamp);
} }
} }

View File

@ -677,6 +677,7 @@ public class QtNative
public static native void keyDown(int key, int unicode, int modifier, boolean autoRepeat); public static native void keyDown(int key, int unicode, int modifier, boolean autoRepeat);
public static native void keyUp(int key, int unicode, int modifier, boolean autoRepeat); public static native void keyUp(int key, int unicode, int modifier, boolean autoRepeat);
public static native void keyboardVisibilityChanged(boolean visibility); public static native void keyboardVisibilityChanged(boolean visibility);
public static native void keyboardGeometryChanged(int x, int y, int width, int height);
// keyboard methods // keyboard methods
// dispatch events methods // dispatch events methods

View File

@ -769,7 +769,7 @@ inline T *q_check_ptr(T *p) { Q_CHECK_PTR(p); return p; }
typedef void (*QFunctionPointer)(); typedef void (*QFunctionPointer)();
#if !defined(Q_UNIMPLEMENTED) #if !defined(Q_UNIMPLEMENTED)
# define Q_UNIMPLEMENTED() qWarning("%s:%d: %s: Unimplemented code.", __FILE__, __LINE__, Q_FUNC_INFO) # define Q_UNIMPLEMENTED() qWarning("Unimplemented code.")
#endif #endif
Q_DECL_CONSTEXPR static inline bool qFuzzyCompare(double p1, double p2) Q_REQUIRED_RESULT Q_DECL_UNUSED; Q_DECL_CONSTEXPR static inline bool qFuzzyCompare(double p1, double p2) Q_REQUIRED_RESULT Q_DECL_UNUSED;

View File

@ -123,7 +123,8 @@ QString QStandardPaths::writableLocation(StandardLocation type)
QStringList QStandardPaths::standardLocations(StandardLocation type) QStringList QStandardPaths::standardLocations(StandardLocation type)
{ {
return QStringList(writableLocation(type)); const QString writable = writableLocation(type);
return writable.isEmpty() ? QStringList() : QStringList(writable);
} }
QT_END_NAMESPACE QT_END_NAMESPACE

View File

@ -1646,7 +1646,6 @@ QModelIndexList QItemSelectionModel::selectedIndexes() const
/*! /*!
\since 4.2 \since 4.2
Returns the indexes in the given \a column for the rows where all columns are selected. Returns the indexes in the given \a column for the rows where all columns are selected.
The list is not sorted.
\sa selectedIndexes(), selectedColumns() \sa selectedIndexes(), selectedColumns()
*/ */

View File

@ -88,6 +88,7 @@ wince {
SOURCES += \ SOURCES += \
kernel/qfunctions_wince.cpp kernel/qfunctions_wince.cpp
HEADERS += \ HEADERS += \
kernel/qfunctions_fake_env_p.h \
kernel/qfunctions_wince.h kernel/qfunctions_wince.h
} }
@ -95,6 +96,7 @@ winrt {
SOURCES += \ SOURCES += \
kernel/qfunctions_winrt.cpp kernel/qfunctions_winrt.cpp
HEADERS += \ HEADERS += \
kernel/qfunctions_fake_env_p.h \
kernel/qfunctions_winrt.h kernel/qfunctions_winrt.h
} }

View File

@ -0,0 +1,101 @@
/****************************************************************************
**
** Copyright (C) 2015 The Qt Company Ltd.
** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtCore module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL21$
** 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 http://www.qt.io/terms-conditions. For further
** information use the contact form at http://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 2.1 or version 3 as published by the Free
** Software Foundation and appearing in the file LICENSE.LGPLv21 and
** LICENSE.LGPLv3 included in the packaging of this file. Please review the
** following information to ensure the GNU Lesser General Public License
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
** As a special exception, The Qt Company gives you certain additional
** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
**
****************************************************************************/
#ifndef QFUNCTIONS_FAKE_ENV_P_H
#define QFUNCTIONS_FAKE_ENV_P_H
//
// W A R N I N G
// -------------
//
// This file is not part of the Qt API. It exists for the convenience
// of the QLibrary class. This header file may change from
// version to version without notice, or even be removed.
//
// We mean it.
//
#include "qbytearray.h"
#include "qhash.h"
QT_BEGIN_NAMESPACE
// Environment ------------------------------------------------------
Q_CORE_EXPORT QHash<QByteArray, QByteArray> &qt_app_environment()
{
static QHash<QByteArray, QByteArray> internalEnvironment;
return internalEnvironment;
}
errno_t qt_fake_getenv_s(size_t *sizeNeeded, char *buffer, size_t bufferSize, const char *varName)
{
if (!sizeNeeded)
return EINVAL;
QHash<QByteArray, QByteArray>::const_iterator iterator = qt_app_environment().constFind(varName);
if (iterator == qt_app_environment().constEnd()) {
if (buffer)
buffer[0] = '\0';
return ENOENT;
}
const int size = iterator->size() + 1;
if (bufferSize < size_t(size)) {
*sizeNeeded = size;
return ERANGE;
}
qstrcpy(buffer, iterator->constData());
return 0;
}
errno_t qt_fake__putenv_s(const char *varName, const char *value)
{
QHash<QByteArray, QByteArray>::iterator iterator = qt_app_environment().find(varName);
QHash<QByteArray, QByteArray>::iterator end = qt_app_environment().end();
if (!value || !*value) {
if (iterator != end)
qt_app_environment().erase(iterator);
} else {
if (iterator == end)
qt_app_environment()[varName] = QByteArray(value);
else
(*iterator) = value;
}
return 0;
}
QT_END_NAMESPACE
#endif // QFUNCTIONS_FAKE_ENV_P_H

View File

@ -44,9 +44,8 @@
#include "qplatformdefs.h" #include "qplatformdefs.h"
#include "qfunctions_wince.h" #include "qfunctions_wince.h"
#include "qfunctions_fake_env_p.h"
#include "qstring.h" #include "qstring.h"
#include "qbytearray.h"
#include "qhash.h"
QT_USE_NAMESPACE QT_USE_NAMESPACE
@ -399,51 +398,4 @@ int qt_wince__getpid()
#ifdef __cplusplus #ifdef __cplusplus
} // extern "C" } // extern "C"
#endif #endif
// Environment ------------------------------------------------------
inline QHash<QByteArray, QByteArray>& qt_app_environment()
{
static QHash<QByteArray, QByteArray> internalEnvironment;
return internalEnvironment;
}
errno_t qt_wince_getenv_s(size_t* sizeNeeded, char* buffer, size_t bufferSize, const char* varName)
{
if (!sizeNeeded)
return EINVAL;
if (!qt_app_environment().contains(varName)) {
if (buffer)
buffer[0] = '\0';
return ENOENT;
}
QByteArray value = qt_app_environment().value(varName);
if (!value.endsWith('\0')) // win32 guarantees terminated string
value.append('\0');
if (bufferSize < (size_t)value.size()) {
*sizeNeeded = value.size();
return 0;
}
strcpy(buffer, value.constData());
return 0;
}
errno_t qt_wince__putenv_s(const char* varName, const char* value)
{
QByteArray input = value;
if (input.isEmpty()) {
if (qt_app_environment().contains(varName))
qt_app_environment().remove(varName);
} else {
// win32 guarantees terminated string
if (!input.endsWith('\0'))
input.append('\0');
qt_app_environment()[varName] = input;
}
return 0;
}
#endif // Q_OS_WINCE #endif // Q_OS_WINCE

View File

@ -76,8 +76,8 @@ QT_END_NAMESPACE
#endif #endif
// Environment ------------------------------------------------------ // Environment ------------------------------------------------------
errno_t qt_wince_getenv_s(size_t*, char*, size_t, const char*); errno_t qt_fake_getenv_s(size_t*, char*, size_t, const char*);
errno_t qt_wince__putenv_s(const char*, const char*); errno_t qt_fake__putenv_s(const char*, const char*);
#ifdef __cplusplus // have this as tiff plugin is written in C #ifdef __cplusplus // have this as tiff plugin is written in C
extern "C" { extern "C" {
@ -398,20 +398,20 @@ typedef DWORD OLE_COLOR;
{ \ { \
return qt_wince_##funcname(p1); \ return qt_wince_##funcname(p1); \
} }
#define generate_inline_return_func2(funcname, returntype, param1, param2) \ #define generate_inline_return_func2(funcname, returntype, prependnamespace, param1, param2) \
inline returntype funcname(param1 p1, param2 p2) \ inline returntype funcname(param1 p1, param2 p2) \
{ \ { \
return qt_wince_##funcname(p1, p2); \ return prependnamespace##funcname(p1, p2); \
} }
#define generate_inline_return_func3(funcname, returntype, param1, param2, param3) \ #define generate_inline_return_func3(funcname, returntype, param1, param2, param3) \
inline returntype funcname(param1 p1, param2 p2, param3 p3) \ inline returntype funcname(param1 p1, param2 p2, param3 p3) \
{ \ { \
return qt_wince_##funcname(p1, p2, p3); \ return qt_wince_##funcname(p1, p2, p3); \
} }
#define generate_inline_return_func4(funcname, returntype, param1, param2, param3, param4) \ #define generate_inline_return_func4(funcname, returntype, prependnamespace, param1, param2, param3, param4) \
inline returntype funcname(param1 p1, param2 p2, param3 p3, param4 p4) \ inline returntype funcname(param1 p1, param2 p2, param3 p3, param4 p4) \
{ \ { \
return qt_wince_##funcname(p1, p2, p3, p4); \ return prependnamespace##funcname(p1, p2, p3, p4); \
} }
#define generate_inline_return_func5(funcname, returntype, param1, param2, param3, param4, param5) \ #define generate_inline_return_func5(funcname, returntype, param1, param2, param3, param4, param5) \
inline returntype funcname(param1 p1, param2 p2, param3 p3, param4 p4, param5 p5) \ inline returntype funcname(param1 p1, param2 p2, param3 p3, param4 p4, param5 p5) \
@ -433,28 +433,28 @@ typedef unsigned (__stdcall *StartAdressExFunc)(void *);
typedef void(*StartAdressFunc)(void *); typedef void(*StartAdressFunc)(void *);
typedef int ( __cdecl *CompareFunc ) (const void *, const void *) ; typedef int ( __cdecl *CompareFunc ) (const void *, const void *) ;
generate_inline_return_func4(getenv_s, errno_t, size_t *, char *, size_t, const char *) generate_inline_return_func4(getenv_s, errno_t, qt_fake_, size_t *, char *, size_t, const char *)
generate_inline_return_func2(_putenv_s, errno_t, const char *, const char *) generate_inline_return_func2(_putenv_s, errno_t, qt_fake_, const char *, const char *)
generate_inline_return_func0(_getpid, int) generate_inline_return_func0(_getpid, int)
generate_inline_return_func1(time_tToFt, FILETIME, time_t) generate_inline_return_func1(time_tToFt, FILETIME, time_t)
generate_inline_return_func1(ftToTime_t, time_t, FILETIME) generate_inline_return_func1(ftToTime_t, time_t, FILETIME)
generate_inline_return_func0(_getdrive, int) generate_inline_return_func0(_getdrive, int)
generate_inline_return_func2(_waccess, int, const wchar_t *, int) generate_inline_return_func2(_waccess, int, qt_wince_, const wchar_t *, int)
generate_inline_return_func3(_wopen, int, const wchar_t *, int, int) generate_inline_return_func3(_wopen, int, const wchar_t *, int, int)
generate_inline_return_func2(_fdopen, FILE *, int, const char *) generate_inline_return_func2(_fdopen, FILE *, qt_wince_, int, const char *)
generate_inline_return_func2(fdopen, FILE *, int, const char *) generate_inline_return_func2(fdopen, FILE *, qt_wince_, int, const char *)
generate_inline_return_func1(rewind, void, FILE *) generate_inline_return_func1(rewind, void, FILE *)
generate_inline_return_func0(tmpfile, FILE *) generate_inline_return_func0(tmpfile, FILE *)
generate_inline_return_func2(_rename, int, const char *, const char *) generate_inline_return_func2(_rename, int, qt_wince_, const char *, const char *)
generate_inline_return_func1(_remove, int, const char *) generate_inline_return_func1(_remove, int, const char *)
generate_inline_return_func1(SetErrorMode, int, int) generate_inline_return_func1(SetErrorMode, int, int)
#if _WIN32_WCE < 0x800 #if _WIN32_WCE < 0x800
generate_inline_return_func2(_chmod, bool, const char *, int) generate_inline_return_func2(_chmod, bool, qt_wince_, const char *, int)
generate_inline_return_func2(_wchmod, bool, const wchar_t *, int) generate_inline_return_func2(_wchmod, bool, qt_wince_, const wchar_t *, int)
#endif #endif
generate_inline_return_func7(CreateFileA, HANDLE, LPCSTR, DWORD, DWORD, LPSECURITY_ATTRIBUTES, DWORD, DWORD, HANDLE) generate_inline_return_func7(CreateFileA, HANDLE, LPCSTR, DWORD, DWORD, LPSECURITY_ATTRIBUTES, DWORD, DWORD, HANDLE)
generate_inline_return_func4(SetWindowOrgEx, BOOL, HDC, int, int, LPPOINT) generate_inline_return_func4(SetWindowOrgEx, BOOL, qt_wince_, HDC, int, int, LPPOINT)
generate_inline_return_func2(calloc, void *, size_t, size_t) generate_inline_return_func2(calloc, void *, qt_wince_, size_t, size_t)
generate_inline_return_func0(GetThreadLocale, DWORD) generate_inline_return_func0(GetThreadLocale, DWORD)
generate_inline_return_func3(_beginthread, HANDLE, StartAdressFunc, unsigned, void *) generate_inline_return_func3(_beginthread, HANDLE, StartAdressFunc, unsigned, void *)
generate_inline_return_func6(_beginthreadex, unsigned long, void *, unsigned, StartAdressExFunc, void *, unsigned, unsigned *) generate_inline_return_func6(_beginthreadex, unsigned long, void *, unsigned, StartAdressExFunc, void *, unsigned, unsigned *)

View File

@ -35,59 +35,10 @@
#ifdef Q_OS_WINRT #ifdef Q_OS_WINRT
#include "qstring.h" #include "qfunctions_fake_env_p.h"
#include "qbytearray.h"
#include "qhash.h"
QT_BEGIN_NAMESPACE QT_BEGIN_NAMESPACE
// Environment ------------------------------------------------------
inline QHash<QByteArray, QByteArray> &qt_app_environment()
{
static QHash<QByteArray, QByteArray> internalEnvironment;
return internalEnvironment;
}
errno_t qt_winrt_getenv_s(size_t* sizeNeeded, char* buffer, size_t bufferSize, const char* varName)
{
if (!sizeNeeded)
return EINVAL;
if (!qt_app_environment().contains(varName)) {
if (buffer)
buffer[0] = '\0';
return ENOENT;
}
QByteArray value = qt_app_environment().value(varName);
if (!value.endsWith('\0')) // win32 guarantees terminated string
value.append('\0');
if (bufferSize < (size_t)value.size()) {
*sizeNeeded = value.size();
return ERANGE;
}
strcpy(buffer, value.constData());
return 0;
}
errno_t qt_winrt__putenv_s(const char* varName, const char* value)
{
QByteArray input = value;
if (input.isEmpty()) {
if (qt_app_environment().contains(varName))
qt_app_environment().remove(varName);
} else {
// win32 on winrt guarantees terminated string
if (!input.endsWith('\0'))
input.append('\0');
qt_app_environment()[varName] = input;
}
return 0;
}
void qt_winrt_tzset() void qt_winrt_tzset()
{ {
} }

View File

@ -49,10 +49,20 @@
ret; \ ret; \
} }
#define RETURN_IF_FAILED_WITH_ARGS(msg, ret, ...) \
if (FAILED(hr)) { \
qErrnoWarning(hr, msg, __VA_ARGS__); \
ret; \
}
#define RETURN_HR_IF_FAILED(msg) RETURN_IF_FAILED(msg, return hr) #define RETURN_HR_IF_FAILED(msg) RETURN_IF_FAILED(msg, return hr)
#define RETURN_OK_IF_FAILED(msg) RETURN_IF_FAILED(msg, return S_OK) #define RETURN_OK_IF_FAILED(msg) RETURN_IF_FAILED(msg, return S_OK)
#define RETURN_FALSE_IF_FAILED(msg) RETURN_IF_FAILED(msg, return false) #define RETURN_FALSE_IF_FAILED(msg) RETURN_IF_FAILED(msg, return false)
#define RETURN_VOID_IF_FAILED(msg) RETURN_IF_FAILED(msg, return) #define RETURN_VOID_IF_FAILED(msg) RETURN_IF_FAILED(msg, return)
#define RETURN_HR_IF_FAILED_WITH_ARGS(msg, ...) RETURN_IF_FAILED_WITH_ARGS(msg, return hr, __VA_ARGS__)
#define RETURN_OK_IF_FAILED_WITH_ARGS(msg, ...) RETURN_IF_FAILED_WITH_ARGS(msg, return S_OK, __VA_ARGS__)
#define RETURN_FALSE_IF_FAILED_WITH_ARGS(msg, ...) RETURN_IF_FAILED_WITH_ARGS(msg, return false, __VA_ARGS__)
#define RETURN_VOID_IF_FAILED_WITH_ARGS(msg, ...) RETURN_IF_FAILED_WITH_ARGS(msg, return, __VA_ARGS__)
#define Q_ASSERT_SUCCEEDED(hr) \ #define Q_ASSERT_SUCCEEDED(hr) \
Q_ASSERT_X(SUCCEEDED(hr), Q_FUNC_INFO, qPrintable(qt_error_string(hr))); Q_ASSERT_X(SUCCEEDED(hr), Q_FUNC_INFO, qPrintable(qt_error_string(hr)));
@ -65,8 +75,8 @@ QT_BEGIN_NAMESPACE
#endif #endif
// Environment ------------------------------------------------------ // Environment ------------------------------------------------------
errno_t qt_winrt_getenv_s(size_t*, char*, size_t, const char*); errno_t qt_fake_getenv_s(size_t*, char*, size_t, const char*);
errno_t qt_winrt__putenv_s(const char*, const char*); errno_t qt_fake__putenv_s(const char*, const char*);
void qt_winrt_tzset(); void qt_winrt_tzset();
void qt_winrt__tzset(); void qt_winrt__tzset();
@ -91,20 +101,20 @@ QT_END_NAMESPACE
{ \ { \
return QT_PREPEND_NAMESPACE(qt_winrt_##funcname)(p1); \ return QT_PREPEND_NAMESPACE(qt_winrt_##funcname)(p1); \
} }
#define generate_inline_return_func2(funcname, returntype, param1, param2) \ #define generate_inline_return_func2(funcname, returntype, prependnamespace, param1, param2) \
inline returntype funcname(param1 p1, param2 p2) \ inline returntype funcname(param1 p1, param2 p2) \
{ \ { \
return QT_PREPEND_NAMESPACE(qt_winrt_##funcname)(p1, p2); \ return QT_PREPEND_NAMESPACE(prependnamespace##funcname)(p1, p2); \
} }
#define generate_inline_return_func3(funcname, returntype, param1, param2, param3) \ #define generate_inline_return_func3(funcname, returntype, param1, param2, param3) \
inline returntype funcname(param1 p1, param2 p2, param3 p3) \ inline returntype funcname(param1 p1, param2 p2, param3 p3) \
{ \ { \
return QT_PREPEND_NAMESPACE(qt_winrt_##funcname)(p1, p2, p3); \ return QT_PREPEND_NAMESPACE(qt_winrt_##funcname)(p1, p2, p3); \
} }
#define generate_inline_return_func4(funcname, returntype, param1, param2, param3, param4) \ #define generate_inline_return_func4(funcname, returntype, prependnamespace, param1, param2, param3, param4) \
inline returntype funcname(param1 p1, param2 p2, param3 p3, param4 p4) \ inline returntype funcname(param1 p1, param2 p2, param3 p3, param4 p4) \
{ \ { \
return QT_PREPEND_NAMESPACE(qt_winrt_##funcname)(p1, p2, p3, p4); \ return QT_PREPEND_NAMESPACE(prependnamespace##funcname)(p1, p2, p3, p4); \
} }
#define generate_inline_return_func5(funcname, returntype, param1, param2, param3, param4, param5) \ #define generate_inline_return_func5(funcname, returntype, param1, param2, param3, param4, param5) \
inline returntype funcname(param1 p1, param2 p2, param3 p3, param4 p4, param5 p5) \ inline returntype funcname(param1 p1, param2 p2, param3 p3, param4 p4, param5 p5) \
@ -126,8 +136,8 @@ typedef unsigned (__stdcall *StartAdressExFunc)(void *);
typedef void(*StartAdressFunc)(void *); typedef void(*StartAdressFunc)(void *);
typedef int ( __cdecl *CompareFunc ) (const void *, const void *) ; typedef int ( __cdecl *CompareFunc ) (const void *, const void *) ;
generate_inline_return_func4(getenv_s, errno_t, size_t *, char *, size_t, const char *) generate_inline_return_func4(getenv_s, errno_t, qt_fake_, size_t *, char *, size_t, const char *)
generate_inline_return_func2(_putenv_s, errno_t, const char *, const char *) generate_inline_return_func2(_putenv_s, errno_t, qt_fake_, const char *, const char *)
generate_inline_return_func0(tzset, void) generate_inline_return_func0(tzset, void)
generate_inline_return_func0(_tzset, void) generate_inline_return_func0(_tzset, void)

View File

@ -4822,7 +4822,7 @@ bool QObject::disconnect(const QMetaObject::Connection &connection)
\note It is not possible to use this overload to diconnect signals \note It is not possible to use this overload to diconnect signals
connected to functors or lambda expressions. That is because it is not connected to functors or lambda expressions. That is because it is not
possible to compare them. Instead, use the olverload that take a possible to compare them. Instead, use the overload that takes a
QMetaObject::Connection QMetaObject::Connection
\sa connect() \sa connect()

View File

@ -2930,9 +2930,9 @@ QByteArray QByteArray::toUpper_helper(QByteArray &a)
/*! \fn void QByteArray::clear() /*! \fn void QByteArray::clear()
Clears the contents of the byte array and makes it empty. Clears the contents of the byte array and makes it null.
\sa resize(), isEmpty() \sa resize(), isNull()
*/ */
void QByteArray::clear() void QByteArray::clear()

View File

@ -918,6 +918,13 @@ QByteArray QTzTimeZonePrivate::systemTimeZoneId() const
if (!ianaId.isEmpty() && ianaId.at(0) == ':') if (!ianaId.isEmpty() && ianaId.at(0) == ':')
ianaId = ianaId.mid(1); ianaId = ianaId.mid(1);
// The TZ value can be ":/etc/localtime" which libc considers
// to be a "default timezone", in which case it will be read
// by one of the blocks below, so unset it here so it is not
// considered as a valid/found ianaId
if (ianaId == "/etc/localtime")
ianaId.clear();
// On Debian Etch and later /etc/localtime is real file with name held in /etc/timezone // On Debian Etch and later /etc/localtime is real file with name held in /etc/timezone
if (ianaId.isEmpty()) { if (ianaId.isEmpty()) {
QFile tzif(QStringLiteral("/etc/timezone")); QFile tzif(QStringLiteral("/etc/timezone"));

View File

@ -852,18 +852,17 @@ void QAccessible::updateAccessibility(QAccessibleEvent *event)
// during construction of widgets. If you see cases where the // during construction of widgets. If you see cases where the
// cache seems wrong, this call is "to blame", but the code that // cache seems wrong, this call is "to blame", but the code that
// caches dynamic data should be updated to handle change events. // caches dynamic data should be updated to handle change events.
if (!isActive() || !event->accessibleInterface()) QAccessibleInterface *iface = event->accessibleInterface();
return; if (isActive() && iface) {
if (event->type() == QAccessible::TableModelChanged) {
if (iface->tableInterface())
iface->tableInterface()->modelChange(static_cast<QAccessibleTableModelChangeEvent*>(event));
}
if (event->type() == QAccessible::TableModelChanged) { if (updateHandler) {
QAccessibleInterface *iface = event->accessibleInterface(); updateHandler(event);
if (iface && iface->tableInterface()) return;
iface->tableInterface()->modelChange(static_cast<QAccessibleTableModelChangeEvent*>(event)); }
}
if (updateHandler) {
updateHandler(event);
return;
} }
if (QPlatformAccessibility *pfAccessibility = platformAccessibility()) if (QPlatformAccessibility *pfAccessibility = platformAccessibility())

View File

@ -1,6 +1,7 @@
/**************************************************************************** /****************************************************************************
** **
** Copyright (C) 2015 The Qt Company Ltd. ** Copyright (C) 2015 The Qt Company Ltd.
** Copyright (C) 2015 Olivier Goffart <ogoffart@woboq.com>
** Contact: http://www.qt.io/licensing/ ** Contact: http://www.qt.io/licensing/
** **
** This file is part of the QtGui module of the Qt Toolkit. ** This file is part of the QtGui module of the Qt Toolkit.
@ -1420,15 +1421,15 @@ QString qt_findAtNxFile(const QString &baseFileName, qreal targetDevicePixelRati
if (disableNxImageLoading) if (disableNxImageLoading)
return baseFileName; return baseFileName;
QString atNx = QLatin1String("@%1x");
int dotIndex = baseFileName.lastIndexOf(QLatin1Char('.')); int dotIndex = baseFileName.lastIndexOf(QLatin1Char('.'));
if (dotIndex == -1) /* no dot */ if (dotIndex == -1) /* no dot */
dotIndex = baseFileName.size(); /* append */ dotIndex = baseFileName.size(); /* append */
QString atNxfileName = baseFileName;
atNxfileName.insert(dotIndex, QLatin1String("@2x"));
// Check for @Nx, ..., @3x, @2x file versions, // Check for @Nx, ..., @3x, @2x file versions,
for (int n = qCeil(targetDevicePixelRatio); n > 1; --n) { for (int n = qMin(qCeil(targetDevicePixelRatio), 9); n > 1; --n) {
QString atNxfileName = baseFileName; atNxfileName[dotIndex + 1] = QLatin1Char('0' + n);
atNxfileName.insert(dotIndex, atNx.arg(n));
if (QFile::exists(atNxfileName)) { if (QFile::exists(atNxfileName)) {
if (sourceDevicePixelRatio) if (sourceDevicePixelRatio)
*sourceDevicePixelRatio = n; *sourceDevicePixelRatio = n;

View File

@ -2380,17 +2380,25 @@ QColor QImage::pixelColor(int x, int y) const
return QColor(); return QColor();
} }
QRgba64 c;
const uchar * s = constScanLine(y); const uchar * s = constScanLine(y);
switch (d->format) { switch (d->format) {
case Format_BGR30: case Format_BGR30:
case Format_A2BGR30_Premultiplied: case Format_A2BGR30_Premultiplied:
return QColor(qConvertA2rgb30ToRgb64<PixelOrderBGR>(reinterpret_cast<const quint32 *>(s)[x])); c = qConvertA2rgb30ToRgb64<PixelOrderBGR>(reinterpret_cast<const quint32 *>(s)[x]);
break;
case Format_RGB30: case Format_RGB30:
case Format_A2RGB30_Premultiplied: case Format_A2RGB30_Premultiplied:
return QColor(qConvertA2rgb30ToRgb64<PixelOrderRGB>(reinterpret_cast<const quint32 *>(s)[x])); c = qConvertA2rgb30ToRgb64<PixelOrderRGB>(reinterpret_cast<const quint32 *>(s)[x]);
break;
default: default:
return QColor(pixel(x, y)); c = QRgba64::fromArgb32(pixel(x, y));
break;
} }
// QColor is always unpremultiplied
if (hasAlphaChannel() && qPixelLayouts[d->format].premultiplied)
c = c.unpremultiplied();
return QColor(c);
} }
/*! /*!
@ -2421,6 +2429,12 @@ void QImage::setPixelColor(int x, int y, const QColor &color)
qWarning("QImage::setPixelColor: coordinate (%d,%d) out of range", x, y); qWarning("QImage::setPixelColor: coordinate (%d,%d) out of range", x, y);
return; return;
} }
// QColor is always unpremultiplied
QRgba64 c = color.rgba64();
if (!hasAlphaChannel())
c.setAlpha(65535);
else if (qPixelLayouts[d->format].premultiplied)
c = c.premultiplied();
// detach is called from within scanLine // detach is called from within scanLine
uchar * s = scanLine(y); uchar * s = scanLine(y);
switch (d->format) { switch (d->format) {
@ -2430,19 +2444,19 @@ void QImage::setPixelColor(int x, int y, const QColor &color)
qWarning("QImage::setPixelColor: called on monochrome or indexed format"); qWarning("QImage::setPixelColor: called on monochrome or indexed format");
return; return;
case Format_BGR30: case Format_BGR30:
((uint *)s)[x] = qConvertRgb64ToRgb30<PixelOrderBGR>(color.rgba64()) | 0xc0000000; ((uint *)s)[x] = qConvertRgb64ToRgb30<PixelOrderBGR>(c) | 0xc0000000;
return; return;
case Format_A2BGR30_Premultiplied: case Format_A2BGR30_Premultiplied:
((uint *)s)[x] = qConvertRgb64ToRgb30<PixelOrderBGR>(color.rgba64()); ((uint *)s)[x] = qConvertRgb64ToRgb30<PixelOrderBGR>(c);
return; return;
case Format_RGB30: case Format_RGB30:
((uint *)s)[x] = qConvertRgb64ToRgb30<PixelOrderRGB>(color.rgba64()) | 0xc0000000; ((uint *)s)[x] = qConvertRgb64ToRgb30<PixelOrderRGB>(c) | 0xc0000000;
return; return;
case Format_A2RGB30_Premultiplied: case Format_A2RGB30_Premultiplied:
((uint *)s)[x] = qConvertRgb64ToRgb30<PixelOrderRGB>(color.rgba64()); ((uint *)s)[x] = qConvertRgb64ToRgb30<PixelOrderRGB>(c);
return; return;
default: default:
setPixel(x, y, color.rgba()); setPixel(x, y, c.toArgb32());
return; return;
} }
} }

View File

@ -2920,7 +2920,7 @@ InPlace_Image_Converter qimage_inplace_converter_map[QImage::NImageFormats][QIma
} // Format_Grayscale8 } // Format_Grayscale8
}; };
void qInitImageConversions() static void qInitImageConversions()
{ {
#if defined(__SSE2__) && defined(QT_COMPILER_SUPPORTS_SSSE3) #if defined(__SSE2__) && defined(QT_COMPILER_SUPPORTS_SSSE3)
if (qCpuHasFeature(SSSE3)) { if (qCpuHasFeature(SSSE3)) {
@ -2967,4 +2967,15 @@ void qInitImageConversions()
#endif #endif
} }
class QImageConversionsInitializer {
public:
QImageConversionsInitializer()
{
qInitImageConversions();
}
};
// Ensure initialization if this object file is linked.
static QImageConversionsInitializer qImageConversionsInitializer;
QT_END_NAMESPACE QT_END_NAMESPACE

View File

@ -111,8 +111,6 @@ bool convert_generic_inplace(QImageData *data, QImage::Format dst_format, Qt::Im
void dither_to_Mono(QImageData *dst, const QImageData *src, Qt::ImageConversionFlags flags, bool fromalpha); void dither_to_Mono(QImageData *dst, const QImageData *src, Qt::ImageConversionFlags flags, bool fromalpha);
void qInitImageConversions();
const uchar *qt_get_bitflip_array(); const uchar *qt_get_bitflip_array();
Q_GUI_EXPORT void qGamma_correct_back_to_linear_cs(QImage *image); Q_GUI_EXPORT void qGamma_correct_back_to_linear_cs(QImage *image);

View File

@ -194,9 +194,6 @@ extern void qRegisterGuiVariant();
#ifndef QT_NO_ANIMATION #ifndef QT_NO_ANIMATION
extern void qRegisterGuiGetInterpolator(); extern void qRegisterGuiGetInterpolator();
#endif #endif
extern void qInitBlendFunctions();
extern void qInitDrawhelperAsm();
extern void qInitImageConversions();
static bool qt_detectRTLLanguage() static bool qt_detectRTLLanguage()
{ {
@ -1359,13 +1356,6 @@ void QGuiApplicationPrivate::init()
if (platform_integration == 0) if (platform_integration == 0)
createPlatformIntegration(); createPlatformIntegration();
// Set up blend function tables.
qInitBlendFunctions();
// Set up which span functions should be used in raster engine...
qInitDrawhelperAsm();
// and QImage conversion functions
qInitImageConversions();
initPalette(); initPalette();
QFont::initialize(); QFont::initialize();

View File

@ -147,6 +147,9 @@ QRectF QInputMethod::cursorRectangle() const
/*! /*!
\property QInputMethod::keyboardRectangle \property QInputMethod::keyboardRectangle
\brief Virtual keyboard's geometry in window coordinates. \brief Virtual keyboard's geometry in window coordinates.
This might be an empty rectangle if it is not possible to know the geometry
of the keyboard. This is the case for a floating keyboard on android.
*/ */
QRectF QInputMethod::keyboardRectangle() const QRectF QInputMethod::keyboardRectangle() const
{ {

View File

@ -581,6 +581,9 @@ void QPlatformWindow::invalidateSurface()
QRect QPlatformWindow::initialGeometry(const QWindow *w, QRect QPlatformWindow::initialGeometry(const QWindow *w,
const QRect &initialGeometry, int defaultWidth, int defaultHeight) const QRect &initialGeometry, int defaultWidth, int defaultHeight)
{ {
const QScreen *screen = effectiveScreen(w);
if (!screen)
return initialGeometry;
QRect rect(QHighDpi::fromNativePixels(initialGeometry, w)); QRect rect(QHighDpi::fromNativePixels(initialGeometry, w));
if (rect.width() == 0) { if (rect.width() == 0) {
const int minWidth = w->minimumWidth(); const int minWidth = w->minimumWidth();
@ -591,25 +594,23 @@ QRect QPlatformWindow::initialGeometry(const QWindow *w,
rect.setHeight(minHeight > 0 ? minHeight : defaultHeight); rect.setHeight(minHeight > 0 ? minHeight : defaultHeight);
} }
if (w->isTopLevel() && qt_window_private(const_cast<QWindow*>(w))->positionAutomatic if (w->isTopLevel() && qt_window_private(const_cast<QWindow*>(w))->positionAutomatic
&& w->type() != Qt::Popup) { && w->type() != Qt::Popup) {
if (const QScreen *screen = effectiveScreen(w)) { const QRect availableGeometry = screen->availableGeometry();
const QRect availableGeometry = screen->availableGeometry(); // Center unless the geometry ( + unknown window frame) is too large for the screen).
// Center unless the geometry ( + unknown window frame) is too large for the screen). if (rect.height() < (availableGeometry.height() * 8) / 9
if (rect.height() < (availableGeometry.height() * 8) / 9
&& rect.width() < (availableGeometry.width() * 8) / 9) { && rect.width() < (availableGeometry.width() * 8) / 9) {
const QWindow *tp = w->transientParent(); const QWindow *tp = w->transientParent();
if (tp) { if (tp) {
// A transient window should be centered w.r.t. its transient parent. // A transient window should be centered w.r.t. its transient parent.
rect.moveCenter(tp->geometry().center()); rect.moveCenter(tp->geometry().center());
} else { } else {
// Center the window on the screen. (Only applicable on platforms // Center the window on the screen. (Only applicable on platforms
// which do not provide a better way.) // which do not provide a better way.)
rect.moveCenter(availableGeometry.center()); rect.moveCenter(availableGeometry.center());
}
} }
} }
} }
return QHighDpi::toNativePixels(rect, w); return QHighDpi::toNativePixels(rect, screen);
} }
/*! /*!

View File

@ -325,13 +325,29 @@ int QStyleHints::cursorFlashTime() const
\note The platform may still choose to show certain windows non-fullscreen, \note The platform may still choose to show certain windows non-fullscreen,
such as popups or dialogs. This property only reports the default behavior. such as popups or dialogs. This property only reports the default behavior.
\sa QWindow::show() \sa QWindow::show(), showIsMaximized()
*/ */
bool QStyleHints::showIsFullScreen() const bool QStyleHints::showIsFullScreen() const
{ {
return hint(QPlatformIntegration::ShowIsFullScreen).toBool(); return hint(QPlatformIntegration::ShowIsFullScreen).toBool();
} }
/*!
\property QStyleHints::showIsMaximized
\brief \c true if the platform defaults to windows being maximized,
otherwise \c false.
\note The platform may still choose to show certain windows non-maximized,
such as popups or dialogs. This property only reports the default behavior.
\sa QWindow::show(), showIsFullScreen()
\since 5.6
*/
bool QStyleHints::showIsMaximized() const
{
return hint(QPlatformIntegration::ShowIsMaximized).toBool();
}
/*! /*!
\property QStyleHints::passwordMaskDelay \property QStyleHints::passwordMaskDelay
\brief the time, in milliseconds, a typed letter is displayed unshrouded \brief the time, in milliseconds, a typed letter is displayed unshrouded

View File

@ -56,6 +56,7 @@ class Q_GUI_EXPORT QStyleHints : public QObject
Q_PROPERTY(int passwordMaskDelay READ passwordMaskDelay STORED false CONSTANT FINAL) Q_PROPERTY(int passwordMaskDelay READ passwordMaskDelay STORED false CONSTANT FINAL)
Q_PROPERTY(bool setFocusOnTouchRelease READ setFocusOnTouchRelease STORED false CONSTANT FINAL) Q_PROPERTY(bool setFocusOnTouchRelease READ setFocusOnTouchRelease STORED false CONSTANT FINAL)
Q_PROPERTY(bool showIsFullScreen READ showIsFullScreen STORED false CONSTANT FINAL) Q_PROPERTY(bool showIsFullScreen READ showIsFullScreen STORED false CONSTANT FINAL)
Q_PROPERTY(bool showIsMaximized READ showIsMaximized STORED false CONSTANT FINAL)
Q_PROPERTY(int startDragDistance READ startDragDistance NOTIFY startDragDistanceChanged FINAL) Q_PROPERTY(int startDragDistance READ startDragDistance NOTIFY startDragDistanceChanged FINAL)
Q_PROPERTY(int startDragTime READ startDragTime NOTIFY startDragTimeChanged FINAL) Q_PROPERTY(int startDragTime READ startDragTime NOTIFY startDragTimeChanged FINAL)
Q_PROPERTY(int startDragVelocity READ startDragVelocity STORED false CONSTANT FINAL) Q_PROPERTY(int startDragVelocity READ startDragVelocity STORED false CONSTANT FINAL)
@ -79,6 +80,7 @@ public:
void setCursorFlashTime(int cursorFlashTime); void setCursorFlashTime(int cursorFlashTime);
int cursorFlashTime() const; int cursorFlashTime() const;
bool showIsFullScreen() const; bool showIsFullScreen() const;
bool showIsMaximized() const;
int passwordMaskDelay() const; int passwordMaskDelay() const;
QChar passwordMaskCharacter() const; QChar passwordMaskCharacter() const;
qreal fontSmoothingGamma() const; qreal fontSmoothingGamma() const;

View File

@ -6328,7 +6328,7 @@ void qt_memfill32(quint32 *dest, quint32 color, int count)
template<QtPixelOrder> const uint *QT_FASTCALL convertA2RGB30PMFromARGB32PM_sse4(uint *buffer, const uint *src, int count, const QPixelLayout *, const QRgb *); template<QtPixelOrder> const uint *QT_FASTCALL convertA2RGB30PMFromARGB32PM_sse4(uint *buffer, const uint *src, int count, const QPixelLayout *, const QRgb *);
#endif #endif
void qInitDrawhelperAsm() static void qInitDrawhelperFunctions()
{ {
#ifdef __SSE2__ #ifdef __SSE2__
qDrawHelper[QImage::Format_RGB32].bitmapBlit = qt_bitmapblit32_sse2; qDrawHelper[QImage::Format_RGB32].bitmapBlit = qt_bitmapblit32_sse2;
@ -6523,4 +6523,19 @@ void qInitDrawhelperAsm()
#endif // QT_COMPILER_SUPPORTS_MIPS_DSP || QT_COMPILER_SUPPORTS_MIPS_DSPR2 #endif // QT_COMPILER_SUPPORTS_MIPS_DSP || QT_COMPILER_SUPPORTS_MIPS_DSPR2
} }
extern void qInitBlendFunctions();
class DrawHelperInitializer {
public:
DrawHelperInitializer()
{
// Set up basic blend function tables.
qInitBlendFunctions();
// Set up architecture optimized methods for the current machine.
qInitDrawhelperFunctions();
}
};
// Ensure initialization if this object file is linked.
static DrawHelperInitializer drawHelperInitializer;
QT_END_NAMESPACE QT_END_NAMESPACE

View File

@ -213,8 +213,6 @@ struct Operator
}; };
}; };
void qInitDrawhelperAsm();
class QRasterPaintEngine; class QRasterPaintEngine;
struct QSolidData struct QSolidData

View File

@ -717,8 +717,12 @@ bool QFontEngineFT::init(FaceId faceId, bool antialias, GlyphFormat format,
FT_Set_Transform(face, &matrix, 0); FT_Set_Transform(face, &matrix, 0);
freetype->matrix = matrix; freetype->matrix = matrix;
// fake bold // fake bold
if ((fontDef.weight >= QFont::Bold) && !(face->style_flags & FT_STYLE_FLAG_BOLD) && !FT_IS_FIXED_WIDTH(face)) if ((fontDef.weight >= QFont::Bold) && !(face->style_flags & FT_STYLE_FLAG_BOLD) && !FT_IS_FIXED_WIDTH(face)) {
embolden = true; if (const TT_OS2 *os2 = reinterpret_cast<const TT_OS2 *>(FT_Get_Sfnt_Table(face, ft_sfnt_os2))) {
if (os2->usWeightClass < 750)
embolden = true;
}
}
// underline metrics // underline metrics
line_thickness = QFixed::fromFixed(FT_MulFix(face->underline_thickness, face->size->metrics.y_scale)); line_thickness = QFixed::fromFixed(FT_MulFix(face->underline_thickness, face->size->metrics.y_scale));
underline_position = QFixed::fromFixed(-FT_MulFix(face->underline_position, face->size->metrics.y_scale)); underline_position = QFixed::fromFixed(-FT_MulFix(face->underline_position, face->size->metrics.y_scale));

View File

@ -986,8 +986,8 @@ void QTextTable::removeColumns(int pos, int num)
Merges the cell at the specified \a row and \a column with the adjacent cells Merges the cell at the specified \a row and \a column with the adjacent cells
into one cell. The new cell will span \a numRows rows and \a numCols columns. into one cell. The new cell will span \a numRows rows and \a numCols columns.
If \a numRows or \a numCols is less than the current number of rows or columns This method does nothing if \a numRows or \a numCols is less than the current
the cell spans then this method does nothing. number of rows or columns spanned by the cell.
\sa splitCell() \sa splitCell()
*/ */

View File

@ -40,9 +40,9 @@
//! [0] //! [0]
QNetworkConfigurationManager mgr; QNetworkConfigurationManager mgr;
QList<QNetworkConfiguration> activeConfigs = mgr.allConfigurations(QNetworkConfiguration::Active) QList<QNetworkConfiguration> activeConfigs = mgr.allConfigurations(QNetworkConfiguration::Active);
if (activeConfigs.count() > 0) if (activeConfigs.count() > 0)
Q_ASSERT(mgr.isOnline()) Q_ASSERT(mgr.isOnline());
else else
Q_ASSERT(!mgr.isOnline()) Q_ASSERT(!mgr.isOnline());
//! [0] //! [0]

View File

@ -380,8 +380,10 @@ int QNativeSocketEngine::accept()
Q_CHECK_STATE(QNativeSocketEngine::accept(), QAbstractSocket::ListeningState, -1); Q_CHECK_STATE(QNativeSocketEngine::accept(), QAbstractSocket::ListeningState, -1);
Q_CHECK_TYPE(QNativeSocketEngine::accept(), QAbstractSocket::TcpSocket, -1); Q_CHECK_TYPE(QNativeSocketEngine::accept(), QAbstractSocket::TcpSocket, -1);
if (d->socketDescriptor == -1 || d->pendingConnections.isEmpty()) if (d->socketDescriptor == -1 || d->pendingConnections.isEmpty()) {
d->setError(QAbstractSocket::TemporaryError, QNativeSocketEnginePrivate::TemporaryErrorString);
return -1; return -1;
}
// Start processing incoming data // Start processing incoming data
if (d->socketType == QAbstractSocket::TcpSocket) { if (d->socketType == QAbstractSocket::TcpSocket) {

View File

@ -99,7 +99,7 @@ void QSpiAccessibleBridge::notifyAccessibilityUpdate(QAccessibleEvent *event)
{ {
if (!dbusAdaptor) if (!dbusAdaptor)
return; return;
if (isActive()) if (isActive() && event->accessibleInterface())
dbusAdaptor->notify(event); dbusAdaptor->notify(event);
} }

View File

@ -51,6 +51,7 @@ namespace QtAndroidInput
static bool m_ignoreMouseEvents = false; static bool m_ignoreMouseEvents = false;
static bool m_softwareKeyboardVisible = false; static bool m_softwareKeyboardVisible = false;
static QRect m_softwareKeyboardRect;
static QList<QWindowSystemInterface::TouchPoint> m_touchPoints; static QList<QWindowSystemInterface::TouchPoint> m_touchPoints;
@ -108,6 +109,11 @@ namespace QtAndroidInput
return m_softwareKeyboardVisible; return m_softwareKeyboardVisible;
} }
QRect softwareKeyboardRect()
{
return m_softwareKeyboardRect;
}
static void mouseDown(JNIEnv */*env*/, jobject /*thiz*/, jint /*winId*/, jint x, jint y) static void mouseDown(JNIEnv */*env*/, jobject /*thiz*/, jint /*winId*/, jint x, jint y)
{ {
@ -734,14 +740,35 @@ namespace QtAndroidInput
static void keyboardVisibilityChanged(JNIEnv */*env*/, jobject /*thiz*/, jboolean visibility) static void keyboardVisibilityChanged(JNIEnv */*env*/, jobject /*thiz*/, jboolean visibility)
{ {
m_softwareKeyboardVisible = visibility; m_softwareKeyboardVisible = visibility;
if (!visibility)
m_softwareKeyboardRect = QRect();
QAndroidInputContext *inputContext = QAndroidInputContext::androidInputContext(); QAndroidInputContext *inputContext = QAndroidInputContext::androidInputContext();
if (inputContext && qGuiApp) if (inputContext && qGuiApp) {
inputContext->emitInputPanelVisibleChanged(); inputContext->emitInputPanelVisibleChanged();
if (!visibility)
inputContext->emitKeyboardRectChanged();
}
#ifdef QT_DEBUG_ANDROID_IM_PROTOCOL #ifdef QT_DEBUG_ANDROID_IM_PROTOCOL
qDebug() << "@@@ KEYBOARDVISIBILITYCHANGED" << inputContext; qDebug() << "@@@ KEYBOARDVISIBILITYCHANGED" << inputContext;
#endif #endif
} }
static void keyboardGeometryChanged(JNIEnv */*env*/, jobject /*thiz*/, jint x, jint y, jint w, jint h)
{
QRect r = QRect(x, y, w, h);
if (r == m_softwareKeyboardRect)
return;
m_softwareKeyboardRect = r;
QAndroidInputContext *inputContext = QAndroidInputContext::androidInputContext();
if (inputContext && qGuiApp)
inputContext->emitKeyboardRectChanged();
#ifdef QT_DEBUG_ANDROID_IM_PROTOCOL
qDebug() << "@@@ KEYBOARDRECTCHANGED" << m_softwareKeyboardRect;
#endif
}
static JNINativeMethod methods[] = { static JNINativeMethod methods[] = {
{"touchBegin","(I)V",(void*)touchBegin}, {"touchBegin","(I)V",(void*)touchBegin},
{"touchAdd","(IIIZIIFF)V",(void*)touchAdd}, {"touchAdd","(IIIZIIFF)V",(void*)touchAdd},
@ -753,7 +780,8 @@ namespace QtAndroidInput
{"tabletEvent", "(IIJIIIFFF)V", (void *)tabletEvent}, {"tabletEvent", "(IIJIIIFFF)V", (void *)tabletEvent},
{"keyDown", "(IIIZ)V", (void *)keyDown}, {"keyDown", "(IIIZ)V", (void *)keyDown},
{"keyUp", "(IIIZ)V", (void *)keyUp}, {"keyUp", "(IIIZ)V", (void *)keyUp},
{"keyboardVisibilityChanged", "(Z)V", (void *)keyboardVisibilityChanged} {"keyboardVisibilityChanged", "(Z)V", (void *)keyboardVisibilityChanged},
{"keyboardGeometryChanged", "(IIII)V", (void *)keyboardGeometryChanged}
}; };
bool registerNatives(JNIEnv *env) bool registerNatives(JNIEnv *env)

View File

@ -35,6 +35,7 @@
#define ANDROIDJNIINPUT_H #define ANDROIDJNIINPUT_H
#include <jni.h> #include <jni.h>
#include <QtCore/qglobal.h> #include <QtCore/qglobal.h>
#include <QtCore/QRect>
QT_BEGIN_NAMESPACE QT_BEGIN_NAMESPACE
@ -45,6 +46,7 @@ namespace QtAndroidInput
void resetSoftwareKeyboard(); void resetSoftwareKeyboard();
void hideSoftwareKeyboard(); void hideSoftwareKeyboard();
bool isSoftwareKeyboardVisible(); bool isSoftwareKeyboardVisible();
QRect softwareKeyboardRect();
void updateSelection(int selStart, int selEnd, int candidatesStart, int candidatesEnd); void updateSelection(int selStart, int selEnd, int candidatesStart, int candidatesEnd);
// Software keyboard support // Software keyboard support

View File

@ -512,7 +512,7 @@ void QAndroidInputContext::invokeAction(QInputMethod::Action action, int cursorP
QRectF QAndroidInputContext::keyboardRect() const QRectF QAndroidInputContext::keyboardRect() const
{ {
return QPlatformInputContext::keyboardRect(); return QtAndroidInput::softwareKeyboardRect();
} }
bool QAndroidInputContext::isAnimating() const bool QAndroidInputContext::isAnimating() const

View File

@ -51,6 +51,8 @@ QCocoaAccessibility::~QCocoaAccessibility()
void QCocoaAccessibility::notifyAccessibilityUpdate(QAccessibleEvent *event) void QCocoaAccessibility::notifyAccessibilityUpdate(QAccessibleEvent *event)
{ {
if (!isActive() || !event->accessibleInterface())
return;
QMacAccessibilityElement *element = [QMacAccessibilityElement elementWithId: event->uniqueId()]; QMacAccessibilityElement *element = [QMacAccessibilityElement elementWithId: event->uniqueId()];
if (!element) { if (!element) {
qWarning() << "QCocoaAccessibility::notifyAccessibilityUpdate: invalid element"; qWarning() << "QCocoaAccessibility::notifyAccessibilityUpdate: invalid element";

View File

@ -160,10 +160,10 @@ QSizeF QEglFSKmsScreen::physicalSize() const
QDpi QEglFSKmsScreen::logicalDpi() const QDpi QEglFSKmsScreen::logicalDpi() const
{ {
QSizeF ps = physicalSize(); const QSizeF ps = physicalSize();
QSize s = geometry().size(); const QSize s = geometry().size();
if (ps.isValid() && s.isValid()) if (!ps.isEmpty() && !s.isEmpty())
return QDpi(25.4 * s.width() / ps.width(), return QDpi(25.4 * s.width() / ps.width(),
25.4 * s.height() / ps.height()); 25.4 * s.height() / ps.height());
else else

View File

@ -33,6 +33,7 @@
#include "qeglfskmsegldeviceintegration.h" #include "qeglfskmsegldeviceintegration.h"
#include <QLoggingCategory> #include <QLoggingCategory>
#include <private/qmath_p.h>
QT_BEGIN_NAMESPACE QT_BEGIN_NAMESPACE
@ -115,7 +116,18 @@ EGLDisplay QEglFSKmsEglDeviceIntegration::createDisplay(EGLNativeDisplayType nat
QSizeF QEglFSKmsEglDeviceIntegration::physicalScreenSize() const QSizeF QEglFSKmsEglDeviceIntegration::physicalScreenSize() const
{ {
return QSizeF(m_drm_connector->mmWidth, m_drm_connector->mmHeight); const int defaultPhysicalDpi = 100;
static const int width = qEnvironmentVariableIntValue("QT_QPA_EGLFS_PHYSICAL_WIDTH");
static const int height = qEnvironmentVariableIntValue("QT_QPA_EGLFS_PHYSICAL_HEIGHT");
QSizeF size(width, height);
if (size.isEmpty()) {
size = QSizeF(m_drm_connector->mmWidth, m_drm_connector->mmHeight);
if (size.isEmpty()) {
const float pixelsPerMm = Q_MM_PER_INCH / defaultPhysicalDpi;
size = QSizeF(screenSize().width() * pixelsPerMm, screenSize().height() * pixelsPerMm);
}
}
return size;
} }
QSize QEglFSKmsEglDeviceIntegration::screenSize() const QSize QEglFSKmsEglDeviceIntegration::screenSize() const

View File

@ -212,11 +212,14 @@ QSize QEGLDeviceIntegration::screenSize() const
QDpi QEGLDeviceIntegration::logicalDpi() const QDpi QEGLDeviceIntegration::logicalDpi() const
{ {
QSizeF ps = physicalScreenSize(); const QSizeF ps = physicalScreenSize();
QSize s = screenSize(); const QSize s = screenSize();
return QDpi(25.4 * s.width() / ps.width(), if (!ps.isEmpty() && !s.isEmpty())
25.4 * s.height() / ps.height()); return QDpi(25.4 * s.width() / ps.width(),
25.4 * s.height() / ps.height());
else
return QDpi(100, 100);
} }
qreal QEGLDeviceIntegration::pixelDensity() const qreal QEGLDeviceIntegration::pixelDensity() const

View File

@ -66,6 +66,8 @@ void invalidateCache(QAccessibleInterface *iface)
void QIOSPlatformAccessibility::notifyAccessibilityUpdate(QAccessibleEvent *event) void QIOSPlatformAccessibility::notifyAccessibilityUpdate(QAccessibleEvent *event)
{ {
if (!isActive() || !event->accessibleInterface())
return;
switch (event->type()) { switch (event->type()) {
case QAccessible::ObjectCreated: case QAccessible::ObjectCreated:
case QAccessible::ObjectShow: case QAccessible::ObjectShow:

View File

@ -151,7 +151,7 @@ void QWindowsAccessibility::notifyAccessibilityUpdate(QAccessibleEvent *event)
// An event has to be associated with a window, // An event has to be associated with a window,
// so find the first parent that is a widget and that has a WId // so find the first parent that is a widget and that has a WId
QAccessibleInterface *iface = event->accessibleInterface(); QAccessibleInterface *iface = event->accessibleInterface();
if (!iface || !iface->isValid()) if (!isActive() || !iface || !iface->isValid())
return; return;
QWindow *window = QWindowsAccessibility::windowHelper(iface); QWindow *window = QWindowsAccessibility::windowHelper(iface);

View File

@ -1033,7 +1033,17 @@ void QWindowsWindow::destroyWindow()
void QWindowsWindow::updateDropSite(bool topLevel) void QWindowsWindow::updateDropSite(bool topLevel)
{ {
bool enabled = false; bool enabled = false;
if (topLevel) { bool parentIsEmbedded = false;
if (!topLevel) {
// if the parent window is a foreign window wrapped via QWindow::fromWinId, we need to enable the drop site
// on the first child window
const QWindow *parent = window()->parent();
if (parent && (parent->type() == Qt::ForeignWindow))
parentIsEmbedded = true;
}
if (topLevel || parentIsEmbedded) {
switch (window()->type()) { switch (window()->type()) {
case Qt::Window: case Qt::Window:
case Qt::Dialog: case Qt::Dialog:

View File

@ -444,12 +444,14 @@ bool QWinRTFileDialogHelper::show(Qt::WindowFlags windowFlags, Qt::WindowModalit
} }
} }
const QString suffix = dialogOptions->defaultSuffix(); QString suffix = dialogOptions->defaultSuffix();
if (!suffix.isEmpty()) { if (!suffix.isEmpty()) {
if (!suffix.startsWith(QLatin1Char('.')))
suffix.prepend(QLatin1Char('.'));
HStringReference nativeSuffix(reinterpret_cast<const wchar_t *>(suffix.utf16()), HStringReference nativeSuffix(reinterpret_cast<const wchar_t *>(suffix.utf16()),
suffix.length()); suffix.length());
hr = picker->put_DefaultFileExtension(nativeSuffix.Get()); hr = picker->put_DefaultFileExtension(nativeSuffix.Get());
RETURN_FALSE_IF_FAILED("Failed to set default file extension"); RETURN_FALSE_IF_FAILED_WITH_ARGS("Failed to set default file extension \"%s\"", qPrintable(suffix));
} }
const QString suggestedName = QFileInfo(d->saveFileName.toLocalFile()).fileName(); const QString suggestedName = QFileInfo(d->saveFileName.toLocalFile()).fileName();

View File

@ -37,6 +37,7 @@
#include "qwinrtmessagedialoghelper.h" #include "qwinrtmessagedialoghelper.h"
#include "qwinrttheme.h" #include "qwinrttheme.h"
#include <QtGui/QTextDocument>
#include <QtCore/qfunctions_winrt.h> #include <QtCore/qfunctions_winrt.h>
#include <private/qeventdispatcher_winrt_p.h> #include <private/qeventdispatcher_winrt_p.h>
@ -110,6 +111,10 @@ bool QWinRTMessageDialogHelper::show(Qt::WindowFlags windowFlags, Qt::WindowModa
const QString informativeText = options->informativeText(); const QString informativeText = options->informativeText();
const QString title = options->windowTitle(); const QString title = options->windowTitle();
const QString text = informativeText.isEmpty() ? options->text() : (options->text() + QLatin1Char('\n') + informativeText); const QString text = informativeText.isEmpty() ? options->text() : (options->text() + QLatin1Char('\n') + informativeText);
if (Qt::mightBeRichText(text)) {
qWarning("Rich text detected, defaulting to QtWidgets-based dialog.");
return false;
}
HRESULT hr; HRESULT hr;
ComPtr<IMessageDialogFactory> dialogFactory; ComPtr<IMessageDialogFactory> dialogFactory;

View File

@ -38,16 +38,6 @@
** **
****************************************************************************/ ****************************************************************************/
/****************************************************************************
**
** Copyright (C) 2015 The Qt Company Ltd.
** Contact: http://www.qt.io/licensing/
**
** This file is part of an example program for Qt.
** EDITIONS: NOLIMITS
**
****************************************************************************/
/* /*
model.cpp model.cpp

View File

@ -38,16 +38,6 @@
** **
****************************************************************************/ ****************************************************************************/
/****************************************************************************
**
** Copyright (C) 2015 The Qt Company Ltd.
** Contact: http://www.qt.io/licensing/
**
** This file is part of an example program for Qt.
** EDITIONS: NOLIMITS
**
****************************************************************************/
#ifndef MODEL_H #ifndef MODEL_H
#define MODEL_H #define MODEL_H

View File

@ -2199,6 +2199,54 @@
\snippet code/doc_src_stylesheet.qdoc 68 \snippet code/doc_src_stylesheet.qdoc 68
\row
\li \b outline
\li
\li The outline drawn around the object's border.
\row
\li \b outline-color
\li \l{#Color}{Color}
\li The color of the outline.
See also \l{Qt Style Sheets Reference#border-color-prop}{border-color}
\row
\li \b outline-offset
\li \l{#Length}{Length}
\li The outline's offset from the border of the widget.
\row
\li \b outline-style
\li
\li Specifies the pattern used to draw the outline.
See also \l{Qt Style Sheets Reference#border-style-prop}{border-style}
\row
\li \b outline-radius
\li
\li Adds rounded corners to the outline
\row
\li \b outline-bottom-left-radius
\li \l{#Radius}{Radius}
\li The radius for the bottom-left rounded corner of the outline.
\row
\li \b outline-bottom-right-radius
\li \l{#Radius}{Radius}
\li The radius for the bottom-right rounded corner of the outline.
\row
\li \b outline-top-left-radius
\li \l{#Radius}{Radius}
\li The radius for the top-left corner of the outline.
\row
\li \b outline-top-right-radius
\li \l{#Radius}{Radius}
\li The radius for the top-right rounded corner of the outline.
\row \row
\li \b{\c padding} \target padding-prop \li \b{\c padding} \target padding-prop
\li \l{#Box Lengths}{Box Lengths} \li \l{#Box Lengths}{Box Lengths}

View File

@ -196,6 +196,8 @@ private slots:
void metadataPassthrough(); void metadataPassthrough();
void pixelColor();
private: private:
const QString m_prefix; const QString m_prefix;
}; };
@ -3027,5 +3029,21 @@ void tst_QImage::metadataPassthrough()
QCOMPARE(swapped.devicePixelRatio(), a.devicePixelRatio()); QCOMPARE(swapped.devicePixelRatio(), a.devicePixelRatio());
} }
void tst_QImage::pixelColor()
{
QImage argb32(1, 1, QImage::Format_ARGB32);
QImage argb32pm(1, 1, QImage::Format_ARGB32_Premultiplied);
QColor c(Qt::red);
c.setAlpha(128);
argb32.setPixelColor(QPoint(0, 0), c);
argb32pm.setPixelColor(QPoint(0, 0), c);
QCOMPARE(argb32.pixelColor(QPoint(0, 0)), c);
QCOMPARE(argb32pm.pixelColor(QPoint(0, 0)), c);
QImage t = argb32.convertToFormat(QImage::Format_ARGB32_Premultiplied);
QCOMPARE(t.pixel(0,0), argb32pm.pixel(0,0));
}
QTEST_GUILESS_MAIN(tst_QImage) QTEST_GUILESS_MAIN(tst_QImage)
#include "tst_qimage.moc" #include "tst_qimage.moc"

View File

@ -733,7 +733,10 @@ public:
int done = clients; int done = clients;
while (done > 0) { while (done > 0) {
bool timedOut = true; bool timedOut = true;
QVERIFY(server.waitForNewConnection(7000, &timedOut)); QVERIFY2(server.waitForNewConnection(7000, &timedOut),
(QByteArrayLiteral("done=") + QByteArray::number(done)
+ QByteArrayLiteral(", timedOut=")
+ (timedOut ? "true" : "false")).constData());
QVERIFY(!timedOut); QVERIFY(!timedOut);
QLocalSocket *serverSocket = server.nextPendingConnection(); QLocalSocket *serverSocket = server.nextPendingConnection();
QVERIFY(serverSocket); QVERIFY(serverSocket);

View File

@ -4562,8 +4562,18 @@ void tst_QWidget::setWindowGeometry_data()
QList<int> windowFlags; QList<int> windowFlags;
windowFlags << 0 << Qt::FramelessWindowHint; windowFlags << 0 << Qt::FramelessWindowHint;
const bool skipEmptyRects = (m_platform == QStringLiteral("windows"));
foreach (QList<QRect> l, rects) { foreach (QList<QRect> l, rects) {
QRect rect = l.first(); QRect rect = l.first();
if (skipEmptyRects) {
QList<QRect>::iterator it = l.begin();
while (it != l.end()) {
if (it->isEmpty())
it = l.erase(it);
else
++it;
}
}
foreach (int windowFlag, windowFlags) { foreach (int windowFlag, windowFlags) {
QTest::newRow(QString("%1,%2 %3x%4, flags %5") QTest::newRow(QString("%1,%2 %3x%4, flags %5")
.arg(rect.x()) .arg(rect.x())
@ -4612,8 +4622,13 @@ void tst_QWidget::setWindowGeometry()
widget.setGeometry(rect); widget.setGeometry(rect);
widget.showNormal(); widget.showNormal();
if (rect.isValid()) if (rect.isValid()) {
QVERIFY(QTest::qWaitForWindowExposed(&widget)); QVERIFY(QTest::qWaitForWindowExposed(&widget));
} else {
// in case of an invalid rect, wait for the geometry to become
// adjusted to the actual (valid) value.
QApplication::processEvents();
}
QTRY_COMPARE(widget.geometry(), rect); QTRY_COMPARE(widget.geometry(), rect);
// setGeometry() while shown // setGeometry() while shown

View File

@ -1,11 +1,20 @@
QT += core gui QT += core gui
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets printsupport
greaterThan(QT_MAJOR_VERSION, 4) {
QT += widgets
qtHaveModule(printsupport): QT += printsupport
}
TARGET = dialogs TARGET = dialogs
TEMPLATE = app TEMPLATE = app
SOURCES += main.cpp filedialogpanel.cpp colordialogpanel.cpp fontdialogpanel.cpp \ SOURCES += main.cpp filedialogpanel.cpp colordialogpanel.cpp fontdialogpanel.cpp \
wizardpanel.cpp messageboxpanel.cpp printdialogpanel.cpp utils.cpp wizardpanel.cpp messageboxpanel.cpp utils.cpp
HEADERS += filedialogpanel.h colordialogpanel.h fontdialogpanel.h \ HEADERS += filedialogpanel.h colordialogpanel.h fontdialogpanel.h \
wizardpanel.h messageboxpanel.h printdialogpanel.h utils.h wizardpanel.h messageboxpanel.h utils.h
FORMS += printdialogpanel.ui
!contains(DEFINES, QT_NO_PRINTER) {
SOURCES += printdialogpanel.cpp
HEADERS += printdialogpanel.h
FORMS += printdialogpanel.ui
}