Merge remote-tracking branch 'gerrit/master' into newdocs

Change-Id: If2168c519daf45390af04af9ef9722770453a493
bb10
Tor Arne Vestbø 2012-10-16 10:43:36 +02:00
commit 8fc4f99e46
182 changed files with 1714 additions and 949 deletions

View File

@ -1206,10 +1206,12 @@ if($check_includes) {
my $qt_begin_namespace_found = 0;
my $qt_end_namespace_found = 0;
my $line;
my $stop_processing = 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;
@ -1237,7 +1239,7 @@ if($check_includes) {
$qt_end_namespace_found = 1;
}
}
if ($header_skip_qt_begin_header_test == 0) {
if ($header_skip_qt_begin_header_test == 0 and $stop_processing == 0) {
if ($qt_begin_header_found == 0) {
print "$lib: WARNING: $iheader does not include QT_BEGIN_HEADER\n";
}
@ -1247,7 +1249,7 @@ if($check_includes) {
}
}
if ($header_skip_qt_begin_namespace_test == 0) {
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";
}

8
configure vendored
View File

@ -2311,12 +2311,10 @@ if [ -z "$PLATFORM" ]; then
PLATFORM=macx-clang
elif [ "$OSX_VERSION" -eq 11 ]; then
# We're on Lion. Check if we have a supported Clang version
case "$(clang -v 2>&1 | grep -Po '(?<=version )\d[\d.]+')" in
3.*)
if [ "$(clang -v 2>&1 | grep -Po '(?<=version )[\d]')" -ge 3 ]; then
PLATFORM=macx-clang
PLATFORM_NOTES="\n - Also available for Mac OS X: macx-g++\n"
;;
esac
fi
fi
;;
AIX:*)
@ -6122,7 +6120,7 @@ QT_SOURCE_TREE = \$\$quote($relpath)
QT_BUILD_TREE = \$\$quote($outpath)
include(\$\$PWD/mkspecs/qmodule.pri)
CONFIG += dylib fix_output_dirs no_private_qt_headers_warning QTDIR_build
CONFIG += fix_output_dirs no_private_qt_headers_warning QTDIR_build
EOF

View File

@ -50,6 +50,6 @@ int main(int argc, char **argv)
PaintedWindow window;
window.show();
app.exec();
return app.exec();
}

View File

@ -1,8 +1,10 @@
<!--
This file is part of _PACKAGE_NAME_
This file is part of QtWebKit
Copyright (c) 2012 Digia Plc and/or its subsidiary(-ies).
Contact: http://www.qt-project.org/legal
Copyright (c) 2012 Nokia Corporation and/or its subsidiary(-ies).
You may use this file under the terms of the BSD license as follows:
@ -17,7 +19,7 @@ o Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
o Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
o Neither the name of Digia Plc and its Subsidiary(-ies) nor
the names of its contributors may be used to endorse or promote
products derived from this software without specific prior written
permission.

View File

@ -2,7 +2,8 @@
This file is part of QtWebKit
Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
Contact: http://www.qt-project.org/legal
You may use this file under the terms of the BSD license as follows:
@ -17,7 +18,7 @@ o Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
o Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
o Neither the name of Digia Plc and its Subsidiary(-ies) nor
the names of its contributors may be used to endorse or promote
products derived from this software without specific prior written
permission.

View File

@ -2,7 +2,8 @@
This file is part of QtWebKit
Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
Contact: http://www.qt-project.org/legal
You may use this file under the terms of the BSD license as follows:
@ -17,7 +18,7 @@ o Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
o Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
o Neither the name of Digia Plc and its Subsidiary(-ies) nor
the names of its contributors may be used to endorse or promote
products derived from this software without specific prior written
permission.

View File

@ -2,7 +2,8 @@
This file is part of QtWebKit
Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
Contact: http://www.qt-project.org/legal
You may use this file under the terms of the BSD license as follows:
@ -17,7 +18,7 @@ o Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
o Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
o Neither the name of Digia Plc and its Subsidiary(-ies) nor
the names of its contributors may be used to endorse or promote
products derived from this software without specific prior written
permission.

View File

@ -2,7 +2,8 @@
This file is part of QtWebKit
Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
Contact: http://www.qt-project.org/legal
You may use this file under the terms of the BSD license as follows:
@ -17,7 +18,7 @@ o Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
o Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
o Neither the name of Digia Plc and its Subsidiary(-ies) nor
the names of its contributors may be used to endorse or promote
products derived from this software without specific prior written
permission.

View File

@ -2,7 +2,8 @@
This file is part of QtWebKit
Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
Contact: http://www.qt-project.org/legal
You may use this file under the terms of the BSD license as follows:
@ -17,7 +18,7 @@ o Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
o Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
o Neither the name of Digia Plc and its Subsidiary(-ies) nor
the names of its contributors may be used to endorse or promote
products derived from this software without specific prior written
permission.

View File

@ -2,7 +2,8 @@
This file is part of QtWebKit
Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
Contact: http://www.qt-project.org/legal
You may use this file under the terms of the BSD license as follows:
@ -17,7 +18,7 @@ o Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
o Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
o Neither the name of Digia Plc and its Subsidiary(-ies) nor
the names of its contributors may be used to endorse or promote
products derived from this software without specific prior written
permission.

View File

@ -2,7 +2,8 @@
This file is part of QtWebKit
Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
Contact: http://www.qt-project.org/legal
You may use this file under the terms of the BSD license as follows:
@ -17,7 +18,7 @@ o Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
o Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
o Neither the name of Digia Plc and its Subsidiary(-ies) nor
the names of its contributors may be used to endorse or promote
products derived from this software without specific prior written
permission.

View File

@ -2,7 +2,8 @@
This file is part of QtWebKit
Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
Contact: http://www.qt-project.org/legal
You may use this file under the terms of the BSD license as follows:
@ -17,7 +18,7 @@ o Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
o Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
o Neither the name of Digia Plc and its Subsidiary(-ies) nor
the names of its contributors may be used to endorse or promote
products derived from this software without specific prior written
permission.

View File

@ -2,7 +2,8 @@
This file is part of QtWebKit
Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
Contact: http://www.qt-project.org/legal
You may use this file under the terms of the BSD license as follows:
@ -17,7 +18,7 @@ o Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
o Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
o Neither the name of Digia Plc and its Subsidiary(-ies) nor
the names of its contributors may be used to endorse or promote
products derived from this software without specific prior written
permission.

View File

@ -2,7 +2,8 @@
This file is part of QtWebKit
Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
Contact: http://www.qt-project.org/legal
You may use this file under the terms of the BSD license as follows:
@ -17,7 +18,7 @@ o Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
o Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
o Neither the name of Digia Plc and its Subsidiary(-ies) nor
the names of its contributors may be used to endorse or promote
products derived from this software without specific prior written
permission.

View File

@ -2,7 +2,8 @@
This file is part of QtWebKit
Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
Contact: http://www.qt-project.org/legal
You may use this file under the terms of the BSD license as follows:
@ -17,7 +18,7 @@ o Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
o Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
o Neither the name of Digia Plc and its Subsidiary(-ies) nor
the names of its contributors may be used to endorse or promote
products derived from this software without specific prior written
permission.

View File

@ -2,7 +2,8 @@
This file is part of QtWebKit
Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
Contact: http://www.qt-project.org/legal
You may use this file under the terms of the BSD license as follows:
@ -17,7 +18,7 @@ o Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
o Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
o Neither the name of Digia Plc and its Subsidiary(-ies) nor
the names of its contributors may be used to endorse or promote
products derived from this software without specific prior written
permission.

View File

@ -2,7 +2,8 @@
This file is part of QtWebKit
Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
Contact: http://www.qt-project.org/legal
You may use this file under the terms of the BSD license as follows:
@ -17,7 +18,7 @@ o Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
o Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
o Neither the name of Digia Plc and its Subsidiary(-ies) nor
the names of its contributors may be used to endorse or promote
products derived from this software without specific prior written
permission.

View File

@ -2,7 +2,8 @@
This file is part of QtWebKit
Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
Contact: http://www.qt-project.org/legal
You may use this file under the terms of the BSD license as follows:
@ -17,7 +18,7 @@ o Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
o Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
o Neither the name of Digia Plc and its Subsidiary(-ies) nor
the names of its contributors may be used to endorse or promote
products derived from this software without specific prior written
permission.

View File

@ -2,7 +2,8 @@
This file is part of QtWebKit
Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
Contact: http://www.qt-project.org/legal
You may use this file under the terms of the BSD license as follows:
@ -17,7 +18,7 @@ o Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
o Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
o Neither the name of Digia Plc and its Subsidiary(-ies) nor
the names of its contributors may be used to endorse or promote
products derived from this software without specific prior written
permission.

View File

@ -2,7 +2,8 @@
This file is part of QtWebKit
Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
Contact: http://www.qt-project.org/legal
You may use this file under the terms of the BSD license as follows:
@ -17,7 +18,7 @@ o Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
o Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
o Neither the name of Digia Plc and its Subsidiary(-ies) nor
the names of its contributors may be used to endorse or promote
products derived from this software without specific prior written
permission.

View File

@ -2,7 +2,8 @@
This file is part of QtWebKit
Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
Contact: http://www.qt-project.org/legal
You may use this file under the terms of the BSD license as follows:
@ -17,7 +18,7 @@ o Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
o Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
o Neither the name of Digia Plc and its Subsidiary(-ies) nor
the names of its contributors may be used to endorse or promote
products derived from this software without specific prior written
permission.

View File

@ -2,7 +2,8 @@
This file is part of QtWebKit
Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
Contact: http://www.qt-project.org/legal
You may use this file under the terms of the BSD license as follows:
@ -17,7 +18,7 @@ o Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
o Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
o Neither the name of Digia Plc and its Subsidiary(-ies) nor
the names of its contributors may be used to endorse or promote
products derived from this software without specific prior written
permission.

View File

@ -2,7 +2,8 @@
This file is part of QtWebKit
Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
Contact: http://www.qt-project.org/legal
You may use this file under the terms of the BSD license as follows:
@ -17,7 +18,7 @@ o Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
o Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
o Neither the name of Digia Plc and its Subsidiary(-ies) nor
the names of its contributors may be used to endorse or promote
products derived from this software without specific prior written
permission.

View File

@ -2,7 +2,8 @@
This file is part of QtWebKit
Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
Contact: http://www.qt-project.org/legal
You may use this file under the terms of the BSD license as follows:
@ -17,7 +18,7 @@ o Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
o Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
o Neither the name of Digia Plc and its Subsidiary(-ies) nor
the names of its contributors may be used to endorse or promote
products derived from this software without specific prior written
permission.

View File

@ -2,7 +2,8 @@
This file is part of QtWebKit
Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
Contact: http://www.qt-project.org/legal
You may use this file under the terms of the BSD license as follows:
@ -17,7 +18,7 @@ o Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
o Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
o Neither the name of Digia Plc and its Subsidiary(-ies) nor
the names of its contributors may be used to endorse or promote
products derived from this software without specific prior written
permission.

View File

@ -2,7 +2,8 @@
This file is part of QtWebKit
Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
Contact: http://www.qt-project.org/legal
You may use this file under the terms of the BSD license as follows:
@ -17,7 +18,7 @@ o Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
o Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
o Neither the name of Digia Plc and its Subsidiary(-ies) nor
the names of its contributors may be used to endorse or promote
products derived from this software without specific prior written
permission.

View File

@ -2,7 +2,8 @@
This file is part of QtWebKit
Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
Contact: http://www.qt-project.org/legal
You may use this file under the terms of the BSD license as follows:
@ -17,7 +18,7 @@ o Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
o Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
o Neither the name of Digia Plc and its Subsidiary(-ies) nor
the names of its contributors may be used to endorse or promote
products derived from this software without specific prior written
permission.

View File

@ -2,7 +2,8 @@
This file is part of QtWebKit
Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
Contact: http://www.qt-project.org/legal
You may use this file under the terms of the BSD license as follows:
@ -17,7 +18,7 @@ o Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
o Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
o Neither the name of Digia Plc and its Subsidiary(-ies) nor
the names of its contributors may be used to endorse or promote
products derived from this software without specific prior written
permission.

View File

@ -2,7 +2,8 @@
This file is part of QtWebKit
Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
Contact: http://www.qt-project.org/legal
You may use this file under the terms of the BSD license as follows:
@ -17,7 +18,7 @@ o Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
o Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
o Neither the name of Digia Plc and its Subsidiary(-ies) nor
the names of its contributors may be used to endorse or promote
products derived from this software without specific prior written
permission.

View File

@ -2,7 +2,8 @@
This file is part of QtWebKit
Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
Contact: http://www.qt-project.org/legal
You may use this file under the terms of the BSD license as follows:
@ -17,7 +18,7 @@ o Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
o Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
o Neither the name of Digia Plc and its Subsidiary(-ies) nor
the names of its contributors may be used to endorse or promote
products derived from this software without specific prior written
permission.

View File

@ -2,7 +2,8 @@
This file is part of QtWebKit
Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
Contact: http://www.qt-project.org/legal
You may use this file under the terms of the BSD license as follows:
@ -17,7 +18,7 @@ o Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
o Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
o Neither the name of Digia Plc and its Subsidiary(-ies) nor
the names of its contributors may be used to endorse or promote
products derived from this software without specific prior written
permission.

View File

@ -2,7 +2,8 @@
This file is part of QtWebKit
Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
Contact: http://www.qt-project.org/legal
You may use this file under the terms of the BSD license as follows:
@ -17,7 +18,7 @@ o Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
o Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
o Neither the name of Digia Plc and its Subsidiary(-ies) nor
the names of its contributors may be used to endorse or promote
products derived from this software without specific prior written
permission.

View File

@ -2,7 +2,8 @@
This file is part of QtWebKit
Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
Contact: http://www.qt-project.org/legal
You may use this file under the terms of the BSD license as follows:
@ -17,7 +18,7 @@ o Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
o Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
o Neither the name of Digia Plc and its Subsidiary(-ies) nor
the names of its contributors may be used to endorse or promote
products derived from this software without specific prior written
permission.

View File

@ -2,7 +2,8 @@
This file is part of QtWebKit
Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
Contact: http://www.qt-project.org/legal
You may use this file under the terms of the BSD license as follows:
@ -17,7 +18,7 @@ o Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
o Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
o Neither the name of Digia Plc and its Subsidiary(-ies) nor
the names of its contributors may be used to endorse or promote
products derived from this software without specific prior written
permission.

View File

@ -2,7 +2,8 @@
This file is part of QtWebKit
Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
Contact: http://www.qt-project.org/legal
You may use this file under the terms of the BSD license as follows:
@ -17,7 +18,7 @@ o Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
o Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
o Neither the name of Digia Plc and its Subsidiary(-ies) nor
the names of its contributors may be used to endorse or promote
products derived from this software without specific prior written
permission.

View File

@ -2,7 +2,8 @@
This file is part of QtWebKit
Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
Contact: http://www.qt-project.org/legal
You may use this file under the terms of the BSD license as follows:
@ -17,7 +18,7 @@ o Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
o Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
o Neither the name of Digia Plc and its Subsidiary(-ies) nor
the names of its contributors may be used to endorse or promote
products derived from this software without specific prior written
permission.

View File

@ -2,7 +2,8 @@
This file is part of QtWebKit
Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
Contact: http://www.qt-project.org/legal
You may use this file under the terms of the BSD license as follows:
@ -17,7 +18,7 @@ o Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
o Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
o Neither the name of Digia Plc and its Subsidiary(-ies) nor
the names of its contributors may be used to endorse or promote
products derived from this software without specific prior written
permission.

View File

@ -2,7 +2,8 @@
This file is part of QtWebKit
Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
Contact: http://www.qt-project.org/legal
You may use this file under the terms of the BSD license as follows:
@ -17,7 +18,7 @@ o Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
o Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
o Neither the name of Digia Plc and its Subsidiary(-ies) nor
the names of its contributors may be used to endorse or promote
products derived from this software without specific prior written
permission.

View File

@ -2,7 +2,8 @@
This file is part of QtWebKit
Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). All
Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
Contact: http://www.qt-project.org/legal All
rights reserved.
You may use this file under the terms of the BSD license as follows:
@ -18,7 +19,7 @@ o Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
o Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
o Neither the name of Digia Plc and its Subsidiary(-ies) nor
the names of its contributors may be used to endorse or promote
products derived from this software without specific prior written
permission.

View File

@ -2,7 +2,8 @@
This file is part of QtWebKit
Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
Contact: http://www.qt-project.org/legal
You may use this file under the terms of the BSD license as follows:
@ -17,7 +18,7 @@ o Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
o Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
o Neither the name of Digia Plc and its Subsidiary(-ies) nor
the names of its contributors may be used to endorse or promote
products derived from this software without specific prior written
permission.

View File

@ -2,7 +2,8 @@
This file is part of QtWebKit
Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
Contact: http://www.qt-project.org/legal
You may use this file under the terms of the BSD license as follows:
@ -17,7 +18,7 @@ o Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
o Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
o Neither the name of Digia Plc and its Subsidiary(-ies) nor
the names of its contributors may be used to endorse or promote
products derived from this software without specific prior written
permission.

View File

@ -39,10 +39,6 @@
possible to insert new child items, and this is shown in the supporting
example code.
\note The model only shows the basic principles used when creating an
editable, hierarchical model. You may wish to use the \l{ModelTest}
project to test production models.
\section1 Overview
As described in the \l{Model Subclassing Reference}, models must
@ -212,7 +208,7 @@
As with the \l{itemviews/simpletreemodel}{Simple Tree Model} example,
the \c TreeModel needs to be able to take a model index, find the
corresponding \c TreeItem, and return model indexes that correspond to
its parents and children.
its parents and children.
In the diagram, we show how the model's \l{TreeModel::parent}{parent()}
implementation obtains the model index corresponding to the parent of

View File

@ -1,7 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/
** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the examples of the Qt Toolkit.
**

View File

@ -1,7 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/
** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the examples of the Qt Toolkit.
**

View File

@ -60,6 +60,8 @@ static|staticlib:CMAKE_STATIC_TYPE = true
contains(QT_CONFIG, reduce_relocations):CMAKE_ADD_FPIE_FLAGS = "true"
CMAKE_MKSPEC = $$relative_path($$QMAKESPEC, $$[QT_HOST_DATA/get]/mkspecs)
macx {
!isEmpty(CMAKE_STATIC_TYPE) {
CMAKE_LIB_FILE_LOCATION_DEBUG = libQt$${CMAKE_MODULE_NAME}$${QT_LIBINFIX}_debug.a

View File

@ -89,7 +89,6 @@ MODULE_PRI = $$MODULE_QMAKE_OUTDIR/mkspecs/modules-inst/qt_$${MODULE}.pri
"QT.$${MODULE}.libs = \$\$QT_MODULE_LIB_BASE" \
"QT.$${MODULE}.plugins = \$\$QT_MODULE_PLUGIN_BASE" \
"QT.$${MODULE}.imports = \$\$QT_MODULE_IMPORT_BASE$$MODULE_IMPORT_SUFFIX" \
"QT.$${MODULE}.docs = \$\$QT_MODULE_DOC_BASE" \
"QT.$${MODULE}.depends =$$join(MODULE_DEPENDS, " ", " ")" \
$$module_privdep \
$$module_build_type \
@ -122,7 +121,19 @@ CONFIG += qmake_cache target_qt
CONFIG -= fix_output_dirs
!isEmpty(QMAKE_DOCS) {
QMAKE_DOCS_OUTPUTDIR = $$eval(QT.$${MODULE}.docs)/qt$${MODULE}
doc_subdir = doc
QTDIR = $$[QT_HOST_PREFIX]
!force_independent:exists($$QTDIR/.qmake.cache): \
mod_component_base = $$QTDIR
else: \
mod_component_base = $$MODULE_BASE_OUTDIR
unset(QMAKE_DOCS_INDEX)
QMAKE_DOCS_OUTPUTDIR = $$mod_component_base/$$doc_subdir/qt$${MODULE}
for(qmod, QMAKEMODULES): \
QMAKE_DOCS_INDEX += $$section(qmod, /, 0, -3)/$$doc_subdir
CONFIG += qt_install_module_docs
}

View File

@ -68,7 +68,6 @@
"QT_MODULE_IMPORT_BASE = $$mod_component_base/imports" \
"QT_MODULE_LIB_BASE = $$mod_component_base/lib" \
"QT_MODULE_PLUGIN_BASE = $$mod_component_base/plugins" \
"QT_MODULE_DOC_BASE = $$mod_component_base/doc" \
$$module_rpathlink \
$$module_rpathlink_priv \
"QT.$${MODULE}.rpath = $$MODULE_INSTALL_LIBS" \
@ -86,7 +85,7 @@
include($$MODULE_FWD_PRI)
for(var, $$list(VERSION MAJOR_VERSION MINOR_VERSION PATCH_VERSION \
name depends private_depends module_config CONFIG DEFINES sources \
includes private_includes bins libs plugins imports docs \
includes private_includes bins libs plugins imports \
)):defined(QT.$${MODULE}.$$var, var):cache(QT.$${MODULE}.$$var, transient)
cache(QT_CONFIG, transient)

View File

@ -12,7 +12,7 @@ QMAKE_LEX = flex
QMAKE_LEXFLAGS =
QMAKE_YACC = yacc
QMAKE_YACCFLAGS = -d
QMAKE_CFLAGS = -falign-stack=maintain-16-byte
QMAKE_CFLAGS =
QMAKE_CFLAGS_DEPS = -M
QMAKE_CFLAGS_WARN_ON = -w1 -Wcheck -wd654,1572,411,873,1125,2259,2261
QMAKE_CFLAGS_WARN_OFF = -w

View File

@ -44,6 +44,10 @@
#include <ui/DisplayInfo.h>
#include <ui/FramebufferNativeWindow.h>
#include <gui/SurfaceComposerClient.h>
#include <fcntl.h>
#include <unistd.h>
#include <linux/fb.h>
#include <sys/ioctl.h>
using namespace android;
@ -53,6 +57,8 @@ class QEglFSPandaHooks : public QEglFSHooks
{
public:
virtual EGLNativeWindowType createNativeWindow(const QSize &size, const QSurfaceFormat &format);
virtual QSize screenSize() const;
virtual int screenDepth() const;
private:
// androidy things
sp<android::SurfaceComposerClient> mSession;
@ -72,13 +78,74 @@ EGLNativeWindowType QEglFSPandaHooks::createNativeWindow(const QSize &size, cons
0, dinfo.w, dinfo.h, PIXEL_FORMAT_RGB_888);
SurfaceComposerClient::openGlobalTransaction();
mControl->setLayer(0x40000000);
mControl->setAlpha(0.4);
// mControl->setAlpha(1);
SurfaceComposerClient::closeGlobalTransaction();
mAndroidSurface = mControl->getSurface();
EGLNativeWindowType eglWindow = mAndroidSurface.get();
return eglWindow;
}
QSize QEglFSPandaHooks::screenSize() const
{
static QSize size;
if (size.isEmpty()) {
int width = qgetenv("QT_QPA_EGLFS_WIDTH").toInt();
int height = qgetenv("QT_QPA_EGLFS_HEIGHT").toInt();
if (width && height) {
// no need to read fb0
size.setWidth(width);
size.setHeight(height);
return size;
}
struct fb_var_screeninfo vinfo;
int fd = open("/dev/graphics/fb0", O_RDONLY);
if (fd != -1) {
if (ioctl(fd, FBIOGET_VSCREENINFO, &vinfo) == -1)
qWarning("Could not query variable screen info.");
else
size = QSize(vinfo.xres, vinfo.yres);
close(fd);
} else {
qWarning("Failed to open /dev/graphics/fb0 to detect screen resolution.");
}
// override fb0 from environment var setting
if (width)
size.setWidth(width);
if (height)
size.setHeight(height);
}
return size;
}
int QEglFSPandaHooks::screenDepth() const
{
static int depth = qgetenv("QT_QPA_EGLFS_DEPTH").toInt();
if (depth == 0) {
struct fb_var_screeninfo vinfo;
int fd = open("/dev/graphics/fb0", O_RDONLY);
if (fd != -1) {
if (ioctl(fd, FBIOGET_VSCREENINFO, &vinfo) == -1)
qWarning("Could not query variable screen info.");
else
depth = vinfo.bits_per_pixel;
close(fd);
} else {
qWarning("Failed to open /dev/graphics/fb0 to detect screen depth.");
}
}
return depth == 0 ? 32 : depth;
}
static QEglFSPandaHooks eglFSPandaHooks;
QEglFSHooks *platformHooks = &eglFSPandaHooks;

View File

@ -25,13 +25,14 @@ defineReplace(getAndroidBuildVar) {
write_file(android_build_vars, store_ANDROID_TARGET_ARCH, append)
}
warning(using android build env from cache in $$PWD/android_build_vars . delete this file if you changed your build env )
info(using android build env from cache in $$PWD/android_build_vars . delete this file if you changed your build env )
exists($$PWD/android_build_vars) {
include($$PWD/android_build_vars)
}
MAKEFILE_GENERATOR = UNIX
QMAKE_COMPILER = gcc
TARGET_PLATFORM = unix
TEMPLATE = app
QMAKE_INCREMENTAL_STYLE = sublib
@ -41,9 +42,11 @@ include(../../common/gcc-base-unix.conf)
CONFIG = qt warn_on release link_prl
QT = core gui
DEFINES += Q_OS_LINUX_ANDROID ANDROID HAVE_ANDROID_OS
DEFINES += Q_OS_LINUX_ANDROID HAVE_ANDROID_OS
DEFINES += QT_NO_PRINTER QT_NO_PRINTDIALOG QT_NO_EXCEPTIONS
#note: -DANDROID results in weird behaviour of math.h
DEFINES += ANDROID
QT_QPA_DEFAULT_PLATFORM = eglfs
EGLFS_PLATFORM_HOOKS_SOURCES = $$PWD/qeglfshooks_surfaceflinger.cpp
@ -53,6 +56,8 @@ EGLFS_PLATFORM_HOOKS_LIBS += -lgui -lutils
QMAKE_CC = $${ANDROID_TOOLCHAIN_PREFIX}gcc
QMAKE_CFLAGS = $${ANDROID_TARGET_CFLAGS}
QMAKE_CFLAGS -= -Werror=non-virtual-dtor
QMAKE_CFLAGS -= -DNDEBUG
QMAKE_CFLAGS_WARN_ON = -Wall -Wextra
QMAKE_CFLAGS_WARN_OFF = -Wno-psabi

View File

@ -85,6 +85,7 @@ QMAKE_LIBS_CORE = -lole32 -luuid -lws2_32 -ladvapi32 -lshell32 -luser32
QMAKE_LIBS_GUI = -lgdi32 -lcomdlg32 -loleaut32 -limm32 -lwinmm -lwinspool -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_COMPAT = -ladvapi32 -lshell32 -lcomdlg32 -luser32 -lgdi32 -lws2_32
QMAKE_LIBS_QT_ENTRY = -lmingw32 -lqtmain

View File

@ -335,7 +335,7 @@ static QStringList unquote(const QStringList &values)
{
QStringList result;
result.reserve(values.size());
for (int i = values.count(); --i >= 0;)
for (int i = 0; i < values.count(); ++i)
result << unquote(values.at(i));
return result;
}

View File

@ -44,9 +44,9 @@ set(Qt5Core_MOC_EXECUTABLE Qt5::moc)
set(Qt5Core_RCC_EXECUTABLE Qt5::rcc)
!!IF isEmpty(CMAKE_DATA_DIR_IS_ABSOLUTE)
list(APPEND Qt5Core_INCLUDE_DIRS \"${_qt5_corelib_install_prefix}/mkspecs/default\")
list(APPEND Qt5Core_INCLUDE_DIRS \"${_qt5_corelib_install_prefix}/mkspecs/$${CMAKE_MKSPEC}\")
!!ELSE
list(APPEND Qt5Core_INCLUDE_DIRS \"$${CMAKE_DATA_DIR}mkspecs/default\")
list(APPEND Qt5Core_INCLUDE_DIRS \"$${CMAKE_DATA_DIR}mkspecs/$${CMAKE_MKSPEC}\")
!!ENDIF
!!IF !isEmpty(CMAKE_ADD_FPIE_FLAGS)

View File

@ -39,6 +39,10 @@
**
****************************************************************************/
#if 0
#pragma qt_sync_stop_processing
#endif
#define QT_FONTS_ARE_RESOURCES
/* Data structures */

View File

@ -306,6 +306,11 @@
#define QT_NO_NETWORKDISKCACHE
#endif
// QLocalServer
#if !defined(QT_NO_LOCALSERVER) && (defined(QT_NO_TEMPORARYFILE))
#define QT_NO_LOCALSERVER
#endif
// QProgressDialog
#if !defined(QT_NO_PROGRESSDIALOG) && (defined(QT_NO_PROGRESSBAR))
#define QT_NO_PROGRESSDIALOG

View File

@ -727,20 +727,6 @@ Requires:
Name: QWindowsStyle
SeeAlso: ???
Feature: STYLE_MOTIF
Description: Supports a Motif look and feel.
Section: Styles
Requires:
Name: QMotifStyle
SeeAlso: ???
Feature: STYLE_CDE
Description: Supports a CDE look and feel.
Section: Styles
Requires: STYLE_MOTIF
Name: QCDEStyle
SeeAlso: ???
Feature: STYLE_PLASTIQUE
Description: Supports a widget style similar to the Plastik style available in KDE.
Section: Styles
@ -1025,6 +1011,12 @@ Requires: LIBRARY NETWORKINTERFACE PROPERTIES
Name: Bearer Management
SeeAlso: ???
Feature: LOCALSERVER
Description: Supports a local socket based server
Section: Networking
Requires: TEMPORARYFILE
Name: QLocalServer
SeeAlso: ???
# Utilities

View File

@ -177,7 +177,7 @@ static QProcessManager *processManager()
QMutexLocker locker(&processManagerGlobalMutex);
if (!processManagerInstance)
QProcessPrivate::initializeProcessManager();
new QProcessManager;
Q_ASSERT(processManagerInstance);
return processManagerInstance;
@ -185,9 +185,6 @@ static QProcessManager *processManager()
QProcessManager::QProcessManager()
{
// can only be called from main thread
Q_ASSERT(!qApp || qApp->thread() == QThread::currentThread());
#if defined (QPROCESS_DEBUG)
qDebug() << "QProcessManager::QProcessManager()";
#endif
@ -1434,15 +1431,7 @@ bool QProcessPrivate::startDetached(const QString &program, const QStringList &a
void QProcessPrivate::initializeProcessManager()
{
if (qApp && qApp->thread() != QThread::currentThread()) {
// The process manager must be initialized in the main thread
// Note: The call below will re-enter this function, but in the right thread,
// so the else statement below will be executed.
QMetaObject::invokeMethod(qApp, "_q_initializeProcessManager", Qt::BlockingQueuedConnection);
} else {
static QProcessManager processManager;
Q_UNUSED(processManager);
}
(void) processManager();
}
QT_END_NAMESPACE

View File

@ -264,6 +264,35 @@ struct QCoreApplicationData {
data->deref(); // deletes the data and the adopted thread
}
}
#ifdef Q_OS_BLACKBERRY
//The QCoreApplicationData struct is only populated on demand, because it is rarely needed and would
//affect startup time
void loadManifest() {
static bool manifestLoadAttempt = false;
if (manifestLoadAttempt)
return;
manifestLoadAttempt = true;
QFile metafile(QStringLiteral("app/META-INF/MANIFEST.MF"));
if (!metafile.open(QIODevice::ReadOnly)) {
qWarning() << Q_FUNC_INFO << "Could not open application metafile for reading";
} else {
while (!metafile.atEnd() && (application.isEmpty() || applicationVersion.isEmpty() || orgName.isEmpty())) {
QByteArray line = metafile.readLine();
if (line.startsWith("Application-Name:"))
application = QString::fromUtf8(line.mid(18).trimmed());
else if (line.startsWith("Application-Version:"))
applicationVersion = QString::fromUtf8(line.mid(21).trimmed());
else if (line.startsWith("Package-Author:"))
orgName = QString::fromUtf8(line.mid(16).trimmed());
}
metafile.close();
}
}
#endif
QString orgName, orgDomain, application;
QString applicationVersion;
@ -363,16 +392,6 @@ void QCoreApplicationPrivate::createEventDispatcher()
#endif
}
void QCoreApplicationPrivate::_q_initializeProcessManager()
{
#ifndef QT_NO_PROCESS
# ifdef Q_OS_UNIX
QProcessPrivate::initializeProcessManager();
# endif
#endif
}
QThread *QCoreApplicationPrivate::theMainThread = 0;
QThread *QCoreApplicationPrivate::mainThread()
{
@ -596,6 +615,12 @@ void QCoreApplication::init()
d->appendApplicationPathToLibraryPaths();
#endif
#if defined(Q_OS_UNIX) && !(defined(QT_NO_PROCESS))
// Make sure the process manager thread object is created in the main
// thread.
QProcessPrivate::initializeProcessManager();
#endif
#ifdef QT_EVAL
extern void qt_core_eval_init(uint);
qt_core_eval_init(d->application_type);
@ -1765,6 +1790,15 @@ QString QCoreApplication::applicationFilePath()
#if defined(Q_OS_WIN)
d->cachedApplicationFilePath = QFileInfo(qAppFileName()).filePath();
return d->cachedApplicationFilePath;
#elif defined(Q_OS_BLACKBERRY)
QDir dir(QStringLiteral("./app/native/"));
QStringList executables = dir.entryList(QDir::Executable | QDir::Files);
if (!executables.empty()) {
//We assume that there is only one executable in the folder
return dir.absoluteFilePath(executables.first());
} else {
return QString();
}
#elif defined(Q_OS_MAC)
QString qAppFileName_str = qAppFileName();
if(!qAppFileName_str.isEmpty()) {
@ -1930,6 +1964,9 @@ void QCoreApplication::setOrganizationName(const QString &orgName)
QString QCoreApplication::organizationName()
{
#ifdef Q_OS_BLACKBERRY
coreappdata()->loadManifest();
#endif
return coreappdata()->orgName;
}
@ -1977,6 +2014,9 @@ void QCoreApplication::setApplicationName(const QString &application)
QString QCoreApplication::applicationName()
{
#ifdef Q_OS_BLACKBERRY
coreappdata()->loadManifest();
#endif
QString appname = coreappdata() ? coreappdata()->application : QString();
if (appname.isEmpty() && QCoreApplication::self)
appname = QCoreApplication::self->d_func()->appName();
@ -2003,6 +2043,9 @@ void QCoreApplication::setApplicationVersion(const QString &version)
QString QCoreApplication::applicationVersion()
{
#ifdef Q_OS_BLACKBERRY
coreappdata()->loadManifest();
#endif
return coreappdata()->applicationVersion;
}
@ -2317,5 +2360,3 @@ void QCoreApplication::setEventDispatcher(QAbstractEventDispatcher *eventDispatc
*/
QT_END_NAMESPACE
#include "moc_qcoreapplication.cpp"

View File

@ -178,7 +178,6 @@ protected:
QCoreApplication(QCoreApplicationPrivate &p);
private:
Q_PRIVATE_SLOT(d_func(), void _q_initializeProcessManager())
static bool sendSpontaneousEvent(QObject *receiver, QEvent *event);
bool notifyInternal(QObject *receiver, QEvent *event);

View File

@ -76,8 +76,6 @@ public:
bool sendThroughObjectEventFilters(QObject *, QEvent *);
bool notify_helper(QObject *, QEvent *);
void _q_initializeProcessManager();
QString appName() const;
virtual void createEventDispatcher();
static void removePostedEvent(QEvent *);

View File

@ -295,14 +295,35 @@ int QEventDispatcherBlackberry::select(int nfds, fd_set *readfds, fd_set *writef
if (timeout)
timeout_bps = (timeout->tv_sec * 1000) + (timeout->tv_usec / 1000);
bool hasProcessedEventsOnce = false;
bps_event_t *event = 0;
// This loop exists such that we can drain the bps event queue of all native events
// more efficiently than if we were to return control to Qt after each event. This
// is important for handling touch events which can come in rapidly.
forever {
// Wait for event or file to be ready
bps_event_t *event = NULL;
const int result = bps_get_event(&event, timeout_bps);
Q_ASSERT(!hasProcessedEventsOnce || event);
// Only emit the awake() and aboutToBlock() signals in the second iteration. For the first
// iteration, the UNIX event dispatcher will have taken care of that already.
if (hasProcessedEventsOnce)
emit awake();
// Filtering the native event should happen between the awake() and aboutToBlock() signal
// emissions. The calls awake() - filterNativeEvent() - aboutToBlock() - bps_get_event()
// need not to be interrupted by a break or return statement.
//
// Because of this, the native event is actually processed one loop iteration
// after it was retrieved with bps_get_event().
if (event)
filterNativeEvent(QByteArrayLiteral("bps_event_t"), static_cast<void*>(event), 0);
if (hasProcessedEventsOnce)
emit aboutToBlock();
// Wait for event or file to be ready
event = 0;
const int result = bps_get_event(&event, timeout_bps);
if (result != BPS_SUCCESS)
qWarning("QEventDispatcherBlackberry::select: bps_get_event() failed");
@ -314,14 +335,16 @@ int QEventDispatcherBlackberry::select(int nfds, fd_set *readfds, fd_set *writef
if (!event || bps_event_get_domain(event) == bpsIOReadyDomain)
break;
// Any other events must be bps native events so we pass all such received
// events through the native event filter chain
filterNativeEvent(QByteArrayLiteral("bps_event_t"), static_cast<void*>(event), 0);
// Update the timeout. If this fails we have exceeded our alloted time or the system
// clock has changed time and we cannot calculate a new timeout so we bail out.
if (!updateTimeout(&timeout_bps, startTime))
if (!updateTimeout(&timeout_bps, startTime)) {
// No more loop iteration, so we need to filter the event here.
filterNativeEvent(QByteArrayLiteral("bps_event_t"), static_cast<void*>(event), 0);
break;
}
hasProcessedEventsOnce = true;
}
// the number of bits set in the file sets

View File

@ -162,8 +162,9 @@ public:
If \a mode is QMutex::Recursive, a thread can lock the same mutex
multiple times and the mutex won't be unlocked until a
corresponding number of unlock() calls have been made. The
default is QMutex::NonRecursive.
corresponding number of unlock() calls have been made. Otherwise
a thread may only lock a mutex once. The default is
QMutex::NonRecursive.
\sa lock(), unlock()
*/
@ -371,6 +372,13 @@ bool QBasicMutex::isRecursive()
\sa unlock()
*/
/*!
\fn QMutex *QMutexLocker::mutex()
Returns the mutex on which the QMutexLocker is operating.
*/
#ifndef QT_LINUX_FUTEX //linux implementation is in qmutex_linux.cpp
/*

View File

@ -323,7 +323,8 @@ QThreadPrivate::~QThreadPrivate()
/*!
\fn void QThread::started()
This signal is emitted when the thread starts executing.
This signal is emitted from the associated thread when it starts executing,
before the run() function is called.
\sa finished(), terminated()
*/
@ -331,7 +332,14 @@ QThreadPrivate::~QThreadPrivate()
/*!
\fn void QThread::finished()
This signal is emitted when the thread has finished executing.
This signal is emitted from the associated thread right before it finishes executing.
When this signal is emitted, the event loop has already stopped running.
No more events will be processed in the thread, except for deferred deletion events.
This signal can be connected to QObject::deleteLater(), to free objects in that thread.
\note If the associated thread was terminated using terminate(), it is undefined from
which thread this signal is emitted.
\sa started(), terminated()
*/
@ -341,6 +349,8 @@ QThreadPrivate::~QThreadPrivate()
This signal is emitted when the thread is terminated.
It is undefined from which thread this signal is emitted.
\sa started(), finished()
*/

View File

@ -134,19 +134,184 @@ QT_BEGIN_NAMESPACE
*/
/*!
\fn QString QAccessibleTextInterface::textBeforeOffset (int offset, QAccessible2::BoundaryType boundaryType,
int *startOffset, int *endOffset) const
Returns the text item of type \a boundaryType that is close to offset \a offset
and sets \a startOffset and \a endOffset values to the start and end positions
of that item; returns an empty string if there is no such an item.
Sets \a startOffset and \a endOffset values to -1 on error.
*/
QString QAccessibleTextInterface::textBeforeOffset(int offset, QAccessible2::BoundaryType boundaryType,
int *startOffset, int *endOffset) const
{
const QString txt = text(0, characterCount());
if (txt.isEmpty() || offset < 0 || offset > txt.length()) {
*startOffset = *endOffset = -1;
return QString();
}
if (offset == 0) {
*startOffset = *endOffset = offset;
return QString();
}
QTextBoundaryFinder::BoundaryType type;
switch (boundaryType) {
case QAccessible2::CharBoundary:
type = QTextBoundaryFinder::Grapheme;
break;
case QAccessible2::WordBoundary:
type = QTextBoundaryFinder::Word;
break;
case QAccessible2::SentenceBoundary:
type = QTextBoundaryFinder::Sentence;
break;
default:
// in any other case return the whole line
*startOffset = 0;
*endOffset = txt.length();
return txt;
}
// keep behavior in sync with QTextCursor::movePosition()!
QTextBoundaryFinder boundary(type, txt);
boundary.setPosition(offset);
do {
if ((boundary.boundaryReasons() & (QTextBoundaryFinder::StartOfItem | QTextBoundaryFinder::EndOfItem)))
break;
} while (boundary.toPreviousBoundary() > 0);
Q_ASSERT(boundary.position() >= 0);
*endOffset = boundary.position();
while (boundary.toPreviousBoundary() > 0) {
if ((boundary.boundaryReasons() & (QTextBoundaryFinder::StartOfItem | QTextBoundaryFinder::EndOfItem)))
break;
}
Q_ASSERT(boundary.position() >= 0);
*startOffset = boundary.position();
return txt.mid(*startOffset, *endOffset - *startOffset);
}
/*!
\fn QString QAccessibleTextInterface::textAfterOffset(int offset, QAccessible2::BoundaryType boundaryType,
int *startOffset, int *endOffset) const
Returns the text item of type \a boundaryType that is right after offset \a offset
and sets \a startOffset and \a endOffset values to the start and end positions
of that item; returns an empty string if there is no such an item.
Sets \a startOffset and \a endOffset values to -1 on error.
*/
QString QAccessibleTextInterface::textAfterOffset(int offset, QAccessible2::BoundaryType boundaryType,
int *startOffset, int *endOffset) const
{
const QString txt = text(0, characterCount());
if (txt.isEmpty() || offset < 0 || offset > txt.length()) {
*startOffset = *endOffset = -1;
return QString();
}
if (offset == txt.length()) {
*startOffset = *endOffset = offset;
return QString();
}
QTextBoundaryFinder::BoundaryType type;
switch (boundaryType) {
case QAccessible2::CharBoundary:
type = QTextBoundaryFinder::Grapheme;
break;
case QAccessible2::WordBoundary:
type = QTextBoundaryFinder::Word;
break;
case QAccessible2::SentenceBoundary:
type = QTextBoundaryFinder::Sentence;
break;
default:
// in any other case return the whole line
*startOffset = 0;
*endOffset = txt.length();
return txt;
}
// keep behavior in sync with QTextCursor::movePosition()!
QTextBoundaryFinder boundary(type, txt);
boundary.setPosition(offset);
while (boundary.toNextBoundary() < txt.length()) {
if ((boundary.boundaryReasons() & (QTextBoundaryFinder::StartOfItem | QTextBoundaryFinder::EndOfItem)))
break;
}
Q_ASSERT(boundary.position() <= txt.length());
*startOffset = boundary.position();
while (boundary.toNextBoundary() < txt.length()) {
if ((boundary.boundaryReasons() & (QTextBoundaryFinder::StartOfItem | QTextBoundaryFinder::EndOfItem)))
break;
}
Q_ASSERT(boundary.position() <= txt.length());
*endOffset = boundary.position();
return txt.mid(*startOffset, *endOffset - *startOffset);
}
/*!
\fn QString QAccessibleTextInterface::textAtOffset(int offset, QAccessible2::BoundaryType boundaryType,
int *startOffset, int *endOffset) const
Returns the text item of type \a boundaryType at offset \a offset
and sets \a startOffset and \a endOffset values to the start and end positions
of that item; returns an empty string if there is no such an item.
Sets \a startOffset and \a endOffset values to -1 on error.
*/
QString QAccessibleTextInterface::textAtOffset(int offset, QAccessible2::BoundaryType boundaryType,
int *startOffset, int *endOffset) const
{
const QString txt = text(0, characterCount());
if (txt.isEmpty() || offset < 0 || offset > txt.length()) {
*startOffset = *endOffset = -1;
return QString();
}
if (offset == txt.length()) {
*startOffset = *endOffset = offset;
return QString();
}
QTextBoundaryFinder::BoundaryType type;
switch (boundaryType) {
case QAccessible2::CharBoundary:
type = QTextBoundaryFinder::Grapheme;
break;
case QAccessible2::WordBoundary:
type = QTextBoundaryFinder::Word;
break;
case QAccessible2::SentenceBoundary:
type = QTextBoundaryFinder::Sentence;
break;
default:
// in any other case return the whole line
*startOffset = 0;
*endOffset = txt.length();
return txt;
}
// keep behavior in sync with QTextCursor::movePosition()!
QTextBoundaryFinder boundary(type, txt);
boundary.setPosition(offset);
do {
if ((boundary.boundaryReasons() & (QTextBoundaryFinder::StartOfItem | QTextBoundaryFinder::EndOfItem)))
break;
} while (boundary.toPreviousBoundary() > 0);
Q_ASSERT(boundary.position() >= 0);
*startOffset = boundary.position();
while (boundary.toNextBoundary() < txt.length()) {
if ((boundary.boundaryReasons() & (QTextBoundaryFinder::StartOfItem | QTextBoundaryFinder::EndOfItem)))
break;
}
Q_ASSERT(boundary.position() <= txt.length());
*endOffset = boundary.position();
return txt.mid(*startOffset, *endOffset - *startOffset);
}
/*!
\fn void QAccessibleTextInterface::removeSelection(int selectionIndex)
@ -512,117 +677,6 @@ const QString &QAccessibleActionInterface::toggleAction()
return accessibleActionStrings()->toggleAction;
}
/*!
\internal
*/
QString Q_GUI_EXPORT qTextBeforeOffsetFromString(int offset, QAccessible2::BoundaryType boundaryType,
int *startOffset, int *endOffset, const QString& text)
{
QTextBoundaryFinder::BoundaryType type;
switch (boundaryType) {
case QAccessible2::CharBoundary:
type = QTextBoundaryFinder::Grapheme;
break;
case QAccessible2::WordBoundary:
type = QTextBoundaryFinder::Word;
break;
case QAccessible2::SentenceBoundary:
type = QTextBoundaryFinder::Sentence;
break;
default:
// in any other case return the whole line
*startOffset = 0;
*endOffset = text.length();
return text;
}
QTextBoundaryFinder boundary(type, text);
boundary.setPosition(offset);
if (!boundary.isAtBoundary()) {
boundary.toPreviousBoundary();
}
boundary.toPreviousBoundary();
*startOffset = boundary.position();
boundary.toNextBoundary();
*endOffset = boundary.position();
return text.mid(*startOffset, *endOffset - *startOffset);
}
/*!
\internal
*/
QString Q_GUI_EXPORT qTextAfterOffsetFromString(int offset, QAccessible2::BoundaryType boundaryType,
int *startOffset, int *endOffset, const QString& text)
{
QTextBoundaryFinder::BoundaryType type;
switch (boundaryType) {
case QAccessible2::CharBoundary:
type = QTextBoundaryFinder::Grapheme;
break;
case QAccessible2::WordBoundary:
type = QTextBoundaryFinder::Word;
break;
case QAccessible2::SentenceBoundary:
type = QTextBoundaryFinder::Sentence;
break;
default:
// in any other case return the whole line
*startOffset = 0;
*endOffset = text.length();
return text;
}
QTextBoundaryFinder boundary(type, text);
boundary.setPosition(offset);
boundary.toNextBoundary();
*startOffset = boundary.position();
boundary.toNextBoundary();
*endOffset = boundary.position();
return text.mid(*startOffset, *endOffset - *startOffset);
}
/*!
\internal
*/
QString Q_GUI_EXPORT qTextAtOffsetFromString(int offset, QAccessible2::BoundaryType boundaryType,
int *startOffset, int *endOffset, const QString& text)
{
QTextBoundaryFinder::BoundaryType type;
switch (boundaryType) {
case QAccessible2::CharBoundary:
type = QTextBoundaryFinder::Grapheme;
break;
case QAccessible2::WordBoundary:
type = QTextBoundaryFinder::Word;
break;
case QAccessible2::SentenceBoundary:
type = QTextBoundaryFinder::Sentence;
break;
default:
// in any other case return the whole line
*startOffset = 0;
*endOffset = text.length();
return text;
}
QTextBoundaryFinder boundary(type, text);
boundary.setPosition(offset);
if (!boundary.isAtBoundary()) {
boundary.toPreviousBoundary();
}
*startOffset = boundary.position();
boundary.toNextBoundary();
*endOffset = boundary.position();
return text.mid(*startOffset, *endOffset - *startOffset);
}
QT_END_NAMESPACE
#endif // QT_NO_ACCESSIBILITY

View File

@ -83,12 +83,12 @@ public:
// text
virtual QString text(int startOffset, int endOffset) const = 0;
virtual QString textBeforeOffset (int offset, QAccessible2::BoundaryType boundaryType,
int *startOffset, int *endOffset) const = 0;
virtual QString textBeforeOffset(int offset, QAccessible2::BoundaryType boundaryType,
int *startOffset, int *endOffset) const;
virtual QString textAfterOffset(int offset, QAccessible2::BoundaryType boundaryType,
int *startOffset, int *endOffset) const = 0;
int *startOffset, int *endOffset) const;
virtual QString textAtOffset(int offset, QAccessible2::BoundaryType boundaryType,
int *startOffset, int *endOffset) const = 0;
int *startOffset, int *endOffset) const;
virtual int characterCount() const = 0;
// character <-> geometry

View File

@ -1207,6 +1207,10 @@ void QGuiApplicationPrivate::processWindowSystemEvent(QWindowSystemInterfacePriv
QGuiApplicationPrivate::processPlatformPanelEvent(
static_cast<QWindowSystemInterfacePrivate::PlatformPanelEvent *>(e));
break;
case QWindowSystemInterfacePrivate::FileOpen:
QGuiApplicationPrivate::processFileOpenEvent(
static_cast<QWindowSystemInterfacePrivate::FileOpenEvent *>(e));
break;
default:
qWarning() << "Unknown user input event type:" << e->type;
break;
@ -1942,13 +1946,12 @@ void QGuiApplicationPrivate::reportGeometryChange(QWindowSystemInterfacePrivate:
Qt::ScreenOrientation primaryOrientation = s->primaryOrientation();
s->d_func()->updatePrimaryOrientation();
emit s->sizeChanged(s->size());
emit s->geometryChanged(s->geometry());
emit s->physicalDotsPerInchXChanged(s->physicalDotsPerInchX());
emit s->physicalDotsPerInchYChanged(s->physicalDotsPerInchY());
emit s->physicalSizeChanged(s->physicalSize());
emit s->physicalDotsPerInchChanged(s->physicalDotsPerInch());
emit s->availableSizeChanged(s->availableSize());
emit s->availableGeometryChanged(s->availableGeometry());
emit s->logicalDotsPerInchChanged(s->logicalDotsPerInch());
foreach (QScreen* sibling, s->virtualSiblings())
emit sibling->virtualGeometryChanged(sibling->virtualGeometry());
if (s->primaryOrientation() != primaryOrientation)
emit s->primaryOrientationChanged(s->primaryOrientation());
@ -1970,8 +1973,8 @@ void QGuiApplicationPrivate::reportAvailableGeometryChange(
QScreen *s = e->screen.data();
s->d_func()->availableGeometry = e->availableGeometry;
emit s->availableSizeChanged(s->availableSize());
emit s->availableGeometryChanged(s->availableGeometry());
foreach (QScreen* sibling, s->virtualSiblings())
emit sibling->virtualGeometryChanged(sibling->virtualGeometry());
}
void QGuiApplicationPrivate::reportLogicalDotsPerInchChange(QWindowSystemInterfacePrivate::ScreenLogicalDotsPerInchEvent *e)
@ -1986,8 +1989,6 @@ void QGuiApplicationPrivate::reportLogicalDotsPerInchChange(QWindowSystemInterfa
QScreen *s = e->screen.data();
s->d_func()->logicalDpi = QDpi(e->dpiX, e->dpiY);
emit s->logicalDotsPerInchXChanged(s->logicalDotsPerInchX());
emit s->logicalDotsPerInchYChanged(s->logicalDotsPerInchY());
emit s->logicalDotsPerInchChanged(s->logicalDotsPerInch());
}

View File

@ -43,6 +43,8 @@
#include <qdebug.h>
#include <private/qevent_p.h>
#include <private/qlocale_p.h>
#include <private/qguiapplication_p.h>
#include <qpa/qplatformintegration.h>
QT_BEGIN_NAMESPACE
@ -66,7 +68,10 @@ void QKeyMapperPrivate::clearMappings()
QList<int> QKeyMapperPrivate::possibleKeys(QKeyEvent *e)
{
QList<int> result;
QList<int> result = QGuiApplicationPrivate::platformIntegration()->possibleKeys(e);
if (!result.isEmpty())
return result;
if (e->key() && (e->key() != Qt::Key_unknown))
result << int(e->key() + e->modifiers());
else if (!e->text().isEmpty())

View File

@ -227,11 +227,6 @@ public:
QKeySequence(int) {}
};
#ifndef QT_NO_DATASTREAM
Q_GUI_EXPORT QDataStream &operator<<(QDataStream &in, const QKeySequence &ks) {}
Q_GUI_EXPORT QDataStream &operator>>(QDataStream &in, QKeySequence &ks) {}
#endif /* #ifndef QT_NO_DATASTREAM */
#endif // QT_NO_SHORTCUT
QT_END_NAMESPACE

View File

@ -312,6 +312,20 @@ Qt::KeyboardModifiers QPlatformIntegration::queryKeyboardModifiers() const
return QGuiApplication::keyboardModifiers();
}
/*!
Should be used to obtain a list of possible shortcuts for the given key
event. As that needs system functionality it cannot be done in qkeymapper.
One example for more than 1 possibility is the key combination of Shift+5.
That one might trigger a shortcut which is set as "Shift+5" as well as one
using %. These combinations depend on the currently set keyboard layout
which cannot be obtained by Qt functionality.
*/
QList<int> QPlatformIntegration::possibleKeys(const QKeyEvent *) const
{
return QList<int>();
}
/*!
Should be called by the implementation whenever a new screen is added.

View File

@ -76,6 +76,7 @@ class QPlatformTheme;
class QPlatformDialogHelper;
class QPlatformSharedGraphicsCache;
class QPlatformServices;
class QKeyEvent;
class Q_GUI_EXPORT QPlatformIntegration
{
@ -141,6 +142,7 @@ public:
virtual QVariant styleHint(StyleHint hint) const;
virtual Qt::KeyboardModifiers queryKeyboardModifiers() const;
virtual QList<int> possibleKeys(const QKeyEvent *) const;
virtual QStringList themeNames() const;
virtual QPlatformTheme *createPlatformTheme(const QString &name) const;

View File

@ -142,17 +142,16 @@ void QPlatformWindow::setVisible(bool visible)
QWindowSystemInterface::handleExposeEvent(window(), rect);
QWindowSystemInterface::flushWindowSystemEvents();
}
/*!
Requests setting the window flags of this surface
to \a type. Returns the actual flags set.
to \a flags.
*/
Qt::WindowFlags QPlatformWindow::setWindowFlags(Qt::WindowFlags flags)
void QPlatformWindow::setWindowFlags(Qt::WindowFlags flags)
{
return flags;
Q_UNUSED(flags);
}
/*!
Returns if this window is exposed in the windowing system.

View File

@ -90,7 +90,7 @@ public:
virtual QMargins frameMargins() const;
virtual void setVisible(bool visible);
virtual Qt::WindowFlags setWindowFlags(Qt::WindowFlags flags);
virtual void setWindowFlags(Qt::WindowFlags flags);
virtual Qt::WindowState setWindowState(Qt::WindowState state);
virtual WId winId() const;

View File

@ -70,20 +70,20 @@ class Q_GUI_EXPORT QScreen : public QObject
Q_PROPERTY(QString name READ name CONSTANT)
Q_PROPERTY(int depth READ depth CONSTANT)
Q_PROPERTY(QSize size READ size NOTIFY sizeChanged)
Q_PROPERTY(QSize availableSize READ availableSize NOTIFY availableSizeChanged)
Q_PROPERTY(QSize virtualSize READ virtualSize NOTIFY sizeChanged)
Q_PROPERTY(QSize availableVirtualSize READ availableVirtualSize NOTIFY availableSizeChanged)
Q_PROPERTY(QSize size READ size NOTIFY geometryChanged)
Q_PROPERTY(QSize availableSize READ availableSize NOTIFY virtualGeometryChanged)
Q_PROPERTY(QSize virtualSize READ virtualSize NOTIFY virtualGeometryChanged)
Q_PROPERTY(QSize availableVirtualSize READ availableVirtualSize NOTIFY virtualGeometryChanged)
Q_PROPERTY(QRect geometry READ geometry NOTIFY geometryChanged)
Q_PROPERTY(QRect availableGeometry READ availableGeometry NOTIFY availableGeometryChanged)
Q_PROPERTY(QRect virtualGeometry READ virtualGeometry NOTIFY sizeChanged)
Q_PROPERTY(QRect availableVirtualGeometry READ availableVirtualGeometry NOTIFY availableGeometryChanged)
Q_PROPERTY(QSizeF physicalSize READ physicalSize CONSTANT)
Q_PROPERTY(qreal physicalDotsPerInchX READ physicalDotsPerInchX NOTIFY physicalDotsPerInchXChanged)
Q_PROPERTY(qreal physicalDotsPerInchY READ physicalDotsPerInchY NOTIFY physicalDotsPerInchYChanged)
Q_PROPERTY(QRect availableGeometry READ availableGeometry NOTIFY virtualGeometryChanged)
Q_PROPERTY(QRect virtualGeometry READ virtualGeometry NOTIFY virtualGeometryChanged)
Q_PROPERTY(QRect availableVirtualGeometry READ availableVirtualGeometry NOTIFY virtualGeometryChanged)
Q_PROPERTY(QSizeF physicalSize READ physicalSize NOTIFY physicalSizeChanged)
Q_PROPERTY(qreal physicalDotsPerInchX READ physicalDotsPerInchX NOTIFY physicalDotsPerInchChanged)
Q_PROPERTY(qreal physicalDotsPerInchY READ physicalDotsPerInchY NOTIFY physicalDotsPerInchChanged)
Q_PROPERTY(qreal physicalDotsPerInch READ physicalDotsPerInch NOTIFY physicalDotsPerInchChanged)
Q_PROPERTY(qreal logicalDotsPerInchX READ logicalDotsPerInchX NOTIFY logicalDotsPerInchXChanged)
Q_PROPERTY(qreal logicalDotsPerInchY READ logicalDotsPerInchY NOTIFY logicalDotsPerInchYChanged)
Q_PROPERTY(qreal logicalDotsPerInchX READ logicalDotsPerInchX NOTIFY logicalDotsPerInchChanged)
Q_PROPERTY(qreal logicalDotsPerInchY READ logicalDotsPerInchY NOTIFY logicalDotsPerInchChanged)
Q_PROPERTY(qreal logicalDotsPerInch READ logicalDotsPerInch NOTIFY logicalDotsPerInchChanged)
Q_PROPERTY(Qt::ScreenOrientation primaryOrientation READ primaryOrientation NOTIFY primaryOrientationChanged)
Q_PROPERTY(Qt::ScreenOrientation orientation READ orientation NOTIFY orientationChanged)
@ -138,16 +138,11 @@ public:
qreal refreshRate() const;
Q_SIGNALS:
void sizeChanged(const QSize &size);
void geometryChanged(const QRect &geometry);
void physicalDotsPerInchXChanged(qreal dpi);
void physicalDotsPerInchYChanged(qreal dpi);
void physicalSizeChanged(const QSizeF &size);
void physicalDotsPerInchChanged(qreal dpi);
void logicalDotsPerInchXChanged(qreal dpi);
void logicalDotsPerInchYChanged(qreal dpi);
void logicalDotsPerInchChanged(qreal dpi);
void availableSizeChanged(const QSize &size);
void availableGeometryChanged(const QRect &rect);
void virtualGeometryChanged(const QRect &rect);
void primaryOrientationChanged(Qt::ScreenOrientation orientation);
void orientationChanged(Qt::ScreenOrientation orientation);
void refreshRateChanged(qreal refreshRate);

View File

@ -514,9 +514,8 @@ void QWindow::setWindowFlags(Qt::WindowFlags flags)
{
Q_D(QWindow);
if (d->platformWindow)
d->windowFlags = d->platformWindow->setWindowFlags(flags);
else
d->windowFlags = flags;
d->platformWindow->setWindowFlags(flags);
d->windowFlags = flags;
}
/*!

View File

@ -63,7 +63,7 @@ QT_BEGIN_HEADER
*/
typedef char GLchar;
# include "qopengles2ext.h"
# include <QtGui/qopengles2ext.h>
# ifndef GL_DOUBLE
# define GL_DOUBLE GL_FLOAT
# endif
@ -96,7 +96,7 @@ typedef GLfloat GLdouble;
# include <QtCore/qt_windows.h>
# endif
# include <GL/gl.h>
# include "qopenglext.h"
# include <QtGui/qopenglext.h>
# endif // Q_OS_MAC
#endif

View File

@ -3,6 +3,7 @@
#if 0
#pragma qt_no_master_include
#pragma qt_sync_stop_processing
#endif
/* $Revision: 18481 $ on $Date:: 2012-07-11 18:07:26 -0700 #$ */

View File

@ -3,6 +3,7 @@
#if 0
#pragma qt_no_master_include
#pragma qt_sync_stop_processing
#endif
#ifdef __cplusplus

View File

@ -83,6 +83,8 @@ typedef ptrdiff_t qopengl_GLsizeiptr;
#if defined(APIENTRY) && !defined(QOPENGLF_APIENTRY)
# define QOPENGLF_APIENTRY APIENTRY
#elif defined(GL_APIENTRY) && !defined(QOPENGLF_APIENTRY)
# define QOPENGLF_APIENTRY GL_APIENTRY
#endif
# ifndef QOPENGLF_APIENTRYP

View File

@ -42,6 +42,10 @@
#ifndef QT_MIPS_ASM_DSP_H
#define QT_MIPS_ASM_DSP_H
#if 0
#pragma qt_sync_stop_processing
#endif
#define zero $0
#define AT $1
#define v0 $2

View File

@ -760,6 +760,9 @@ QString QFont::family() const
*/
void QFont::setFamily(const QString &family)
{
if ((resolve_mask & QFont::FamilyResolved) && d->request.family == family)
return;
detach();
d->request.family = family;
@ -793,6 +796,9 @@ QString QFont::styleName() const
*/
void QFont::setStyleName(const QString &styleName)
{
if ((resolve_mask & QFont::StyleNameResolved) && d->request.styleName == styleName)
return;
detach();
d->request.styleName = styleName;
@ -892,6 +898,9 @@ int QFont::pointSize() const
*/
void QFont::setHintingPreference(HintingPreference hintingPreference)
{
if ((resolve_mask & QFont::HintingPreferenceResolved) && d->request.hintingPreference == hintingPreference)
return;
detach();
d->request.hintingPreference = hintingPreference;
@ -922,6 +931,9 @@ void QFont::setPointSize(int pointSize)
return;
}
if ((resolve_mask & QFont::SizeResolved) && d->request.pointSize == qreal(pointSize))
return;
detach();
d->request.pointSize = qreal(pointSize);
@ -944,6 +956,9 @@ void QFont::setPointSizeF(qreal pointSize)
return;
}
if ((resolve_mask & QFont::SizeResolved) && d->request.pointSize == pointSize)
return;
detach();
d->request.pointSize = pointSize;
@ -979,6 +994,9 @@ void QFont::setPixelSize(int pixelSize)
return;
}
if ((resolve_mask & QFont::SizeResolved) && d->request.pixelSize == qreal(pixelSize))
return;
detach();
d->request.pixelSize = pixelSize;
@ -1034,6 +1052,9 @@ QFont::Style QFont::style() const
*/
void QFont::setStyle(Style style)
{
if ((resolve_mask & QFont::StyleResolved) && d->request.style == style)
return;
detach();
d->request.style = style;
@ -1077,6 +1098,9 @@ void QFont::setWeight(int weight)
{
Q_ASSERT_X(weight >= 0 && weight <= 99, "QFont::setWeight", "Weight must be between 0 and 99");
if ((resolve_mask & QFont::WeightResolved) && d->request.weight == weight)
return;
detach();
d->request.weight = weight;
@ -1122,6 +1146,9 @@ bool QFont::underline() const
*/
void QFont::setUnderline(bool enable)
{
if ((resolve_mask & QFont::UnderlineResolved) && d->underline == enable)
return;
detach();
d->underline = enable;
@ -1145,6 +1172,9 @@ bool QFont::overline() const
*/
void QFont::setOverline(bool enable)
{
if ((resolve_mask & QFont::OverlineResolved) && d->overline == enable)
return;
detach();
d->overline = enable;
@ -1169,6 +1199,9 @@ bool QFont::strikeOut() const
*/
void QFont::setStrikeOut(bool enable)
{
if ((resolve_mask & QFont::StrikeOutResolved) && d->strikeOut == enable)
return;
detach();
d->strikeOut = enable;
@ -1193,6 +1226,9 @@ bool QFont::fixedPitch() const
*/
void QFont::setFixedPitch(bool enable)
{
if ((resolve_mask & QFont::FixedPitchResolved) && d->request.fixedPitch == enable)
return;
detach();
d->request.fixedPitch = enable;
@ -1223,7 +1259,11 @@ bool QFont::kerning() const
*/
void QFont::setKerning(bool enable)
{
if ((resolve_mask & QFont::KerningResolved) && d->kerning == enable)
return;
detach();
d->kerning = enable;
resolve_mask |= QFont::KerningResolved;
}
@ -1339,13 +1379,13 @@ QFont::StyleHint QFont::styleHint() const
*/
void QFont::setStyleHint(StyleHint hint, StyleStrategy strategy)
{
detach();
if ((resolve_mask & (QFont::StyleHintResolved | QFont::StyleStrategyResolved)) &&
(StyleHint) d->request.styleHint == hint &&
(StyleStrategy) d->request.styleStrategy == strategy)
return;
detach();
d->request.styleHint = hint;
d->request.styleStrategy = strategy;
resolve_mask |= QFont::StyleHintResolved;
@ -1360,12 +1400,12 @@ void QFont::setStyleHint(StyleHint hint, StyleStrategy strategy)
*/
void QFont::setStyleStrategy(StyleStrategy s)
{
detach();
if ((resolve_mask & QFont::StyleStrategyResolved) &&
s == (StyleStrategy)d->request.styleStrategy)
return;
detach();
d->request.styleStrategy = s;
resolve_mask |= QFont::StyleStrategyResolved;
}
@ -1593,10 +1633,10 @@ QFont::Capitalization QFont::capitalization() const
*/
void QFont::setRawMode(bool enable)
{
detach();
if ((bool) d->rawMode == enable) return;
detach();
d->rawMode = enable;
}
@ -2648,9 +2688,9 @@ void QFontCache::clear()
QFontEngineData *QFontCache::findEngineData(const QFontDef &def) const
{
EngineDataCache::ConstIterator it = engineDataCache.find(def),
end = engineDataCache.end();
if (it == end) return 0;
EngineDataCache::ConstIterator it = engineDataCache.constFind(def);
if (it == engineDataCache.constEnd())
return 0;
// found
return it.value();
@ -2768,7 +2808,7 @@ void QFontCache::timerEvent(QTimerEvent *)
end = engineDataCache.constEnd();
for (; it != end; ++it) {
#ifdef QFONTCACHE_DEBUG
FC_DEBUG(" %p: ref %2d", it.value(), int(it.value()->ref));
FC_DEBUG(" %p: ref %2d", it.value(), int(it.value()->ref.load()));
#endif // QFONTCACHE_DEBUG

View File

@ -473,15 +473,15 @@ void QGlyphRun::setBoundingRect(const QRectF &boundingRect)
*/
QRectF QGlyphRun::boundingRect() const
{
if (!d->boundingRect.isEmpty())
if (!d->boundingRect.isEmpty() || !d->rawFont.isValid())
return d->boundingRect;
qreal minX, minY, maxX, maxY;
minX = minY = maxX = maxY = 0;
for (int i=0; i<qMin(d->glyphPositions.size(), d->glyphIndexes.size()); ++i) {
QRectF glyphRect = d->rawFont.boundingRect(d->glyphIndexes.at(i));
glyphRect.translate(d->glyphPositions.at(i));
for (int i = 0, n = qMin(d->glyphIndexDataSize, d->glyphPositionDataSize); i < n; ++i) {
QRectF glyphRect = d->rawFont.boundingRect(d->glyphIndexData[i]);
glyphRect.translate(d->glyphPositionData[i]);
if (i == 0) {
minX = glyphRect.left();
@ -506,7 +506,7 @@ QRectF QGlyphRun::boundingRect() const
*/
bool QGlyphRun::isEmpty() const
{
return d->glyphIndexes.isEmpty();
return d->glyphIndexDataSize == 0;
}
QT_END_NAMESPACE

View File

@ -388,10 +388,7 @@ qreal QRawFont::unitsPerEm() const
*/
qreal QRawFont::lineThickness() const
{
if (!isValid())
return 0.0;
return d->fontEngine->lineThickness().toReal();
return d->isValid() ? d->fontEngine->lineThickness().toReal() : 0.0;
}
/*!
@ -400,10 +397,7 @@ qreal QRawFont::lineThickness() const
*/
qreal QRawFont::underlinePosition() const
{
if (!isValid())
return 0.0;
return d->fontEngine->underlinePosition().toReal();
return d->isValid() ? d->fontEngine->underlinePosition().toReal() : 0.0;
}
/*!
@ -459,23 +453,28 @@ int QRawFont::weight() const
*/
QVector<quint32> QRawFont::glyphIndexesForString(const QString &text) const
{
if (!d->isValid())
return QVector<quint32>();
QVector<quint32> glyphIndexes;
if (!d->isValid() || text.isEmpty())
return glyphIndexes;
int nglyphs = text.size();
QVarLengthGlyphLayoutArray glyphs(nglyphs);
if (!glyphIndexesForChars(text.data(), text.size(), glyphs.glyphs, &nglyphs)) {
glyphs.resize(nglyphs);
if (!glyphIndexesForChars(text.data(), text.size(), glyphs.glyphs, &nglyphs)) {
int numGlyphs = text.size();
glyphIndexes.resize(numGlyphs);
QGlyphLayout glyphs;
glyphs.numGlyphs = numGlyphs;
glyphs.glyphs = glyphIndexes.data();
if (!d->fontEngine->stringToCMap(text.data(), text.size(), &glyphs, &numGlyphs, QFontEngine::GlyphIndicesOnly)) {
glyphIndexes.resize(numGlyphs);
glyphs.numGlyphs = numGlyphs;
glyphs.glyphs = glyphIndexes.data();
if (!d->fontEngine->stringToCMap(text.data(), text.size(), &glyphs, &numGlyphs, QFontEngine::GlyphIndicesOnly)) {
Q_ASSERT_X(false, Q_FUNC_INFO, "stringToCMap shouldn't fail twice");
return QVector<quint32>();
}
}
QVector<quint32> glyphIndexes;
for (int i=0; i<nglyphs; ++i)
glyphIndexes.append(glyphs.glyphs[i]);
glyphIndexes.resize(numGlyphs);
return glyphIndexes;
}
@ -491,38 +490,32 @@ QVector<quint32> QRawFont::glyphIndexesForString(const QString &text) const
*/
bool QRawFont::glyphIndexesForChars(const QChar *chars, int numChars, quint32 *glyphIndexes, int *numGlyphs) const
{
if (!d->isValid())
Q_ASSERT(numGlyphs);
if (!d->isValid() || numChars <= 0) {
*numGlyphs = 0;
return false;
}
if (*numGlyphs <= 0 || !glyphIndexes) {
*numGlyphs = numChars;
return false;
}
QGlyphLayout glyphs;
glyphs.numGlyphs = *numGlyphs;
glyphs.glyphs = glyphIndexes;
return d->fontEngine->stringToCMap(chars, numChars, &glyphs, numGlyphs, QFontEngine::GlyphIndicesOnly);
}
/*!
\fn QVector<QPointF> QRawFont::advancesForGlyphIndexes(const QVector<quint32> &glyphIndexes) const
Returns the QRawFont's advances for each of the \a glyphIndexes in pixel units. The advances
give the distance from the position of a given glyph to where the next glyph should be drawn
to make it appear as if the two glyphs are unspaced.
\sa QTextLine::horizontalAdvance(), QFontMetricsF::width()
*/
QVector<QPointF> QRawFont::advancesForGlyphIndexes(const QVector<quint32> &glyphIndexes) const
{
if (!d->isValid())
return QVector<QPointF>();
int numGlyphs = glyphIndexes.size();
QVarLengthGlyphLayoutArray glyphs(numGlyphs);
memcpy(glyphs.glyphs, glyphIndexes.data(), numGlyphs * sizeof(quint32));
d->fontEngine->recalcAdvances(&glyphs, 0);
QVector<QPointF> advances;
for (int i=0; i<numGlyphs; ++i)
advances.append(QPointF(glyphs.advances_x[i].toReal(), glyphs.advances_y[i].toReal()));
return advances;
}
/*!
Returns the QRawFont's advances for each of the \a glyphIndexes in pixel units. The advances
@ -535,7 +528,8 @@ QVector<QPointF> QRawFont::advancesForGlyphIndexes(const QVector<quint32> &glyph
*/
bool QRawFont::advancesForGlyphIndexes(const quint32 *glyphIndexes, QPointF *advances, int numGlyphs) const
{
if (!d->isValid())
Q_ASSERT(glyphIndexes && advances);
if (!d->isValid() || numGlyphs <= 0)
return false;
QGlyphLayout glyphs;

View File

@ -94,7 +94,7 @@ public:
int weight() const;
QVector<quint32> glyphIndexesForString(const QString &text) const;
QVector<QPointF> advancesForGlyphIndexes(const QVector<quint32> &glyphIndexes) const;
inline QVector<QPointF> advancesForGlyphIndexes(const QVector<quint32> &glyphIndexes) const;
bool glyphIndexesForChars(const QChar *chars, int numChars, quint32 *glyphIndexes, int *numGlyphs) const;
bool advancesForGlyphIndexes(const quint32 *glyphIndexes, QPointF *advances, int numGlyphs) const;
@ -147,6 +147,14 @@ private:
Q_DECLARE_SHARED(QRawFont)
inline QVector<QPointF> QRawFont::advancesForGlyphIndexes(const QVector<quint32> &glyphIndexes) const
{
QVector<QPointF> advances(glyphIndexes.size());
if (advancesForGlyphIndexes(glyphIndexes.constData(), advances.data(), glyphIndexes.size()))
return advances;
return QVector<QPointF>();
}
QT_END_NAMESPACE
QT_END_HEADER

View File

@ -157,27 +157,27 @@ private:
m_splitter->setPosition(start);
QScriptAnalysis itemAnalysis = m_analysis[start];
if (m_splitter->boundaryReasons() & QTextBoundaryFinder::StartWord) {
if (m_splitter->boundaryReasons() & QTextBoundaryFinder::StartOfItem)
itemAnalysis.flags = QScriptAnalysis::Uppercase;
m_splitter->toNextBoundary();
}
m_splitter->toNextBoundary();
const int end = start + length;
for (int i = start + 1; i < end; ++i) {
bool atWordBoundary = false;
bool atWordStart = false;
if (i == m_splitter->position()) {
if (m_splitter->boundaryReasons() & QTextBoundaryFinder::StartWord
&& m_analysis[i].flags < QScriptAnalysis::TabOrObject)
atWordBoundary = true;
if (m_splitter->boundaryReasons() & QTextBoundaryFinder::StartOfItem) {
Q_ASSERT(m_analysis[i].flags < QScriptAnalysis::TabOrObject);
atWordStart = true;
}
m_splitter->toNextBoundary();
}
if (m_analysis[i] == itemAnalysis
&& m_analysis[i].flags < QScriptAnalysis::TabOrObject
&& !atWordBoundary
&& !atWordStart
&& i - start < MaxItemLength)
continue;
@ -185,7 +185,7 @@ private:
start = i;
itemAnalysis = m_analysis[start];
if (atWordBoundary)
if (atWordStart)
itemAnalysis.flags = QScriptAnalysis::Uppercase;
}
m_items.append(QScriptItem(start, itemAnalysis));
@ -1799,7 +1799,6 @@ struct QJustificationPoint {
int type;
QFixed kashidaWidth;
QGlyphLayout glyph;
QFontEngine *fontEngine;
};
Q_DECLARE_TYPEINFO(QJustificationPoint, Q_PRIMITIVE_TYPE);
@ -1808,7 +1807,6 @@ static void set(QJustificationPoint *point, int type, const QGlyphLayout &glyph,
{
point->type = type;
point->glyph = glyph;
point->fontEngine = fe;
if (type >= HB_Arabic_Normal) {
QChar ch(0x640); // Kashida character
@ -2741,13 +2739,13 @@ void QTextEngine::resolveAdditionalFormats() const
const QScriptItem *si = &layoutData->items.at(i);
int end = si->position + length(si);
while (startIt != addFormatSortedByStart.end() &&
while (startIt != addFormatSortedByStart.constEnd() &&
specialData->addFormats.at(*startIt).start <= si->position) {
currentFormats.insert(std::upper_bound(currentFormats.begin(), currentFormats.end(), *startIt),
*startIt);
++startIt;
}
while (endIt != addFormatSortedByEnd.end() &&
while (endIt != addFormatSortedByEnd.constEnd() &&
specialData->addFormats.at(*endIt).start + specialData->addFormats.at(*endIt).length < end) {
currentFormats.remove(qBinaryFind(currentFormats, *endIt) - currentFormats.begin());
++endIt;

View File

@ -3358,8 +3358,8 @@ int QTextFormatCollection::indexForFormat(const QTextFormat &format)
bool QTextFormatCollection::hasFormatCached(const QTextFormat &format) const
{
uint hash = getHash(format.d, format.format_type);
QMultiHash<uint, int>::const_iterator i = hashes.find(hash);
while (i != hashes.end() && i.key() == hash) {
QMultiHash<uint, int>::const_iterator i = hashes.constFind(hash);
while (i != hashes.constEnd() && i.key() == hash) {
if (formats.value(i.value()) == format) {
return true;
}

View File

@ -1185,8 +1185,15 @@ Qt::LayoutDirection QTextBlock::textDirection() const
const QChar *p = buffer.constData() + frag->stringPosition;
const QChar * const end = p + frag->size_array[0];
while (p < end) {
switch(QChar::direction(p->unicode()))
{
uint ucs4 = p->unicode();
if (QChar::isHighSurrogate(ucs4) && p + 1 < end) {
ushort low = p[1].unicode();
if (QChar::isLowSurrogate(low)) {
ucs4 = QChar::surrogateToUcs4(ucs4, low);
++p;
}
}
switch (QChar::direction(ucs4)) {
case QChar::DirL:
return Qt::LeftToRight;
case QChar::DirR:

View File

@ -78,7 +78,7 @@ QT_BEGIN_NAMESPACE
and ends in ".cache". Data is written to disk only in insert()
and updateMetaData().
Currently you can not share the same cache files with more then
Currently you cannot share the same cache files with more than
one disk cache.
QNetworkDiskCache by default limits the amount of space that the cache will

View File

@ -42,6 +42,10 @@
#ifndef QNETWORKFUNCTIONS_WINCE_H
#define QNETWORKFUNCTIONS_WINCE_H
#if 0
#pragma qt_sync_stop_processing
#endif
#ifdef Q_OS_WINCE
#include <qt_windows.h>

View File

@ -61,6 +61,11 @@ QT_BEGIN_NAMESPACE
typedef ptrdiff_t qgl_GLintptr;
typedef ptrdiff_t qgl_GLsizeiptr;
#if defined(APIENTRY) && !defined(QGLF_APIENTRY)
# define QGLF_APIENTRY APIENTRY
#elif defined(GL_APIENTRY) && !defined(QGLF_APIENTRY)
# define QGLF_APIENTRY GL_APIENTRY
#endif
# ifndef QGLF_APIENTRYP
# ifdef QGLF_APIENTRY

View File

@ -76,11 +76,10 @@ void QFbWindow::setGeometry(const QRect &rect)
QPlatformWindow::setGeometry(rect);
}
Qt::WindowFlags QFbWindow::setWindowFlags(Qt::WindowFlags flags)
void QFbWindow::setWindowFlags(Qt::WindowFlags flags)
{
mWindowFlags = flags;
platformScreen()->invalidateRectCache();
return mWindowFlags;
}
Qt::WindowFlags QFbWindow::windowFlags() const

View File

@ -60,7 +60,7 @@ public:
void setGeometry(const QRect &rect);
virtual Qt::WindowFlags setWindowFlags(Qt::WindowFlags type);
virtual void setWindowFlags(Qt::WindowFlags type);
virtual Qt::WindowFlags windowFlags() const;
WId winId() const { return mWindowId; }

View File

@ -707,7 +707,8 @@ void AtSpiAdaptor::setBitFlag(const QString &flag)
sendObject_text_selection_changed = 1;
} else if (right.startsWith(QLatin1String("ValueChanged"))) {
sendObject_value_changed = 1;
} else if (right.startsWith(QLatin1String("VisibleDataChanged"))) {
} else if (right.startsWith(QLatin1String("VisibleDataChanged"))
|| right.startsWith(QLatin1String("VisibledataChanged"))) { // typo in libatspi
sendObject_visible_data_changed = 1;
} else {
qAtspiDebug() << "WARNING: subscription string not handled:" << flag;
@ -1277,7 +1278,16 @@ bool AtSpiAdaptor::applicationInterface(const QAIPointer &interface, const QStri
QDBusMessage reply = message.createReply(QVariant::fromValue(QDBusVariant(QLatin1String("Qt"))));
return connection.send(reply);
}
if (function == QLatin1String("GetVersion")) {
Q_ASSERT(message.signature() == QLatin1String("ss"));
QDBusMessage reply = message.createReply(QVariant::fromValue(QDBusVariant(QLatin1String(qVersion()))));
return connection.send(reply);
}
if (function == QLatin1String("GetLocale")) {
Q_ASSERT(message.signature() == QLatin1String("u"));
QDBusMessage reply = message.createReply(QVariant::fromValue(QLocale().name()));
return connection.send(reply);
}
qAtspiDebug() << "AtSpiAdaptor::applicationInterface " << message.path() << interface << function;
return false;
}

View File

@ -407,7 +407,7 @@ QModelIndex QAccessibleTree::indexFromLogical(int row, int column) const
return QModelIndex();
const QTreeView *treeView = qobject_cast<const QTreeView*>(view());
if (treeView->d_func()->viewItems.count() <= row) {
if ((row < 0) || (column < 0) || (treeView->d_func()->viewItems.count() <= row)) {
qWarning() << "QAccessibleTree::indexFromLogical: invalid index: " << row << column << " for " << treeView;
return QModelIndex();
}

View File

@ -949,7 +949,7 @@ QPair< int, int > QAccessibleTextWidget::getBoundaries(int offset, BoundaryType
sentenceFinder.setPosition(offsetWithinBlockText);
int prevBoundary = offsetWithinBlockText;
int nextBoundary = offsetWithinBlockText;
if (!sentenceFinder.isAtBoundary())
if (!(sentenceFinder.boundaryReasons() & QTextBoundaryFinder::StartOfItem))
prevBoundary = sentenceFinder.toPreviousBoundary();
nextBoundary = sentenceFinder.toNextBoundary();
if (nextBoundary != -1)

View File

@ -72,13 +72,6 @@ extern QList<QWidget*> childWidgets(const QWidget *widget, bool includeTopLevel
QString Q_GUI_EXPORT qt_accStripAmp(const QString &text);
QString Q_GUI_EXPORT qt_accHotKey(const QString &text);
QString Q_GUI_EXPORT qTextBeforeOffsetFromString(int offset, QAccessible2::BoundaryType boundaryType,
int *startOffset, int *endOffset, const QString& text);
QString Q_GUI_EXPORT qTextAtOffsetFromString(int offset, QAccessible2::BoundaryType boundaryType,
int *startOffset, int *endOffset, const QString& text);
QString Q_GUI_EXPORT qTextAfterOffsetFromString(int offset, QAccessible2::BoundaryType boundaryType,
int *startOffset, int *endOffset, const QString& text);
/*!
\class QAccessibleButton
\brief The QAccessibleButton class implements the QAccessibleInterface for button type widgets.
@ -725,7 +718,7 @@ QString QAccessibleLineEdit::textBeforeOffset(int offset, BoundaryType boundaryT
*startOffset = *endOffset = -1;
return QString();
}
return qTextBeforeOffsetFromString(offset, boundaryType, startOffset, endOffset, lineEdit()->text());
return QAccessibleTextInterface::textBeforeOffset(offset, boundaryType, startOffset, endOffset);
}
QString QAccessibleLineEdit::textAfterOffset(int offset, BoundaryType boundaryType,
@ -735,7 +728,7 @@ QString QAccessibleLineEdit::textAfterOffset(int offset, BoundaryType boundaryTy
*startOffset = *endOffset = -1;
return QString();
}
return qTextAfterOffsetFromString(offset, boundaryType, startOffset, endOffset, lineEdit()->text());
return QAccessibleTextInterface::textAfterOffset(offset, boundaryType, startOffset, endOffset);
}
QString QAccessibleLineEdit::textAtOffset(int offset, BoundaryType boundaryType,
@ -745,7 +738,7 @@ QString QAccessibleLineEdit::textAtOffset(int offset, BoundaryType boundaryType,
*startOffset = *endOffset = -1;
return QString();
}
return qTextAtOffsetFromString(offset, boundaryType, startOffset, endOffset, lineEdit()->text());
return QAccessibleTextInterface::textAtOffset(offset, boundaryType, startOffset, endOffset);
}
void QAccessibleLineEdit::removeSelection(int selectionIndex)

View File

@ -56,8 +56,11 @@ class QCocoaNativeInterface : public QPlatformNativeInterface
public:
QCocoaNativeInterface();
void *nativeResourceForContext(const QByteArray &resourceString, QOpenGLContext *context);
void *nativeResourceForWindow(const QByteArray &resourceString, QWindow *window);
static void *cglContextForContext(QOpenGLContext *context);
public Q_SLOTS:
void onAppFocusWindowChanged(QWindow *window);

View File

@ -65,6 +65,17 @@ QCocoaNativeInterface::QCocoaNativeInterface()
{
}
void *QCocoaNativeInterface::nativeResourceForContext(const QByteArray &resourceString, QOpenGLContext *context)
{
if (!context)
return 0;
if (resourceString.toLower() == "cglcontextobj")
return cglContextForContext(context);
return 0;
}
void *QCocoaNativeInterface::nativeResourceForWindow(const QByteArray &resourceString, QWindow *window)
{
if (!window->handle()) {
@ -109,4 +120,17 @@ void QCocoaNativeInterface::onAppFocusWindowChanged(QWindow *window)
QCocoaMenuBar::updateMenuBarImmediately();
}
void *QCocoaNativeInterface::cglContextForContext(QOpenGLContext* context)
{
if (context) {
QCocoaGLContext *cocoaGLContext = static_cast<QCocoaGLContext *>(context->handle());
if (cocoaGLContext) {
NSOpenGLContext *nsOpenGLContext = cocoaGLContext->nsOpenGLContext();
if (nsOpenGLContext)
return [nsOpenGLContext CGLContextObj];
}
}
return 0;
}
QT_END_NAMESPACE

View File

@ -98,7 +98,7 @@ public:
void setGeometry(const QRect &rect);
void setCocoaGeometry(const QRect &rect);
void setVisible(bool visible);
Qt::WindowFlags setWindowFlags(Qt::WindowFlags flags);
void setWindowFlags(Qt::WindowFlags flags);
Qt::WindowState setWindowState(Qt::WindowState state);
void setWindowTitle(const QString &title);
void setWindowFilePath(const QString &filePath);

View File

@ -387,7 +387,7 @@ void QCocoaWindow::setWindowShadow(Qt::WindowFlags flags)
[m_nsWindow setHasShadow:(keepShadow ? YES : NO)];
}
Qt::WindowFlags QCocoaWindow::setWindowFlags(Qt::WindowFlags flags)
void QCocoaWindow::setWindowFlags(Qt::WindowFlags flags)
{
if (m_nsWindow) {
NSUInteger styleMask = windowStyleMask(flags);
@ -398,7 +398,6 @@ Qt::WindowFlags QCocoaWindow::setWindowFlags(Qt::WindowFlags flags)
}
m_windowFlags = flags;
return m_windowFlags;
}
Qt::WindowState QCocoaWindow::setWindowState(Qt::WindowState state)

View File

@ -140,7 +140,7 @@ void QDirectFbWindow::setVisible(bool visible)
QWindowSystemInterface::handleExposeEvent(window(), window()->geometry());
}
Qt::WindowFlags QDirectFbWindow::setWindowFlags(Qt::WindowFlags flags)
void QDirectFbWindow::setWindowFlags(Qt::WindowFlags flags)
{
switch (flags & Qt::WindowType_Mask) {
case Qt::ToolTip: {
@ -154,7 +154,6 @@ Qt::WindowFlags QDirectFbWindow::setWindowFlags(Qt::WindowFlags flags)
}
m_dfbWindow->SetStackingClass(m_dfbWindow.data(), flags & Qt::WindowStaysOnTopHint ? DWSC_UPPER : DWSC_MIDDLE);
return flags;
}
void QDirectFbWindow::raise()

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