Merge remote-tracking branch 'origin/5.6' into dev
Conflicts: src/corelib/kernel/qcoreapplication.cpp src/corelib/kernel/qeventdispatcher_blackberry.cpp src/network/bearer/qnetworkconfiguration.cpp src/plugins/bearer/blackberry/qbbengine.cpp src/plugins/platforms/android/androidjnimain.cpp src/plugins/platforms/android/qandroidplatformtheme.cpp src/plugins/platforms/qnx/qqnxbpseventfilter.cpp src/plugins/platforms/qnx/qqnxfiledialoghelper_bb10.cpp src/plugins/platforms/qnx/qqnxinputcontext_imf.cpp src/plugins/platforms/qnx/qqnxintegration.cpp src/plugins/platforms/qnx/qqnxnavigatorbps.cpp src/plugins/platforms/qnx/qqnxvirtualkeyboardbps.cpp src/plugins/platforms/qnx/qqnxwindow.cpp src/widgets/kernel/qwidgetwindow.cpp src/widgets/styles/qwindowsvistastyle.cpp src/widgets/styles/qwindowsxpstyle.cpp src/widgets/widgets/qtoolbararealayout.cpp tests/auto/corelib/global/qflags/qflags.pro tests/auto/corelib/itemmodels/qitemmodel/modelstotest.cpp tests/auto/corelib/tools/qversionnumber/qversionnumber.pro tests/auto/widgets/dialogs/qfilesystemmodel/tst_qfilesystemmodel.cpp Change-Id: I37be88c6c185bb85404823353e027a0a6acdbce4
This commit is contained in:
commit
72f5867f14
184
bin/syncqt.pl
184
bin/syncqt.pl
@ -81,6 +81,8 @@ our @qpa_headers = ();
|
||||
|
||||
# will be derived from sync.profile
|
||||
our %reverse_classnames = ();
|
||||
my %ignore_for_include_check = ();
|
||||
my %ignore_for_qt_begin_namespace_check = ();
|
||||
|
||||
# global variables (modified by options)
|
||||
my $isunix = 0;
|
||||
@ -319,6 +321,75 @@ sub classNames {
|
||||
return @ret;
|
||||
}
|
||||
|
||||
sub check_header {
|
||||
my ($lib, $header, $iheader, $public_header, $private_header) = @_;
|
||||
my $header_skip_qt_begin_namespace_test = 0;
|
||||
|
||||
if ($public_header) {
|
||||
return if ($ignore_for_include_check{$header});
|
||||
$header_skip_qt_begin_namespace_test = 1 if ($ignore_for_qt_begin_namespace_check{$header});
|
||||
}
|
||||
|
||||
open(F, "<$iheader") or return;
|
||||
my $qt_begin_namespace_found = 0;
|
||||
my $qt_end_namespace_found = 0;
|
||||
my $qt_namespace_suffix = "";
|
||||
my $line;
|
||||
my $stop_processing = 0;
|
||||
my $we_mean_it = 0;
|
||||
while ($line = <F>) {
|
||||
chomp $line;
|
||||
my $output_line = 1;
|
||||
if ($line =~ /^ *\# *pragma (qt_no_included_check|qt_sync_stop_processing)/) {
|
||||
$stop_processing = 1;
|
||||
last;
|
||||
}
|
||||
if ($line =~ /^ *\# *include/) {
|
||||
my $include = $line;
|
||||
if ($line =~ /<.*>/) {
|
||||
$include =~ s,.*<(.*)>.*,$1,;
|
||||
} elsif ($line =~ /".*"/) {
|
||||
$include =~ s,.*"(.*)".*,$1,;
|
||||
} else {
|
||||
$include = 0;
|
||||
}
|
||||
if ($include && $public_header) {
|
||||
print STDERR "$lib: ERROR: $iheader includes private header $include\n" if ($include =~ /_p.h$/);
|
||||
for my $trylib (keys(%modules)) {
|
||||
if (-e "$out_basedir/include/$trylib/$include") {
|
||||
print "$lib: WARNING: $iheader includes $include when it should include $trylib/$include\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
} elsif (!$private_header) {
|
||||
if ($header_skip_qt_begin_namespace_test == 0 and $line =~ /^QT_BEGIN_NAMESPACE(_[A-Z_]+)?\s*$/) {
|
||||
$qt_namespace_suffix = defined($1) ? $1 : "";
|
||||
$qt_begin_namespace_found = 1;
|
||||
} elsif ($header_skip_qt_begin_namespace_test == 0 and $line =~ /^QT_END_NAMESPACE$qt_namespace_suffix\s*$/) {
|
||||
$qt_end_namespace_found = 1;
|
||||
}
|
||||
} elsif ($line =~ "^// We mean it.") {
|
||||
++$we_mean_it;
|
||||
}
|
||||
}
|
||||
|
||||
if ($public_header) {
|
||||
if ($header_skip_qt_begin_namespace_test == 0 and $stop_processing == 0) {
|
||||
if ($qt_begin_namespace_found == 0) {
|
||||
print "$lib: WARNING: $iheader does not include QT_BEGIN_NAMESPACE\n";
|
||||
}
|
||||
|
||||
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";
|
||||
}
|
||||
}
|
||||
} elsif ($private_header) {
|
||||
print "$lib: WARNING: $iheader does not have the \"We mean it.\" warning\n" if (!$we_mean_it);
|
||||
}
|
||||
|
||||
close(F);
|
||||
}
|
||||
|
||||
sub make_path {
|
||||
my ($dir, $lib, $be_verbose) = @_;
|
||||
unless(-e $dir) {
|
||||
@ -801,6 +872,8 @@ loadSyncProfile(\$basedir, \$out_basedir);
|
||||
@modules_to_sync = keys(%modules) if($#modules_to_sync == -1);
|
||||
|
||||
my %allmoduleheadersprivate = map { $_ => 1 } @allmoduleheadersprivate;
|
||||
%ignore_for_include_check = map { $_ => 1 } @ignore_for_include_check;
|
||||
%ignore_for_qt_begin_namespace_check = map { $_ => 1 } @ignore_for_qt_begin_namespace_check;
|
||||
|
||||
$isunix = checkUnix; #cache checkUnix
|
||||
|
||||
@ -931,6 +1004,12 @@ foreach my $lib (@modules_to_sync) {
|
||||
my $clean_header;
|
||||
my $iheader = $subdir . "/" . $header;
|
||||
$iheader =~ s/^\Q$basedir\E/$out_basedir/ if ($shadow);
|
||||
if ($check_includes) {
|
||||
# We need both $public_header and $private_header because QPA headers count as neither
|
||||
my $private_header = !$public_header && !$qpa_header
|
||||
&& $header =~ /_p\.h$/ && $subdir !~ /3rdparty/;
|
||||
check_header($lib, $header, $iheader, $public_header, $private_header);
|
||||
}
|
||||
my @classes = $public_header && (!$minimal && $is_qt) ? classNames($iheader, \$clean_header) : ();
|
||||
if($showonly) {
|
||||
print "$header [$lib]\n";
|
||||
@ -1128,109 +1207,4 @@ foreach my $lib (@modules_to_sync) {
|
||||
}
|
||||
}
|
||||
|
||||
if($check_includes) {
|
||||
foreach my $lib (@modules_to_sync) {
|
||||
next if ($modules{$lib} =~ /^!/);
|
||||
#calc subdirs
|
||||
my @subdirs = listSubdirs(map { s/^\^//; $_ } split(/;/, $modules{$lib}));
|
||||
|
||||
foreach my $subdir (@subdirs) {
|
||||
my @headers = findFiles($subdir, "^[-a-z0-9_]*\\.h\$" , 0);
|
||||
foreach my $header (@headers) {
|
||||
my $header_skip_qt_begin_namespace_test = 0;
|
||||
$header = 0 if($header =~ /^ui_.*.h/);
|
||||
$header = 0 if ($header eq lc($lib)."version.h");
|
||||
foreach (@ignore_headers) {
|
||||
$header = 0 if($header eq $_);
|
||||
}
|
||||
if($header) {
|
||||
# We need both $public_header and $private_header because QPA headers count as neither
|
||||
my $public_header = $header;
|
||||
my $private_header = 0;
|
||||
if($public_header =~ /_p.h$/ || $public_header =~ /_pch.h$/) {
|
||||
$public_header = 0;
|
||||
$private_header = $header =~ /_p.h$/ && $subdir !~ /3rdparty/
|
||||
} elsif (isQpaHeader($public_header)) {
|
||||
$public_header = 0;
|
||||
} else {
|
||||
foreach (@ignore_for_master_contents) {
|
||||
$public_header = 0 if($header eq $_);
|
||||
}
|
||||
if($public_header) {
|
||||
foreach (@ignore_for_include_check) {
|
||||
$public_header = 0 if($header eq $_);
|
||||
}
|
||||
foreach(@ignore_for_qt_begin_namespace_check) {
|
||||
$header_skip_qt_begin_namespace_test = 1 if ($header eq $_);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
my $iheader = $subdir . "/" . $header;
|
||||
if (open(F, "<$iheader")) {
|
||||
my $qt_begin_namespace_found = 0;
|
||||
my $qt_end_namespace_found = 0;
|
||||
my $qt_namespace_suffix = "";
|
||||
my $line;
|
||||
my $stop_processing = 0;
|
||||
my $we_mean_it = 0;
|
||||
while ($line = <F>) {
|
||||
chomp $line;
|
||||
my $output_line = 1;
|
||||
if ($line =~ /^ *\# *pragma (qt_no_included_check|qt_sync_stop_processing)/) {
|
||||
$stop_processing = 1;
|
||||
last;
|
||||
} elsif ($line =~ /^ *\# *include/) {
|
||||
my $include = $line;
|
||||
if ($line =~ /<.*>/) {
|
||||
$include =~ s,.*<(.*)>.*,$1,;
|
||||
} elsif ($line =~ /".*"/) {
|
||||
$include =~ s,.*"(.*)".*,$1,;
|
||||
} else {
|
||||
$include = 0;
|
||||
}
|
||||
if ($include) {
|
||||
if ($public_header) {
|
||||
print STDERR "$lib: ERROR: $iheader includes private header $include\n" if ($include =~ /_p.h$/);
|
||||
for my $trylib (keys(%modules)) {
|
||||
if(-e "$out_basedir/include/$trylib/$include") {
|
||||
print "$lib: WARNING: $iheader includes $include when it should include $trylib/$include\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
} elsif (!$private_header) {
|
||||
if ($header_skip_qt_begin_namespace_test == 0 and $line =~ /^QT_BEGIN_NAMESPACE(_[A-Z_]+)?\s*$/) {
|
||||
$qt_namespace_suffix = defined($1) ? $1 : "";
|
||||
$qt_begin_namespace_found = 1;
|
||||
} elsif ($header_skip_qt_begin_namespace_test == 0 and $line =~ /^QT_END_NAMESPACE$qt_namespace_suffix\s*$/) {
|
||||
$qt_end_namespace_found = 1;
|
||||
}
|
||||
} elsif ($line =~ "^// We mean it.") {
|
||||
++$we_mean_it;
|
||||
}
|
||||
}
|
||||
|
||||
if ($public_header) {
|
||||
if ($header_skip_qt_begin_namespace_test == 0 and $stop_processing == 0) {
|
||||
if ($qt_begin_namespace_found == 0) {
|
||||
print "$lib: WARNING: $iheader does not include QT_BEGIN_NAMESPACE\n";
|
||||
}
|
||||
|
||||
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";
|
||||
}
|
||||
}
|
||||
} elsif ($private_header) {
|
||||
print "$lib: WARNING: $iheader does not have the \"We mean it.\" warning\n" if (!$we_mean_it);
|
||||
}
|
||||
|
||||
close(F);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
exit 0;
|
||||
|
@ -43,16 +43,21 @@ manifestmeta.highlighted.names = "QtQuick/Qt Quick Demo - Same Game" \
|
||||
"QtQuick/Qt Quick Demo - Clocks" \
|
||||
"QtQuick/Qt Quick Examples - Shader Effects" \
|
||||
"QtQuickExtras/Qt Quick Extras - Dashboard" \
|
||||
"QtQuickExtras/Qt Quick Extras - Flat" \
|
||||
"QtQuickExtras/Qt Quick Extras - Gallery" \
|
||||
"QtQuickControls/Qt Quick Controls - Gallery" \
|
||||
"QtQuickControls/Qt Quick Controls - Text Editor Example" \
|
||||
"QtQuickControls/Qt Quick Controls - Table View Example" \
|
||||
"QtQuickControls/Qt Quick Controls - Calendar Example" \
|
||||
"QtQuickControls/Qt Quick Controls - File System Browser Example" \
|
||||
"QtQuickDialogs/Qt Quick System Dialog Examples" \
|
||||
"QtWinExtras/Quick Player" \
|
||||
"QtMultimedia/QML Video Shader Effects Example" \
|
||||
"QtCanvas3D/Planets Example" \
|
||||
"QtLocation/Map Viewer (QML)"
|
||||
"QtCanvas3D/Interactive Mobile Phone Example" \
|
||||
"QtLocation/Map Viewer (QML)" \
|
||||
"QtWebEngine/WebEngine Quick Nano Browser" \
|
||||
"QtWebEngine/Markdown Editor Example"
|
||||
|
||||
manifestmeta.highlighted.attributes = isHighlighted:true
|
||||
|
||||
|
@ -39,6 +39,7 @@ Cpp.ignoretokens += \
|
||||
Q_DECL_UNUSED \
|
||||
Q_DECL_CF_RETURNS_RETAINED \
|
||||
Q_DECL_NS_RETURNS_AUTORELEASED \
|
||||
Q_DECL_EQ_DEFAULT \
|
||||
Q_DECLARATIVE_EXPORT \
|
||||
Q_EXPLICIT \
|
||||
Q_EXPORT \
|
||||
@ -78,6 +79,7 @@ Cpp.ignoretokens += \
|
||||
Q_REQUIRED_RESULT \
|
||||
Q_SCRIPT_EXPORT \
|
||||
Q_SCRIPTTOOLS_EXPORT \
|
||||
Q_SERIALBUS_EXPORT \
|
||||
Q_SQL_EXPORT \
|
||||
Q_SVG_EXPORT \
|
||||
Q_TESTLIB_EXPORT \
|
||||
|
@ -515,15 +515,26 @@ li {
|
||||
margin-bottom: 10px;
|
||||
padding-left: 8px;
|
||||
list-style: outside;
|
||||
list-style-type: square;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
ul > li {
|
||||
list-style-type: square;
|
||||
}
|
||||
|
||||
ol {
|
||||
margin: 10px;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
ol.A > li {
|
||||
list-style-type: upper-alpha;
|
||||
}
|
||||
|
||||
ol.a > li{
|
||||
list-style-type: lower-alpha;
|
||||
}
|
||||
|
||||
ol > li {
|
||||
margin-left: 30px;
|
||||
padding-left: 8px;
|
||||
|
@ -975,9 +975,23 @@ ol,ul {
|
||||
margin-top:0.75em;
|
||||
margin-left:20px
|
||||
}
|
||||
.mainContent ol>li {
|
||||
list-style-type:decimal
|
||||
|
||||
.context ol > li {
|
||||
margin-left: 20px
|
||||
}
|
||||
|
||||
.mainContent ol>li {
|
||||
list-style-type: decimal;
|
||||
}
|
||||
|
||||
.mainContent ol.a >li {
|
||||
list-style-type: lower-alpha;
|
||||
}
|
||||
|
||||
.mainContent ol.A >li {
|
||||
list-style-type: upper-alpha;
|
||||
}
|
||||
|
||||
blockquote,q {
|
||||
quotes:none
|
||||
}
|
||||
|
@ -87,7 +87,7 @@
|
||||
|
||||
\snippet fortuneserver/server.cpp 7
|
||||
|
||||
We then call QTcpServer::newPendingConnection(), which returns the
|
||||
We then call QTcpServer::nextPendingConnection(), which returns the
|
||||
QTcpSocket representing the server side of the connection. By connecting
|
||||
QTcpSocket::disconnected() to QObject::deleteLater(), we ensure that the
|
||||
socket will be deleted after disconnecting.
|
||||
|
9
mkspecs/common/angle.conf
Normal file
9
mkspecs/common/angle.conf
Normal file
@ -0,0 +1,9 @@
|
||||
# Renaming these files requires that the LIBRARY entry of their corresponding
|
||||
# def files are also updated to reflect the name.
|
||||
# The .def files are found in the angle directories:
|
||||
#
|
||||
# qtbase\src\3rdparty\angle\src\libEGL\libEGL[d?].def
|
||||
# qtbase\src\3rdparty\angle\src\libEGL\libGLESv2[d?].def
|
||||
|
||||
LIBEGL_NAME="libEGL"
|
||||
LIBGLESV2_NAME="libGLESv2"
|
56
mkspecs/common/msvc-base.conf
Normal file
56
mkspecs/common/msvc-base.conf
Normal file
@ -0,0 +1,56 @@
|
||||
#
|
||||
# qmake configuration for Microsoft Visual Studio C/C++ Compiler
|
||||
# This mkspec is used for all win32-msvcXXXX, winrt-XXX-msvcXXX
|
||||
# and winphone-XXX-msvcXXX specs
|
||||
#
|
||||
|
||||
#
|
||||
# Version-specific changes
|
||||
#
|
||||
|
||||
greaterThan(MSC_VER, 1499) {
|
||||
# Visual Studio 2008 (9.0) / Visual C++ 15.0 and up
|
||||
QMAKE_CFLAGS_MP = -MP
|
||||
QMAKE_CXXFLAGS_MP = $$QMAKE_CFLAGS_MP
|
||||
}
|
||||
|
||||
greaterThan(MSC_VER, 1599) {
|
||||
# Visual Studio 2010 (10.0) / Visual C++ 16.0 and up
|
||||
MAKEFILE_GENERATOR = MSBUILD
|
||||
|
||||
QMAKE_CFLAGS_AVX = -arch:AVX
|
||||
QMAKE_CFLAGS_AVX2 = -arch:AVX
|
||||
|
||||
VCPROJ_EXTENSION = .vcxproj
|
||||
}
|
||||
|
||||
greaterThan(MSC_VER, 1699) {
|
||||
# Visual Studio 2012 (11.0) / Visual C++ 17.0 and up
|
||||
QMAKE_CXXFLAGS_EXCEPTIONS_OFF = -D_HAS_EXCEPTIONS=0
|
||||
QMAKE_LFLAGS_CONSOLE = /SUBSYSTEM:CONSOLE@QMAKE_SUBSYSTEM_SUFFIX@
|
||||
QMAKE_LFLAGS_WINDOWS = /SUBSYSTEM:WINDOWS@QMAKE_SUBSYSTEM_SUFFIX@
|
||||
QT_CONFIG += c++11
|
||||
CONFIG += c++11
|
||||
}
|
||||
|
||||
greaterThan(MSC_VER, 1799) {
|
||||
# Visual Studio 2013 (12.0) / Visual C++ 18.0 and up
|
||||
QMAKE_CFLAGS += -FS
|
||||
QMAKE_CXXFLAGS += -FS
|
||||
|
||||
equals(MSC_VER, 1800) {
|
||||
QMAKE_CFLAGS_RELEASE += -Zc:strictStrings
|
||||
QMAKE_CFLAGS_RELEASE_WITH_DEBUGINFO += -Zc:strictStrings
|
||||
QMAKE_CXXFLAGS_RELEASE += -Zc:strictStrings
|
||||
QMAKE_CXXFLAGS_RELEASE_WITH_DEBUGINFO += -Zc:strictStrings
|
||||
}
|
||||
}
|
||||
|
||||
greaterThan(MSC_VER, 1899) {
|
||||
# Visual Studio 2015 (14.0) / Visual C++ 19.0 and up
|
||||
QMAKE_CFLAGS += -Zc:strictStrings
|
||||
QMAKE_CFLAGS_WARN_ON += -w44456 -w44457 -w44458
|
||||
QMAKE_CFLAGS_AVX2 = -arch:AVX2
|
||||
QMAKE_CXXFLAGS += -Zc:strictStrings -Zc:throwingNew
|
||||
QMAKE_CXXFLAGS_WARN_ON += -w44456 -w44457 -w44458 -wd4577
|
||||
}
|
@ -9,6 +9,8 @@ isEmpty(MSC_VER)|isEmpty(MSVC_VER): error("Source mkspec must set both MSC_VER a
|
||||
# Baseline: Visual Studio 2005 (8.0), VC++ 14.0
|
||||
#
|
||||
|
||||
include(angle.conf)
|
||||
|
||||
MAKEFILE_GENERATOR = MSVC.NET
|
||||
QMAKE_PLATFORM = win32
|
||||
QMAKE_COMPILER = msvc
|
||||
@ -83,8 +85,8 @@ QMAKE_LIBS_CORE = kernel32.lib user32.lib shell32.lib uuid.lib ole32.lib
|
||||
QMAKE_LIBS_GUI = gdi32.lib comdlg32.lib oleaut32.lib imm32.lib winmm.lib ws2_32.lib ole32.lib user32.lib advapi32.lib
|
||||
QMAKE_LIBS_NETWORK = ws2_32.lib
|
||||
QMAKE_LIBS_OPENGL = glu32.lib opengl32.lib gdi32.lib user32.lib
|
||||
QMAKE_LIBS_OPENGL_ES2 = libEGL.lib libGLESv2.lib gdi32.lib user32.lib
|
||||
QMAKE_LIBS_OPENGL_ES2_DEBUG = libEGLd.lib libGLESv2d.lib gdi32.lib user32.lib
|
||||
QMAKE_LIBS_OPENGL_ES2 = $${LIBEGL_NAME}.lib $${LIBGLESV2_NAME}.lib gdi32.lib user32.lib
|
||||
QMAKE_LIBS_OPENGL_ES2_DEBUG = $${LIBEGL_NAME}d.lib $${LIBGLESV2_NAME}d.lib gdi32.lib user32.lib
|
||||
QMAKE_LIBS_COMPAT = advapi32.lib shell32.lib comdlg32.lib user32.lib gdi32.lib ws2_32.lib
|
||||
|
||||
QMAKE_LIBS_QT_ENTRY = -lqtmain
|
||||
@ -97,54 +99,6 @@ VCPROJ_EXTENSION = .vcproj
|
||||
VCSOLUTION_EXTENSION = .sln
|
||||
VCPROJ_KEYWORD = Qt4VSv1.0
|
||||
|
||||
#
|
||||
# Version-specific changes
|
||||
#
|
||||
greaterThan(MSC_VER, 1499) {
|
||||
# Visual Studio 2008 (9.0) / Visual C++ 15.0 and up
|
||||
QMAKE_CFLAGS_MP = -MP
|
||||
QMAKE_CXXFLAGS_MP = $$QMAKE_CFLAGS_MP
|
||||
}
|
||||
|
||||
greaterThan(MSC_VER, 1599) {
|
||||
# Visual Studio 2010 (10.0) / Visual C++ 16.0 and up
|
||||
MAKEFILE_GENERATOR = MSBUILD
|
||||
|
||||
QMAKE_CFLAGS_AVX = -arch:AVX
|
||||
QMAKE_CFLAGS_AVX2 = -arch:AVX
|
||||
|
||||
VCPROJ_EXTENSION = .vcxproj
|
||||
}
|
||||
|
||||
greaterThan(MSC_VER, 1699) {
|
||||
# Visual Studio 2012 (11.0) / Visual C++ 17.0 and up
|
||||
QMAKE_CXXFLAGS_EXCEPTIONS_OFF = -D_HAS_EXCEPTIONS=0
|
||||
QMAKE_LFLAGS_CONSOLE = /SUBSYSTEM:CONSOLE@QMAKE_SUBSYSTEM_SUFFIX@
|
||||
QMAKE_LFLAGS_WINDOWS = /SUBSYSTEM:WINDOWS@QMAKE_SUBSYSTEM_SUFFIX@
|
||||
QT_CONFIG += c++11
|
||||
CONFIG += c++11
|
||||
}
|
||||
|
||||
greaterThan(MSC_VER, 1799) {
|
||||
# Visual Studio 2013 (12.0) / Visual C++ 18.0 and up
|
||||
QMAKE_CFLAGS += -FS
|
||||
QMAKE_CXXFLAGS += -FS
|
||||
|
||||
equals(MSC_VER, 1800) {
|
||||
QMAKE_CFLAGS_RELEASE += -Zc:strictStrings
|
||||
QMAKE_CFLAGS_RELEASE_WITH_DEBUGINFO += -Zc:strictStrings
|
||||
QMAKE_CXXFLAGS_RELEASE += -Zc:strictStrings
|
||||
QMAKE_CXXFLAGS_RELEASE_WITH_DEBUGINFO += -Zc:strictStrings
|
||||
}
|
||||
}
|
||||
|
||||
greaterThan(MSC_VER, 1899) {
|
||||
# Visual Studio 2015 (14.0) / Visual C++ 19.0 and up
|
||||
QMAKE_CFLAGS += -Zc:strictStrings
|
||||
QMAKE_CFLAGS_WARN_ON += -w44456 -w44457 -w44458
|
||||
QMAKE_CFLAGS_AVX2 = -arch:AVX2
|
||||
QMAKE_CXXFLAGS += -Zc:strictStrings -Zc:throwingNew
|
||||
QMAKE_CXXFLAGS_WARN_ON += -w44456 -w44457 -w44458 -wd4577
|
||||
}
|
||||
include(msvc-base.conf)
|
||||
|
||||
unset(MSC_VER)
|
||||
|
@ -2,6 +2,8 @@
|
||||
# qmake configuration for common Windows CE
|
||||
#
|
||||
|
||||
include(../angle.conf)
|
||||
|
||||
MAKEFILE_GENERATOR = MSVC.NET
|
||||
QMAKE_PLATFORM += wince win32
|
||||
CONFIG += incremental flat precompile_header autogen_precompile_source debug_and_release debug_and_release_target
|
||||
@ -67,8 +69,8 @@ QMAKE_EXTENSION_SHLIB = dll
|
||||
QMAKE_PREFIX_STATICLIB =
|
||||
QMAKE_EXTENSION_STATICLIB = lib
|
||||
|
||||
QMAKE_LIBS_EGL = libEGL.lib
|
||||
QMAKE_LIBS_OPENGL_ES2 = libGLESv2.lib
|
||||
QMAKE_LIBS_EGL = $${LIBEGL_NAME}.lib
|
||||
QMAKE_LIBS_OPENGL_ES2 = $${LIBGLESV2_NAME}.lib
|
||||
|
||||
QMAKE_LIBS_QT_ENTRY = -lqtmain
|
||||
|
||||
|
@ -4,6 +4,8 @@
|
||||
# Written for Microsoft Visual C++
|
||||
#
|
||||
|
||||
include(../angle.conf)
|
||||
|
||||
MAKEFILE_GENERATOR = MSBUILD
|
||||
QMAKE_COMPILER = msvc
|
||||
QMAKE_PLATFORM = winrt win32
|
||||
@ -79,8 +81,8 @@ QMAKE_LIBS += runtimeobject.lib
|
||||
QMAKE_LIBS_CORE =
|
||||
QMAKE_LIBS_GUI =
|
||||
QMAKE_LIBS_NETWORK =
|
||||
QMAKE_LIBS_OPENGL_ES2 = libEGL.lib libGLESv2.lib
|
||||
QMAKE_LIBS_OPENGL_ES2_DEBUG = libEGLd.lib libGLESv2d.lib
|
||||
QMAKE_LIBS_OPENGL_ES2 = $${LIBEGL_NAME}.lib $${LIBGLESV2_NAME}.lib
|
||||
QMAKE_LIBS_OPENGL_ES2_DEBUG = $${LIBEGL_NAME}d.lib $${LIBGLESV2_NAME}d.lib
|
||||
|
||||
QMAKE_LIBS_QT_ENTRY = -lqtmain
|
||||
|
||||
@ -92,4 +94,9 @@ VCPROJ_EXTENSION = .vcxproj
|
||||
VCSOLUTION_EXTENSION = .sln
|
||||
VCPROJ_KEYWORD = Qt4VSv1.0
|
||||
WINRT_ASSETS_PATH = $$PWD/assets
|
||||
|
||||
include(../msvc-base.conf)
|
||||
|
||||
unset(MSC_VER)
|
||||
|
||||
load(qt_config)
|
||||
|
@ -20,10 +20,9 @@ isEmpty(MODULE_QMAKE_OUTDIR): MODULE_QMAKE_OUTDIR = $$MODULE_BASE_OUTDIR
|
||||
exists($$MODULE_BASE_INDIR/.git): \
|
||||
CONFIG += git_build
|
||||
|
||||
!prefix_build {
|
||||
QTDIR = $$[QT_HOST_PREFIX]
|
||||
# Permit modules to enforce being built outside QTDIR ...
|
||||
!force_independent: MODULE_BASE_OUTDIR = $$QTDIR
|
||||
# ... though this sort of breaks the idea.
|
||||
MODULE_QMAKE_OUTDIR = $$QTDIR
|
||||
!force_independent {
|
||||
# If the module is not built independently, everything ends up in qtbase.
|
||||
# This is the case in non-prefix builds, except for selected modules.
|
||||
MODULE_BASE_OUTDIR = $$[QT_HOST_PREFIX]
|
||||
MODULE_QMAKE_OUTDIR = $$[QT_HOST_PREFIX]
|
||||
}
|
||||
|
@ -93,7 +93,7 @@ INCLUDEPATH *= $$eval(QT.$${MODULE}.includes) $$eval(QT.$${MODULE}_private.inclu
|
||||
contains(QT_CONFIG, build_all):CONFIG += build_all
|
||||
}
|
||||
|
||||
linux*:QMAKE_LFLAGS += $$QMAKE_LFLAGS_NOUNDEF
|
||||
QMAKE_LFLAGS += $$QMAKE_LFLAGS_NOUNDEF
|
||||
|
||||
QT += $$QT_FOR_PRIVATE
|
||||
unset(QT_FOR_PRIVATE)
|
||||
|
@ -8,6 +8,7 @@
|
||||
#
|
||||
|
||||
load(device_config)
|
||||
include(../common/angle.conf)
|
||||
|
||||
MAKEFILE_GENERATOR = MINGW
|
||||
QMAKE_PLATFORM = win32 mingw
|
||||
@ -98,8 +99,8 @@ QMAKE_LIBS_CORE = -lole32 -luuid -lws2_32 -ladvapi32 -lshell32 -luser32
|
||||
QMAKE_LIBS_GUI = -lgdi32 -lcomdlg32 -loleaut32 -limm32 -lwinmm -lws2_32 -lole32 -luuid -luser32 -ladvapi32
|
||||
QMAKE_LIBS_NETWORK = -lws2_32
|
||||
QMAKE_LIBS_OPENGL = -lglu32 -lopengl32 -lgdi32 -luser32
|
||||
QMAKE_LIBS_OPENGL_ES2 = -llibEGL -llibGLESv2 -lgdi32 -luser32
|
||||
QMAKE_LIBS_OPENGL_ES2_DEBUG = -llibEGLd -llibGLESv2d -lgdi32 -luser32
|
||||
QMAKE_LIBS_OPENGL_ES2 = -l$${LIBEGL_NAME} -l$${LIBGLESV2_NAME} -lgdi32 -luser32
|
||||
QMAKE_LIBS_OPENGL_ES2_DEBUG = -l$${LIBEGL_NAME}d -l$${LIBGLESV2_NAME}d -lgdi32 -luser32
|
||||
QMAKE_LIBS_COMPAT = -ladvapi32 -lshell32 -lcomdlg32 -luser32 -lgdi32 -lws2_32
|
||||
QMAKE_LIBS_QT_ENTRY = -lmingw32 -lqtmain
|
||||
|
||||
|
@ -21,7 +21,7 @@ QMAKE_LIBS_NETWORK = ws2.lib $$QMAKE_LIBS_GUI
|
||||
QMAKE_LIBS_OPENGL =
|
||||
QMAKE_LIBS_COMPAT =
|
||||
QMAKE_LIBS_OPENVG = libopenvg.lib
|
||||
QMAKE_LIBS_OPENGL_ES2 = libEGL.lib libGLESv2.lib
|
||||
QMAKE_LIBS_OPENGL_ES2 = $${LIBEGL_NAME}.lib $${LIBGLESV2_NAME}.lib
|
||||
|
||||
QMAKE_RC = rc
|
||||
|
||||
|
@ -36,7 +36,7 @@ QMAKE_LIBS_NETWORK = ws2.lib $$QMAKE_LIBS_GUI
|
||||
QMAKE_LIBS_OPENGL =
|
||||
QMAKE_LIBS_COMPAT =
|
||||
QMAKE_LIBS_OPENVG =
|
||||
QMAKE_LIBS_OPENGL_ES2 = libEGL.lib libGLESv2.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
|
||||
QMAKE_LIBDIR_EGL = $$(NV_WINCE_T2_PLAT)/lib/Test
|
||||
|
@ -4,6 +4,7 @@
|
||||
# Written for Microsoft Visual C++ 2015
|
||||
#
|
||||
|
||||
MSC_VER = 1900
|
||||
include(../common/winrt_winphone/qmake.conf)
|
||||
QMAKE_COMPILER_DEFINES += _MSC_VER=1900
|
||||
DEFINES += WINAPI_FAMILY=WINAPI_FAMILY_PC_APP WINAPI_PARTITION_PHONE_APP=1 ARM __ARM__ __arm__
|
||||
|
@ -4,6 +4,7 @@
|
||||
# Written for Microsoft Visual C++ 2015
|
||||
#
|
||||
|
||||
MSC_VER = 1900
|
||||
include(../common/winrt_winphone/qmake.conf)
|
||||
QMAKE_COMPILER_DEFINES += _MSC_VER=1900 _WIN32
|
||||
DEFINES += WINAPI_FAMILY=WINAPI_FAMILY_PC_APP WINAPI_PARTITION_PHONE_APP=1 X64 __X64__ __x64__
|
||||
|
@ -4,6 +4,7 @@
|
||||
# Written for Microsoft Visual C++ 2015
|
||||
#
|
||||
|
||||
MSC_VER = 1900
|
||||
include(../common/winrt_winphone/qmake.conf)
|
||||
QMAKE_COMPILER_DEFINES += _MSC_VER=1900 _WIN32
|
||||
DEFINES += WINAPI_FAMILY=WINAPI_FAMILY_PC_APP WINAPI_PARTITION_PHONE_APP=1 X86 __X86__ __x86__
|
||||
|
@ -532,31 +532,13 @@ ProStringList VcprojGenerator::collectDependencies(QMakeProject *proj, QHash<QSt
|
||||
|
||||
// We assume project filename is [QMAKE_PROJECT_NAME].vcproj
|
||||
QString vcproj = tmp_vcproj.project->first("QMAKE_PROJECT_NAME") + project->first("VCPROJ_EXTENSION");
|
||||
QString vcprojDir = qmake_getpwd();
|
||||
QString vcprojDir = Option::output_dir;
|
||||
|
||||
// If file doesn't exsist, then maybe the users configuration
|
||||
// doesn't allow it to be created. Skip to next...
|
||||
if (!exists(vcprojDir + Option::dir_sep + vcproj)) {
|
||||
// Try to find the directory which fits relative
|
||||
// to the output path, which represents the shadow
|
||||
// path in case we are shadow building
|
||||
QStringList list = fi.path().split(QLatin1Char('/'));
|
||||
QString tmpDir = QFileInfo(Option::output).path() + Option::dir_sep;
|
||||
bool found = false;
|
||||
for (int i = list.size() - 1; i >= 0; --i) {
|
||||
QString curr;
|
||||
for (int j = i; j < list.size(); ++j)
|
||||
curr += list.at(j) + Option::dir_sep;
|
||||
if (exists(tmpDir + curr + vcproj)) {
|
||||
vcprojDir = QDir::cleanPath(tmpDir + curr);
|
||||
found = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!found) {
|
||||
warn_msg(WarnLogic, "Ignored (not found) '%s'", QString(vcprojDir + Option::dir_sep + vcproj).toLatin1().constData());
|
||||
goto nextfile; // # Dirty!
|
||||
}
|
||||
warn_msg(WarnLogic, "Ignored (not found) '%s'", QString(vcprojDir + Option::dir_sep + vcproj).toLatin1().constData());
|
||||
goto nextfile; // # Dirty!
|
||||
}
|
||||
|
||||
VcsolutionDepend *newDep = new VcsolutionDepend;
|
||||
|
@ -64,7 +64,13 @@ HRESULT NativeWindow::createSwapChain(ID3D11Device* device, DXGIFactory* factory
|
||||
swapChainDesc.Windowed = TRUE;
|
||||
swapChainDesc.SwapEffect = DXGI_SWAP_EFFECT_DISCARD;
|
||||
|
||||
return factory->CreateSwapChain(device, &swapChainDesc, swapChain);
|
||||
const HRESULT result = factory->CreateSwapChain(device, &swapChainDesc, swapChain);
|
||||
if (SUCCEEDED(result))
|
||||
{
|
||||
const HRESULT makeWindowAssociationResult = factory->MakeWindowAssociation(mWindow, DXGI_MWA_NO_ALT_ENTER);
|
||||
UNUSED_TRACE_VARIABLE(makeWindowAssociationResult);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
@ -41,6 +41,7 @@ import java.util.concurrent.Semaphore;
|
||||
import android.app.Activity;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.content.pm.PackageManager;
|
||||
import android.net.Uri;
|
||||
import android.os.Handler;
|
||||
import android.os.Looper;
|
||||
@ -53,6 +54,7 @@ import android.view.Menu;
|
||||
import android.view.MotionEvent;
|
||||
import android.view.View;
|
||||
|
||||
import java.lang.reflect.Method;
|
||||
import java.security.KeyStore;
|
||||
import java.security.cert.X509Certificate;
|
||||
import java.util.Iterator;
|
||||
@ -81,6 +83,7 @@ public class QtNative
|
||||
private static int m_oldx, m_oldy;
|
||||
private static final int m_moveThreshold = 0;
|
||||
private static ClipboardManager m_clipboardManager = null;
|
||||
private static Method m_checkSelfPermissionMethod = null;
|
||||
|
||||
private static ClassLoader m_classLoader = null;
|
||||
public static ClassLoader classLoader()
|
||||
@ -393,6 +396,29 @@ public class QtNative
|
||||
}
|
||||
}
|
||||
|
||||
public static int checkSelfPermission(final String permission)
|
||||
{
|
||||
int perm = PackageManager.PERMISSION_DENIED;
|
||||
synchronized (m_mainActivityMutex) {
|
||||
if (m_activity == null)
|
||||
return perm;
|
||||
try {
|
||||
if (Build.VERSION.SDK_INT >= 23) {
|
||||
if (m_checkSelfPermissionMethod == null)
|
||||
m_checkSelfPermissionMethod = Context.class.getMethod("checkSelfPermission", String.class);
|
||||
perm = (Integer)m_checkSelfPermissionMethod.invoke(m_activity, permission);
|
||||
} else {
|
||||
final PackageManager pm = m_activity.getPackageManager();
|
||||
perm = pm.checkPermission(permission, m_activity.getPackageName());
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
return perm;
|
||||
}
|
||||
|
||||
private static void updateSelection(final int selStart,
|
||||
final int selEnd,
|
||||
final int candidatesStart,
|
||||
|
@ -0,0 +1,36 @@
|
||||
From 00f0a46199b622b05619f56e29f172fb61fe6e82 Mon Sep 17 00:00:00 2001
|
||||
From: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
|
||||
Date: Mon, 23 Nov 2015 14:00:02 +0100
|
||||
Subject: [PATCH] ANGLE/D3D11: Suppress keyboard handling of DXGI.
|
||||
|
||||
Set the DXGI_MWA_NO_ALT_ENTER to suppress the Alt-Enter shortcut
|
||||
causing the window to become full screen.
|
||||
|
||||
Task-number: QTBUG-44904
|
||||
Change-Id: Ia4156ddee37a8a3da6e9e3130022c63a674f4429
|
||||
---
|
||||
.../angle/src/libANGLE/renderer/d3d/d3d11/win32/NativeWindow.cpp | 8 +++++++-
|
||||
1 file changed, 7 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/3rdparty/angle/src/libANGLE/renderer/d3d/d3d11/win32/NativeWindow.cpp b/src/3rdparty/angle/src/libANGLE/renderer/d3d/d3d11/win32/NativeWindow.cpp
|
||||
index 0a4f45b..696dfd7 100644
|
||||
--- a/src/3rdparty/angle/src/libANGLE/renderer/d3d/d3d11/win32/NativeWindow.cpp
|
||||
+++ b/src/3rdparty/angle/src/libANGLE/renderer/d3d/d3d11/win32/NativeWindow.cpp
|
||||
@@ -64,7 +64,13 @@ HRESULT NativeWindow::createSwapChain(ID3D11Device* device, DXGIFactory* factory
|
||||
swapChainDesc.Windowed = TRUE;
|
||||
swapChainDesc.SwapEffect = DXGI_SWAP_EFFECT_DISCARD;
|
||||
|
||||
- return factory->CreateSwapChain(device, &swapChainDesc, swapChain);
|
||||
+ const HRESULT result = factory->CreateSwapChain(device, &swapChainDesc, swapChain);
|
||||
+ if (SUCCEEDED(result))
|
||||
+ {
|
||||
+ const HRESULT makeWindowAssociationResult = factory->MakeWindowAssociation(mWindow, DXGI_MWA_NO_ALT_ENTER);
|
||||
+ UNUSED_TRACE_VARIABLE(makeWindowAssociationResult);
|
||||
+ }
|
||||
+ return result;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
--
|
||||
2.5.0.windows.1
|
||||
|
@ -1,9 +1,10 @@
|
||||
CONFIG += installed
|
||||
include(../common/common.pri)
|
||||
|
||||
DEF_FILE_TARGET=$${TARGET}
|
||||
TARGET=$$qtLibraryTarget($${LIBEGL_NAME})
|
||||
winrt: LIBS_PRIVATE += -ld3d11
|
||||
|
||||
LIBS_PRIVATE += -ldxguid -L$$QT_BUILD_TREE/lib -l$$qtLibraryTarget(libGLESv2)
|
||||
LIBS_PRIVATE += -ldxguid -L$$QT_BUILD_TREE/lib -l$$qtLibraryTarget($${LIBGLESV2_NAME})
|
||||
|
||||
DEFINES += GL_APICALL= GL_GLEXT_PROTOTYPES= EGLAPI= LIBEGL_IMPLEMENTATION
|
||||
|
||||
@ -14,8 +15,8 @@ SOURCES += \
|
||||
$$ANGLE_DIR/src/libEGL/libEGL.cpp
|
||||
|
||||
!static {
|
||||
DEF_FILE = $$ANGLE_DIR/src/libEGL/$${TARGET}.def
|
||||
mingw:equals(QT_ARCH, i386): DEF_FILE = $$ANGLE_DIR/src/libEGL/$${TARGET}_mingw32.def
|
||||
DEF_FILE = $$ANGLE_DIR/src/libEGL/$${DEF_FILE_TARGET}.def
|
||||
mingw:equals(QT_ARCH, i386): DEF_FILE = $$ANGLE_DIR/src/libEGL/$${DEF_FILE_TARGET}_mingw32.def
|
||||
}
|
||||
|
||||
egl_headers.files = \
|
||||
|
@ -1,5 +1,7 @@
|
||||
CONFIG += simd installed
|
||||
include(../common/common.pri)
|
||||
DEF_FILE_TARGET=$${TARGET}
|
||||
TARGET=$$qtLibraryTarget($${LIBGLESV2_NAME})
|
||||
|
||||
INCLUDEPATH += $$OUT_PWD/.. $$ANGLE_DIR/src/libANGLE
|
||||
|
||||
@ -327,8 +329,8 @@ angle_d3d11 {
|
||||
}
|
||||
|
||||
!static {
|
||||
DEF_FILE = $$ANGLE_DIR/src/libGLESv2/$${TARGET}.def
|
||||
mingw:equals(QT_ARCH, i386): DEF_FILE = $$ANGLE_DIR/src/libGLESv2/$${TARGET}_mingw32.def
|
||||
DEF_FILE = $$ANGLE_DIR/src/libGLESv2/$${DEF_FILE_TARGET}.def
|
||||
mingw:equals(QT_ARCH, i386): DEF_FILE = $$ANGLE_DIR/src/libGLESv2/$${DEF_FILE_TARGET}_mingw32.def
|
||||
} else {
|
||||
DEFINES += DllMain=DllMain_ANGLE # prevent symbol from conflicting with the user's DllMain
|
||||
}
|
||||
|
@ -6,7 +6,6 @@ HEADERS += \
|
||||
arch/qatomic_armv7.h \
|
||||
arch/qatomic_bootstrap.h \
|
||||
arch/qatomic_ia64.h \
|
||||
arch/qatomic_mips.h \
|
||||
arch/qatomic_x86.h \
|
||||
arch/qatomic_gcc.h \
|
||||
arch/qatomic_cxx11.h
|
||||
|
@ -145,7 +145,7 @@
|
||||
attribute is true, Qt will not do the flip. \l QKeySequence::StandardKey
|
||||
will also flip accordingly (i.e., QKeySequence::Copy will be
|
||||
Command+C on the keyboard regardless of the value set, though what is output for
|
||||
QKeySequence::toString(QKeySequence::PortableText) will be different).
|
||||
QKeySequence::toString() will be different).
|
||||
|
||||
\value AA_Use96Dpi Assume the screen has a resolution of 96 DPI rather
|
||||
than using the OS-provided resolution. This will cause font rendering
|
||||
|
@ -50,7 +50,7 @@
|
||||
#include <cmath>
|
||||
#include <limits>
|
||||
|
||||
#if defined(Q_OS_WIN) && !defined(Q_OS_WINCE)
|
||||
#if defined(Q_CC_MSVC) && !defined(Q_OS_WINCE)
|
||||
# include <intrin.h>
|
||||
#elif defined(Q_CC_INTEL)
|
||||
# include <immintrin.h> // for _addcarry_u<nn>
|
||||
|
@ -177,7 +177,7 @@ void QFileSystemWatcherPrivate::_q_directoryChanged(const QString &path, bool re
|
||||
\note The act of monitoring files and directories for
|
||||
modifications consumes system resources. This implies there is a
|
||||
limit to the number of files and directories your process can
|
||||
monitor simultaneously. On Mac OS X 10.4 and all BSD variants, for
|
||||
monitor simultaneously. On all BSD variants, for
|
||||
example, an open file descriptor is required for each monitored
|
||||
file. Some system limits the number of open file descriptors to 256
|
||||
by default. This means that addPath() and addPaths() will fail if
|
||||
@ -185,7 +185,7 @@ void QFileSystemWatcherPrivate::_q_directoryChanged(const QString &path, bool re
|
||||
the file system monitor. Also note that your process may have
|
||||
other file descriptors open in addition to the ones for files
|
||||
being monitored, and these other open descriptors also count in
|
||||
the total. Mac OS X 10.5 and up use a different backend and do not
|
||||
the total. OS X uses a different backend and does not
|
||||
suffer from this issue.
|
||||
|
||||
|
||||
|
@ -2098,7 +2098,9 @@ QByteArray QProcess::readAllStandardError()
|
||||
\b{Windows:} The arguments are quoted and joined into a command line
|
||||
that is compatible with the \c CommandLineToArgvW() Windows function.
|
||||
For programs that have different command line quoting requirements,
|
||||
you need to use setNativeArguments().
|
||||
you need to use setNativeArguments(). One notable program that does
|
||||
not follow the \c CommandLineToArgvW() rules is cmd.exe and, by
|
||||
consequence, all batch scripts.
|
||||
|
||||
The OpenMode is set to \a mode.
|
||||
|
||||
|
@ -229,7 +229,7 @@ QStringList QStandardPaths::standardLocations(StandardLocation type)
|
||||
CFRelease(bundleUrl);
|
||||
|
||||
CFURLRef resourcesUrl = CFBundleCopyResourcesDirectoryURL(mainBundle);
|
||||
CFStringRef cfResourcesPath = CFURLCopyPath(bundleUrl);
|
||||
CFStringRef cfResourcesPath = CFURLCopyPath(resourcesUrl);
|
||||
QString resourcesPath = QCFString::toQString(cfResourcesPath);
|
||||
CFRelease(cfResourcesPath);
|
||||
CFRelease(resourcesUrl);
|
||||
|
@ -219,7 +219,7 @@ QT_BEGIN_NAMESPACE
|
||||
\value TouchEnd End of touch-event sequence (QTouchEvent).
|
||||
\value TouchUpdate Touch-screen event (QTouchEvent).
|
||||
\value UngrabKeyboard Item loses keyboard grab (QGraphicsItem only).
|
||||
\value UngrabMouse Item loses mouse grab (QGraphicsItem only).
|
||||
\value UngrabMouse Item loses mouse grab (QGraphicsItem, QQuickItem).
|
||||
\value UpdateLater The widget should be queued to be repainted at a later time.
|
||||
\value UpdateRequest The widget should be repainted.
|
||||
\value WhatsThis The widget should reveal "What's This?" help (QHelpEvent).
|
||||
|
@ -513,7 +513,7 @@ QWindowsMessageWindowClassContext::QWindowsMessageWindowClassContext()
|
||||
wc.lpszClassName = className;
|
||||
atom = RegisterClass(&wc);
|
||||
if (!atom) {
|
||||
qErrnoWarning("%s: RegisterClass() failed", Q_FUNC_INFO, qPrintable(qClassName));
|
||||
qErrnoWarning("%s RegisterClass() failed", qPrintable(qClassName));
|
||||
delete [] className;
|
||||
className = 0;
|
||||
}
|
||||
@ -549,7 +549,7 @@ static HWND qt_create_internal_window(const QEventDispatcherWin32 *eventDispatch
|
||||
0); // windows creation data.
|
||||
|
||||
if (!wnd) {
|
||||
qErrnoWarning("%s: CreateWindow() for QEventDispatcherWin32 internal window failed", Q_FUNC_INFO);
|
||||
qErrnoWarning("CreateWindow() for QEventDispatcherWin32 internal window failed");
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -568,9 +568,9 @@ void QMimeBinaryProvider::loadMimeTypePrivate(QMimeTypePrivate &data)
|
||||
mimeFiles = QStandardPaths::locateAll(QStandardPaths::GenericDataLocation, QString::fromLatin1("mime/") + file); // pre-1.3
|
||||
}
|
||||
if (mimeFiles.isEmpty()) {
|
||||
qWarning() << "No file found for" << file << ", even though update-mime-info said it would exist.";
|
||||
qWarning() << "Either it was just removed, or the directory doesn't have executable permission...";
|
||||
qWarning() << QStandardPaths::locateAll(QStandardPaths::GenericDataLocation, QLatin1String("mime"), QStandardPaths::LocateDirectory);
|
||||
qWarning() << "No file found for" << file << ", even though update-mime-info said it would exist.\n"
|
||||
"Either it was just removed, or the directory doesn't have executable permission..."
|
||||
<< QStandardPaths::locateAll(QStandardPaths::GenericDataLocation, QLatin1String("mime"), QStandardPaths::LocateDirectory);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -756,7 +756,7 @@ void QMimeXMLProvider::ensureLoaded()
|
||||
foreach (const QString &packageDir, packageDirs) {
|
||||
QDir dir(packageDir);
|
||||
const QStringList files = dir.entryList(QDir::Files | QDir::NoDotAndDotDot);
|
||||
//qDebug() << static_cast<const void *>(this) << Q_FUNC_INFO << packageDir << files;
|
||||
//qDebug() << static_cast<const void *>(this) << packageDir << files;
|
||||
if (!fdoXmlFound)
|
||||
fdoXmlFound = files.contains(QLatin1String("freedesktop.org.xml"));
|
||||
QStringList::const_iterator endIt(files.constEnd());
|
||||
|
@ -147,8 +147,8 @@ void QFactoryLoader::update()
|
||||
library = QLibraryPrivate::findOrCreate(QFileInfo(fileName).canonicalFilePath());
|
||||
if (!library->isPlugin()) {
|
||||
if (qt_debug_component()) {
|
||||
qDebug() << library->errorString;
|
||||
qDebug() << " not a plugin";
|
||||
qDebug() << library->errorString << endl
|
||||
<< " not a plugin";
|
||||
}
|
||||
library->release();
|
||||
continue;
|
||||
|
@ -337,12 +337,10 @@ static void installCoverageTool(QLibraryPrivate *libPrivate)
|
||||
|
||||
if (qt_debug_component()) {
|
||||
if (ret >= 0) {
|
||||
qDebug("%s: coverage data for %s registered",
|
||||
Q_FUNC_INFO,
|
||||
qDebug("coverage data for %s registered",
|
||||
qPrintable(libPrivate->fileName));
|
||||
} else {
|
||||
qWarning("%s: could not register %s: error %d; coverage data may be incomplete",
|
||||
Q_FUNC_INFO,
|
||||
qWarning("could not register %s: error %d; coverage data may be incomplete",
|
||||
qPrintable(libPrivate->fileName),
|
||||
ret);
|
||||
}
|
||||
|
@ -248,6 +248,8 @@ bool QCollator::numericMode() const
|
||||
|
||||
The default is locale dependent.
|
||||
|
||||
\note This method is not currently supported on Apple platforms or if Qt is configured to not use ICU on Linux.
|
||||
|
||||
\sa ignorePunctuation()
|
||||
*/
|
||||
void QCollator::setIgnorePunctuation(bool on)
|
||||
|
@ -820,8 +820,8 @@ void **QListData::erase(void **xi)
|
||||
|
||||
/*! \fn void QList::insert(int i, const T &value)
|
||||
|
||||
Inserts \a value at index position \a i in the list. If \a i
|
||||
is 0, the value is prepended to the list. If \a i is size(), the
|
||||
Inserts \a value at index position \a i in the list. If \a i <= 0,
|
||||
the value is prepended to the list. If \a i >= size(), the
|
||||
value is appended to the list.
|
||||
|
||||
Example:
|
||||
|
@ -384,6 +384,9 @@
|
||||
initialized with a \l{default-constructed value}. If \a size is less
|
||||
than the current size, elements are removed from the end.
|
||||
|
||||
Since Qt 5.6, resize() doesn't shrink the capacity anymore.
|
||||
To shed excess capacity, use squeeze().
|
||||
|
||||
\sa size()
|
||||
*/
|
||||
|
||||
|
@ -406,9 +406,6 @@ void QVector<T>::resize(int asize)
|
||||
if (asize > oldAlloc) { // there is not enough space
|
||||
newAlloc = asize;
|
||||
opt = QArrayData::Grow;
|
||||
} else if (!d->capacityReserved && asize < d->size && asize < (oldAlloc >> 1)) { // we want to shrink
|
||||
newAlloc = asize;
|
||||
opt = QArrayData::Grow;
|
||||
} else {
|
||||
newAlloc = oldAlloc;
|
||||
}
|
||||
|
@ -1228,6 +1228,12 @@ bool QIcon::hasThemeIcon(const QString &name)
|
||||
*/
|
||||
void QIcon::setIsMask(bool isMask)
|
||||
{
|
||||
if (!d) {
|
||||
d = new QIconPrivate;
|
||||
d->engine = new QPixmapIconEngine;
|
||||
} else {
|
||||
detach();
|
||||
}
|
||||
d->is_mask = isMask;
|
||||
}
|
||||
|
||||
@ -1242,6 +1248,8 @@ void QIcon::setIsMask(bool isMask)
|
||||
*/
|
||||
bool QIcon::isMask() const
|
||||
{
|
||||
if (!d)
|
||||
return false;
|
||||
return d->is_mask;
|
||||
}
|
||||
|
||||
|
@ -907,7 +907,7 @@ void QPixmap::fill(const QPaintDevice *device, const QPoint &p)
|
||||
{
|
||||
Q_UNUSED(device)
|
||||
Q_UNUSED(p)
|
||||
qWarning("%s is deprecated, ignored", Q_FUNC_INFO);
|
||||
qWarning("this function is deprecated, ignored");
|
||||
}
|
||||
|
||||
|
||||
@ -1703,8 +1703,8 @@ QPixmap QPixmap::fromImageReader(QImageReader *imageReader, Qt::ImageConversionF
|
||||
|
||||
QPixmap QPixmap::grabWindow(WId window, int x, int y, int w, int h)
|
||||
{
|
||||
qWarning("%s is deprecated, use QScreen::grabWindow() instead."
|
||||
" Defaulting to primary screen.", Q_FUNC_INFO);
|
||||
qWarning("this function is deprecated, use QScreen::grabWindow() instead."
|
||||
" Defaulting to primary screen.");
|
||||
return QGuiApplication::primaryScreen()->grabWindow(window, x, y, w, h);
|
||||
}
|
||||
|
||||
|
@ -165,7 +165,7 @@ int QGuiApplicationPrivate::mouse_double_click_distance = -1;
|
||||
|
||||
QWindow *QGuiApplicationPrivate::currentMousePressWindow = 0;
|
||||
|
||||
static Qt::LayoutDirection layout_direction = Qt::LeftToRight;
|
||||
static Qt::LayoutDirection layout_direction = Qt::LayoutDirectionAuto;
|
||||
static bool force_reverse = false;
|
||||
|
||||
QGuiApplicationPrivate *QGuiApplicationPrivate::self = 0;
|
||||
@ -1305,7 +1305,6 @@ void QGuiApplicationPrivate::init()
|
||||
pluginList << argv[i];
|
||||
} else if (arg == "-reverse") {
|
||||
force_reverse = true;
|
||||
QGuiApplication::setLayoutDirection(Qt::RightToLeft);
|
||||
#ifdef Q_OS_MAC
|
||||
} else if (arg.startsWith("-psn_")) {
|
||||
// eat "-psn_xxxx" on Mac, which is passed when starting an app from Finder.
|
||||
@ -1429,6 +1428,9 @@ void QGuiApplicationPrivate::init()
|
||||
#else
|
||||
Q_UNUSED(loadTestability);
|
||||
#endif // QT_NO_LIBRARY
|
||||
|
||||
if (layout_direction == Qt::LayoutDirectionAuto || force_reverse)
|
||||
QGuiApplication::setLayoutDirection(qt_detectRTLLanguage() ? Qt::RightToLeft : Qt::LeftToRight);
|
||||
}
|
||||
|
||||
extern void qt_cleanupFontDatabase();
|
||||
@ -3300,7 +3302,10 @@ void QGuiApplication::setLayoutDirection(Qt::LayoutDirection direction)
|
||||
|
||||
Qt::LayoutDirection QGuiApplication::layoutDirection()
|
||||
{
|
||||
return layout_direction;
|
||||
// layout_direction is only ever Qt::LayoutDirectionAuto if setLayoutDirection
|
||||
// was never called, or called with Qt::LayoutDirectionAuto (which is a no-op).
|
||||
// In that case we return the default LeftToRight.
|
||||
return layout_direction == Qt::LayoutDirectionAuto ? Qt::LeftToRight : layout_direction;
|
||||
}
|
||||
|
||||
/*!
|
||||
|
@ -175,7 +175,8 @@ static bool convert(const QVariant::Private *d, int t,
|
||||
switch (t) {
|
||||
case QVariant::ByteArray:
|
||||
if (d->type == QVariant::Color) {
|
||||
*static_cast<QByteArray *>(result) = v_cast<QColor>(d)->name().toLatin1();
|
||||
const QColor *c = v_cast<QColor>(d);
|
||||
*static_cast<QByteArray *>(result) = c->name(c->alpha() != 255 ? QColor::HexArgb : QColor::HexRgb).toLatin1();
|
||||
return true;
|
||||
}
|
||||
break;
|
||||
@ -190,9 +191,11 @@ static bool convert(const QVariant::Private *d, int t,
|
||||
case QVariant::Font:
|
||||
*str = v_cast<QFont>(d)->toString();
|
||||
return true;
|
||||
case QVariant::Color:
|
||||
*str = v_cast<QColor>(d)->name();
|
||||
case QVariant::Color: {
|
||||
const QColor *c = v_cast<QColor>(d);
|
||||
*str = c->name(c->alpha() != 255 ? QColor::HexArgb : QColor::HexRgb);
|
||||
return true;
|
||||
}
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
@ -94,32 +94,121 @@ static inline qreal initialGlobalScaleFactor()
|
||||
plugin interfacing parts of QtGui, for example the QWindow, QScreen and
|
||||
QWindowSystemInterface implementation.
|
||||
|
||||
The coordinate system scaling is enabled by setting one or more scale
|
||||
factors. These will then be factored into the value returned by the
|
||||
devicePixelRatio() accessors (any native scale factor will also be
|
||||
included in this value). Several setters are available:
|
||||
There are now up to three active coordinate systems in Qt:
|
||||
|
||||
- A process-global scale factor
|
||||
- QT_SCALE_FACTOR (environment variable)
|
||||
- QHighDpiScaling::setGlobalFactor()
|
||||
---------------------------------------------------
|
||||
| Application Device Independent Pixels | devicePixelRatio
|
||||
| Qt Widgets | =
|
||||
| Qt Gui |
|
||||
|---------------------------------------------------| Qt Scale Factor
|
||||
| Qt Gui QPlatform* Native Pixels | *
|
||||
| Qt platform plugin |
|
||||
|---------------------------------------------------| OS Scale Factor
|
||||
| Display Device Pixels |
|
||||
| (Graphics Buffers) |
|
||||
-----------------------------------------------------
|
||||
|
||||
- A per-screen scale factor
|
||||
- QT_AUTO_SCALE_FACTOR (environment variable)
|
||||
Setting this to a true-ish value will make QHighDpiScaling
|
||||
call QPlatformScreen::pixelDensity()
|
||||
- QHighDpiScaling::setScreenFactor(screen, factor);
|
||||
- QT_SCREEN_SCALE_FACTORS (environment variable)
|
||||
Set this to a semicolon-separated list of scale factors
|
||||
(matching the order of QGuiApplications::screens()),
|
||||
or to a list of name=value pairs (where name matches
|
||||
QScreen::name()).
|
||||
This is an simplification and shows the main coordinate system. All layers
|
||||
may work with device pixels in specific cases: OpenGL, creating the backing
|
||||
store, and QPixmap management. The "Native Pixels" coordinate system is
|
||||
internal to Qt and should not be exposed to Qt users: Seen from the outside
|
||||
there are only two coordinate systems: device independent pixels and device
|
||||
pixels.
|
||||
|
||||
All scale factors are of type qreal.
|
||||
The devicePixelRatio seen by applications is the product of the Qt scale
|
||||
factor and the OS scale factor. The value of the scale factors may be 1,
|
||||
in which case two or more of the coordinate systems are equivalent. Platforms
|
||||
that (may) have an OS scale factor include OS X, iOS and Wayland.
|
||||
|
||||
The main scaling functions for use in QtGui are:
|
||||
Note that the functions in this file do not work with the OS scale factor
|
||||
directly and are limited to converting between device independent and native
|
||||
pixels. The OS scale factor is accunted for by QWindow::devicePixelRatio()
|
||||
and similar functions.
|
||||
|
||||
Configuration Examples:
|
||||
|
||||
'Classic': Device Independent Pixels = Native Pixels = Device Pixels
|
||||
--------------------------------------------------- devicePixelRatio: 1
|
||||
| Application / Qt Gui 100 x 100 |
|
||||
| | Qt Scale Factor: 1
|
||||
| Qt Platform / OS 100 x 100 |
|
||||
| | OS Scale Factor: 1
|
||||
| Display 100 x 100 |
|
||||
-----------------------------------------------------
|
||||
|
||||
'Retina Device': Device Independent Pixels = Native Pixels
|
||||
--------------------------------------------------- devicePixelRatio: 2
|
||||
| Application / Qt Gui 100 x 100 |
|
||||
| | Qt Scale Factor: 1
|
||||
| Qt Platform / OS 100 x 100 |
|
||||
|---------------------------------------------------| OS Scale Factor: 2
|
||||
| Display 200 x 200 |
|
||||
-----------------------------------------------------
|
||||
|
||||
'2x Qt Scaling': Native Pixels = Device Pixels
|
||||
--------------------------------------------------- devicePixelRatio: 2
|
||||
| Application / Qt Gui 100 x 100 |
|
||||
|---------------------------------------------------| Qt Scale Factor: 2
|
||||
| Qt Platform / OS 200 x 200 |
|
||||
| | OS Scale Factor: 1
|
||||
| Display 200 x 200 |
|
||||
-----------------------------------------------------
|
||||
|
||||
The Qt Scale Factor is the product of two sub-scale factors, which
|
||||
are independently either set or determined by the platform plugin.
|
||||
Several APIs are offered for this, targeting both developers and
|
||||
end users. All scale factors are of type qreal.
|
||||
|
||||
1) A global scale factor
|
||||
The QT_SCALE_FACTOR environment variable can be used to set
|
||||
a global scale factor for all windows in the processs. This
|
||||
is useful for testing and debugging (you can simulate any
|
||||
devicePixelRatio without needing access to sepcial hardware),
|
||||
and perhaps also for targeting a specific application to
|
||||
a specific display type (embedded use cases).
|
||||
|
||||
2) A per-screen scale factors
|
||||
Some platform plugins support providing a per-screen scale
|
||||
factor based on display density information. These platforms
|
||||
include X11, Windows, and Android.
|
||||
|
||||
There are two APIs for enabling or disabling this behavior:
|
||||
- The QT_AUTO_SCALE_FACTOR environment variable.
|
||||
- The AA_EnableHighDpiScaling and AA_DisableHighDpiScaling
|
||||
application attributes
|
||||
|
||||
Enabling either will make QHighDpiScaling call QPlatformScreen::pixelDensity()
|
||||
and use the value provided as the scale factor for the screen in
|
||||
question. Disabling is done on a 'veto' basis where either the
|
||||
environment or the application source can disable. The intended use
|
||||
cases are 'My system is not providing correct display density
|
||||
information' and 'My application needs to work in display pixels',
|
||||
respectively.
|
||||
|
||||
The QT_SCREEN_SCALE_FACTORS environment variable can be used to set the screen
|
||||
scale factors manually.Set this to a semicolon-separated
|
||||
list of scale factors (matching the order of QGuiApplications::screens()),
|
||||
or to a list of name=value pairs (where name matches QScreen::name()).
|
||||
|
||||
Coordinate conversion functions must be used when writing code that passes
|
||||
geometry across the Qt Gui / Platform plugin boundary. The main conversion
|
||||
functions are:
|
||||
T toNativePixels(T, QWindow *)
|
||||
T fromNativePixels(T, QWindow*)
|
||||
Where T is QPoint, QSize, QRect etc.
|
||||
|
||||
The following classes in QtGui use native pixels, for the convenience of the
|
||||
plataform plugins:
|
||||
QPlatformWindow
|
||||
QPlatformScreen
|
||||
QWindowSystemInterface (API only - Events are in device independent pixels)
|
||||
|
||||
As a special consideration platform plugin code should be careful about
|
||||
calling QtGui geometry accessor functions:
|
||||
QRect r = window->geometry();
|
||||
Here the returned geometry is in device independent pixels. Add a conversion call:
|
||||
QRect r = QHighDpi::toNativePixels(window->geometry());
|
||||
(Avoiding calling QWindow and instead using the QPlatformWindow geometry
|
||||
might be a better course of action in this case.)
|
||||
*/
|
||||
|
||||
qreal QHighDpiScaling::m_factor = 1.0;
|
||||
@ -227,7 +316,7 @@ void QHighDpiScaling::setGlobalFactor(qreal factor)
|
||||
if (qFuzzyCompare(factor, m_factor))
|
||||
return;
|
||||
if (!QGuiApplication::allWindows().isEmpty())
|
||||
qWarning() << Q_FUNC_INFO << "QHighDpiScaling::setFactor: Should only be called when no windows exist.";
|
||||
qWarning("QHighDpiScaling::setFactor: Should only be called when no windows exist.");
|
||||
|
||||
m_globalScalingActive = !qFuzzyCompare(factor, qreal(1));
|
||||
m_factor = m_globalScalingActive ? factor : qreal(1);
|
||||
|
@ -69,18 +69,18 @@ bool QPlatformGraphicsBufferHelper::lockAndBindToTexture(QPlatformGraphicsBuffer
|
||||
{
|
||||
if (graphicsBuffer->lock(QPlatformGraphicsBuffer::TextureAccess)) {
|
||||
if (!graphicsBuffer->bindToTexture(rect)) {
|
||||
qWarning() << Q_FUNC_INFO << "Failed to bind graphicsbuffer to texture";
|
||||
qWarning("Failed to bind %sgraphicsbuffer to texture", "");
|
||||
return false;
|
||||
}
|
||||
if (swizzle)
|
||||
*swizzle = false;
|
||||
} else if (graphicsBuffer->lock(QPlatformGraphicsBuffer::SWReadAccess)) {
|
||||
if (!bindSWToTexture(graphicsBuffer, swizzle, rect)) {
|
||||
qWarning() << Q_FUNC_INFO << "Failed to bind SW graphcisbuffer to texture";
|
||||
qWarning("Failed to bind %sgraphicsbuffer to texture", "SW ");
|
||||
return false;
|
||||
}
|
||||
} else {
|
||||
qWarning() << Q_FUNC_INFO << "Failed to lock";
|
||||
qWarning("Failed to lock");
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
|
@ -91,7 +91,8 @@ public:
|
||||
SyncState,
|
||||
RasterGLSurface,
|
||||
AllGLFunctionsQueryable,
|
||||
ApplicationIcon
|
||||
ApplicationIcon,
|
||||
SwitchableWidgetComposition
|
||||
};
|
||||
|
||||
virtual ~QPlatformIntegration() { }
|
||||
|
@ -362,7 +362,7 @@ static int log2(uint i)
|
||||
int QPlatformScreen::angleBetween(Qt::ScreenOrientation a, Qt::ScreenOrientation b)
|
||||
{
|
||||
if (a == Qt::PrimaryOrientation || b == Qt::PrimaryOrientation) {
|
||||
qWarning() << "Use QScreen version of" << __FUNCTION__ << "when passing Qt::PrimaryOrientation";
|
||||
qWarning("Use QScreen version of %sBetween() when passing Qt::PrimaryOrientation", "angle");
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -384,7 +384,7 @@ int QPlatformScreen::angleBetween(Qt::ScreenOrientation a, Qt::ScreenOrientation
|
||||
QTransform QPlatformScreen::transformBetween(Qt::ScreenOrientation a, Qt::ScreenOrientation b, const QRect &target)
|
||||
{
|
||||
if (a == Qt::PrimaryOrientation || b == Qt::PrimaryOrientation) {
|
||||
qWarning() << "Use QScreen version of" << __FUNCTION__ << "when passing Qt::PrimaryOrientation";
|
||||
qWarning("Use QScreen version of %sBetween() when passing Qt::PrimaryOrientation", "transform");
|
||||
return QTransform();
|
||||
}
|
||||
|
||||
@ -415,7 +415,7 @@ QTransform QPlatformScreen::transformBetween(Qt::ScreenOrientation a, Qt::Screen
|
||||
QRect QPlatformScreen::mapBetween(Qt::ScreenOrientation a, Qt::ScreenOrientation b, const QRect &rect)
|
||||
{
|
||||
if (a == Qt::PrimaryOrientation || b == Qt::PrimaryOrientation) {
|
||||
qWarning() << "Use QScreen version of" << __FUNCTION__ << "when passing Qt::PrimaryOrientation";
|
||||
qWarning("Use QScreen version of %sBetween() when passing Qt::PrimaryOrientation", "map");
|
||||
return rect;
|
||||
}
|
||||
|
||||
|
@ -680,7 +680,7 @@ QPixmap QScreen::grabWindow(WId window, int x, int y, int width, int height)
|
||||
{
|
||||
const QPlatformScreen *platformScreen = handle();
|
||||
if (!platformScreen) {
|
||||
qWarning("%s invoked with handle==0", Q_FUNC_INFO);
|
||||
qWarning("invoked with handle==0");
|
||||
return QPixmap();
|
||||
}
|
||||
return platformScreen->grabWindow(window, x, y, width, height);
|
||||
|
@ -369,7 +369,7 @@ void QWindowPrivate::setTopLevelScreen(QScreen *newScreen, bool recreate)
|
||||
{
|
||||
Q_Q(QWindow);
|
||||
if (parentWindow) {
|
||||
qWarning() << this << Q_FUNC_INFO << '(' << newScreen << "): Attempt to set a screen on a child window.";
|
||||
qWarning() << this << '(' << newScreen << "): Attempt to set a screen on a child window.";
|
||||
return;
|
||||
}
|
||||
if (newScreen != topLevelScreen) {
|
||||
@ -625,7 +625,7 @@ void QWindow::setParent(QWindow *parent)
|
||||
|
||||
QScreen *newScreen = parent ? parent->screen() : screen();
|
||||
if (d->windowRecreationRequired(newScreen)) {
|
||||
qWarning() << this << Q_FUNC_INFO << '(' << parent << "): Cannot change screens (" << screen() << newScreen << ')';
|
||||
qWarning() << this << '(' << parent << "): Cannot change screens (" << screen() << newScreen << ')';
|
||||
return;
|
||||
}
|
||||
|
||||
@ -1186,7 +1186,7 @@ void QWindow::setTransientParent(QWindow *parent)
|
||||
{
|
||||
Q_D(QWindow);
|
||||
if (parent && !parent->isTopLevel()) {
|
||||
qWarning() << Q_FUNC_INFO << parent << "must be a top level window.";
|
||||
qWarning() << parent << "must be a top level window.";
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -184,7 +184,7 @@ struct VersionTerm {
|
||||
bool VersionTerm::matches(const QVersionNumber &other) const
|
||||
{
|
||||
if (isNull() || other.isNull()) {
|
||||
qWarning() << Q_FUNC_INFO << "called with invalid parameters";
|
||||
qWarning("called with invalid parameters");
|
||||
return false;
|
||||
}
|
||||
switch (op) {
|
||||
@ -262,7 +262,7 @@ struct OsTypeTerm
|
||||
bool matches(const QString &osName, const QVersionNumber &kernelVersion, const QString &osRelease) const
|
||||
{
|
||||
if (isNull() || osName.isEmpty() || kernelVersion.isNull()) {
|
||||
qWarning() << Q_FUNC_INFO << "called with invalid parameters";
|
||||
qWarning("called with invalid parameters");
|
||||
return false;
|
||||
}
|
||||
if (type != osName)
|
||||
|
@ -285,7 +285,7 @@ bool QOpenGLTextureBlitterPrivate::buildProgram(ProgramIndex idx, const char *vs
|
||||
p->glProgram->addShaderFromSourceCode(QOpenGLShader::Fragment, fs);
|
||||
p->glProgram->link();
|
||||
if (!p->glProgram->isLinked()) {
|
||||
qWarning() << Q_FUNC_INFO << "Could not link shader program:\n" << p->glProgram->log();
|
||||
qWarning() << "Could not link shader program:\n" << p->glProgram->log();
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -101,11 +101,11 @@ SSE4_1_SOURCES += painting/qdrawhelper_sse4.cpp \
|
||||
painting/qimagescale_sse4.cpp
|
||||
AVX2_SOURCES += painting/qdrawhelper_avx2.cpp
|
||||
|
||||
!ios:!contains(QT_ARCH, "arm64") {
|
||||
!ios {
|
||||
CONFIG += no_clang_integrated_as
|
||||
NEON_SOURCES += painting/qdrawhelper_neon.cpp
|
||||
NEON_HEADERS += painting/qdrawhelper_neon_p.h
|
||||
NEON_ASM += ../3rdparty/pixman/pixman-arm-neon-asm.S painting/qdrawhelper_neon_asm.S
|
||||
!contains(QT_ARCH, "arm64"): NEON_ASM += ../3rdparty/pixman/pixman-arm-neon-asm.S painting/qdrawhelper_neon_asm.S
|
||||
}
|
||||
|
||||
MIPS_DSP_SOURCES += painting/qdrawhelper_mips_dsp.cpp
|
||||
|
@ -3885,7 +3885,7 @@ void blend_color_generic_rgb64(int count, const QSpan *spans, void *userData)
|
||||
QSpanData *data = reinterpret_cast<QSpanData *>(userData);
|
||||
Operator op = getOperator(data, spans, count);
|
||||
if (!op.funcSolid64) {
|
||||
qDebug() << Q_FUNC_INFO << "unsupported 64bit blend attempted";
|
||||
qDebug("unsupported 64bit blend attempted");
|
||||
return blend_color_generic(count, spans, userData);
|
||||
}
|
||||
|
||||
@ -4180,7 +4180,7 @@ static void blend_untransformed_generic_rgb64(int count, const QSpan *spans, voi
|
||||
|
||||
Operator op = getOperator(data, spans, count);
|
||||
if (!op.func64) {
|
||||
qWarning() << Q_FUNC_INFO << "Unsupported blend";
|
||||
qWarning("Unsupported blend");
|
||||
return blend_untransformed_generic(count, spans, userData);
|
||||
}
|
||||
QRgba64 buffer[buffer_size];
|
||||
@ -6309,7 +6309,7 @@ void qt_memfill16(quint16 *dest, quint16 color, int count)
|
||||
qt_memfill_template<quint16>(dest, color, count);
|
||||
}
|
||||
#endif
|
||||
#if !defined(__SSE2__) && (!defined(__ARM_NEON__) || defined(Q_PROCESSOR_ARM_64))
|
||||
#if !defined(__SSE2__) && !defined(__ARM_NEON__)
|
||||
# ifdef QT_COMPILER_SUPPORTS_MIPS_DSP
|
||||
extern "C" void qt_memfill32_asm_mips_dsp(quint32 *, quint32, int);
|
||||
# endif
|
||||
@ -6425,14 +6425,11 @@ void qInitDrawhelperAsm()
|
||||
|
||||
#endif // SSE2
|
||||
|
||||
#if defined(__ARM_NEON__) && !defined(Q_OS_IOS) && !defined(Q_PROCESSOR_ARM_64)
|
||||
#if defined(__ARM_NEON__) && !defined(Q_OS_IOS)
|
||||
qBlendFunctions[QImage::Format_RGB32][QImage::Format_RGB32] = qt_blend_rgb32_on_rgb32_neon;
|
||||
qBlendFunctions[QImage::Format_ARGB32_Premultiplied][QImage::Format_RGB32] = qt_blend_rgb32_on_rgb32_neon;
|
||||
qBlendFunctions[QImage::Format_RGB32][QImage::Format_ARGB32_Premultiplied] = qt_blend_argb32_on_argb32_neon;
|
||||
qBlendFunctions[QImage::Format_ARGB32_Premultiplied][QImage::Format_ARGB32_Premultiplied] = qt_blend_argb32_on_argb32_neon;
|
||||
qBlendFunctions[QImage::Format_RGB16][QImage::Format_ARGB32_Premultiplied] = qt_blend_argb32_on_rgb16_neon;
|
||||
qBlendFunctions[QImage::Format_ARGB32_Premultiplied][QImage::Format_RGB16] = qt_blend_rgb16_on_argb32_neon;
|
||||
qBlendFunctions[QImage::Format_RGB16][QImage::Format_RGB16] = qt_blend_rgb16_on_rgb16_neon;
|
||||
#if Q_BYTE_ORDER == Q_LITTLE_ENDIAN
|
||||
qBlendFunctions[QImage::Format_RGBX8888][QImage::Format_RGBX8888] = qt_blend_rgb32_on_rgb32_neon;
|
||||
qBlendFunctions[QImage::Format_RGBA8888_Premultiplied][QImage::Format_RGBX8888] = qt_blend_rgb32_on_rgb32_neon;
|
||||
@ -6440,6 +6437,21 @@ void qInitDrawhelperAsm()
|
||||
qBlendFunctions[QImage::Format_RGBA8888_Premultiplied][QImage::Format_RGBA8888_Premultiplied] = qt_blend_argb32_on_argb32_neon;
|
||||
#endif
|
||||
|
||||
qt_functionForMode_C[QPainter::CompositionMode_SourceOver] = qt_blend_argb32_on_argb32_scanline_neon;
|
||||
qt_functionForModeSolid_C[QPainter::CompositionMode_SourceOver] = comp_func_solid_SourceOver_neon;
|
||||
qt_functionForMode_C[QPainter::CompositionMode_Plus] = comp_func_Plus_neon;
|
||||
|
||||
extern const uint * QT_FASTCALL qt_fetch_radial_gradient_neon(uint *buffer, const Operator *op, const QSpanData *data,
|
||||
int y, int x, int length);
|
||||
|
||||
qt_fetch_radial_gradient = qt_fetch_radial_gradient_neon;
|
||||
|
||||
#if !defined(Q_PROCESSOR_ARM_64)
|
||||
// The RGB16 helpers are using Arm32 assemblythat has not been ported to AArch64
|
||||
qBlendFunctions[QImage::Format_RGB16][QImage::Format_ARGB32_Premultiplied] = qt_blend_argb32_on_rgb16_neon;
|
||||
qBlendFunctions[QImage::Format_ARGB32_Premultiplied][QImage::Format_RGB16] = qt_blend_rgb16_on_argb32_neon;
|
||||
qBlendFunctions[QImage::Format_RGB16][QImage::Format_RGB16] = qt_blend_rgb16_on_rgb16_neon;
|
||||
|
||||
qScaleFunctions[QImage::Format_RGB16][QImage::Format_ARGB32_Premultiplied] = qt_scale_image_argb32_on_rgb16_neon;
|
||||
qScaleFunctions[QImage::Format_RGB16][QImage::Format_RGB16] = qt_scale_image_rgb16_on_rgb16_neon;
|
||||
|
||||
@ -6448,19 +6460,13 @@ void qInitDrawhelperAsm()
|
||||
|
||||
qDrawHelper[QImage::Format_RGB16].alphamapBlit = qt_alphamapblit_quint16_neon;
|
||||
|
||||
qt_functionForMode_C[QPainter::CompositionMode_SourceOver] = qt_blend_argb32_on_argb32_scanline_neon;
|
||||
qt_functionForModeSolid_C[QPainter::CompositionMode_SourceOver] = comp_func_solid_SourceOver_neon;
|
||||
qt_functionForMode_C[QPainter::CompositionMode_Plus] = comp_func_Plus_neon;
|
||||
destFetchProc[QImage::Format_RGB16] = qt_destFetchRGB16_neon;
|
||||
destStoreProc[QImage::Format_RGB16] = qt_destStoreRGB16_neon;
|
||||
|
||||
qMemRotateFunctions[QImage::Format_RGB16][0] = qt_memrotate90_16_neon;
|
||||
qMemRotateFunctions[QImage::Format_RGB16][2] = qt_memrotate270_16_neon;
|
||||
#endif
|
||||
|
||||
extern const uint * QT_FASTCALL qt_fetch_radial_gradient_neon(uint *buffer, const Operator *op, const QSpanData *data,
|
||||
int y, int x, int length);
|
||||
|
||||
qt_fetch_radial_gradient = qt_fetch_radial_gradient_neon;
|
||||
#endif
|
||||
|
||||
#if defined(Q_PROCESSOR_MIPS_32) && defined(QT_COMPILER_SUPPORTS_MIPS_DSP)
|
||||
|
@ -44,6 +44,7 @@ QT_BEGIN_NAMESPACE
|
||||
void qt_memfill32(quint32 *dest, quint32 value, int count)
|
||||
{
|
||||
const int epilogueSize = count % 16;
|
||||
#if !defined(Q_PROCESSOR_ARM_64)
|
||||
if (count >= 16) {
|
||||
quint32 *const neonEnd = dest + count - epilogueSize;
|
||||
register uint32x4_t valueVector1 asm ("q0") = vdupq_n_u32(value);
|
||||
@ -58,6 +59,22 @@ void qt_memfill32(quint32 *dest, quint32 value, int count)
|
||||
);
|
||||
}
|
||||
}
|
||||
#else
|
||||
if (count >= 16) {
|
||||
quint32 *const neonEnd = dest + count - epilogueSize;
|
||||
register uint32x4_t valueVector1 asm ("v0") = vdupq_n_u32(value);
|
||||
register uint32x4_t valueVector2 asm ("v1") = valueVector1;
|
||||
while (dest != neonEnd) {
|
||||
asm volatile (
|
||||
"st2 { v0.4s, v1.4s }, [%[DST]], #32 \n\t"
|
||||
"st2 { v0.4s, v1.4s }, [%[DST]], #32 \n\t"
|
||||
: [DST]"+r" (dest)
|
||||
: [VALUE1]"w"(valueVector1), [VALUE2]"w"(valueVector2)
|
||||
: "memory"
|
||||
);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
switch (epilogueSize)
|
||||
{
|
||||
@ -118,6 +135,7 @@ static inline uint16x8_t qvsource_over_u16(uint16x8_t src16, uint16x8_t dst16, u
|
||||
return vaddq_u16(src16, qvbyte_mul_u16(dst16, alpha16, half));
|
||||
}
|
||||
|
||||
#if !defined(Q_PROCESSOR_ARM_64)
|
||||
extern "C" void
|
||||
pixman_composite_over_8888_0565_asm_neon (int32_t w,
|
||||
int32_t h,
|
||||
@ -164,7 +182,6 @@ pixman_composite_src_0565_0565_asm_neon (int32_t w,
|
||||
int32_t dst_stride,
|
||||
uint16_t *src,
|
||||
int32_t src_stride);
|
||||
|
||||
// qblendfunctions.cpp
|
||||
void qt_blend_argb32_on_rgb16_const_alpha(uchar *destPixels, int dbpl,
|
||||
const uchar *srcPixels, int sbpl,
|
||||
@ -204,6 +221,7 @@ void qt_blend_rgb16_on_rgb16(uchar *dst, int dbpl,
|
||||
int w, int h,
|
||||
int const_alpha);
|
||||
|
||||
|
||||
template <int N>
|
||||
static inline void scanLineBlit16(quint16 *dst, quint16 *src, int dstride)
|
||||
{
|
||||
@ -329,11 +347,16 @@ void qt_blend_argb32_on_rgb16_neon(uchar *destPixels, int dbpl,
|
||||
|
||||
pixman_composite_over_8888_0565_asm_neon(w, h, dst, dbpl / 2, src, sbpl / 4);
|
||||
}
|
||||
#endif
|
||||
|
||||
void qt_blend_argb32_on_argb32_scanline_neon(uint *dest, const uint *src, int length, uint const_alpha)
|
||||
{
|
||||
if (const_alpha == 255) {
|
||||
#if !defined(Q_PROCESSOR_ARM_64)
|
||||
pixman_composite_scanline_over_asm_neon(length, dest, src);
|
||||
#else
|
||||
qt_blend_argb32_on_argb32_neon((uchar *)dest, 4 * length, (uchar *)src, 4 * length, length, 1, 256);
|
||||
#endif
|
||||
} else {
|
||||
qt_blend_argb32_on_argb32_neon((uchar *)dest, 4 * length, (uchar *)src, 4 * length, length, 1, (const_alpha * 256) / 255);
|
||||
}
|
||||
@ -349,7 +372,51 @@ void qt_blend_argb32_on_argb32_neon(uchar *destPixels, int dbpl,
|
||||
uint16x8_t half = vdupq_n_u16(0x80);
|
||||
uint16x8_t full = vdupq_n_u16(0xff);
|
||||
if (const_alpha == 256) {
|
||||
#if !defined(Q_PROCESSOR_ARM_64)
|
||||
pixman_composite_over_8888_8888_asm_neon(w, h, (uint32_t *)destPixels, dbpl / 4, (uint32_t *)srcPixels, sbpl / 4);
|
||||
#else
|
||||
for (int y=0; y<h; ++y) {
|
||||
int x = 0;
|
||||
for (; x < w-3; x += 4) {
|
||||
if (src[x] | src[x+1] | src[x+2] | src[x+3]) {
|
||||
uint32x4_t src32 = vld1q_u32((uint32_t *)&src[x]);
|
||||
uint32x4_t dst32 = vld1q_u32((uint32_t *)&dst[x]);
|
||||
|
||||
const uint8x16_t src8 = vreinterpretq_u8_u32(src32);
|
||||
const uint8x16_t dst8 = vreinterpretq_u8_u32(dst32);
|
||||
|
||||
const uint8x8_t src8_low = vget_low_u8(src8);
|
||||
const uint8x8_t dst8_low = vget_low_u8(dst8);
|
||||
|
||||
const uint8x8_t src8_high = vget_high_u8(src8);
|
||||
const uint8x8_t dst8_high = vget_high_u8(dst8);
|
||||
|
||||
const uint16x8_t src16_low = vmovl_u8(src8_low);
|
||||
const uint16x8_t dst16_low = vmovl_u8(dst8_low);
|
||||
|
||||
const uint16x8_t src16_high = vmovl_u8(src8_high);
|
||||
const uint16x8_t dst16_high = vmovl_u8(dst8_high);
|
||||
|
||||
const uint16x8_t result16_low = qvsource_over_u16(src16_low, dst16_low, half, full);
|
||||
const uint16x8_t result16_high = qvsource_over_u16(src16_high, dst16_high, half, full);
|
||||
|
||||
const uint32x2_t result32_low = vreinterpret_u32_u8(vmovn_u16(result16_low));
|
||||
const uint32x2_t result32_high = vreinterpret_u32_u8(vmovn_u16(result16_high));
|
||||
|
||||
vst1q_u32((uint32_t *)&dst[x], vcombine_u32(result32_low, result32_high));
|
||||
}
|
||||
}
|
||||
for (; x<w; ++x) {
|
||||
uint s = src[x];
|
||||
if (s >= 0xff000000)
|
||||
dst[x] = s;
|
||||
else if (s != 0)
|
||||
dst[x] = s + BYTE_MUL(dst[x], qAlpha(~s));
|
||||
}
|
||||
dst = (quint32 *)(((uchar *) dst) + dbpl);
|
||||
src = (const quint32 *)(((const uchar *) src) + sbpl);
|
||||
}
|
||||
#endif
|
||||
} else if (const_alpha != 0) {
|
||||
const_alpha = (const_alpha * 255) >> 8;
|
||||
uint16x8_t const_alpha16 = vdupq_n_u16(const_alpha);
|
||||
@ -463,6 +530,7 @@ void qt_blend_rgb32_on_rgb32_neon(uchar *destPixels, int dbpl,
|
||||
}
|
||||
}
|
||||
|
||||
#if !defined(Q_PROCESSOR_ARM_64)
|
||||
void qt_alphamapblit_quint16_neon(QRasterBuffer *rasterBuffer,
|
||||
int x, int y, const QRgba64 &color,
|
||||
const uchar *bitmap,
|
||||
@ -703,6 +771,7 @@ void QT_FASTCALL qt_destStoreRGB16_neon(QRasterBuffer *rasterBuffer, int x, int
|
||||
data[i + j] = dstBuffer[j];
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
void QT_FASTCALL comp_func_solid_SourceOver_neon(uint *destPixels, int length, uint color, uint const_alpha)
|
||||
{
|
||||
@ -754,16 +823,13 @@ void QT_FASTCALL comp_func_Plus_neon(uint *dst, const uint *src, int length, uin
|
||||
uint *const neonEnd = end - 3;
|
||||
|
||||
while (dst < neonEnd) {
|
||||
asm volatile (
|
||||
"vld2.8 { d0, d1 }, [%[SRC]] !\n\t"
|
||||
"vld2.8 { d2, d3 }, [%[DST]]\n\t"
|
||||
"vqadd.u8 q0, q0, q1\n\t"
|
||||
"vst2.8 { d0, d1 }, [%[DST]] !\n\t"
|
||||
: [DST]"+r" (dst), [SRC]"+r" (src)
|
||||
:
|
||||
: "memory", "d0", "d1", "d2", "d3", "q0", "q1"
|
||||
);
|
||||
}
|
||||
uint8x16_t vs = vld1q_u8((const uint8_t*)src);
|
||||
const uint8x16_t vd = vld1q_u8((uint8_t*)dst);
|
||||
vs = vqaddq_u8(vs, vd);
|
||||
vst1q_u8((uint8_t*)dst, vs);
|
||||
src += 4;
|
||||
dst += 4;
|
||||
};
|
||||
|
||||
while (dst != end) {
|
||||
*dst = comp_func_Plus_one_pixel(*dst, *src);
|
||||
@ -802,6 +868,7 @@ void QT_FASTCALL comp_func_Plus_neon(uint *dst, const uint *src, int length, uin
|
||||
}
|
||||
}
|
||||
|
||||
#if !defined(Q_PROCESSOR_ARM_64)
|
||||
static const int tileSize = 32;
|
||||
|
||||
extern "C" void qt_rotate90_16_neon(quint16 *dst, const quint16 *src, int sstride, int dstride, int count);
|
||||
@ -945,6 +1012,7 @@ void qt_memrotate270_16_neon(const uchar *srcPixels, int w, int h,
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
class QSimdNeon
|
||||
{
|
||||
|
@ -75,8 +75,15 @@ public:
|
||||
~QPlatformBackingStorePrivate()
|
||||
{
|
||||
#ifndef QT_NO_OPENGL
|
||||
if (blitter)
|
||||
blitter->destroy();
|
||||
QOpenGLContext *ctx = QOpenGLContext::currentContext();
|
||||
if (ctx) {
|
||||
if (textureId)
|
||||
ctx->functions()->glDeleteTextures(1, &textureId);
|
||||
if (blitter)
|
||||
blitter->destroy();
|
||||
} else if (textureId || blitter) {
|
||||
qWarning("No context current during QPlatformBackingStore destruction, OpenGL resources not released");
|
||||
}
|
||||
delete blitter;
|
||||
#endif
|
||||
}
|
||||
|
@ -1277,14 +1277,14 @@ int QTextEngine::shapeTextWithHarfbuzzNG(const QScriptItem &si, const ushort *st
|
||||
for (uint i = 0; i < num_glyphs; ++i)
|
||||
g.advances[i] *= stretch;
|
||||
}
|
||||
|
||||
if (actualFontEngine->fontDef.styleStrategy & QFont::ForceIntegerMetrics) {
|
||||
for (uint i = 0; i < num_glyphs; ++i)
|
||||
g.advances[i] = g.advances[i].round();
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
if (!actualFontEngine->supportsSubPixelPositions() || (actualFontEngine->fontDef.styleStrategy & QFont::ForceIntegerMetrics)) {
|
||||
for (uint i = 0; i < num_glyphs; ++i)
|
||||
g.advances[i] = g.advances[i].round();
|
||||
}
|
||||
|
||||
glyphs_shaped += num_glyphs;
|
||||
}
|
||||
|
||||
|
@ -279,6 +279,12 @@ void QTextOdfWriter::writeBlock(QXmlStreamWriter &writer, const QTextBlock &bloc
|
||||
writer.writeAttribute(textNS, QString::fromLatin1("style-name"), QString::fromLatin1("p%1")
|
||||
.arg(block.blockFormatIndex()));
|
||||
for (QTextBlock::Iterator frag = block.begin(); !frag.atEnd(); ++frag) {
|
||||
bool isHyperlink = frag.fragment().charFormat().hasProperty(QTextFormat::AnchorHref);
|
||||
if (isHyperlink) {
|
||||
QString value = frag.fragment().charFormat().property(QTextFormat::AnchorHref).toString();
|
||||
writer.writeStartElement(textNS, QString::fromLatin1("a"));
|
||||
writer.writeAttribute(xlinkNS, QString::fromLatin1("href"), value);
|
||||
}
|
||||
writer.writeCharacters(QString()); // Trick to make sure that the span gets no linefeed in front of it.
|
||||
writer.writeStartElement(textNS, QString::fromLatin1("span"));
|
||||
|
||||
@ -335,6 +341,9 @@ void QTextOdfWriter::writeBlock(QXmlStreamWriter &writer, const QTextBlock &bloc
|
||||
|
||||
writer.writeCharacters(fragmentText.mid(exportedIndex));
|
||||
writer.writeEndElement(); // span
|
||||
writer.writeCharacters(QString()); // Trick to make sure that the span gets no linefeed behind it.
|
||||
if (isHyperlink)
|
||||
writer.writeEndElement(); // a
|
||||
}
|
||||
writer.writeCharacters(QString()); // Trick to make sure that the span gets no linefeed behind it.
|
||||
writer.writeEndElement(); // p
|
||||
|
@ -197,7 +197,7 @@ bool QDesktopServices::openUrl(const QUrl &url)
|
||||
|
||||
QPlatformServices *platformServices = platformIntegration->services();
|
||||
if (!platformServices) {
|
||||
qWarning("%s: The platform plugin does not support services.", Q_FUNC_INFO);
|
||||
qWarning("The platform plugin does not support services.");
|
||||
return false;
|
||||
}
|
||||
return url.scheme() == QLatin1String("file") ?
|
||||
|
@ -492,7 +492,7 @@ void QHttpThreadDelegate::finishedSlot()
|
||||
if (httpReply->statusCode() >= 400) {
|
||||
// it's an error reply
|
||||
QString msg = QLatin1String(QT_TRANSLATE_NOOP("QNetworkReply",
|
||||
"Error downloading %1 - server replied: %2"));
|
||||
"Error transferring %1 - server replied: %2"));
|
||||
msg = msg.arg(httpRequest.url().toString(), httpReply->reasonPhrase());
|
||||
emit error(statusCodeFromHttp(httpReply->statusCode(), httpRequest.url()), msg);
|
||||
}
|
||||
@ -518,7 +518,7 @@ void QHttpThreadDelegate::synchronousFinishedSlot()
|
||||
if (httpReply->statusCode() >= 400) {
|
||||
// it's an error reply
|
||||
QString msg = QLatin1String(QT_TRANSLATE_NOOP("QNetworkReply",
|
||||
"Error downloading %1 - server replied: %2"));
|
||||
"Error transferring %1 - server replied: %2"));
|
||||
incomingErrorDetail = msg.arg(httpRequest.url().toString(), httpReply->reasonPhrase());
|
||||
incomingErrorCode = statusCodeFromHttp(httpReply->statusCode(), httpRequest.url());
|
||||
}
|
||||
|
@ -127,8 +127,10 @@ void QNetworkReplyImplPrivate::_q_startOperation()
|
||||
return;
|
||||
} else {
|
||||
#ifndef QT_NO_BEARERMANAGEMENT
|
||||
QObject::connect(session.data(), SIGNAL(stateChanged(QNetworkSession::State)),
|
||||
q, SLOT(_q_networkSessionStateChanged(QNetworkSession::State)), Qt::QueuedConnection);
|
||||
if (session) {
|
||||
QObject::connect(session.data(), SIGNAL(stateChanged(QNetworkSession::State)),
|
||||
q, SLOT(_q_networkSessionStateChanged(QNetworkSession::State)), Qt::QueuedConnection);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -452,7 +452,7 @@ bool QSpdyProtocolHandler::uncompressHeader(const QByteArray &input, QByteArray
|
||||
break;
|
||||
}
|
||||
default: {
|
||||
qWarning() << Q_FUNC_INFO << "got unexpected zlib return value:" << zlibRet;
|
||||
qWarning() << "got unexpected zlib return value:" << zlibRet;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@ -688,7 +688,7 @@ bool QSpdyProtocolHandler::uploadData(qint32 streamID)
|
||||
Q_ASSERT(replyPrivate);
|
||||
|
||||
if (reply->d_func()->state == QHttpNetworkReplyPrivate::SPDYHalfClosed || reply->d_func()->state == QHttpNetworkReplyPrivate::SPDYClosed) {
|
||||
qWarning() << Q_FUNC_INFO << "Trying to upload to closed stream";
|
||||
qWarning("Trying to upload to closed stream");
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -843,7 +843,7 @@ void QSpdyProtocolHandler::handleControlFrame(const QByteArray &frameHeaders) //
|
||||
break;
|
||||
}
|
||||
default:
|
||||
qWarning() << Q_FUNC_INFO << "cannot handle frame of type" << type;
|
||||
qWarning() << "cannot handle frame of type" << type;
|
||||
}
|
||||
}
|
||||
|
||||
@ -887,13 +887,13 @@ void QSpdyProtocolHandler::parseHttpHeaders(char flags, const QByteArray &frameD
|
||||
|
||||
QByteArray uncompressedHeader;
|
||||
if (!uncompressHeader(headerValuePairs, &uncompressedHeader)) {
|
||||
qWarning() << Q_FUNC_INFO << "error reading header from SYN_REPLY message";
|
||||
qWarning("error reading header from SYN_REPLY message");
|
||||
return;
|
||||
}
|
||||
|
||||
qint32 headerCount = fourBytesToInt(uncompressedHeader.constData());
|
||||
if (headerCount * 8 > uncompressedHeader.size()) {
|
||||
qWarning() << Q_FUNC_INFO << "error parsing header from SYN_REPLY message";
|
||||
qWarning("error parsing header from SYN_REPLY message");
|
||||
sendRST_STREAM(streamID, RST_STREAM_PROTOCOL_ERROR);
|
||||
return;
|
||||
}
|
||||
@ -904,7 +904,7 @@ void QSpdyProtocolHandler::parseHttpHeaders(char flags, const QByteArray &frameD
|
||||
QByteArray name = uncompressedHeader.mid(readPointer, count);
|
||||
readPointer += count;
|
||||
if (readPointer > uncompressedHeader.size()) {
|
||||
qWarning() << Q_FUNC_INFO << "error parsing header from SYN_REPLY message";
|
||||
qWarning("error parsing header from SYN_REPLY message");
|
||||
sendRST_STREAM(streamID, RST_STREAM_PROTOCOL_ERROR);
|
||||
return;
|
||||
}
|
||||
@ -913,7 +913,7 @@ void QSpdyProtocolHandler::parseHttpHeaders(char flags, const QByteArray &frameD
|
||||
QByteArray value = uncompressedHeader.mid(readPointer, count);
|
||||
readPointer += count;
|
||||
if (readPointer > uncompressedHeader.size()) {
|
||||
qWarning() << Q_FUNC_INFO << "error parsing header from SYN_REPLY message";
|
||||
qWarning("error parsing header from SYN_REPLY message");
|
||||
sendRST_STREAM(streamID, RST_STREAM_PROTOCOL_ERROR);
|
||||
return;
|
||||
}
|
||||
@ -1014,7 +1014,7 @@ void QSpdyProtocolHandler::handleRST_STREAM(char /*flags*/, quint32 length,
|
||||
errorMessage = "server cannot process the frame because it is too large";
|
||||
break;
|
||||
default:
|
||||
qWarning() << Q_FUNC_INFO << "could not understand servers RST_STREAM status code";
|
||||
qWarning("could not understand servers RST_STREAM status code");
|
||||
errorCode = QNetworkReply::ProtocolFailure;
|
||||
errorMessage = "got SPDY RST_STREAM message with unknown error code";
|
||||
}
|
||||
@ -1078,7 +1078,7 @@ void QSpdyProtocolHandler::handleSETTINGS(char flags, quint32 /*length*/, const
|
||||
break;
|
||||
}
|
||||
default:
|
||||
qWarning() << Q_FUNC_INFO << "found unknown settings value" << value;
|
||||
qWarning() << "found unknown settings value" << value;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1117,7 +1117,7 @@ void QSpdyProtocolHandler::handleGOAWAY(char /*flags*/, quint32 /*length*/,
|
||||
break;
|
||||
}
|
||||
default:
|
||||
qWarning() << Q_FUNC_INFO << "unexpected status code" << statusCode;
|
||||
qWarning() << "unexpected status code" << statusCode;
|
||||
errorCode = QNetworkReply::ProtocolUnknownError;
|
||||
}
|
||||
|
||||
@ -1252,7 +1252,7 @@ void QSpdyProtocolHandler::handleDataFrame(const QByteArray &frameHeaders)
|
||||
}
|
||||
|
||||
if (flag_compress) {
|
||||
qWarning() << Q_FUNC_INFO << "SPDY level compression is not supported";
|
||||
qWarning("SPDY level compression is not supported");
|
||||
}
|
||||
|
||||
if (flag_fin) {
|
||||
|
@ -41,7 +41,7 @@ void QDnsLookupRunnable::query(const int requestType, const QByteArray &requestN
|
||||
Q_UNUSED(requestName);
|
||||
Q_UNUSED(nameserver);
|
||||
Q_UNUSED(reply);
|
||||
qWarning() << Q_FUNC_INFO << "Not yet supported on Android";
|
||||
qWarning("Not yet supported on Android");
|
||||
reply->error = QDnsLookup::ResolverError;
|
||||
reply->errorString = tr("Not yet supported on Android");
|
||||
return;
|
||||
|
@ -166,7 +166,7 @@ void QDnsLookupRunnable::query(const int requestType, const QByteArray &requestN
|
||||
ns->sin6_addr.s6_addr[i] = ipv6Address[i];
|
||||
}
|
||||
#else
|
||||
qWarning() << Q_FUNC_INFO << "IPv6 addresses for nameservers is currently not supported";
|
||||
qWarning("IPv6 addresses for nameservers is currently not supported");
|
||||
reply->error = QDnsLookup::ResolverError;
|
||||
reply->errorString = tr("IPv6 addresses for nameservers is currently not supported");
|
||||
return;
|
||||
|
@ -60,9 +60,9 @@ void QDnsLookupRunnable::query(const int requestType, const QByteArray &requestN
|
||||
// For supoprting IPv6 nameserver addresses, we'll need to switch
|
||||
// from DnsQuey() to DnsQueryEx() as it supports passing an IPv6
|
||||
// address in the nameserver list
|
||||
qWarning() << Q_FUNC_INFO << "IPv6 addresses for nameservers is currently not supported";
|
||||
qWarning("IPv6 addresses for nameservers are currently not supported");
|
||||
reply->error = QDnsLookup::ResolverError;
|
||||
reply->errorString = tr("IPv6 addresses for nameservers is currently not supported");
|
||||
reply->errorString = tr("IPv6 addresses for nameservers are currently not supported");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
@ -672,6 +672,24 @@ int QNativeSocketEngine::accept()
|
||||
return d->nativeAccept();
|
||||
}
|
||||
|
||||
/*!
|
||||
Returns the number of bytes that are currently available for
|
||||
reading. On error, -1 is returned.
|
||||
|
||||
For UDP sockets, this function returns the accumulated size of all
|
||||
pending datagrams, and it is therefore more useful for UDP sockets
|
||||
to call hasPendingDatagrams() and pendingDatagramSize().
|
||||
*/
|
||||
qint64 QNativeSocketEngine::bytesAvailable() const
|
||||
{
|
||||
Q_D(const QNativeSocketEngine);
|
||||
Q_CHECK_VALID_SOCKETLAYER(QNativeSocketEngine::bytesAvailable(), -1);
|
||||
Q_CHECK_NOT_STATE(QNativeSocketEngine::bytesAvailable(), QAbstractSocket::UnconnectedState, -1);
|
||||
|
||||
return d->nativeBytesAvailable();
|
||||
}
|
||||
|
||||
#ifndef QT_NO_UDPSOCKET
|
||||
#ifndef QT_NO_NETWORKINTERFACE
|
||||
|
||||
/*!
|
||||
@ -733,23 +751,6 @@ bool QNativeSocketEngine::setMulticastInterface(const QNetworkInterface &iface)
|
||||
|
||||
#endif // QT_NO_NETWORKINTERFACE
|
||||
|
||||
/*!
|
||||
Returns the number of bytes that are currently available for
|
||||
reading. On error, -1 is returned.
|
||||
|
||||
For UDP sockets, this function returns the accumulated size of all
|
||||
pending datagrams, and it is therefore more useful for UDP sockets
|
||||
to call hasPendingDatagrams() and pendingDatagramSize().
|
||||
*/
|
||||
qint64 QNativeSocketEngine::bytesAvailable() const
|
||||
{
|
||||
Q_D(const QNativeSocketEngine);
|
||||
Q_CHECK_VALID_SOCKETLAYER(QNativeSocketEngine::bytesAvailable(), -1);
|
||||
Q_CHECK_NOT_STATE(QNativeSocketEngine::bytesAvailable(), QAbstractSocket::UnconnectedState, -1);
|
||||
|
||||
return d->nativeBytesAvailable();
|
||||
}
|
||||
|
||||
/*!
|
||||
Returns \c true if there is at least one datagram pending. This
|
||||
function is only called by UDP sockets, where a datagram can have
|
||||
@ -834,6 +835,7 @@ qint64 QNativeSocketEngine::writeDatagram(const char *data, qint64 size, const Q
|
||||
|
||||
return d->nativeSendDatagram(data, size, header);
|
||||
}
|
||||
#endif // QT_NO_UDPSOCKET
|
||||
|
||||
/*!
|
||||
Writes a block of \a size bytes from \a data to the socket.
|
||||
|
@ -125,6 +125,12 @@ public:
|
||||
int accept() Q_DECL_OVERRIDE;
|
||||
void close() Q_DECL_OVERRIDE;
|
||||
|
||||
qint64 bytesAvailable() const Q_DECL_OVERRIDE;
|
||||
|
||||
qint64 read(char *data, qint64 maxlen) Q_DECL_OVERRIDE;
|
||||
qint64 write(const char *data, qint64 len) Q_DECL_OVERRIDE;
|
||||
|
||||
#ifndef QT_NO_UDPSOCKET
|
||||
#ifndef QT_NO_NETWORKINTERFACE
|
||||
bool joinMulticastGroup(const QHostAddress &groupAddress,
|
||||
const QNetworkInterface &iface) Q_DECL_OVERRIDE;
|
||||
@ -134,16 +140,12 @@ public:
|
||||
bool setMulticastInterface(const QNetworkInterface &iface) Q_DECL_OVERRIDE;
|
||||
#endif
|
||||
|
||||
qint64 bytesAvailable() const Q_DECL_OVERRIDE;
|
||||
|
||||
qint64 read(char *data, qint64 maxlen) Q_DECL_OVERRIDE;
|
||||
qint64 write(const char *data, qint64 len) Q_DECL_OVERRIDE;
|
||||
|
||||
qint64 readDatagram(char *data, qint64 maxlen, QIpPacketHeader * = 0,
|
||||
PacketHeaderOptions = WantNone) Q_DECL_OVERRIDE;
|
||||
qint64 writeDatagram(const char *data, qint64 len, const QIpPacketHeader &) Q_DECL_OVERRIDE;
|
||||
bool hasPendingDatagrams() const Q_DECL_OVERRIDE;
|
||||
qint64 pendingDatagramSize() const Q_DECL_OVERRIDE;
|
||||
#endif // QT_NO_UDPSOCKET
|
||||
|
||||
qint64 bytesToWrite() const Q_DECL_OVERRIDE;
|
||||
|
||||
|
@ -78,6 +78,21 @@ typedef IAsyncOperationWithProgress<IBuffer *, UINT32> IAsyncBufferOperation;
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
static QByteArray socketDescription(const QAbstractSocketEngine *s)
|
||||
{
|
||||
QByteArray result;
|
||||
if (const QObject *o = s->parent()) {
|
||||
const QString name = o->objectName();
|
||||
if (!name.isEmpty()) {
|
||||
result += '"';
|
||||
result += name.toLocal8Bit();
|
||||
result += "\"/";
|
||||
}
|
||||
result += o->metaObject()->className();
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
// Common constructs
|
||||
#define Q_CHECK_VALID_SOCKETLAYER(function, returnValue) do { \
|
||||
if (!isValid()) { \
|
||||
@ -275,8 +290,9 @@ bool QNativeSocketEngine::connectToHostByName(const QString &name, quint16 port)
|
||||
else if (d->socketType == QAbstractSocket::UdpSocket)
|
||||
hr = d->udpSocket()->ConnectAsync(remoteHost.Get(), portReference.Get(), &d->connectOp);
|
||||
if (hr == E_ACCESSDENIED) {
|
||||
qErrnoWarning(hr, "QNativeSocketEngine::connectToHostByName: Unable to connect to host. \
|
||||
Please check your manifest capabilities.");
|
||||
qErrnoWarning(hr, "QNativeSocketEngine::connectToHostByName: Unable to connect to host (%s:%hu/%s). "
|
||||
"Please check your manifest capabilities.",
|
||||
qPrintable(name), port, socketDescription(this).constData());
|
||||
return false;
|
||||
}
|
||||
Q_ASSERT_SUCCEEDED(hr);
|
||||
@ -328,7 +344,8 @@ bool QNativeSocketEngine::bind(const QHostAddress &address, quint16 port)
|
||||
hr = d->udpSocket()->BindEndpointAsync(hostAddress.Get(), portString.Get(), &op);
|
||||
}
|
||||
if (hr == E_ACCESSDENIED) {
|
||||
qErrnoWarning(hr, "Unable to bind socket. Please check your manifest capabilities.");
|
||||
qErrnoWarning(hr, "Unable to bind socket (%s:%hu/%s). Please check your manifest capabilities.",
|
||||
qPrintable(address.toString()), port, socketDescription(this).constData());
|
||||
return false;
|
||||
}
|
||||
Q_ASSERT_SUCCEEDED(hr);
|
||||
@ -381,12 +398,14 @@ int QNativeSocketEngine::accept()
|
||||
ComPtr<IAsyncBufferOperation> op;
|
||||
hr = stream->ReadAsync(buffer.Get(), READ_BUFFER_SIZE, InputStreamOptions_Partial, &op);
|
||||
if (FAILED(hr)) {
|
||||
qErrnoWarning(hr, "Faild to read from the socket buffer.");
|
||||
qErrnoWarning(hr, "accept(): Failed to read from the socket buffer (%s).",
|
||||
socketDescription(this).constData());
|
||||
return -1;
|
||||
}
|
||||
hr = op->put_Completed(Callback<SocketReadCompletedHandler>(d, &QNativeSocketEnginePrivate::handleReadyRead).Get());
|
||||
if (FAILED(hr)) {
|
||||
qErrnoWarning(hr, "Failed to set socket read callback.");
|
||||
qErrnoWarning(hr, "accept(): Failed to set socket read callback (%s).",
|
||||
socketDescription(this).constData());
|
||||
return -1;
|
||||
}
|
||||
d->currentConnections.append(socket);
|
||||
@ -1272,12 +1291,14 @@ HRESULT QNativeSocketEnginePrivate::handleReadyRead(IAsyncBufferOperation *async
|
||||
ComPtr<IAsyncBufferOperation> op;
|
||||
hr = stream->ReadAsync(buffer.Get(), bufferLength, InputStreamOptions_Partial, &op);
|
||||
if (FAILED(hr)) {
|
||||
qErrnoWarning(hr, "Could not read into socket stream buffer.");
|
||||
qErrnoWarning(hr, "handleReadyRead(): Could not read into socket stream buffer (%s).",
|
||||
socketDescription(q).constData());
|
||||
return S_OK;
|
||||
}
|
||||
hr = op->put_Completed(Callback<SocketReadCompletedHandler>(this, &QNativeSocketEnginePrivate::handleReadyRead).Get());
|
||||
if (FAILED(hr)) {
|
||||
qErrnoWarning(hr, "Failed to set socket read callback.");
|
||||
qErrnoWarning(hr, "handleReadyRead(): Failed to set socket read callback (%s).",
|
||||
socketDescription(q).constData());
|
||||
return S_OK;
|
||||
}
|
||||
return S_OK;
|
||||
|
@ -51,12 +51,291 @@
|
||||
#include <algorithm>
|
||||
#include <cstddef>
|
||||
|
||||
#include <QtCore/private/qcore_mac_p.h>
|
||||
|
||||
#ifdef Q_OS_OSX
|
||||
#include <CoreServices/CoreServices.h>
|
||||
#endif
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
static SSLContextRef qt_createSecureTransportContext(QSslSocket::SslMode mode)
|
||||
{
|
||||
const bool isServer = mode == QSslSocket::SslServerMode;
|
||||
SSLContextRef context = Q_NULLPTR;
|
||||
|
||||
#ifndef Q_OS_OSX
|
||||
const SSLProtocolSide side = isServer ? kSSLServerSide : kSSLClientSide;
|
||||
// We never use kSSLDatagramType, so it's kSSLStreamType unconditionally.
|
||||
context = SSLCreateContext(Q_NULLPTR, side, kSSLStreamType);
|
||||
if (!context)
|
||||
qCWarning(lcSsl) << "SSLCreateContext failed";
|
||||
#else // Q_OS_OSX
|
||||
|
||||
#if QT_MAC_PLATFORM_SDK_EQUAL_OR_ABOVE(__MAC_10_8, __IPHONE_NA)
|
||||
if (QSysInfo::MacintoshVersion >= QSysInfo::MV_10_8) {
|
||||
const SSLProtocolSide side = isServer ? kSSLServerSide : kSSLClientSide;
|
||||
// We never use kSSLDatagramType, so it's kSSLStreamType unconditionally.
|
||||
context = SSLCreateContext(Q_NULLPTR, side, kSSLStreamType);
|
||||
if (!context)
|
||||
qCWarning(lcSsl) << "SSLCreateContext failed";
|
||||
} else {
|
||||
#else
|
||||
{
|
||||
#endif
|
||||
const OSStatus errCode = SSLNewContext(isServer, &context);
|
||||
if (errCode != noErr || !context)
|
||||
qCWarning(lcSsl) << "SSLNewContext failed with error:" << errCode;
|
||||
}
|
||||
#endif // !Q_OS_OSX
|
||||
|
||||
return context;
|
||||
}
|
||||
|
||||
static void qt_releaseSecureTransportContext(SSLContextRef context)
|
||||
{
|
||||
if (!context)
|
||||
return;
|
||||
|
||||
#ifndef Q_OS_OSX
|
||||
CFRelease(context);
|
||||
#else
|
||||
|
||||
#if QT_MAC_PLATFORM_SDK_EQUAL_OR_ABOVE(__MAC_10_8, __IPHONE_NA)
|
||||
if (QSysInfo::MacintoshVersion >= QSysInfo::MV_10_8) {
|
||||
CFRelease(context);
|
||||
} else {
|
||||
#else
|
||||
{
|
||||
#endif // QT_MAC_PLATFORM_...
|
||||
const OSStatus errCode = SSLDisposeContext(context);
|
||||
if (errCode != noErr)
|
||||
qCWarning(lcSsl) << "SSLDisposeContext failed with error:" << errCode;
|
||||
}
|
||||
#endif // !Q_OS_OSX
|
||||
}
|
||||
|
||||
static bool qt_setSessionProtocol(SSLContextRef context, const QSslConfigurationPrivate &configuration,
|
||||
QTcpSocket *plainSocket)
|
||||
{
|
||||
Q_ASSERT(context);
|
||||
|
||||
#ifndef QSSLSOCKET_DEBUG
|
||||
Q_UNUSED(plainSocket)
|
||||
#endif
|
||||
|
||||
OSStatus err = noErr;
|
||||
|
||||
#if QT_MAC_PLATFORM_SDK_EQUAL_OR_ABOVE(__MAC_10_8, __IPHONE_5_0)
|
||||
if (configuration.protocol == QSsl::SslV3) {
|
||||
#ifdef QSSLSOCKET_DEBUG
|
||||
qCDebug(lcSsl) << plainSocket << "requesting : SSLv3";
|
||||
#endif
|
||||
err = SSLSetProtocolVersionMin(context, kSSLProtocol3);
|
||||
if (err == noErr)
|
||||
err = SSLSetProtocolVersionMax(context, kSSLProtocol3);
|
||||
} else if (configuration.protocol == QSsl::TlsV1_0) {
|
||||
#ifdef QSSLSOCKET_DEBUG
|
||||
qCDebug(lcSsl) << plainSocket << "requesting : TLSv1.0";
|
||||
#endif
|
||||
err = SSLSetProtocolVersionMin(context, kTLSProtocol1);
|
||||
if (err == noErr)
|
||||
err = SSLSetProtocolVersionMax(context, kTLSProtocol1);
|
||||
} else if (configuration.protocol == QSsl::TlsV1_1) {
|
||||
#ifdef QSSLSOCKET_DEBUG
|
||||
qCDebug(lcSsl) << plainSocket << "requesting : TLSv1.1";
|
||||
#endif
|
||||
err = SSLSetProtocolVersionMin(context, kTLSProtocol11);
|
||||
if (err == noErr)
|
||||
err = SSLSetProtocolVersionMax(context, kTLSProtocol11);
|
||||
} else if (configuration.protocol == QSsl::TlsV1_2) {
|
||||
#ifdef QSSLSOCKET_DEBUG
|
||||
qCDebug(lcSsl) << plainSocket << "requesting : TLSv1.2";
|
||||
#endif
|
||||
err = SSLSetProtocolVersionMin(context, kTLSProtocol12);
|
||||
if (err == noErr)
|
||||
err = SSLSetProtocolVersionMax(context, kTLSProtocol12);
|
||||
} else if (configuration.protocol == QSsl::AnyProtocol) {
|
||||
#ifdef QSSLSOCKET_DEBUG
|
||||
qCDebug(lcSsl) << plainSocket << "requesting : any";
|
||||
#endif
|
||||
// kSSLProtocol3, since kSSLProtocol2 is disabled:
|
||||
err = SSLSetProtocolVersionMin(context, kSSLProtocol3);
|
||||
if (err == noErr)
|
||||
err = SSLSetProtocolVersionMax(context, kTLSProtocol12);
|
||||
} else if (configuration.protocol == QSsl::TlsV1SslV3) {
|
||||
#ifdef QSSLSOCKET_DEBUG
|
||||
qCDebug(lcSsl) << plainSocket << "requesting : SSLv3 - TLSv1.2";
|
||||
#endif
|
||||
err = SSLSetProtocolVersionMin(context, kSSLProtocol3);
|
||||
if (err == noErr)
|
||||
err = SSLSetProtocolVersionMax(context, kTLSProtocol12);
|
||||
} else if (configuration.protocol == QSsl::SecureProtocols) {
|
||||
#ifdef QSSLSOCKET_DEBUG
|
||||
qCDebug(lcSsl) << plainSocket << "requesting : TLSv1 - TLSv1.2";
|
||||
#endif
|
||||
err = SSLSetProtocolVersionMin(context, kTLSProtocol1);
|
||||
if (err == noErr)
|
||||
err = SSLSetProtocolVersionMax(context, kTLSProtocol12);
|
||||
} else if (configuration.protocol == QSsl::TlsV1_0OrLater) {
|
||||
#ifdef QSSLSOCKET_DEBUG
|
||||
qCDebug(lcSsl) << plainSocket << "requesting : TLSv1 - TLSv1.2";
|
||||
#endif
|
||||
err = SSLSetProtocolVersionMin(context, kTLSProtocol1);
|
||||
if (err == noErr)
|
||||
err = SSLSetProtocolVersionMax(context, kTLSProtocol12);
|
||||
} else if (configuration.protocol == QSsl::TlsV1_1OrLater) {
|
||||
#ifdef QSSLSOCKET_DEBUG
|
||||
qCDebug(lcSsl) << plainSocket << "requesting : TLSv1.1 - TLSv1.2";
|
||||
#endif
|
||||
err = SSLSetProtocolVersionMin(context, kTLSProtocol11);
|
||||
if (err == noErr)
|
||||
err = SSLSetProtocolVersionMax(context, kTLSProtocol12);
|
||||
} else if (configuration.protocol == QSsl::TlsV1_2OrLater) {
|
||||
#ifdef QSSLSOCKET_DEBUG
|
||||
qCDebug(lcSsl) << plainSocket << "requesting : TLSv1.2";
|
||||
#endif
|
||||
err = SSLSetProtocolVersionMin(context, kTLSProtocol12);
|
||||
if (err == noErr)
|
||||
err = SSLSetProtocolVersionMax(context, kTLSProtocol12);
|
||||
} else {
|
||||
#ifdef QSSLSOCKET_DEBUG
|
||||
qCDebug(lcSsl) << plainSocket << "no protocol version found in the configuration";
|
||||
#endif
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
|
||||
return err == noErr;
|
||||
}
|
||||
|
||||
#ifdef Q_OS_OSX
|
||||
|
||||
static bool qt_setSessionProtocolOSX(SSLContextRef context, const QSslConfigurationPrivate &configuration,
|
||||
QTcpSocket *plainSocket)
|
||||
{
|
||||
// This function works with (now) deprecated API that does not even exist on
|
||||
// iOS but is the only API we have on OS X below 10.8
|
||||
|
||||
// Without SSLSetProtocolVersionMin/Max functions it's quite difficult
|
||||
// to have the required result:
|
||||
// If we use SSLSetProtocolVersion - any constant except the ones with 'Only' suffix -
|
||||
// allows a negotiation and we can not set the lower limit.
|
||||
// SSLSetProtocolVersionEnabled supports only a limited subset of constants, if you believe their docs:
|
||||
// kSSLProtocol2
|
||||
// kSSLProtocol3
|
||||
// kTLSProtocol1
|
||||
// kSSLProtocolAll
|
||||
// Here we can only have a look into the SecureTransport's code and hope that what we see there
|
||||
// and what we have on 10.7 is similar:
|
||||
// SSLSetProtocoLVersionEnabled actually accepts other constants also,
|
||||
// called twice with two different protocols it sets a range,
|
||||
// called once with a protocol (when all protocols were disabled)
|
||||
// - only this protocol is enabled (without a lower limit negotiation).
|
||||
|
||||
Q_ASSERT(context);
|
||||
|
||||
#ifndef QSSLSOCKET_DEBUG
|
||||
Q_UNUSED(plainSocket)
|
||||
#endif
|
||||
|
||||
OSStatus err = noErr;
|
||||
|
||||
// First, disable ALL:
|
||||
if (SSLSetProtocolVersionEnabled(context, kSSLProtocolAll, false) != noErr)
|
||||
return false;
|
||||
|
||||
if (configuration.protocol == QSsl::SslV3) {
|
||||
#ifdef QSSLSOCKET_DEBUG
|
||||
qCDebug(lcSsl) << plainSocket << "requesting : SSLv3";
|
||||
#endif
|
||||
err = SSLSetProtocolVersion(context, kSSLProtocol3Only);
|
||||
} else if (configuration.protocol == QSsl::TlsV1_0) {
|
||||
#ifdef QSSLSOCKET_DEBUG
|
||||
qCDebug(lcSsl) << plainSocket << "requesting : TLSv1.0";
|
||||
#endif
|
||||
err = SSLSetProtocolVersion(context, kTLSProtocol1Only);
|
||||
} else if (configuration.protocol == QSsl::TlsV1_1) {
|
||||
#ifdef QSSLSOCKET_DEBUG
|
||||
qCDebug(lcSsl) << plainSocket << "requesting : TLSv1.1";
|
||||
#endif
|
||||
err = SSLSetProtocolVersionEnabled(context, kTLSProtocol11, true);
|
||||
} else if (configuration.protocol == QSsl::TlsV1_2) {
|
||||
#ifdef QSSLSOCKET_DEBUG
|
||||
qCDebug(lcSsl) << plainSocket << "requesting : TLSv1.2";
|
||||
#endif
|
||||
err = SSLSetProtocolVersionEnabled(context, kTLSProtocol12, true);
|
||||
} else if (configuration.protocol == QSsl::AnyProtocol) {
|
||||
#ifdef QSSLSOCKET_DEBUG
|
||||
qCDebug(lcSsl) << plainSocket << "requesting : any";
|
||||
#endif
|
||||
err = SSLSetProtocolVersionEnabled(context, kSSLProtocolAll, true);
|
||||
} else if (configuration.protocol == QSsl::TlsV1SslV3) {
|
||||
#ifdef QSSLSOCKET_DEBUG
|
||||
qCDebug(lcSsl) << plainSocket << "requesting : SSLv3 - TLSv1.2";
|
||||
#endif
|
||||
err = SSLSetProtocolVersionEnabled(context, kTLSProtocol12, true);
|
||||
if (err == noErr)
|
||||
err = SSLSetProtocolVersionEnabled(context, kSSLProtocol3, true);
|
||||
} else if (configuration.protocol == QSsl::SecureProtocols) {
|
||||
#ifdef QSSLSOCKET_DEBUG
|
||||
qCDebug(lcSsl) << plainSocket << "requesting : TLSv1 - TLSv1.2";
|
||||
#endif
|
||||
err = SSLSetProtocolVersionEnabled(context, kTLSProtocol12, true);
|
||||
if (err == noErr)
|
||||
err = SSLSetProtocolVersionEnabled(context, kTLSProtocol1, true);
|
||||
} else if (configuration.protocol == QSsl::TlsV1_0OrLater) {
|
||||
#ifdef QSSLSOCKET_DEBUG
|
||||
qCDebug(lcSsl) << plainSocket << "requesting : TLSv1 - TLSv1.2";
|
||||
#endif
|
||||
err = SSLSetProtocolVersionEnabled(context, kTLSProtocol12, true);
|
||||
if (err == noErr)
|
||||
err = SSLSetProtocolVersionEnabled(context, kTLSProtocol1, true);
|
||||
} else if (configuration.protocol == QSsl::TlsV1_1OrLater) {
|
||||
#ifdef QSSLSOCKET_DEBUG
|
||||
qCDebug(lcSsl) << plainSocket << "requesting : TLSv1.1 - TLSv1.2";
|
||||
#endif
|
||||
err = SSLSetProtocolVersionEnabled(context, kTLSProtocol12, true);
|
||||
if (err == noErr)
|
||||
err = SSLSetProtocolVersionEnabled(context, kTLSProtocol11, true);
|
||||
} else if (configuration.protocol == QSsl::TlsV1_2OrLater) {
|
||||
#ifdef QSSLSOCKET_DEBUG
|
||||
qCDebug(lcSsl) << plainSocket << "requesting : TLSv1.2";
|
||||
#endif
|
||||
err = SSLSetProtocolVersionEnabled(context, kTLSProtocol12, true);
|
||||
} else {
|
||||
#ifdef QSSLSOCKET_DEBUG
|
||||
qCDebug(lcSsl) << plainSocket << "no protocol version found in the configuration";
|
||||
#endif
|
||||
return false;
|
||||
}
|
||||
|
||||
return err == noErr;
|
||||
}
|
||||
|
||||
#endif // Q_OS_OSX
|
||||
|
||||
QSecureTransportContext::QSecureTransportContext(SSLContextRef c)
|
||||
: context(c)
|
||||
{
|
||||
}
|
||||
|
||||
QSecureTransportContext::~QSecureTransportContext()
|
||||
{
|
||||
qt_releaseSecureTransportContext(context);
|
||||
}
|
||||
|
||||
QSecureTransportContext::operator SSLContextRef()const
|
||||
{
|
||||
return context;
|
||||
}
|
||||
|
||||
void QSecureTransportContext::reset(SSLContextRef newContext)
|
||||
{
|
||||
qt_releaseSecureTransportContext(context);
|
||||
context = newContext;
|
||||
}
|
||||
|
||||
Q_GLOBAL_STATIC_WITH_ARGS(QMutex, qt_securetransport_mutex, (QMutex::Recursive))
|
||||
|
||||
//#define QSSLSOCKET_DEBUG
|
||||
@ -144,7 +423,7 @@ void QSslSocketPrivate::ensureInitialized()
|
||||
// from QSslCertificatePrivate's ctor.
|
||||
s_loadedCiphersAndCerts = true;
|
||||
|
||||
QCFType<SSLContextRef> context(SSLCreateContext(Q_NULLPTR, kSSLClientSide, kSSLStreamType));
|
||||
const QSecureTransportContext context(qt_createSecureTransportContext(QSslSocket::SslClientMode));
|
||||
if (context) {
|
||||
QList<QSslCipher> ciphers;
|
||||
QList<QSslCipher> defaultCiphers;
|
||||
@ -171,7 +450,6 @@ void QSslSocketPrivate::ensureInitialized()
|
||||
if (!s_loadRootCertsOnDemand)
|
||||
setDefaultCaCertificates(systemCaCertificates());
|
||||
} else {
|
||||
qCWarning(lcSsl) << "SSLCreateContext failed";
|
||||
s_loadedCiphersAndCerts = false;
|
||||
}
|
||||
|
||||
@ -640,11 +918,7 @@ bool QSslSocketBackendPrivate::initSslContext()
|
||||
Q_ASSERT_X(!context, Q_FUNC_INFO, "invalid socket state, context is not null");
|
||||
Q_ASSERT(plainSocket);
|
||||
|
||||
SSLProtocolSide side = kSSLClientSide;
|
||||
if (mode == QSslSocket::SslServerMode)
|
||||
side = kSSLServerSide;
|
||||
|
||||
context = SSLCreateContext(Q_NULLPTR, side, kSSLStreamType);
|
||||
context.reset(qt_createSecureTransportContext(mode));
|
||||
if (!context) {
|
||||
setErrorAndEmit(QAbstractSocket::SslInternalError, "SSLCreateContext failed");
|
||||
return false;
|
||||
@ -740,7 +1014,7 @@ bool QSslSocketBackendPrivate::initSslContext()
|
||||
|
||||
void QSslSocketBackendPrivate::destroySslContext()
|
||||
{
|
||||
context = Q_NULLPTR;
|
||||
context.reset(Q_NULLPTR);
|
||||
}
|
||||
|
||||
static QByteArray _q_makePkcs12(const QList<QSslCertificate> &certs, const QSslKey &key, const QString &passPhrase);
|
||||
@ -837,8 +1111,6 @@ bool QSslSocketBackendPrivate::setSessionProtocol()
|
||||
{
|
||||
Q_ASSERT_X(context, Q_FUNC_INFO, "invalid SSL context (null)");
|
||||
|
||||
OSStatus err = noErr;
|
||||
|
||||
// QSsl::SslV2 == kSSLProtocol2 is disabled in secure transport and
|
||||
// always fails with errSSLIllegalParam:
|
||||
// if (version < MINIMUM_STREAM_VERSION || version > MAXIMUM_STREAM_VERSION)
|
||||
@ -849,85 +1121,20 @@ bool QSslSocketBackendPrivate::setSessionProtocol()
|
||||
return false;
|
||||
}
|
||||
|
||||
if (configuration.protocol == QSsl::SslV3) {
|
||||
#ifdef QSSLSOCKET_DEBUG
|
||||
qCDebug(lcSsl) << plainSocket << "requesting : SSLv3";
|
||||
#endif
|
||||
err = SSLSetProtocolVersionMin(context, kSSLProtocol3);
|
||||
if (err == noErr)
|
||||
err = SSLSetProtocolVersionMax(context, kSSLProtocol3);
|
||||
} else if (configuration.protocol == QSsl::TlsV1_0) {
|
||||
#ifdef QSSLSOCKET_DEBUG
|
||||
qCDebug(lcSsl) << plainSocket << "requesting : TLSv1.0";
|
||||
#endif
|
||||
err = SSLSetProtocolVersionMin(context, kTLSProtocol1);
|
||||
if (err == noErr)
|
||||
err = SSLSetProtocolVersionMax(context, kTLSProtocol1);
|
||||
} else if (configuration.protocol == QSsl::TlsV1_1) {
|
||||
#ifdef QSSLSOCKET_DEBUG
|
||||
qCDebug(lcSsl) << plainSocket << "requesting : TLSv1.1";
|
||||
#endif
|
||||
err = SSLSetProtocolVersionMin(context, kTLSProtocol11);
|
||||
if (err == noErr)
|
||||
err = SSLSetProtocolVersionMax(context, kTLSProtocol11);
|
||||
} else if (configuration.protocol == QSsl::TlsV1_2) {
|
||||
#ifdef QSSLSOCKET_DEBUG
|
||||
qCDebug(lcSsl) << plainSocket << "requesting : TLSv1.2";
|
||||
#endif
|
||||
err = SSLSetProtocolVersionMin(context, kTLSProtocol12);
|
||||
if (err == noErr)
|
||||
err = SSLSetProtocolVersionMax(context, kTLSProtocol12);
|
||||
} else if (configuration.protocol == QSsl::AnyProtocol) {
|
||||
#ifdef QSSLSOCKET_DEBUG
|
||||
qCDebug(lcSsl) << plainSocket << "requesting : any";
|
||||
#endif
|
||||
// kSSLProtocol3, since kSSLProtocol2 is disabled:
|
||||
err = SSLSetProtocolVersionMin(context, kSSLProtocol3);
|
||||
if (err == noErr)
|
||||
err = SSLSetProtocolVersionMax(context, kTLSProtocol12);
|
||||
} else if (configuration.protocol == QSsl::TlsV1SslV3) {
|
||||
#ifdef QSSLSOCKET_DEBUG
|
||||
qCDebug(lcSsl) << plainSocket << "requesting : SSLv3 - TLSv1.2";
|
||||
#endif
|
||||
err = SSLSetProtocolVersionMin(context, kSSLProtocol3);
|
||||
if (err == noErr)
|
||||
err = SSLSetProtocolVersionMax(context, kTLSProtocol12);
|
||||
} else if (configuration.protocol == QSsl::SecureProtocols) {
|
||||
#ifdef QSSLSOCKET_DEBUG
|
||||
qCDebug(lcSsl) << plainSocket << "requesting : TLSv1 - TLSv1.2";
|
||||
#endif
|
||||
err = SSLSetProtocolVersionMin(context, kTLSProtocol1);
|
||||
if (err == noErr)
|
||||
err = SSLSetProtocolVersionMax(context, kTLSProtocol12);
|
||||
} else if (configuration.protocol == QSsl::TlsV1_0OrLater) {
|
||||
#ifdef QSSLSOCKET_DEBUG
|
||||
qCDebug(lcSsl) << plainSocket << "requesting : TLSv1 - TLSv1.2";
|
||||
#endif
|
||||
err = SSLSetProtocolVersionMin(context, kTLSProtocol1);
|
||||
if (err == noErr)
|
||||
err = SSLSetProtocolVersionMax(context, kTLSProtocol12);
|
||||
} else if (configuration.protocol == QSsl::TlsV1_1OrLater) {
|
||||
#ifdef QSSLSOCKET_DEBUG
|
||||
qCDebug(lcSsl) << plainSocket << "requesting : TLSv1.1 - TLSv1.2";
|
||||
#endif
|
||||
err = SSLSetProtocolVersionMin(context, kTLSProtocol11);
|
||||
if (err == noErr)
|
||||
err = SSLSetProtocolVersionMax(context, kTLSProtocol12);
|
||||
} else if (configuration.protocol == QSsl::TlsV1_2OrLater) {
|
||||
#ifdef QSSLSOCKET_DEBUG
|
||||
qCDebug(lcSsl) << plainSocket << "requesting : TLSv1.2";
|
||||
#endif
|
||||
err = SSLSetProtocolVersionMin(context, kTLSProtocol12);
|
||||
if (err == noErr)
|
||||
err = SSLSetProtocolVersionMax(context, kTLSProtocol12);
|
||||
} else {
|
||||
#ifdef QSSLSOCKET_DEBUG
|
||||
qCDebug(lcSsl) << plainSocket << "no protocol version found in the configuration";
|
||||
#endif
|
||||
return false;
|
||||
}
|
||||
#ifndef Q_OS_OSX
|
||||
return qt_setSessionProtocol(context, configuration, plainSocket);
|
||||
#else
|
||||
|
||||
return err == noErr;
|
||||
#if QT_MAC_PLATFORM_SDK_EQUAL_OR_ABOVE(__MAC_10_8, __IPHONE_NA)
|
||||
if (QSysInfo::MacintoshVersion >= QSysInfo::MV_10_8) {
|
||||
return qt_setSessionProtocol(context, configuration, plainSocket);
|
||||
} else {
|
||||
#else
|
||||
{
|
||||
#endif
|
||||
return qt_setSessionProtocolOSX(context, configuration, plainSocket);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
bool QSslSocketBackendPrivate::canIgnoreTrustVerificationFailure() const
|
||||
|
@ -45,8 +45,6 @@
|
||||
// We mean it.
|
||||
//
|
||||
|
||||
#include <QtCore/private/qcore_mac_p.h>
|
||||
|
||||
#include <QtCore/qstring.h>
|
||||
#include <QtCore/qglobal.h>
|
||||
#include <QtCore/qlist.h>
|
||||
@ -59,6 +57,20 @@
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
class QSecureTransportContext
|
||||
{
|
||||
public:
|
||||
explicit QSecureTransportContext(SSLContextRef context);
|
||||
~QSecureTransportContext();
|
||||
|
||||
operator SSLContextRef () const;
|
||||
void reset(SSLContextRef newContext);
|
||||
private:
|
||||
SSLContextRef context;
|
||||
|
||||
Q_DISABLE_COPY(QSecureTransportContext);
|
||||
};
|
||||
|
||||
class QSslSocketBackendPrivate : public QSslSocketPrivate
|
||||
{
|
||||
Q_DECLARE_PUBLIC(QSslSocket)
|
||||
@ -76,8 +88,8 @@ public:
|
||||
void startServerEncryption() Q_DECL_OVERRIDE;
|
||||
void transmit() Q_DECL_OVERRIDE;
|
||||
|
||||
static QList<QSslError> (verify)(QList<QSslCertificate> certificateChain,
|
||||
const QString &hostName);
|
||||
static QList<QSslError> verify(QList<QSslCertificate> certificateChain,
|
||||
const QString &hostName);
|
||||
|
||||
static bool importPkcs12(QIODevice *device,
|
||||
QSslKey *key, QSslCertificate *cert,
|
||||
@ -101,7 +113,7 @@ private:
|
||||
bool checkSslErrors();
|
||||
bool startHandshake();
|
||||
|
||||
mutable QCFType<SSLContextRef> context;
|
||||
QSecureTransportContext context;
|
||||
|
||||
Q_DISABLE_COPY(QSslSocketBackendPrivate);
|
||||
};
|
||||
|
@ -246,8 +246,7 @@ bool QGLShaderPrivate::create()
|
||||
else
|
||||
shader = glfuncs->glCreateShader(GL_FRAGMENT_SHADER);
|
||||
if (!shader) {
|
||||
qWarning("%s: Could not create shader of type %d.",
|
||||
Q_FUNC_INFO, int(shaderType));
|
||||
qWarning("Could not create shader of type %d.", int(shaderType));
|
||||
return false;
|
||||
}
|
||||
shaderGuard = createSharedResourceGuard(context, shader, freeShaderFunc);
|
||||
|
@ -71,6 +71,7 @@ QOpenGLCompositorBackingStore::QOpenGLCompositorBackingStore(QWindow *window)
|
||||
: QPlatformBackingStore(window),
|
||||
m_window(window),
|
||||
m_bsTexture(0),
|
||||
m_bsTextureContext(0),
|
||||
m_textures(new QPlatformTextureList),
|
||||
m_lockedWidgetTextures(0)
|
||||
{
|
||||
@ -78,6 +79,14 @@ QOpenGLCompositorBackingStore::QOpenGLCompositorBackingStore(QWindow *window)
|
||||
|
||||
QOpenGLCompositorBackingStore::~QOpenGLCompositorBackingStore()
|
||||
{
|
||||
if (m_bsTexture) {
|
||||
QOpenGLContext *ctx = QOpenGLContext::currentContext();
|
||||
if (ctx && m_bsTextureContext && ctx->shareGroup() == m_bsTextureContext->shareGroup())
|
||||
glDeleteTextures(1, &m_bsTexture);
|
||||
else
|
||||
qWarning("QOpenGLCompositorBackingStore: Texture is not valid in the current context");
|
||||
}
|
||||
|
||||
delete m_textures;
|
||||
}
|
||||
|
||||
@ -89,6 +98,8 @@ QPaintDevice *QOpenGLCompositorBackingStore::paintDevice()
|
||||
void QOpenGLCompositorBackingStore::updateTexture()
|
||||
{
|
||||
if (!m_bsTexture) {
|
||||
m_bsTextureContext = QOpenGLContext::currentContext();
|
||||
Q_ASSERT(m_bsTextureContext);
|
||||
glGenTextures(1, &m_bsTexture);
|
||||
glBindTexture(GL_TEXTURE_2D, m_bsTexture);
|
||||
glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
|
||||
|
@ -83,6 +83,7 @@ private:
|
||||
QImage m_image;
|
||||
QRegion m_dirty;
|
||||
uint m_bsTexture;
|
||||
QOpenGLContext *m_bsTextureContext;
|
||||
QPlatformTextureList *m_textures;
|
||||
QPlatformTextureList *m_lockedWidgetTextures;
|
||||
};
|
||||
|
@ -134,7 +134,7 @@ bool QGenericUnixServices::openUrl(const QUrl &url)
|
||||
return openDocument(url);
|
||||
|
||||
if (m_webBrowser.isEmpty() && !detectWebBrowser(desktopEnvironment(), true, &m_webBrowser)) {
|
||||
qWarning("%s: Unable to detect a web browser to launch '%s'", Q_FUNC_INFO, qPrintable(url.toString()));
|
||||
qWarning("Unable to detect a web browser to launch '%s'", qPrintable(url.toString()));
|
||||
return false;
|
||||
}
|
||||
return launch(m_webBrowser, url);
|
||||
@ -143,7 +143,7 @@ bool QGenericUnixServices::openUrl(const QUrl &url)
|
||||
bool QGenericUnixServices::openDocument(const QUrl &url)
|
||||
{
|
||||
if (m_documentLauncher.isEmpty() && !detectWebBrowser(desktopEnvironment(), false, &m_documentLauncher)) {
|
||||
qWarning("%s: Unable to detect a launcher for '%s'", Q_FUNC_INFO, qPrintable(url.toString()));
|
||||
qWarning("Unable to detect a launcher for '%s'", qPrintable(url.toString()));
|
||||
return false;
|
||||
}
|
||||
return launch(m_documentLauncher, url);
|
||||
|
@ -546,7 +546,7 @@ QPlatformTheme *QKdeTheme::createKdeTheme()
|
||||
|
||||
kdeDirs.removeDuplicates();
|
||||
if (kdeDirs.isEmpty()) {
|
||||
qWarning("%s: Unable to determine KDE dirs", Q_FUNC_INFO);
|
||||
qWarning("Unable to determine KDE dirs");
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -74,7 +74,7 @@ QNetworkManagerInterface::QNetworkManagerInterface(QObject *parent)
|
||||
if (!propsReply.isError()) {
|
||||
propertyMap = propsReply.value();
|
||||
} else {
|
||||
qWarning() << Q_FUNC_INFO << "propsReply"<<propsReply.error().message();
|
||||
qWarning() << "propsReply" << propsReply.error().message();
|
||||
}
|
||||
|
||||
QDBusPendingReply<QList <QDBusObjectPath> > nmReply
|
||||
@ -83,7 +83,7 @@ QNetworkManagerInterface::QNetworkManagerInterface(QObject *parent)
|
||||
if (!nmReply.isError()) {
|
||||
devicesPathList = nmReply.value();
|
||||
} else {
|
||||
qWarning() << Q_FUNC_INFO <<"nmReply"<<nmReply.error().message();
|
||||
qWarning() << "nmReply" << nmReply.error().message();
|
||||
}
|
||||
|
||||
QDBusConnection::systemBus().connect(QLatin1String(NM_DBUS_SERVICE),
|
||||
@ -789,7 +789,7 @@ bool QNetworkManagerSettings::setConnections()
|
||||
QLatin1String("NewConnection"),
|
||||
this, SIGNAL(newConnection(QDBusObjectPath)))) {
|
||||
allOk = false;
|
||||
qWarning() << Q_FUNC_INFO << "NewConnection could not be connected";
|
||||
qWarning("NewConnection could not be connected");
|
||||
}
|
||||
|
||||
return allOk;
|
||||
|
@ -69,39 +69,39 @@ QWindowsSockInit2::~QWindowsSockInit2()
|
||||
#ifdef BEARER_MANAGEMENT_DEBUG
|
||||
static void printBlob(NLA_BLOB *blob)
|
||||
{
|
||||
qDebug() << "==== BEGIN NLA_BLOB ====";
|
||||
qDebug() << "==== BEGIN NLA_BLOB ====" << endl
|
||||
|
||||
qDebug() << "type:" << blob->header.type;
|
||||
qDebug() << "size:" << blob->header.dwSize;
|
||||
qDebug() << "next offset:" << blob->header.nextOffset;
|
||||
<< "type:" << blob->header.type << endl
|
||||
<< "size:" << blob->header.dwSize << endl
|
||||
<< "next offset:" << blob->header.nextOffset;
|
||||
|
||||
switch (blob->header.type) {
|
||||
case NLA_RAW_DATA:
|
||||
qDebug() << "Raw Data";
|
||||
qDebug() << '\t' << blob->data.rawData;
|
||||
qDebug() << "Raw Data" << endl
|
||||
<< '\t' << blob->data.rawData;
|
||||
break;
|
||||
case NLA_INTERFACE:
|
||||
qDebug() << "Interface";
|
||||
qDebug() << "\ttype:" << blob->data.interfaceData.dwType;
|
||||
qDebug() << "\tspeed:" << blob->data.interfaceData.dwSpeed;
|
||||
qDebug() << "\tadapter:" << blob->data.interfaceData.adapterName;
|
||||
qDebug() << "Interface" << endl
|
||||
<< "\ttype:" << blob->data.interfaceData.dwType << endl
|
||||
<< "\tspeed:" << blob->data.interfaceData.dwSpeed << endl
|
||||
<< "\tadapter:" << blob->data.interfaceData.adapterName;
|
||||
break;
|
||||
case NLA_802_1X_LOCATION:
|
||||
qDebug() << "802.1x Location";
|
||||
qDebug() << '\t' << blob->data.locationData.information;
|
||||
qDebug() << "802.1x Location" << endl
|
||||
<< '\t' << blob->data.locationData.information;
|
||||
break;
|
||||
case NLA_CONNECTIVITY:
|
||||
qDebug() << "Connectivity";
|
||||
qDebug() << "\ttype:" << blob->data.connectivity.type;
|
||||
qDebug() << "\tinternet:" << blob->data.connectivity.internet;
|
||||
qDebug() << "Connectivity" << endl
|
||||
<< "\ttype:" << blob->data.connectivity.type << endl
|
||||
<< "\tinternet:" << blob->data.connectivity.internet;
|
||||
break;
|
||||
case NLA_ICS:
|
||||
qDebug() << "ICS";
|
||||
qDebug() << "\tspeed:" << blob->data.ICS.remote.speed;
|
||||
qDebug() << "\ttype:" << blob->data.ICS.remote.type;
|
||||
qDebug() << "\tstate:" << blob->data.ICS.remote.state;
|
||||
qDebug() << "\tmachine name:" << blob->data.ICS.remote.machineName;
|
||||
qDebug() << "\tshared adapter name:" << blob->data.ICS.remote.sharedAdapterName;
|
||||
qDebug() << "ICS" << endl
|
||||
<< "\tspeed:" << blob->data.ICS.remote.speed << endl
|
||||
<< "\ttype:" << blob->data.ICS.remote.type << endl
|
||||
<< "\tstate:" << blob->data.ICS.remote.state << endl
|
||||
<< "\tmachine name:" << blob->data.ICS.remote.machineName << endl
|
||||
<< "\tshared adapter name:" << blob->data.ICS.remote.sharedAdapterName;
|
||||
break;
|
||||
default:
|
||||
qDebug() << "UNKNOWN BLOB TYPE";
|
||||
|
@ -1,5 +1,7 @@
|
||||
TEMPLATE = subdirs
|
||||
|
||||
load(qfeatures)
|
||||
|
||||
contains(QT_CONFIG, evdev) {
|
||||
SUBDIRS += evdevmouse evdevtouch evdevkeyboard evdevtablet
|
||||
}
|
||||
@ -8,7 +10,9 @@ contains(QT_CONFIG, tslib) {
|
||||
SUBDIRS += tslib
|
||||
}
|
||||
|
||||
SUBDIRS += tuiotouch
|
||||
!contains(QT_DISABLED_FEATURES, udpsocket) {
|
||||
SUBDIRS += tuiotouch
|
||||
}
|
||||
|
||||
contains(QT_CONFIG, libinput) {
|
||||
SUBDIRS += libinput
|
||||
|
@ -498,8 +498,8 @@ static jboolean startQtApplication(JNIEnv *env, jobject /*object*/, jstring para
|
||||
}
|
||||
|
||||
if (Q_UNLIKELY(!m_main)) {
|
||||
qCritical() << "dlsym failed:" << dlerror();
|
||||
qCritical() << "Could not find main method";
|
||||
qCritical() << "dlsym failed:" << dlerror() << endl
|
||||
<< "Could not find main method";
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -46,6 +46,7 @@
|
||||
#include <QVariant>
|
||||
|
||||
#include <private/qguiapplication_p.h>
|
||||
#include <private/qhighdpiscaling_p.h>
|
||||
#include <qandroidplatformintegration.h>
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
@ -217,7 +218,7 @@ QJsonObject AndroidStyle::loadStyleData()
|
||||
|
||||
static std::shared_ptr<AndroidStyle> loadAndroidStyle(QPalette *defaultPalette)
|
||||
{
|
||||
double pixelDensity = qEnvironmentVariableIsSet("QT_AUTO_SCREEN_SCALE_FACTOR") ? QtAndroid::pixelDensity() : 1.0;
|
||||
double pixelDensity = QHighDpiScaling::isActive() ? QtAndroid::pixelDensity() : 1.0;
|
||||
std::shared_ptr<AndroidStyle> style = std::make_shared<AndroidStyle>();
|
||||
style->m_styleData = AndroidStyle::loadStyleData();
|
||||
if (style->m_styleData.isEmpty())
|
||||
|
@ -294,7 +294,7 @@ void QCocoaMenu::insertMenuItem(QPlatformMenuItem *menuItem, QPlatformMenuItem *
|
||||
int index = m_menuItems.indexOf(beforeItem);
|
||||
// if a before item is supplied, it should be in the menu
|
||||
if (index < 0) {
|
||||
qWarning() << Q_FUNC_INFO << "Before menu item not found";
|
||||
qWarning("Before menu item not found");
|
||||
return;
|
||||
}
|
||||
m_menuItems.insert(index, cocoaItem);
|
||||
@ -315,7 +315,7 @@ void QCocoaMenu::insertNative(QCocoaMenuItem *item, QCocoaMenuItem *beforeItem)
|
||||
return;
|
||||
|
||||
if ([item->nsItem() menu]) {
|
||||
qWarning() << Q_FUNC_INFO << "Menu item is already in a menu, remove it from the other menu first before inserting";
|
||||
qWarning("Menu item is already in a menu, remove it from the other menu first before inserting");
|
||||
return;
|
||||
}
|
||||
// if the item we're inserting before is merged, skip along until
|
||||
@ -326,7 +326,7 @@ void QCocoaMenu::insertNative(QCocoaMenuItem *item, QCocoaMenuItem *beforeItem)
|
||||
|
||||
if (beforeItem) {
|
||||
if (beforeItem->isMerged()) {
|
||||
qWarning() << Q_FUNC_INFO << "No non-merged before menu item found";
|
||||
qWarning("No non-merged before menu item found");
|
||||
return;
|
||||
}
|
||||
NSUInteger nativeIndex = [m_nativeMenu indexOfItem:beforeItem->nsItem()];
|
||||
@ -342,7 +342,7 @@ void QCocoaMenu::removeMenuItem(QPlatformMenuItem *menuItem)
|
||||
QMacAutoReleasePool pool;
|
||||
QCocoaMenuItem *cocoaItem = static_cast<QCocoaMenuItem *>(menuItem);
|
||||
if (!m_menuItems.contains(cocoaItem)) {
|
||||
qWarning() << Q_FUNC_INFO << "Menu does not contain the item to be removed";
|
||||
qWarning("Menu does not contain the item to be removed");
|
||||
return;
|
||||
}
|
||||
|
||||
@ -352,7 +352,7 @@ void QCocoaMenu::removeMenuItem(QPlatformMenuItem *menuItem)
|
||||
m_menuItems.removeOne(cocoaItem);
|
||||
if (!cocoaItem->isMerged()) {
|
||||
if (m_nativeMenu != [cocoaItem->nsItem() menu]) {
|
||||
qWarning() << Q_FUNC_INFO << "Item to remove does not belong to this menu";
|
||||
qWarning("Item to remove does not belong to this menu");
|
||||
return;
|
||||
}
|
||||
[m_nativeMenu removeItem: cocoaItem->nsItem()];
|
||||
@ -372,7 +372,7 @@ void QCocoaMenu::syncMenuItem(QPlatformMenuItem *menuItem)
|
||||
QMacAutoReleasePool pool;
|
||||
QCocoaMenuItem *cocoaItem = static_cast<QCocoaMenuItem *>(menuItem);
|
||||
if (!m_menuItems.contains(cocoaItem)) {
|
||||
qWarning() << Q_FUNC_INFO << "Item does not belong to this menu";
|
||||
qWarning("Item does not belong to this menu");
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -108,12 +108,12 @@ void QCocoaMenuBar::insertMenu(QPlatformMenu *platformMenu, QPlatformMenu *befor
|
||||
#endif
|
||||
|
||||
if (m_menus.contains(menu)) {
|
||||
qWarning() << Q_FUNC_INFO << "This menu already belongs to the menubar, remove it first";
|
||||
qWarning("This menu already belongs to the menubar, remove it first");
|
||||
return;
|
||||
}
|
||||
|
||||
if (beforeMenu && !m_menus.contains(beforeMenu)) {
|
||||
qWarning() << Q_FUNC_INFO << "The before menu does not belong to the menubar";
|
||||
qWarning("The before menu does not belong to the menubar");
|
||||
return;
|
||||
}
|
||||
|
||||
@ -138,7 +138,7 @@ void QCocoaMenuBar::removeMenu(QPlatformMenu *platformMenu)
|
||||
{
|
||||
QCocoaMenu *menu = static_cast<QCocoaMenu *>(platformMenu);
|
||||
if (!m_menus.contains(menu)) {
|
||||
qWarning() << Q_FUNC_INFO << "Trying to remove a menu that does not belong to the menubar";
|
||||
qWarning("Trying to remove a menu that does not belong to the menubar");
|
||||
return;
|
||||
}
|
||||
m_menus.removeOne(menu);
|
||||
|
@ -283,7 +283,7 @@ NSMenuItem *QCocoaMenuItem::sync()
|
||||
}
|
||||
|
||||
default:
|
||||
qWarning() << Q_FUNC_INFO << "menu item" << m_text << "has unsupported role" << (int)m_role;
|
||||
qWarning() << "menu item" << m_text << "has unsupported role" << (int)m_role;
|
||||
}
|
||||
|
||||
if (mergeItem) {
|
||||
@ -400,7 +400,7 @@ QKeySequence QCocoaMenuItem::mergeAccel()
|
||||
void QCocoaMenuItem::syncMerged()
|
||||
{
|
||||
if (!m_merged) {
|
||||
qWarning() << Q_FUNC_INFO << "Trying to sync a non-merged item";
|
||||
qWarning("Trying to sync a non-merged item");
|
||||
return;
|
||||
}
|
||||
[m_native setTag:reinterpret_cast<NSInteger>(this)];
|
||||
|
@ -1534,7 +1534,7 @@ void QCocoaWindow::syncWindowState(Qt::WindowState newState)
|
||||
// do nothing except set the new state
|
||||
NSRect contentRect = [contentView() frame];
|
||||
if (contentRect.size.width <= 0 || contentRect.size.height <= 0) {
|
||||
qWarning() << Q_FUNC_INFO << "invalid window content view size, check your window geometry";
|
||||
qWarning("invalid window content view size, check your window geometry");
|
||||
m_synchedWindowState = newState;
|
||||
return;
|
||||
}
|
||||
|
@ -351,6 +351,7 @@
|
||||
{
|
||||
QWindowSystemInterface::handleKeyEvent(qApp->focusWindow(), QEvent::KeyPress, key, modifiers);
|
||||
QWindowSystemInterface::handleKeyEvent(qApp->focusWindow(), QEvent::KeyRelease, key, modifiers);
|
||||
QWindowSystemInterface::flushWindowSystemEvents();
|
||||
}
|
||||
|
||||
#ifndef QT_NO_SHORTCUT
|
||||
@ -898,7 +899,6 @@
|
||||
// UITextInput selects the text to be deleted before calling this method. To avoid
|
||||
// drawing the selection, we flush after posting the key press/release.
|
||||
[self sendKeyPressRelease:Qt::Key_Backspace modifiers:Qt::NoModifier];
|
||||
QWindowSystemInterface::flushWindowSystemEvents();
|
||||
}
|
||||
|
||||
@end
|
||||
|
@ -62,7 +62,7 @@ bool QQnxAbstractNavigator::invokeUrl(const QUrl &url)
|
||||
// which is not recognized by the navigator anymore
|
||||
const bool result = requestInvokeUrl(url.toString().toUtf8());
|
||||
|
||||
qNavigatorDebug() << Q_FUNC_INFO << "url=" << url << "result=" << result;
|
||||
qNavigatorDebug() << "url=" << url << "result=" << result;
|
||||
|
||||
return result;
|
||||
}
|
||||
|
@ -51,13 +51,13 @@ QT_BEGIN_NAMESPACE
|
||||
QQnxBuffer::QQnxBuffer()
|
||||
: m_buffer(0)
|
||||
{
|
||||
qBufferDebug() << Q_FUNC_INFO << "empty";
|
||||
qBufferDebug("empty");
|
||||
}
|
||||
|
||||
QQnxBuffer::QQnxBuffer(screen_buffer_t buffer)
|
||||
: m_buffer(buffer)
|
||||
{
|
||||
qBufferDebug() << Q_FUNC_INFO << "normal";
|
||||
qBufferDebug("normal");
|
||||
|
||||
// Get size of buffer
|
||||
int size[2];
|
||||
@ -118,17 +118,17 @@ QQnxBuffer::QQnxBuffer(const QQnxBuffer &other)
|
||||
: m_buffer(other.m_buffer),
|
||||
m_image(other.m_image)
|
||||
{
|
||||
qBufferDebug() << Q_FUNC_INFO << "copy";
|
||||
qBufferDebug("copy");
|
||||
}
|
||||
|
||||
QQnxBuffer::~QQnxBuffer()
|
||||
{
|
||||
qBufferDebug() << Q_FUNC_INFO;
|
||||
qBufferDebug();
|
||||
}
|
||||
|
||||
void QQnxBuffer::invalidateInCache()
|
||||
{
|
||||
qBufferDebug() << Q_FUNC_INFO;
|
||||
qBufferDebug();
|
||||
|
||||
// Verify native buffer exists
|
||||
if (Q_UNLIKELY(!m_buffer))
|
||||
|
@ -74,7 +74,7 @@ QQnxButtonEventNotifier::~QQnxButtonEventNotifier()
|
||||
|
||||
void QQnxButtonEventNotifier::start()
|
||||
{
|
||||
qButtonDebug() << Q_FUNC_INFO << "starting hardware button event processing";
|
||||
qButtonDebug("starting hardware button event processing");
|
||||
if (m_fd != -1)
|
||||
return;
|
||||
|
||||
@ -91,7 +91,7 @@ void QQnxButtonEventNotifier::start()
|
||||
m_readNotifier = new QSocketNotifier(m_fd, QSocketNotifier::Read);
|
||||
QObject::connect(m_readNotifier, SIGNAL(activated(int)), this, SLOT(updateButtonStates()));
|
||||
|
||||
qButtonDebug() << Q_FUNC_INFO << "successfully connected to Navigator. fd =" << m_fd;
|
||||
qButtonDebug() << "successfully connected to Navigator. fd =" << m_fd;
|
||||
}
|
||||
|
||||
void QQnxButtonEventNotifier::updateButtonStates()
|
||||
@ -115,7 +115,7 @@ void QQnxButtonEventNotifier::updateButtonStates()
|
||||
// Ensure data is null terminated
|
||||
buffer[bytes] = '\0';
|
||||
|
||||
qButtonDebug() << Q_FUNC_INFO << "received PPS message:\n" << buffer;
|
||||
qButtonDebug() << "received PPS message:\n" << buffer;
|
||||
|
||||
// Process received message
|
||||
QByteArray ppsData = QByteArray::fromRawData(buffer, bytes);
|
||||
@ -197,7 +197,7 @@ bool QQnxButtonEventNotifier::parsePPS(const QByteArray &ppsData, QHash<QByteArr
|
||||
// tokenize current attribute
|
||||
const QByteArray &attr = lines.at(i);
|
||||
|
||||
qButtonDebug() << Q_FUNC_INFO << "attr=" << attr;
|
||||
qButtonDebug() << "attr=" << attr;
|
||||
|
||||
int doubleColon = attr.indexOf(QByteArrayLiteral("::"));
|
||||
if (doubleColon == -1) {
|
||||
|
@ -94,13 +94,13 @@ public:
|
||||
|
||||
void addFormatToCheck(const QString &format) {
|
||||
m_formatsToCheck << format;
|
||||
qClipboardDebug() << Q_FUNC_INFO << "formats=" << m_formatsToCheck;
|
||||
qClipboardDebug() << "formats=" << m_formatsToCheck;
|
||||
}
|
||||
|
||||
bool hasFormat(const QString &mimetype) const
|
||||
{
|
||||
const bool result = is_clipboard_format_present(mimetype.toUtf8().constData()) == 0;
|
||||
qClipboardDebug() << Q_FUNC_INFO << "mimetype=" << mimetype << "result=" << result;
|
||||
qClipboardDebug() << "mimetype=" << mimetype << "result=" << result;
|
||||
return result;
|
||||
}
|
||||
|
||||
@ -113,7 +113,7 @@ public:
|
||||
result << format;
|
||||
}
|
||||
|
||||
qClipboardDebug() << Q_FUNC_INFO << "result=" << result;
|
||||
qClipboardDebug() << "result=" << result;
|
||||
return result;
|
||||
}
|
||||
|
||||
@ -137,7 +137,7 @@ public:
|
||||
protected:
|
||||
QVariant retrieveData(const QString &mimetype, QVariant::Type preferredType) const
|
||||
{
|
||||
qClipboardDebug() << Q_FUNC_INFO << "mimetype=" << mimetype << "preferredType=" << preferredType;
|
||||
qClipboardDebug() << "mimetype=" << mimetype << "preferredType=" << preferredType;
|
||||
if (is_clipboard_format_present(mimetype.toUtf8().constData()) != 0)
|
||||
return QMimeData::retrieveData(mimetype, preferredType);
|
||||
|
||||
@ -149,7 +149,7 @@ private Q_SLOTS:
|
||||
void releaseOwnership()
|
||||
{
|
||||
if (m_userMimeData) {
|
||||
qClipboardDebug() << Q_FUNC_INFO << "user data formats=" << m_userMimeData->formats() << "system formats=" << formats();
|
||||
qClipboardDebug() << "user data formats=" << m_userMimeData->formats() << "system formats=" << formats();
|
||||
delete m_userMimeData;
|
||||
m_userMimeData = 0;
|
||||
m_clipboard->emitChanged(QClipboard::Clipboard);
|
||||
@ -195,7 +195,7 @@ void QQnxClipboard::setMimeData(QMimeData *data, QClipboard::Mode mode)
|
||||
}
|
||||
|
||||
const QStringList formats = data->formats();
|
||||
qClipboardDebug() << Q_FUNC_INFO << "formats=" << formats;
|
||||
qClipboardDebug() << "formats=" << formats;
|
||||
|
||||
Q_FOREACH (const QString &format, formats) {
|
||||
const QByteArray buf = data->data(format);
|
||||
@ -204,7 +204,7 @@ void QQnxClipboard::setMimeData(QMimeData *data, QClipboard::Mode mode)
|
||||
continue;
|
||||
|
||||
int ret = set_clipboard_data(format.toUtf8().data(), buf.size(), buf.data());
|
||||
qClipboardDebug() << Q_FUNC_INFO << "set " << format << "to clipboard, size=" << buf.size() << ";ret=" << ret;
|
||||
qClipboardDebug() << "set " << format << "to clipboard, size=" << buf.size() << ";ret=" << ret;
|
||||
if (ret)
|
||||
m_mimeData->addFormatToCheck(format);
|
||||
}
|
||||
|
@ -115,7 +115,7 @@ void QQnxEglWindow::destroyEGLSurface()
|
||||
|
||||
void QQnxEglWindow::swapEGLBuffers()
|
||||
{
|
||||
qEglWindowDebug() << Q_FUNC_INFO;
|
||||
qEglWindowDebug();
|
||||
// Set current rendering API
|
||||
EGLBoolean eglResult = eglBindAPI(EGL_OPENGL_ES_API);
|
||||
if (Q_UNLIKELY(eglResult != EGL_TRUE))
|
||||
|
@ -56,7 +56,7 @@ QQnxGLContext::QQnxGLContext(QOpenGLContext *glContext)
|
||||
m_glContext(glContext),
|
||||
m_currentEglSurface(EGL_NO_SURFACE)
|
||||
{
|
||||
qGLContextDebug() << Q_FUNC_INFO;
|
||||
qGLContextDebug();
|
||||
QSurfaceFormat format = m_glContext->format();
|
||||
|
||||
// Set current rendering API
|
||||
@ -132,7 +132,7 @@ QQnxGLContext::QQnxGLContext(QOpenGLContext *glContext)
|
||||
|
||||
QQnxGLContext::~QQnxGLContext()
|
||||
{
|
||||
qGLContextDebug() << Q_FUNC_INFO;
|
||||
qGLContextDebug();
|
||||
|
||||
// Cleanup EGL context if it exists
|
||||
if (m_eglContext != EGL_NO_CONTEXT)
|
||||
@ -166,7 +166,7 @@ EGLenum QQnxGLContext::checkEGLError(const char *msg)
|
||||
|
||||
void QQnxGLContext::initializeContext()
|
||||
{
|
||||
qGLContextDebug() << Q_FUNC_INFO;
|
||||
qGLContextDebug();
|
||||
|
||||
// Initialize connection to EGL
|
||||
ms_eglDisplay = eglGetDisplay(EGL_DEFAULT_DISPLAY);
|
||||
@ -184,7 +184,7 @@ void QQnxGLContext::initializeContext()
|
||||
|
||||
void QQnxGLContext::shutdownContext()
|
||||
{
|
||||
qGLContextDebug() << Q_FUNC_INFO;
|
||||
qGLContextDebug();
|
||||
|
||||
// Close connection to EGL
|
||||
eglTerminate(ms_eglDisplay);
|
||||
@ -192,7 +192,7 @@ void QQnxGLContext::shutdownContext()
|
||||
|
||||
bool QQnxGLContext::makeCurrent(QPlatformSurface *surface)
|
||||
{
|
||||
qGLContextDebug() << Q_FUNC_INFO;
|
||||
qGLContextDebug();
|
||||
|
||||
Q_ASSERT(surface->surface()->surfaceType() == QSurface::OpenGLSurface);
|
||||
|
||||
@ -223,7 +223,7 @@ bool QQnxGLContext::makeCurrent(QPlatformSurface *surface)
|
||||
|
||||
void QQnxGLContext::doneCurrent()
|
||||
{
|
||||
qGLContextDebug() << Q_FUNC_INFO;
|
||||
qGLContextDebug();
|
||||
|
||||
// set current rendering API
|
||||
EGLBoolean eglResult = eglBindAPI(EGL_OPENGL_ES_API);
|
||||
@ -238,7 +238,7 @@ void QQnxGLContext::doneCurrent()
|
||||
|
||||
void QQnxGLContext::swapBuffers(QPlatformSurface *surface)
|
||||
{
|
||||
qGLContextDebug() << Q_FUNC_INFO;
|
||||
qGLContextDebug();
|
||||
QQnxEglWindow *platformWindow = dynamic_cast<QQnxEglWindow*>(surface);
|
||||
if (!platformWindow)
|
||||
return;
|
||||
@ -248,7 +248,7 @@ void QQnxGLContext::swapBuffers(QPlatformSurface *surface)
|
||||
|
||||
QFunctionPointer QQnxGLContext::getProcAddress(const QByteArray &procName)
|
||||
{
|
||||
qGLContextDebug() << Q_FUNC_INFO;
|
||||
qGLContextDebug();
|
||||
|
||||
// Set current rendering API
|
||||
EGLBoolean eglResult = eglBindAPI(EGL_OPENGL_ES_API);
|
||||
@ -270,7 +270,7 @@ EGLDisplay QQnxGLContext::getEglDisplay() {
|
||||
|
||||
EGLint *QQnxGLContext::contextAttrs(const QSurfaceFormat &format)
|
||||
{
|
||||
qGLContextDebug() << Q_FUNC_INFO;
|
||||
qGLContextDebug();
|
||||
|
||||
// Choose EGL settings based on OpenGL version
|
||||
#if defined(QT_OPENGL_ES_2)
|
||||
|
@ -191,7 +191,7 @@ static int32_t ic_begin_batch_edit(input_session_t *ic)
|
||||
// See comment at beginning of namespace declaration for general information
|
||||
static int32_t ic_commit_text(input_session_t *ic, spannable_string_t *text, int32_t new_cursor_position)
|
||||
{
|
||||
qInputContextIMFRequestDebug() << Q_FUNC_INFO;
|
||||
qInputContextIMFRequestDebug();
|
||||
|
||||
QQnxImfRequest event(ic, ImfCommitText);
|
||||
event.ct.text = text;
|
||||
@ -206,7 +206,7 @@ static int32_t ic_commit_text(input_session_t *ic, spannable_string_t *text, int
|
||||
// See comment at beginning of namespace declaration for general information
|
||||
static int32_t ic_delete_surrounding_text(input_session_t *ic, int32_t left_length, int32_t right_length)
|
||||
{
|
||||
qInputContextIMFRequestDebug() << Q_FUNC_INFO;
|
||||
qInputContextIMFRequestDebug();
|
||||
|
||||
QQnxImfRequest event(ic, ImfDeleteSurroundingText);
|
||||
event.dst.left_length = left_length;
|
||||
@ -230,7 +230,7 @@ static int32_t ic_end_batch_edit(input_session_t *ic)
|
||||
// See comment at beginning of namespace declaration for general information
|
||||
static int32_t ic_finish_composing_text(input_session_t *ic)
|
||||
{
|
||||
qInputContextIMFRequestDebug() << Q_FUNC_INFO;
|
||||
qInputContextIMFRequestDebug();
|
||||
|
||||
QQnxImfRequest event(ic, ImfFinishComposingText);
|
||||
event.fct.result = -1;
|
||||
@ -243,7 +243,7 @@ static int32_t ic_finish_composing_text(input_session_t *ic)
|
||||
// See comment at beginning of namespace declaration for general information
|
||||
static int32_t ic_get_cursor_position(input_session_t *ic)
|
||||
{
|
||||
qInputContextIMFRequestDebug() << Q_FUNC_INFO;
|
||||
qInputContextIMFRequestDebug();
|
||||
|
||||
QQnxImfRequest event(ic, ImfGetCursorPosition);
|
||||
event.gcp.result = -1;
|
||||
@ -256,7 +256,7 @@ static int32_t ic_get_cursor_position(input_session_t *ic)
|
||||
// See comment at beginning of namespace declaration for general information
|
||||
static spannable_string_t *ic_get_text_after_cursor(input_session_t *ic, int32_t n, int32_t flags)
|
||||
{
|
||||
qInputContextIMFRequestDebug() << Q_FUNC_INFO;
|
||||
qInputContextIMFRequestDebug();
|
||||
|
||||
QQnxImfRequest event(ic, ImfGetTextAfterCursor);
|
||||
event.gtac.n = n;
|
||||
@ -271,7 +271,7 @@ static spannable_string_t *ic_get_text_after_cursor(input_session_t *ic, int32_t
|
||||
// See comment at beginning of namespace declaration for general information
|
||||
static spannable_string_t *ic_get_text_before_cursor(input_session_t *ic, int32_t n, int32_t flags)
|
||||
{
|
||||
qInputContextIMFRequestDebug() << Q_FUNC_INFO;
|
||||
qInputContextIMFRequestDebug();
|
||||
|
||||
QQnxImfRequest event(ic, ImfGetTextBeforeCursor);
|
||||
event.gtac.n = n;
|
||||
@ -286,7 +286,7 @@ static spannable_string_t *ic_get_text_before_cursor(input_session_t *ic, int32_
|
||||
// See comment at beginning of namespace declaration for general information
|
||||
static int32_t ic_send_event(input_session_t *ic, event_t *event)
|
||||
{
|
||||
qInputContextIMFRequestDebug() << Q_FUNC_INFO;
|
||||
qInputContextIMFRequestDebug();
|
||||
|
||||
QQnxImfRequest imfEvent(ic, ImfSendEvent);
|
||||
imfEvent.sae.event = event;
|
||||
@ -300,7 +300,7 @@ static int32_t ic_send_event(input_session_t *ic, event_t *event)
|
||||
// See comment at beginning of namespace declaration for general information
|
||||
static int32_t ic_send_async_event(input_session_t *ic, event_t *event)
|
||||
{
|
||||
qInputContextIMFRequestDebug() << Q_FUNC_INFO;
|
||||
qInputContextIMFRequestDebug();
|
||||
|
||||
// There's no difference from our point of view between ic_send_event & ic_send_async_event
|
||||
QQnxImfRequest imfEvent(ic, ImfSendEvent);
|
||||
@ -315,7 +315,7 @@ static int32_t ic_send_async_event(input_session_t *ic, event_t *event)
|
||||
// See comment at beginning of namespace declaration for general information
|
||||
static int32_t ic_set_composing_region(input_session_t *ic, int32_t start, int32_t end)
|
||||
{
|
||||
qInputContextIMFRequestDebug() << Q_FUNC_INFO;
|
||||
qInputContextIMFRequestDebug();
|
||||
|
||||
QQnxImfRequest event(ic, ImfSetComposingRegion);
|
||||
event.scr.start = start;
|
||||
@ -331,7 +331,7 @@ static int32_t ic_set_composing_region(input_session_t *ic, int32_t start, int32
|
||||
// See comment at beginning of namespace declaration for general information
|
||||
static int32_t ic_set_composing_text(input_session_t *ic, spannable_string_t *text, int32_t new_cursor_position)
|
||||
{
|
||||
qInputContextIMFRequestDebug() << Q_FUNC_INFO;
|
||||
qInputContextIMFRequestDebug();
|
||||
|
||||
QQnxImfRequest event(ic, ImfSetComposingText);
|
||||
event.sct.text = text;
|
||||
@ -346,7 +346,7 @@ static int32_t ic_set_composing_text(input_session_t *ic, spannable_string_t *te
|
||||
// See comment at beginning of namespace declaration for general information
|
||||
static int32_t ic_is_text_selected(input_session_t* ic, int32_t* pIsSelected)
|
||||
{
|
||||
qInputContextIMFRequestDebug() << Q_FUNC_INFO;
|
||||
qInputContextIMFRequestDebug();
|
||||
|
||||
QQnxImfRequest event(ic, ImfIsTextSelected);
|
||||
event.its.pIsSelected = pIsSelected;
|
||||
@ -360,7 +360,7 @@ static int32_t ic_is_text_selected(input_session_t* ic, int32_t* pIsSelected)
|
||||
// See comment at beginning of namespace declaration for general information
|
||||
static int32_t ic_is_all_text_selected(input_session_t* ic, int32_t* pIsSelected)
|
||||
{
|
||||
qInputContextIMFRequestDebug() << Q_FUNC_INFO;
|
||||
qInputContextIMFRequestDebug();
|
||||
|
||||
QQnxImfRequest event(ic, ImfIsAllTextSelected);
|
||||
event.its.pIsSelected = pIsSelected;
|
||||
@ -496,7 +496,7 @@ initEvent(event_t *pEvent, const input_session_t *pSession, EventType eventType,
|
||||
|
||||
static spannable_string_t *toSpannableString(const QString &text)
|
||||
{
|
||||
qInputContextDebug() << Q_FUNC_INFO << text;
|
||||
qInputContextDebug() << text;
|
||||
|
||||
spannable_string_t *pString = static_cast<spannable_string_t *>(malloc(sizeof(spannable_string_t)));
|
||||
pString->str = static_cast<wchar_t *>(malloc(sizeof(wchar_t) * text.length() + 1));
|
||||
@ -531,7 +531,7 @@ static bool imfAvailable()
|
||||
if ( p_imf_client_init == 0 ) {
|
||||
void *handle = dlopen("libinput_client.so.1", 0);
|
||||
if (Q_UNLIKELY(!handle)) {
|
||||
qCritical() << Q_FUNC_INFO << "libinput_client.so.1 is not present - IMF services are disabled.";
|
||||
qCritical("libinput_client.so.1 is not present - IMF services are disabled.");
|
||||
s_imfDisabled = true;
|
||||
return false;
|
||||
}
|
||||
@ -547,7 +547,7 @@ static bool imfAvailable()
|
||||
p_ictrl_open_session = 0;
|
||||
p_ictrl_dispatch_event = 0;
|
||||
s_imfDisabled = true;
|
||||
qCritical() << Q_FUNC_INFO << "libinput_client.so.1 did not contain the correct symbols, library mismatch? IMF services are disabled.";
|
||||
qCritical("libinput_client.so.1 did not contain the correct symbols, library mismatch? IMF services are disabled.");
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -570,7 +570,7 @@ QQnxInputContext::QQnxInputContext(QQnxIntegration *integration, QQnxAbstractVir
|
||||
m_integration(integration),
|
||||
m_virtualKeyboard(keyboard)
|
||||
{
|
||||
qInputContextDebug() << Q_FUNC_INFO;
|
||||
qInputContextDebug();
|
||||
|
||||
if (!imfAvailable())
|
||||
return;
|
||||
@ -593,7 +593,7 @@ QQnxInputContext::QQnxInputContext(QQnxIntegration *integration, QQnxAbstractVir
|
||||
|
||||
QQnxInputContext::~QQnxInputContext()
|
||||
{
|
||||
qInputContextDebug() << Q_FUNC_INFO;
|
||||
qInputContextDebug();
|
||||
|
||||
Q_ASSERT(sInputContextInstance == this);
|
||||
sInputContextInstance = 0;
|
||||
@ -668,7 +668,7 @@ void QQnxInputContext::processImfEvent(QQnxImfRequest *imfEvent)
|
||||
|
||||
bool QQnxInputContext::filterEvent( const QEvent *event )
|
||||
{
|
||||
qInputContextDebug() << Q_FUNC_INFO << event;
|
||||
qInputContextDebug() << event;
|
||||
|
||||
switch (event->type()) {
|
||||
case QEvent::CloseSoftwareInputPanel:
|
||||
@ -691,19 +691,19 @@ QRectF QQnxInputContext::keyboardRect() const
|
||||
|
||||
void QQnxInputContext::reset()
|
||||
{
|
||||
qInputContextDebug() << Q_FUNC_INFO;
|
||||
qInputContextDebug();
|
||||
endComposition();
|
||||
}
|
||||
|
||||
void QQnxInputContext::commit()
|
||||
{
|
||||
qInputContextDebug() << Q_FUNC_INFO;
|
||||
qInputContextDebug();
|
||||
endComposition();
|
||||
}
|
||||
|
||||
void QQnxInputContext::update(Qt::InputMethodQueries queries)
|
||||
{
|
||||
qInputContextDebug() << Q_FUNC_INFO << queries;
|
||||
qInputContextDebug() << queries;
|
||||
|
||||
if (queries & Qt::ImCursorPosition) {
|
||||
int lastCaret = m_caretPosition;
|
||||
@ -715,7 +715,7 @@ void QQnxInputContext::update(Qt::InputMethodQueries queries)
|
||||
initEvent(&caretEvent.event, sInputSession, EVENT_CARET, CARET_POS_CHANGED, sizeof(caretEvent));
|
||||
caretEvent.old_pos = lastCaret;
|
||||
caretEvent.new_pos = m_caretPosition;
|
||||
qInputContextDebug() << Q_FUNC_INFO << "ictrl_dispatch_event caret changed" << lastCaret << m_caretPosition;
|
||||
qInputContextDebug() << "ictrl_dispatch_event caret changed" << lastCaret << m_caretPosition;
|
||||
p_ictrl_dispatch_event(&caretEvent.event);
|
||||
}
|
||||
}
|
||||
@ -723,7 +723,7 @@ void QQnxInputContext::update(Qt::InputMethodQueries queries)
|
||||
|
||||
void QQnxInputContext::closeSession()
|
||||
{
|
||||
qInputContextDebug() << Q_FUNC_INFO;
|
||||
qInputContextDebug();
|
||||
if (!imfAvailable())
|
||||
return;
|
||||
|
||||
@ -745,7 +745,7 @@ bool QQnxInputContext::openSession()
|
||||
closeSession();
|
||||
sInputSession = p_ictrl_open_session(&ic_funcs);
|
||||
|
||||
qInputContextDebug() << Q_FUNC_INFO;
|
||||
qInputContextDebug();
|
||||
|
||||
return sInputSession != 0;
|
||||
}
|
||||
@ -769,7 +769,7 @@ bool QQnxInputContext::hasSelectedText()
|
||||
|
||||
bool QQnxInputContext::dispatchRequestSoftwareInputPanel()
|
||||
{
|
||||
qInputContextDebug() << Q_FUNC_INFO << "requesting keyboard" << m_inputPanelVisible;
|
||||
qInputContextDebug() << "requesting keyboard" << m_inputPanelVisible;
|
||||
m_virtualKeyboard.showKeyboard();
|
||||
|
||||
return true;
|
||||
@ -777,7 +777,7 @@ bool QQnxInputContext::dispatchRequestSoftwareInputPanel()
|
||||
|
||||
bool QQnxInputContext::dispatchCloseSoftwareInputPanel()
|
||||
{
|
||||
qInputContextDebug() << Q_FUNC_INFO << "hiding keyboard" << m_inputPanelVisible;
|
||||
qInputContextDebug() << "hiding keyboard" << m_inputPanelVisible;
|
||||
m_virtualKeyboard.hideKeyboard();
|
||||
|
||||
return true;
|
||||
@ -823,7 +823,7 @@ bool QQnxInputContext::dispatchFocusGainEvent(int inputHints)
|
||||
focusEvent.style |= IMF_EMAIL_TYPE;
|
||||
}
|
||||
|
||||
qInputContextDebug() << Q_FUNC_INFO << "ictrl_dispatch_event focus gain style:" << focusEvent.style;
|
||||
qInputContextDebug() << "ictrl_dispatch_event focus gain style:" << focusEvent.style;
|
||||
|
||||
p_ictrl_dispatch_event((event_t *)&focusEvent);
|
||||
|
||||
@ -833,7 +833,7 @@ bool QQnxInputContext::dispatchFocusGainEvent(int inputHints)
|
||||
void QQnxInputContext::dispatchFocusLossEvent()
|
||||
{
|
||||
if (hasSession()) {
|
||||
qInputContextDebug() << Q_FUNC_INFO << "ictrl_dispatch_event focus lost";
|
||||
qInputContextDebug("ictrl_dispatch_event focus lost");
|
||||
|
||||
focus_event_t focusEvent;
|
||||
initEvent(&focusEvent.event, sInputSession, EVENT_FOCUS, FOCUS_LOST, sizeof(focusEvent));
|
||||
@ -908,7 +908,7 @@ bool QQnxInputContext::handleKeyboardEvent(int flags, int sym, int mod, int scan
|
||||
navigation_event_t navEvent;
|
||||
initEvent(&navEvent.event, sInputSession, EVENT_NAVIGATION, key, sizeof(navEvent));
|
||||
navEvent.magnitude = 1;
|
||||
qInputContextDebug() << Q_FUNC_INFO << "ictrl_dispatch_even navigation" << key;
|
||||
qInputContextDebug() << "ictrl_dispatch_even navigation" << key;
|
||||
p_ictrl_dispatch_event(&navEvent.event);
|
||||
}
|
||||
} else {
|
||||
@ -921,7 +921,7 @@ bool QQnxInputContext::handleKeyboardEvent(int flags, int sym, int mod, int scan
|
||||
keyEvent.sequence_id = sequenceId;
|
||||
|
||||
p_ictrl_dispatch_event(&keyEvent.event);
|
||||
qInputContextDebug() << Q_FUNC_INFO << "ictrl_dispatch_even key" << key;
|
||||
qInputContextDebug() << "ictrl_dispatch_even key" << key;
|
||||
}
|
||||
|
||||
return true;
|
||||
@ -937,7 +937,7 @@ void QQnxInputContext::updateCursorPosition()
|
||||
QCoreApplication::sendEvent(input, &query);
|
||||
m_caretPosition = query.value(Qt::ImCursorPosition).toInt();
|
||||
|
||||
qInputContextDebug() << Q_FUNC_INFO << m_caretPosition;
|
||||
qInputContextDebug() << m_caretPosition;
|
||||
}
|
||||
|
||||
void QQnxInputContext::endComposition()
|
||||
@ -950,7 +950,7 @@ void QQnxInputContext::endComposition()
|
||||
if (hasSession()) {
|
||||
action_event_t actionEvent;
|
||||
initEvent(&actionEvent.event, sInputSession, EVENT_ACTION, ACTION_END_COMPOSITION, sizeof(actionEvent));
|
||||
qInputContextDebug() << Q_FUNC_INFO << "ictrl_dispatch_even end composition";
|
||||
qInputContextDebug("ictrl_dispatch_even end composition");
|
||||
p_ictrl_dispatch_event(&actionEvent.event);
|
||||
}
|
||||
}
|
||||
@ -967,7 +967,7 @@ void QQnxInputContext::updateComposition(spannable_string_t *text, int32_t new_c
|
||||
m_composingText = QString::fromWCharArray(text->str, text->length);
|
||||
m_isComposing = true;
|
||||
|
||||
qInputContextDebug() << Q_FUNC_INFO << m_composingText << new_cursor_position;
|
||||
qInputContextDebug() << m_composingText << new_cursor_position;
|
||||
|
||||
QList<QInputMethodEvent::Attribute> attributes;
|
||||
attributes.append(QInputMethodEvent::Attribute(QInputMethodEvent::Cursor,
|
||||
@ -1016,7 +1016,7 @@ void QQnxInputContext::finishComposingText()
|
||||
QObject *input = qGuiApp->focusObject();
|
||||
|
||||
if (input) {
|
||||
qInputContextDebug() << Q_FUNC_INFO << m_composingText;
|
||||
qInputContextDebug() << m_composingText;
|
||||
|
||||
QInputMethodEvent event;
|
||||
event.setCommitString(m_composingText);
|
||||
@ -1081,13 +1081,13 @@ int32_t QQnxInputContext::processEvent(event_t *event)
|
||||
int32_t result = -1;
|
||||
switch (event->event_type) {
|
||||
case EVENT_SPELL_CHECK: {
|
||||
qInputContextDebug() << Q_FUNC_INFO << "EVENT_SPELL_CHECK";
|
||||
qInputContextDebug("EVENT_SPELL_CHECK");
|
||||
result = handleSpellCheck(reinterpret_cast<spell_check_event_t *>(event));
|
||||
break;
|
||||
}
|
||||
|
||||
case EVENT_NAVIGATION: {
|
||||
qInputContextDebug() << Q_FUNC_INFO << "EVENT_NAVIGATION";
|
||||
qInputContextDebug("EVENT_NAVIGATION");
|
||||
|
||||
int key = event->event_id == NAVIGATE_UP ? KEYCODE_UP :
|
||||
event->event_id == NAVIGATE_DOWN ? KEYCODE_DOWN :
|
||||
@ -1110,7 +1110,7 @@ int32_t QQnxInputContext::processEvent(event_t *event)
|
||||
int flags = KEY_SYM_VALID | KEY_CAP_VALID;
|
||||
if (event->event_id == IMF_KEY_DOWN)
|
||||
flags |= KEY_DOWN;
|
||||
qInputContextDebug() << Q_FUNC_INFO << "EVENT_KEY" << flags << keySym;
|
||||
qInputContextDebug() << "EVENT_KEY" << flags << keySym;
|
||||
QQnxScreenEventHandler::injectKeyboardEvent(flags, keySym, modifiers, 0, keyCap);
|
||||
result = 0;
|
||||
break;
|
||||
@ -1126,10 +1126,10 @@ int32_t QQnxInputContext::processEvent(event_t *event)
|
||||
case EVENT_USER_ACTION:
|
||||
case EVENT_STROKE:
|
||||
case EVENT_INVOKE_LATER:
|
||||
qCritical() << Q_FUNC_INFO << "Unsupported event type: " << event->event_type;
|
||||
qCritical() << "Unsupported event type: " << event->event_type;
|
||||
break;
|
||||
default:
|
||||
qCritical() << Q_FUNC_INFO << "Unknown event type: " << event->event_type;
|
||||
qCritical() << "Unknown event type: " << event->event_type;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
@ -1150,7 +1150,7 @@ int32_t QQnxInputContext::onCommitText(spannable_string_t *text, int32_t new_cur
|
||||
|
||||
int32_t QQnxInputContext::onDeleteSurroundingText(int32_t left_length, int32_t right_length)
|
||||
{
|
||||
qInputContextDebug() << Q_FUNC_INFO << "L:" << left_length << " R:" << right_length;
|
||||
qInputContextDebug() << "L:" << left_length << " R:" << right_length;
|
||||
|
||||
QObject *input = qGuiApp->focusObject();
|
||||
if (!input)
|
||||
@ -1181,7 +1181,7 @@ int32_t QQnxInputContext::onFinishComposingText()
|
||||
|
||||
int32_t QQnxInputContext::onGetCursorPosition()
|
||||
{
|
||||
qInputContextDebug() << Q_FUNC_INFO;
|
||||
qInputContextDebug();
|
||||
|
||||
QObject *input = qGuiApp->focusObject();
|
||||
if (!input)
|
||||
@ -1195,7 +1195,7 @@ int32_t QQnxInputContext::onGetCursorPosition()
|
||||
spannable_string_t *QQnxInputContext::onGetTextAfterCursor(int32_t n, int32_t flags)
|
||||
{
|
||||
Q_UNUSED(flags);
|
||||
qInputContextDebug() << Q_FUNC_INFO;
|
||||
qInputContextDebug();
|
||||
|
||||
QObject *input = qGuiApp->focusObject();
|
||||
if (!input)
|
||||
@ -1212,7 +1212,7 @@ spannable_string_t *QQnxInputContext::onGetTextAfterCursor(int32_t n, int32_t fl
|
||||
spannable_string_t *QQnxInputContext::onGetTextBeforeCursor(int32_t n, int32_t flags)
|
||||
{
|
||||
Q_UNUSED(flags);
|
||||
qInputContextDebug() << Q_FUNC_INFO;
|
||||
qInputContextDebug();
|
||||
|
||||
QObject *input = qGuiApp->focusObject();
|
||||
if (!input)
|
||||
@ -1231,7 +1231,7 @@ spannable_string_t *QQnxInputContext::onGetTextBeforeCursor(int32_t n, int32_t f
|
||||
|
||||
int32_t QQnxInputContext::onSendEvent(event_t *event)
|
||||
{
|
||||
qInputContextDebug() << Q_FUNC_INFO;
|
||||
qInputContextDebug();
|
||||
|
||||
return processEvent(event);
|
||||
}
|
||||
@ -1247,7 +1247,7 @@ int32_t QQnxInputContext::onSetComposingRegion(int32_t start, int32_t end)
|
||||
QString text = query.value(Qt::ImSurroundingText).toString();
|
||||
m_caretPosition = query.value(Qt::ImCursorPosition).toInt();
|
||||
|
||||
qInputContextDebug() << Q_FUNC_INFO << text;
|
||||
qInputContextDebug() << text;
|
||||
|
||||
m_isUpdatingText = true;
|
||||
|
||||
@ -1290,7 +1290,7 @@ int32_t QQnxInputContext::onIsTextSelected(int32_t* pIsSelected)
|
||||
{
|
||||
*pIsSelected = hasSelectedText();
|
||||
|
||||
qInputContextDebug() << Q_FUNC_INFO << *pIsSelected;
|
||||
qInputContextDebug() << *pIsSelected;
|
||||
|
||||
return 0;
|
||||
}
|
||||
@ -1306,20 +1306,20 @@ int32_t QQnxInputContext::onIsAllTextSelected(int32_t* pIsSelected)
|
||||
|
||||
*pIsSelected = query.value(Qt::ImSurroundingText).toString().length() == query.value(Qt::ImCurrentSelection).toString().length();
|
||||
|
||||
qInputContextDebug() << Q_FUNC_INFO << *pIsSelected;
|
||||
qInputContextDebug() << *pIsSelected;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
void QQnxInputContext::showInputPanel()
|
||||
{
|
||||
qInputContextDebug() << Q_FUNC_INFO;
|
||||
qInputContextDebug();
|
||||
dispatchRequestSoftwareInputPanel();
|
||||
}
|
||||
|
||||
void QQnxInputContext::hideInputPanel()
|
||||
{
|
||||
qInputContextDebug() << Q_FUNC_INFO;
|
||||
qInputContextDebug();
|
||||
dispatchCloseSoftwareInputPanel();
|
||||
}
|
||||
|
||||
@ -1335,7 +1335,7 @@ QLocale QQnxInputContext::locale() const
|
||||
|
||||
void QQnxInputContext::keyboardVisibilityChanged(bool visible)
|
||||
{
|
||||
qInputContextDebug() << Q_FUNC_INFO << "visible=" << visible;
|
||||
qInputContextDebug() << "visible=" << visible;
|
||||
if (m_inputPanelVisible != visible) {
|
||||
m_inputPanelVisible = visible;
|
||||
emitInputPanelVisibleChanged();
|
||||
@ -1344,7 +1344,7 @@ void QQnxInputContext::keyboardVisibilityChanged(bool visible)
|
||||
|
||||
void QQnxInputContext::keyboardLocaleChanged(const QLocale &locale)
|
||||
{
|
||||
qInputContextDebug() << Q_FUNC_INFO << "locale=" << locale;
|
||||
qInputContextDebug() << "locale=" << locale;
|
||||
if (m_inputPanelLocale != locale) {
|
||||
m_inputPanelLocale = locale;
|
||||
emitLocaleChanged();
|
||||
@ -1353,7 +1353,7 @@ void QQnxInputContext::keyboardLocaleChanged(const QLocale &locale)
|
||||
|
||||
void QQnxInputContext::setHighlightColor(int index, const QColor &color)
|
||||
{
|
||||
qInputContextDebug() << Q_FUNC_INFO << "setHighlightColor" << index << color << qGuiApp->focusObject();
|
||||
qInputContextDebug() << "setHighlightColor" << index << color << qGuiApp->focusObject();
|
||||
|
||||
if (!sInputContextInstance)
|
||||
return;
|
||||
@ -1372,7 +1372,7 @@ void QQnxInputContext::setHighlightColor(int index, const QColor &color)
|
||||
|
||||
void QQnxInputContext::setFocusObject(QObject *object)
|
||||
{
|
||||
qInputContextDebug() << Q_FUNC_INFO << "input item=" << object;
|
||||
qInputContextDebug() << "input item=" << object;
|
||||
|
||||
// Ensure the colors are reset if we've a change in focus object
|
||||
setHighlightColor(-1, QColor());
|
||||
@ -1402,7 +1402,7 @@ void QQnxInputContext::setFocusObject(QObject *object)
|
||||
|
||||
bool QQnxInputContext::checkSpelling(const QString &text, void *context, void (*spellCheckDone)(void *context, const QString &text, const QList<int> &indices))
|
||||
{
|
||||
qInputContextDebug() << Q_FUNC_INFO << "text" << text;
|
||||
qInputContextDebug() << "text" << text;
|
||||
|
||||
if (!imfAvailable())
|
||||
return false;
|
||||
|
@ -88,13 +88,13 @@ bool QQnxInputContext::filterEvent( const QEvent *event )
|
||||
|
||||
if (event->type() == QEvent::CloseSoftwareInputPanel) {
|
||||
m_virtualKeyboard.hideKeyboard();
|
||||
qInputContextDebug() << Q_FUNC_INFO << "hiding virtual keyboard";
|
||||
qInputContextDebug("hiding virtual keyboard");
|
||||
return false;
|
||||
}
|
||||
|
||||
if (event->type() == QEvent::RequestSoftwareInputPanel) {
|
||||
m_virtualKeyboard.showKeyboard();
|
||||
qInputContextDebug() << Q_FUNC_INFO << "requesting virtual keyboard";
|
||||
qInputContextDebug("requesting virtual keyboard");
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -121,13 +121,13 @@ bool QQnxInputContext::handleKeyboardEvent(int flags, int sym, int mod, int scan
|
||||
|
||||
void QQnxInputContext::showInputPanel()
|
||||
{
|
||||
qInputContextDebug() << Q_FUNC_INFO;
|
||||
qInputContextDebug();
|
||||
m_virtualKeyboard.showKeyboard();
|
||||
}
|
||||
|
||||
void QQnxInputContext::hideInputPanel()
|
||||
{
|
||||
qInputContextDebug() << Q_FUNC_INFO;
|
||||
qInputContextDebug();
|
||||
m_virtualKeyboard.hideKeyboard();
|
||||
}
|
||||
|
||||
@ -148,7 +148,7 @@ void QQnxInputContext::keyboardHeightChanged()
|
||||
|
||||
void QQnxInputContext::keyboardVisibilityChanged(bool visible)
|
||||
{
|
||||
qInputContextDebug() << Q_FUNC_INFO << "visible=" << visible;
|
||||
qInputContextDebug() << "visible=" << visible;
|
||||
if (m_inputPanelVisible != visible) {
|
||||
m_inputPanelVisible = visible;
|
||||
emitInputPanelVisibleChanged();
|
||||
@ -157,7 +157,7 @@ void QQnxInputContext::keyboardVisibilityChanged(bool visible)
|
||||
|
||||
void QQnxInputContext::keyboardLocaleChanged(const QLocale &locale)
|
||||
{
|
||||
qInputContextDebug() << Q_FUNC_INFO << "locale=" << locale;
|
||||
qInputContextDebug() << "locale=" << locale;
|
||||
if (m_inputPanelLocale != locale) {
|
||||
m_inputPanelLocale = locale;
|
||||
emitLocaleChanged();
|
||||
@ -166,7 +166,7 @@ void QQnxInputContext::keyboardLocaleChanged(const QLocale &locale)
|
||||
|
||||
void QQnxInputContext::setFocusObject(QObject *object)
|
||||
{
|
||||
qInputContextDebug() << Q_FUNC_INFO << "input item=" << object;
|
||||
qInputContextDebug() << "input item=" << object;
|
||||
|
||||
if (!inputMethodAccepted()) {
|
||||
if (m_inputPanelVisible)
|
||||
|
@ -143,7 +143,7 @@ QQnxIntegration::QQnxIntegration(const QStringList ¶mList)
|
||||
#endif
|
||||
{
|
||||
ms_options = parseOptions(paramList);
|
||||
qIntegrationDebug() << Q_FUNC_INFO;
|
||||
qIntegrationDebug();
|
||||
// Open connection to QNX composition manager
|
||||
Q_SCREEN_CRITICALERROR(screen_create_context(&ms_screenContext, SCREEN_APPLICATION_CONTEXT),
|
||||
"Failed to create screen context");
|
||||
@ -210,7 +210,7 @@ QQnxIntegration::QQnxIntegration(const QStringList ¶mList)
|
||||
|
||||
QQnxIntegration::~QQnxIntegration()
|
||||
{
|
||||
qIntegrationDebug() << Q_FUNC_INFO << "platform plugin shutdown begin";
|
||||
qIntegrationDebug("platform plugin shutdown begin");
|
||||
delete m_nativeInterface;
|
||||
|
||||
#if !defined(QT_NO_DRAGANDDROP)
|
||||
@ -267,12 +267,12 @@ QQnxIntegration::~QQnxIntegration()
|
||||
// Destroy navigator interface
|
||||
delete m_navigator;
|
||||
|
||||
qIntegrationDebug() << Q_FUNC_INFO << "platform plugin shutdown end";
|
||||
qIntegrationDebug("platform plugin shutdown end");
|
||||
}
|
||||
|
||||
bool QQnxIntegration::hasCapability(QPlatformIntegration::Capability cap) const
|
||||
{
|
||||
qIntegrationDebug() << Q_FUNC_INFO;
|
||||
qIntegrationDebug();
|
||||
switch (cap) {
|
||||
case MultipleWindows:
|
||||
case ThreadedPixmaps:
|
||||
@ -290,7 +290,7 @@ bool QQnxIntegration::hasCapability(QPlatformIntegration::Capability cap) const
|
||||
|
||||
QPlatformWindow *QQnxIntegration::createPlatformWindow(QWindow *window) const
|
||||
{
|
||||
qIntegrationDebug() << Q_FUNC_INFO;
|
||||
qIntegrationDebug();
|
||||
QSurface::SurfaceType surfaceType = window->surfaceType();
|
||||
const bool needRootWindow = options() & RootWindow;
|
||||
switch (surfaceType) {
|
||||
@ -308,14 +308,14 @@ QPlatformWindow *QQnxIntegration::createPlatformWindow(QWindow *window) const
|
||||
|
||||
QPlatformBackingStore *QQnxIntegration::createPlatformBackingStore(QWindow *window) const
|
||||
{
|
||||
qIntegrationDebug() << Q_FUNC_INFO;
|
||||
qIntegrationDebug();
|
||||
return new QQnxRasterBackingStore(window);
|
||||
}
|
||||
|
||||
#if !defined(QT_NO_OPENGL)
|
||||
QPlatformOpenGLContext *QQnxIntegration::createPlatformOpenGLContext(QOpenGLContext *context) const
|
||||
{
|
||||
qIntegrationDebug() << Q_FUNC_INFO;
|
||||
qIntegrationDebug();
|
||||
return new QQnxGLContext(context);
|
||||
}
|
||||
#endif
|
||||
@ -323,14 +323,14 @@ QPlatformOpenGLContext *QQnxIntegration::createPlatformOpenGLContext(QOpenGLCont
|
||||
#if defined(QQNX_PPS)
|
||||
QPlatformInputContext *QQnxIntegration::inputContext() const
|
||||
{
|
||||
qIntegrationDebug() << Q_FUNC_INFO;
|
||||
qIntegrationDebug();
|
||||
return m_inputContext;
|
||||
}
|
||||
#endif
|
||||
|
||||
void QQnxIntegration::moveToScreen(QWindow *window, int screen)
|
||||
{
|
||||
qIntegrationDebug() << Q_FUNC_INFO << "w =" << window << ", s =" << screen;
|
||||
qIntegrationDebug() << "w =" << window << ", s =" << screen;
|
||||
|
||||
// get platform window used by widget
|
||||
QQnxWindow *platformWindow = static_cast<QQnxWindow *>(window->handle());
|
||||
@ -344,7 +344,7 @@ void QQnxIntegration::moveToScreen(QWindow *window, int screen)
|
||||
|
||||
QAbstractEventDispatcher *QQnxIntegration::createEventDispatcher() const
|
||||
{
|
||||
qIntegrationDebug() << Q_FUNC_INFO;
|
||||
qIntegrationDebug();
|
||||
|
||||
// We transfer ownersip of the event-dispatcher to QtCoreApplication
|
||||
QAbstractEventDispatcher *eventDispatcher = m_eventDispatcher;
|
||||
@ -361,7 +361,7 @@ QPlatformNativeInterface *QQnxIntegration::nativeInterface() const
|
||||
#if !defined(QT_NO_CLIPBOARD)
|
||||
QPlatformClipboard *QQnxIntegration::clipboard() const
|
||||
{
|
||||
qIntegrationDebug() << Q_FUNC_INFO;
|
||||
qIntegrationDebug();
|
||||
|
||||
#if defined(QQNX_PPS)
|
||||
if (!m_clipboard)
|
||||
@ -380,7 +380,7 @@ QPlatformDrag *QQnxIntegration::drag() const
|
||||
|
||||
QVariant QQnxIntegration::styleHint(QPlatformIntegration::StyleHint hint) const
|
||||
{
|
||||
qIntegrationDebug() << Q_FUNC_INFO;
|
||||
qIntegrationDebug();
|
||||
if ((hint == ShowIsFullScreen) && (ms_options & FullScreenApplication))
|
||||
return true;
|
||||
|
||||
@ -394,7 +394,7 @@ QPlatformServices * QQnxIntegration::services() const
|
||||
|
||||
QWindow *QQnxIntegration::window(screen_window_t qnxWindow)
|
||||
{
|
||||
qIntegrationDebug() << Q_FUNC_INFO;
|
||||
qIntegrationDebug();
|
||||
QMutexLocker locker(&ms_windowMapperMutex);
|
||||
Q_UNUSED(locker);
|
||||
return ms_windowMapper.value(qnxWindow, 0);
|
||||
@ -402,7 +402,7 @@ QWindow *QQnxIntegration::window(screen_window_t qnxWindow)
|
||||
|
||||
void QQnxIntegration::addWindow(screen_window_t qnxWindow, QWindow *window)
|
||||
{
|
||||
qIntegrationDebug() << Q_FUNC_INFO;
|
||||
qIntegrationDebug();
|
||||
QMutexLocker locker(&ms_windowMapperMutex);
|
||||
Q_UNUSED(locker);
|
||||
ms_windowMapper.insert(qnxWindow, window);
|
||||
@ -410,7 +410,7 @@ void QQnxIntegration::addWindow(screen_window_t qnxWindow, QWindow *window)
|
||||
|
||||
void QQnxIntegration::removeWindow(screen_window_t qnxWindow)
|
||||
{
|
||||
qIntegrationDebug() << Q_FUNC_INFO;
|
||||
qIntegrationDebug();
|
||||
QMutexLocker locker(&ms_windowMapperMutex);
|
||||
Q_UNUSED(locker);
|
||||
ms_windowMapper.remove(qnxWindow);
|
||||
@ -418,7 +418,7 @@ void QQnxIntegration::removeWindow(screen_window_t qnxWindow)
|
||||
|
||||
void QQnxIntegration::createDisplays()
|
||||
{
|
||||
qIntegrationDebug() << Q_FUNC_INFO;
|
||||
qIntegrationDebug();
|
||||
// Query number of displays
|
||||
int displayCount = 0;
|
||||
int result = screen_get_context_property_iv(ms_screenContext, SCREEN_PROPERTY_DISPLAY_COUNT,
|
||||
@ -447,11 +447,11 @@ void QQnxIntegration::createDisplays()
|
||||
Q_SCREEN_CHECKERROR(result, "Failed to query display attachment");
|
||||
|
||||
if (!isAttached) {
|
||||
qIntegrationDebug() << Q_FUNC_INFO << "Skipping non-attached display" << i;
|
||||
qIntegrationDebug() << "Skipping non-attached display" << i;
|
||||
continue;
|
||||
}
|
||||
|
||||
qIntegrationDebug() << Q_FUNC_INFO << "Creating screen for display" << i;
|
||||
qIntegrationDebug() << "Creating screen for display" << i;
|
||||
createDisplay(displays[i], /*isPrimary=*/false);
|
||||
} // of displays iteration
|
||||
}
|
||||
@ -485,7 +485,7 @@ void QQnxIntegration::removeDisplay(QQnxScreen *screen)
|
||||
|
||||
void QQnxIntegration::destroyDisplays()
|
||||
{
|
||||
qIntegrationDebug() << Q_FUNC_INFO;
|
||||
qIntegrationDebug();
|
||||
Q_FOREACH (QQnxScreen *screen, m_screens) {
|
||||
QPlatformIntegration::destroyScreen(screen);
|
||||
}
|
||||
|
@ -57,20 +57,20 @@ bool QQnxNavigatorEventHandler::handleOrientationCheck(int angle)
|
||||
{
|
||||
// reply to navigator that (any) orientation is acceptable
|
||||
// TODO: check if top window flags prohibit orientation change
|
||||
qNavigatorEventHandlerDebug() << Q_FUNC_INFO << "angle=" << angle;
|
||||
qNavigatorEventHandlerDebug() << "angle=" << angle;
|
||||
return true;
|
||||
}
|
||||
|
||||
void QQnxNavigatorEventHandler::handleOrientationChange(int angle)
|
||||
{
|
||||
// update screen geometry and reply to navigator that we're ready
|
||||
qNavigatorEventHandlerDebug() << Q_FUNC_INFO << "angle=" << angle;
|
||||
qNavigatorEventHandlerDebug() << "angle=" << angle;
|
||||
emit rotationChanged(angle);
|
||||
}
|
||||
|
||||
void QQnxNavigatorEventHandler::handleSwipeDown()
|
||||
{
|
||||
qNavigatorEventHandlerDebug() << Q_FUNC_INFO;
|
||||
qNavigatorEventHandlerDebug();
|
||||
|
||||
Q_EMIT swipeDown();
|
||||
}
|
||||
@ -78,25 +78,25 @@ void QQnxNavigatorEventHandler::handleSwipeDown()
|
||||
void QQnxNavigatorEventHandler::handleExit()
|
||||
{
|
||||
// shutdown everything
|
||||
qNavigatorEventHandlerDebug() << Q_FUNC_INFO;
|
||||
qNavigatorEventHandlerDebug();
|
||||
QCoreApplication::quit();
|
||||
}
|
||||
|
||||
void QQnxNavigatorEventHandler::handleWindowGroupActivated(const QByteArray &id)
|
||||
{
|
||||
qNavigatorEventHandlerDebug() << Q_FUNC_INFO << id;
|
||||
qNavigatorEventHandlerDebug() << id;
|
||||
Q_EMIT windowGroupActivated(id);
|
||||
}
|
||||
|
||||
void QQnxNavigatorEventHandler::handleWindowGroupDeactivated(const QByteArray &id)
|
||||
{
|
||||
qNavigatorEventHandlerDebug() << Q_FUNC_INFO << id;
|
||||
qNavigatorEventHandlerDebug() << id;
|
||||
Q_EMIT windowGroupDeactivated(id);
|
||||
}
|
||||
|
||||
void QQnxNavigatorEventHandler::handleWindowGroupStateChanged(const QByteArray &id, Qt::WindowState state)
|
||||
{
|
||||
qNavigatorEventHandlerDebug() << Q_FUNC_INFO << id;
|
||||
qNavigatorEventHandlerDebug() << id;
|
||||
Q_EMIT windowGroupStateChanged(id, state);
|
||||
}
|
||||
|
||||
|
@ -74,18 +74,18 @@ QQnxNavigatorEventNotifier::~QQnxNavigatorEventNotifier()
|
||||
if (m_fd != -1)
|
||||
close(m_fd);
|
||||
|
||||
qNavigatorEventNotifierDebug() << Q_FUNC_INFO << "navigator event notifier stopped";
|
||||
qNavigatorEventNotifierDebug("navigator event notifier stopped");
|
||||
}
|
||||
|
||||
void QQnxNavigatorEventNotifier::start()
|
||||
{
|
||||
qNavigatorEventNotifierDebug() << Q_FUNC_INFO << "navigator event notifier started";
|
||||
qNavigatorEventNotifierDebug("navigator event notifier started");
|
||||
|
||||
// open connection to navigator
|
||||
errno = 0;
|
||||
m_fd = open(navigatorControlPath, O_RDWR);
|
||||
if (m_fd == -1) {
|
||||
qNavigatorEventNotifierDebug() << Q_FUNC_INFO << ": failed to open navigator pps:"
|
||||
qNavigatorEventNotifierDebug() << "failed to open navigator pps:"
|
||||
<< strerror(errno);
|
||||
return;
|
||||
}
|
||||
@ -96,7 +96,7 @@ void QQnxNavigatorEventNotifier::start()
|
||||
|
||||
void QQnxNavigatorEventNotifier::parsePPS(const QByteArray &ppsData, QByteArray &msg, QByteArray &dat, QByteArray &id)
|
||||
{
|
||||
qNavigatorEventNotifierDebug() << Q_FUNC_INFO << "data=" << ppsData;
|
||||
qNavigatorEventNotifierDebug() << "data=" << ppsData;
|
||||
|
||||
// tokenize pps data into lines
|
||||
QList<QByteArray> lines = ppsData.split('\n');
|
||||
@ -110,7 +110,7 @@ void QQnxNavigatorEventNotifier::parsePPS(const QByteArray &ppsData, QByteArray
|
||||
|
||||
// tokenize current attribute
|
||||
const QByteArray &attr = lines.at(i);
|
||||
qNavigatorEventNotifierDebug() << Q_FUNC_INFO << "attr=" << attr;
|
||||
qNavigatorEventNotifierDebug() << "attr=" << attr;
|
||||
|
||||
int firstColon = attr.indexOf(':');
|
||||
if (firstColon == -1) {
|
||||
@ -127,8 +127,8 @@ void QQnxNavigatorEventNotifier::parsePPS(const QByteArray &ppsData, QByteArray
|
||||
QByteArray key = attr.left(firstColon);
|
||||
QByteArray value = attr.mid(secondColon + 1);
|
||||
|
||||
qNavigatorEventNotifierDebug() << Q_FUNC_INFO << "key=" << key;
|
||||
qNavigatorEventNotifierDebug() << Q_FUNC_INFO << "val=" << value;
|
||||
qNavigatorEventNotifierDebug() << "key=" << key;
|
||||
qNavigatorEventNotifierDebug() << "val=" << value;
|
||||
|
||||
// save attribute value
|
||||
if (key == "msg")
|
||||
@ -155,7 +155,7 @@ void QQnxNavigatorEventNotifier::replyPPS(const QByteArray &res, const QByteArra
|
||||
}
|
||||
ppsData += "\n";
|
||||
|
||||
qNavigatorEventNotifierDebug() << Q_FUNC_INFO << "reply=" << ppsData;
|
||||
qNavigatorEventNotifierDebug() << "reply=" << ppsData;
|
||||
|
||||
// send pps message to navigator
|
||||
errno = 0;
|
||||
@ -166,7 +166,7 @@ void QQnxNavigatorEventNotifier::replyPPS(const QByteArray &res, const QByteArra
|
||||
|
||||
void QQnxNavigatorEventNotifier::handleMessage(const QByteArray &msg, const QByteArray &dat, const QByteArray &id)
|
||||
{
|
||||
qNavigatorEventNotifierDebug() << Q_FUNC_INFO << "msg=" << msg << ", dat=" << dat << ", id=" << id;
|
||||
qNavigatorEventNotifierDebug() << "msg=" << msg << ", dat=" << dat << ", id=" << id;
|
||||
|
||||
// check message type
|
||||
if (msg == "orientationCheck") {
|
||||
@ -190,7 +190,7 @@ void QQnxNavigatorEventNotifier::handleMessage(const QByteArray &msg, const QByt
|
||||
|
||||
void QQnxNavigatorEventNotifier::readData()
|
||||
{
|
||||
qNavigatorEventNotifierDebug() << Q_FUNC_INFO << "reading navigator data";
|
||||
qNavigatorEventNotifierDebug("reading navigator data");
|
||||
|
||||
// allocate buffer for pps data
|
||||
char buffer[ppsBufferSize];
|
||||
|
@ -73,7 +73,7 @@ bool QQnxNavigatorPps::openPpsConnection()
|
||||
return false;
|
||||
}
|
||||
|
||||
qNavigatorDebug() << Q_FUNC_INFO << "successfully connected to Navigator. fd=" << m_fd;
|
||||
qNavigatorDebug() << "successfully connected to Navigator. fd=" << m_fd;
|
||||
|
||||
return true;
|
||||
}
|
||||
@ -95,7 +95,7 @@ bool QQnxNavigatorPps::sendPpsMessage(const QByteArray &message, const QByteArra
|
||||
|
||||
ppsMessage += "\n";
|
||||
|
||||
qNavigatorDebug() << Q_FUNC_INFO << "sending PPS message:\n" << ppsMessage;
|
||||
qNavigatorDebug() << "sending PPS message:\n" << ppsMessage;
|
||||
|
||||
// send pps message to navigator
|
||||
errno = 0;
|
||||
@ -117,7 +117,7 @@ bool QQnxNavigatorPps::sendPpsMessage(const QByteArray &message, const QByteArra
|
||||
// ensure data is null terminated
|
||||
buffer[bytes] = '\0';
|
||||
|
||||
qNavigatorDebug() << Q_FUNC_INFO << "received PPS message:\n" << buffer;
|
||||
qNavigatorDebug() << "received PPS message:\n" << buffer;
|
||||
|
||||
// process received message
|
||||
QByteArray ppsData(buffer);
|
||||
@ -136,7 +136,7 @@ bool QQnxNavigatorPps::sendPpsMessage(const QByteArray &message, const QByteArra
|
||||
|
||||
void QQnxNavigatorPps::parsePPS(const QByteArray &ppsData, QHash<QByteArray, QByteArray> &messageFields)
|
||||
{
|
||||
qNavigatorDebug() << Q_FUNC_INFO << "data=" << ppsData;
|
||||
qNavigatorDebug() << "data=" << ppsData;
|
||||
|
||||
// tokenize pps data into lines
|
||||
QList<QByteArray> lines = ppsData.split('\n');
|
||||
@ -151,7 +151,7 @@ void QQnxNavigatorPps::parsePPS(const QByteArray &ppsData, QHash<QByteArray, QBy
|
||||
// tokenize current attribute
|
||||
const QByteArray &attr = lines.at(i);
|
||||
|
||||
qNavigatorDebug() << Q_FUNC_INFO << "attr=" << attr;
|
||||
qNavigatorDebug() << "attr=" << attr;
|
||||
|
||||
int firstColon = attr.indexOf(':');
|
||||
if (firstColon == -1) {
|
||||
@ -168,8 +168,8 @@ void QQnxNavigatorPps::parsePPS(const QByteArray &ppsData, QHash<QByteArray, QBy
|
||||
QByteArray key = attr.left(firstColon);
|
||||
QByteArray value = attr.mid(secondColon + 1);
|
||||
|
||||
qNavigatorDebug() << Q_FUNC_INFO << "key=" << key;
|
||||
qNavigatorDebug() << Q_FUNC_INFO << "val=" << value;
|
||||
qNavigatorDebug() << "key=" << key;
|
||||
qNavigatorDebug() << "val=" << value;
|
||||
messageFields[key] = value;
|
||||
}
|
||||
}
|
||||
|
@ -53,14 +53,14 @@ QQnxRasterBackingStore::QQnxRasterBackingStore(QWindow *window)
|
||||
m_needsPosting(false),
|
||||
m_scrolled(false)
|
||||
{
|
||||
qRasterBackingStoreDebug() << Q_FUNC_INFO << "w =" << window;
|
||||
qRasterBackingStoreDebug() << "w =" << window;
|
||||
|
||||
m_window = window;
|
||||
}
|
||||
|
||||
QQnxRasterBackingStore::~QQnxRasterBackingStore()
|
||||
{
|
||||
qRasterBackingStoreDebug() << Q_FUNC_INFO << "w =" << window();
|
||||
qRasterBackingStoreDebug() << "w =" << window();
|
||||
}
|
||||
|
||||
QPaintDevice *QQnxRasterBackingStore::paintDevice()
|
||||
@ -75,7 +75,7 @@ void QQnxRasterBackingStore::flush(QWindow *window, const QRegion ®ion, const
|
||||
{
|
||||
Q_UNUSED(offset)
|
||||
|
||||
qRasterBackingStoreDebug() << Q_FUNC_INFO << "w =" << this->window();
|
||||
qRasterBackingStoreDebug() << "w =" << this->window();
|
||||
|
||||
// Sometimes this method is called even though there is nothing to be
|
||||
// flushed (posted in "screen" parlance), for instance, after an expose
|
||||
@ -103,7 +103,7 @@ void QQnxRasterBackingStore::resize(const QSize &size, const QRegion &staticCont
|
||||
{
|
||||
Q_UNUSED(size);
|
||||
Q_UNUSED(staticContents);
|
||||
qRasterBackingStoreDebug() << Q_FUNC_INFO << "w =" << window() << ", s =" << size;
|
||||
qRasterBackingStoreDebug() << "w =" << window() << ", s =" << size;
|
||||
|
||||
// NOTE: defer resizing window buffers until next paint as
|
||||
// resize() can be called multiple times before a paint occurs
|
||||
@ -111,7 +111,7 @@ void QQnxRasterBackingStore::resize(const QSize &size, const QRegion &staticCont
|
||||
|
||||
bool QQnxRasterBackingStore::scroll(const QRegion &area, int dx, int dy)
|
||||
{
|
||||
qRasterBackingStoreDebug() << Q_FUNC_INFO << "w =" << window();
|
||||
qRasterBackingStoreDebug() << "w =" << window();
|
||||
|
||||
m_needsPosting = true;
|
||||
|
||||
@ -127,7 +127,7 @@ void QQnxRasterBackingStore::beginPaint(const QRegion ®ion)
|
||||
{
|
||||
Q_UNUSED(region);
|
||||
|
||||
qRasterBackingStoreDebug() << Q_FUNC_INFO << "w =" << window();
|
||||
qRasterBackingStoreDebug() << "w =" << window();
|
||||
m_needsPosting = true;
|
||||
|
||||
platformWindow()->adjustBufferSize();
|
||||
@ -154,7 +154,7 @@ void QQnxRasterBackingStore::beginPaint(const QRegion ®ion)
|
||||
|
||||
void QQnxRasterBackingStore::endPaint()
|
||||
{
|
||||
qRasterBackingStoreDebug() << Q_FUNC_INFO << "w =" << window();
|
||||
qRasterBackingStoreDebug() << "w =" << window();
|
||||
}
|
||||
|
||||
QQnxRasterWindow *QQnxRasterBackingStore::platformWindow() const
|
||||
|
@ -91,7 +91,7 @@ void QQnxRasterWindow::post(const QRegion &dirty)
|
||||
|
||||
// Check if render buffer exists and something was rendered
|
||||
if (m_currentBufferIndex != -1 && !dirty.isEmpty()) {
|
||||
qRasterWindowDebug() << Q_FUNC_INFO << "window =" << window();
|
||||
qRasterWindowDebug() << "window =" << window();
|
||||
QQnxBuffer ¤tBuffer = m_buffers[m_currentBufferIndex];
|
||||
|
||||
// Copy unmodified region from old render buffer to new render buffer;
|
||||
@ -124,14 +124,14 @@ void QQnxRasterWindow::post(const QRegion &dirty)
|
||||
|
||||
void QQnxRasterWindow::scroll(const QRegion ®ion, int dx, int dy, bool flush)
|
||||
{
|
||||
qRasterWindowDebug() << Q_FUNC_INFO << "window =" << window();
|
||||
qRasterWindowDebug() << "window =" << window();
|
||||
blitPreviousToCurrent(region, dx, dy, flush);
|
||||
m_scrolled += region;
|
||||
}
|
||||
|
||||
QQnxBuffer &QQnxRasterWindow::renderBuffer()
|
||||
{
|
||||
qRasterWindowDebug() << Q_FUNC_INFO << "window =" << window();
|
||||
qRasterWindowDebug() << "window =" << window();
|
||||
|
||||
// Check if render buffer is invalid
|
||||
if (m_currentBufferIndex == -1) {
|
||||
@ -192,7 +192,7 @@ void QQnxRasterWindow::resetBuffers()
|
||||
|
||||
void QQnxRasterWindow::blitPreviousToCurrent(const QRegion ®ion, int dx, int dy, bool flush)
|
||||
{
|
||||
qRasterWindowDebug() << Q_FUNC_INFO << "window =" << window();
|
||||
qRasterWindowDebug() << "window =" << window();
|
||||
|
||||
// Abort if previous buffer is invalid or if nothing to copy
|
||||
if (m_previousBufferIndex == -1 || region.isEmpty())
|
||||
|
@ -154,7 +154,7 @@ QQnxScreen::QQnxScreen(screen_context_t screenContext, screen_display_t display,
|
||||
m_coverWindow(0),
|
||||
m_cursor(new QQnxCursor())
|
||||
{
|
||||
qScreenDebug() << Q_FUNC_INFO;
|
||||
qScreenDebug();
|
||||
// Cache initial orientation of this display
|
||||
int result = screen_get_display_property_iv(m_display, SCREEN_PROPERTY_ROTATION,
|
||||
&m_initialRotation);
|
||||
@ -191,7 +191,7 @@ QQnxScreen::QQnxScreen(screen_context_t screenContext, screen_display_t display,
|
||||
|
||||
QQnxScreen::~QQnxScreen()
|
||||
{
|
||||
qScreenDebug() << Q_FUNC_INFO;
|
||||
qScreenDebug();
|
||||
Q_FOREACH (QQnxWindow *childWindow, m_childWindows)
|
||||
childWindow->setScreen(0);
|
||||
|
||||
@ -300,7 +300,7 @@ QPixmap QQnxScreen::grabWindow(WId window, int x, int y, int width, int height)
|
||||
|
||||
static int defaultDepth()
|
||||
{
|
||||
qScreenDebug() << Q_FUNC_INFO;
|
||||
qScreenDebug();
|
||||
static int defaultDepth = 0;
|
||||
if (defaultDepth == 0) {
|
||||
// check if display depth was specified in environment variable;
|
||||
@ -314,7 +314,7 @@ static int defaultDepth()
|
||||
|
||||
QRect QQnxScreen::availableGeometry() const
|
||||
{
|
||||
qScreenDebug() << Q_FUNC_INFO;
|
||||
qScreenDebug();
|
||||
// available geometry = total geometry - keyboard
|
||||
return QRect(m_currentGeometry.x(), m_currentGeometry.y(),
|
||||
m_currentGeometry.width(), m_currentGeometry.height() - m_keyboardHeight);
|
||||
@ -334,7 +334,7 @@ qreal QQnxScreen::refreshRate() const
|
||||
qWarning("QQnxScreen: Failed to query screen mode. Using default value of 60Hz");
|
||||
return 60.0;
|
||||
}
|
||||
qScreenDebug() << Q_FUNC_INFO << "screen mode:" << endl
|
||||
qScreenDebug() << "screen mode:" << endl
|
||||
<< " width =" << displayMode.width << endl
|
||||
<< " height =" << displayMode.height << endl
|
||||
<< " refresh =" << displayMode.refresh << endl
|
||||
@ -372,7 +372,7 @@ Qt::ScreenOrientation QQnxScreen::orientation() const
|
||||
else
|
||||
orient = Qt::InvertedLandscapeOrientation;
|
||||
}
|
||||
qScreenDebug() << Q_FUNC_INFO << "orientation =" << orient;
|
||||
qScreenDebug() << "orientation =" << orient;
|
||||
return orient;
|
||||
}
|
||||
|
||||
@ -398,7 +398,7 @@ static bool isOrthogonal(int angle1, int angle2)
|
||||
|
||||
void QQnxScreen::setRotation(int rotation)
|
||||
{
|
||||
qScreenDebug() << Q_FUNC_INFO << "orientation =" << rotation;
|
||||
qScreenDebug() << "orientation =" << rotation;
|
||||
// Check if rotation changed
|
||||
// We only want to rotate if we are the primary screen
|
||||
if (m_currentRotation != rotation && isPrimaryScreen()) {
|
||||
@ -419,7 +419,7 @@ void QQnxScreen::setRotation(int rotation)
|
||||
|
||||
// Resize root window if we've rotated 90 or 270 from previous orientation
|
||||
if (isOrthogonal(m_currentRotation, rotation)) {
|
||||
qScreenDebug() << Q_FUNC_INFO << "resize, size =" << m_currentGeometry.size();
|
||||
qScreenDebug() << "resize, size =" << m_currentGeometry.size();
|
||||
if (rootWindow())
|
||||
rootWindow()->setGeometry(QRect(QPoint(0,0), m_currentGeometry.size()));
|
||||
|
||||
@ -566,7 +566,7 @@ QQnxWindow *QQnxScreen::findWindow(screen_window_t windowHandle) const
|
||||
|
||||
void QQnxScreen::addWindow(QQnxWindow *window)
|
||||
{
|
||||
qScreenDebug() << Q_FUNC_INFO << "window =" << window;
|
||||
qScreenDebug() << "window =" << window;
|
||||
|
||||
if (m_childWindows.contains(window))
|
||||
return;
|
||||
@ -589,7 +589,7 @@ void QQnxScreen::addWindow(QQnxWindow *window)
|
||||
|
||||
void QQnxScreen::removeWindow(QQnxWindow *window)
|
||||
{
|
||||
qScreenDebug() << Q_FUNC_INFO << "window =" << window;
|
||||
qScreenDebug() << "window =" << window;
|
||||
|
||||
if (window != m_coverWindow) {
|
||||
const int numWindowsRemoved = m_childWindows.removeAll(window);
|
||||
@ -604,7 +604,7 @@ void QQnxScreen::removeWindow(QQnxWindow *window)
|
||||
|
||||
void QQnxScreen::raiseWindow(QQnxWindow *window)
|
||||
{
|
||||
qScreenDebug() << Q_FUNC_INFO << "window =" << window;
|
||||
qScreenDebug() << "window =" << window;
|
||||
|
||||
if (window != m_coverWindow) {
|
||||
removeWindow(window);
|
||||
@ -614,7 +614,7 @@ void QQnxScreen::raiseWindow(QQnxWindow *window)
|
||||
|
||||
void QQnxScreen::lowerWindow(QQnxWindow *window)
|
||||
{
|
||||
qScreenDebug() << Q_FUNC_INFO << "window =" << window;
|
||||
qScreenDebug() << "window =" << window;
|
||||
|
||||
if (window != m_coverWindow) {
|
||||
removeWindow(window);
|
||||
@ -624,7 +624,7 @@ void QQnxScreen::lowerWindow(QQnxWindow *window)
|
||||
|
||||
void QQnxScreen::updateHierarchy()
|
||||
{
|
||||
qScreenDebug() << Q_FUNC_INFO;
|
||||
qScreenDebug();
|
||||
|
||||
QList<QQnxWindow*>::const_iterator it;
|
||||
int result;
|
||||
@ -800,7 +800,7 @@ void QQnxScreen::windowClosed(void *window)
|
||||
|
||||
void QQnxScreen::windowGroupStateChanged(const QByteArray &id, Qt::WindowState state)
|
||||
{
|
||||
qScreenDebug() << Q_FUNC_INFO;
|
||||
qScreenDebug();
|
||||
|
||||
if (!rootWindow() || id != rootWindow()->groupName())
|
||||
return;
|
||||
@ -815,7 +815,7 @@ void QQnxScreen::windowGroupStateChanged(const QByteArray &id, Qt::WindowState s
|
||||
|
||||
void QQnxScreen::activateWindowGroup(const QByteArray &id)
|
||||
{
|
||||
qScreenDebug() << Q_FUNC_INFO;
|
||||
qScreenDebug();
|
||||
|
||||
if (!rootWindow() || id != rootWindow()->groupName())
|
||||
return;
|
||||
@ -834,7 +834,7 @@ void QQnxScreen::activateWindowGroup(const QByteArray &id)
|
||||
|
||||
void QQnxScreen::deactivateWindowGroup(const QByteArray &id)
|
||||
{
|
||||
qScreenDebug() << Q_FUNC_INFO;
|
||||
qScreenDebug();
|
||||
|
||||
if (!rootWindow() || id != rootWindow()->groupName())
|
||||
return;
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user