summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLorn Potter <lorn.potter@nokia.com>2010-09-03 01:15:34 (GMT)
committerLorn Potter <lorn.potter@nokia.com>2010-09-03 01:15:34 (GMT)
commitda4bf68133a65ad03b3ebdaa29624b757bbad4e4 (patch)
tree0f2a9caf515928dbb819950972e2813cb803aa5a
parent036d7afd42ce3ca9736e173a72bc5228a1eb211d (diff)
parent6939815182b31ab865184e40991eb339ff21ba2d (diff)
downloadQt-da4bf68133a65ad03b3ebdaa29624b757bbad4e4.zip
Qt-da4bf68133a65ad03b3ebdaa29624b757bbad4e4.tar.gz
Qt-da4bf68133a65ad03b3ebdaa29624b757bbad4e4.tar.bz2
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-1 into 4.7
-rwxr-xr-xbin/syncqt232
-rwxr-xr-xconfigure.exebin1320960 -> 1320960 bytes
-rw-r--r--demos/browser/downloadmanager.cpp2
-rw-r--r--demos/browser/settings.cpp2
-rwxr-xr-xdemos/declarative/samegame/SamegameCore/samegame.js3
-rw-r--r--demos/declarative/samegame/samegame.qml1
-rw-r--r--demos/qtdemo/menumanager.cpp4
-rw-r--r--dist/changes-4.7.024
-rw-r--r--doc/src/declarative/qml-intro.qdoc7
-rw-r--r--doc/src/declarative/qmlruntime.qdoc12
-rw-r--r--doc/src/getting-started/gettingstartedqml.qdoc36
-rw-r--r--doc/src/images/symbian-draw-pixmap-sequence.pngbin0 -> 5724 bytes
-rw-r--r--doc/src/images/symbian-qt-draw-pixmap-sequence.pngbin0 -> 9141 bytes
-rw-r--r--doc/src/images/symbian-qt-rendering-stack-non-screenplay.pngbin0 -> 52802 bytes
-rw-r--r--doc/src/images/symbian-rendering-stack-non-screenplay.pngbin0 -> 44655 bytes
-rw-r--r--doc/src/platforms/platform-notes.qdoc50
-rw-r--r--doc/src/platforms/supported-platforms.qdoc42
-rw-r--r--doc/src/snippets/declarative/qml-intro/basic-syntax.qml48
-rw-r--r--doc/src/snippets/declarative/qml-intro/sequential-animation3.qml2
-rw-r--r--examples/sql/masterdetail/mainwindow.cpp6
-rw-r--r--examples/tools/treemodelcompleter/mainwindow.cpp2
-rw-r--r--examples/xmlpatterns/filetree/mainwindow.cpp2
-rw-r--r--mkspecs/common/symbian/symbian.conf3
-rw-r--r--mkspecs/features/win32/msvc_mp.prf2
-rw-r--r--mkspecs/win32-msvc2008/qmake.conf2
-rw-r--r--mkspecs/win32-msvc2010/qmake.conf2
-rw-r--r--qmake/Makefile.win32357
-rw-r--r--src/3rdparty/javascriptcore/JavaScriptCore/ChangeLog36
-rw-r--r--src/3rdparty/javascriptcore/JavaScriptCore/JavaScriptCore.pri1
-rw-r--r--src/3rdparty/javascriptcore/JavaScriptCore/interpreter/RegisterFile.cpp2
-rw-r--r--src/3rdparty/javascriptcore/JavaScriptCore/interpreter/RegisterFile.h33
-rw-r--r--src/3rdparty/javascriptcore/JavaScriptCore/wtf/symbian/RegisterFileAllocatorSymbian.cpp111
-rw-r--r--src/3rdparty/javascriptcore/JavaScriptCore/wtf/symbian/RegisterFileAllocatorSymbian.h69
-rw-r--r--src/3rdparty/javascriptcore/JavaScriptCore/wtf/symbian/SymbianDefines.h42
-rw-r--r--src/3rdparty/phonon/gstreamer/mediaobject.cpp6
-rw-r--r--src/corelib/global/global.pri2
-rw-r--r--src/corelib/kernel/qeventdispatcher_symbian.cpp8
-rw-r--r--src/corelib/tools/qelapsedtimer_unix.cpp129
-rw-r--r--src/corelib/tools/qsimd.cpp106
-rw-r--r--src/corelib/tools/qstring.cpp23
-rw-r--r--src/dbus/qdbusintegrator.cpp3
-rw-r--r--src/declarative/graphicsitems/qdeclarativeflickable.cpp1
-rw-r--r--src/declarative/qml/parser/qdeclarativejslexer.cpp8
-rw-r--r--src/declarative/qml/qdeclarativeobjectscriptclass.cpp2
-rw-r--r--src/declarative/qml/qdeclarativevmemetaobject.cpp14
-rw-r--r--src/declarative/util/qdeclarativeanimation.cpp2
-rw-r--r--src/declarative/util/qdeclarativepixmapcache.cpp16
-rw-r--r--src/gui/graphicsview/qgraphicsitem.cpp3
-rw-r--r--src/gui/inputmethod/qcoefepinputcontext_p.h12
-rw-r--r--src/gui/inputmethod/qcoefepinputcontext_s60.cpp56
-rw-r--r--src/gui/kernel/qapplication_mac.mm3
-rw-r--r--src/gui/kernel/qapplication_s60.cpp37
-rw-r--r--src/gui/kernel/qcocoasharedwindowmethods_mac_p.h13
-rw-r--r--src/gui/kernel/qt_s60_p.h4
-rw-r--r--src/gui/kernel/qwidget_s60.cpp6
-rw-r--r--src/gui/painting/qblendfunctions.cpp8
-rw-r--r--src/gui/painting/qdrawhelper.cpp1
-rw-r--r--src/gui/painting/qdrawhelper_neon.cpp98
-rw-r--r--src/gui/painting/qdrawhelper_neon_p.h5
-rw-r--r--src/gui/painting/qpainter.cpp2
-rw-r--r--src/gui/styles/qcleanlooksstyle.cpp10
-rw-r--r--src/gui/styles/qs60style.cpp6
-rw-r--r--src/gui/text/qfont_s60.cpp36
-rw-r--r--src/gui/text/qfontengine.cpp4
-rw-r--r--src/gui/text/qfontengine_ft.cpp13
-rw-r--r--src/gui/text/qfontengine_qpf.cpp2
-rw-r--r--src/gui/text/qfontengine_s60.cpp7
-rw-r--r--src/gui/text/qfontengine_s60_p.h1
-rw-r--r--src/gui/widgets/qlinecontrol.cpp6
-rw-r--r--src/network/bearer/qnetworkconfigmanager.cpp23
-rw-r--r--src/opengl/qgl_mac.mm14
-rw-r--r--src/plugins/bearer/symbian/qnetworksession_impl.cpp131
-rw-r--r--src/plugins/bearer/symbian/qnetworksession_impl.h12
-rw-r--r--src/plugins/bearer/symbian/symbianengine.cpp86
-rw-r--r--src/plugins/bearer/symbian/symbianengine.h17
-rw-r--r--src/script/script.pro5
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/data/in.qml7
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp11
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/variantNotify.qml13
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/tst_qdeclarativelanguage.cpp16
-rw-r--r--tests/auto/declarative/qdeclarativepixmapcache/tst_qdeclarativepixmapcache.cpp27
-rw-r--r--tests/auto/linguist/lupdate/testdata/good/parseqml/main.qml97
-rw-r--r--tests/auto/linguist/lupdate/testdata/good/parseqml/project.pro3
-rw-r--r--tests/auto/linguist/lupdate/testdata/good/parseqml/project.ts.result195
-rw-r--r--tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp2
-rw-r--r--tests/auto/qinputcontext/qinputcontext.pro4
-rw-r--r--tests/auto/qinputcontext/tst_qinputcontext.cpp781
-rw-r--r--tests/auto/qkeysequence/tst_qkeysequence.cpp28
-rw-r--r--tests/auto/qtimer/tst_qtimer.cpp5
-rw-r--r--tests/auto/qwidget/tst_qwidget.cpp25
-rw-r--r--tools/activeqt/testcon/changeproperties.cpp8
-rw-r--r--tools/assistant/tools/assistant/bookmarkitem.cpp5
-rw-r--r--tools/assistant/tools/assistant/cmdlineparser.cpp6
-rw-r--r--tools/assistant/tools/assistant/cmdlineparser.h1
-rw-r--r--tools/assistant/tools/assistant/mainwindow.cpp2
-rw-r--r--tools/assistant/tools/qcollectiongenerator/main.cpp75
-rw-r--r--tools/assistant/tools/qhelpconverter/filterpage.cpp2
-rw-r--r--tools/assistant/tools/qhelpconverter/finishpage.cpp3
-rw-r--r--tools/assistant/tools/qhelpconverter/helpwindow.cpp2
-rw-r--r--tools/assistant/tools/qhelpconverter/main.cpp15
-rw-r--r--tools/assistant/tools/qhelpgenerator/main.cpp42
-rw-r--r--tools/assistant/tools/shared/helpgenerator.cpp4
-rw-r--r--tools/configure/configureapp.cpp14
-rw-r--r--tools/designer/src/components/taskmenu/itemlisteditor.cpp22
-rw-r--r--tools/designer/src/lib/shared/plugindialog.cpp4
-rw-r--r--tools/designer/src/plugins/phononwidgets/seeksliderplugin.cpp4
-rw-r--r--tools/designer/src/plugins/phononwidgets/videoplayerplugin.cpp4
-rw-r--r--tools/designer/src/plugins/phononwidgets/volumesliderplugin.cpp4
-rw-r--r--tools/designer/src/plugins/qdeclarativeview/qdeclarativeview_plugin.cpp4
-rw-r--r--tools/designer/src/plugins/qwebview/qwebview_plugin.cpp4
-rw-r--r--tools/linguist/lconvert/main.cpp21
-rw-r--r--tools/linguist/linguist/phrase.cpp7
-rw-r--r--tools/linguist/lrelease/main.cpp52
-rw-r--r--tools/linguist/lupdate/cpp.cpp83
-rw-r--r--tools/linguist/lupdate/java.cpp29
-rw-r--r--tools/linguist/lupdate/main.cpp32
-rw-r--r--tools/linguist/lupdate/merge.cpp18
-rw-r--r--tools/linguist/lupdate/qdeclarative.cpp166
-rw-r--r--tools/linguist/lupdate/qscript.cpp52
-rw-r--r--tools/linguist/lupdate/qscript.g51
-rw-r--r--tools/linguist/lupdate/ui.cpp19
-rw-r--r--tools/qdoc3/main.cpp2
-rw-r--r--tools/shared/qtpropertybrowser/qtpropertymanager.cpp24
-rw-r--r--translations/assistant_uk.ts461
-rw-r--r--translations/designer_uk.ts131
-rw-r--r--translations/linguist_uk.ts1081
-rw-r--r--translations/qt_help_uk.ts4
-rw-r--r--translations/qt_uk.ts124
-rw-r--r--translations/qvfb_uk.ts145
-rw-r--r--translations/translations.pri4
130 files changed, 4175 insertions, 1846 deletions
diff --git a/bin/syncqt b/bin/syncqt
index 4acb5b5..907869d 100755
--- a/bin/syncqt
+++ b/bin/syncqt
@@ -213,7 +213,7 @@ sub classNames {
}
}
return @ret if($line =~ m/^#pragma qt_sync_stop_processing/);
- push(@ret, "$1") if($line =~ m/^#pragma qt_class\(([^)]*)\)[\r\n]*$/);
+ push(@ret, $1) if($line =~ m/^#pragma qt_class\(([^)]*)\)[\r\n]*$/);
$line = 0;
}
if($line) {
@@ -297,8 +297,7 @@ sub classNames {
push @symbols, "QMutable" . $1 . "Iterator";
}
- foreach (@symbols) {
- my $symbol = $_;
+ foreach my $symbol (@symbols) {
$symbol = (join("::", @namespaces) . "::" . $symbol) if (scalar @namespaces);
push @ret, $symbol
if ($symbol =~ /^Q[^:]*$/ # no-namespace, starting with Q
@@ -310,21 +309,22 @@ sub classNames {
}
######################################################################
-# Syntax: syncHeader(header, iheader, copy)
+# Syntax: syncHeader(header, iheader, copy, timestamp)
# Params: header, string, filename to create "symlink" for
# iheader, string, destination name of symlink
# copy, forces header to be a copy of iheader
+# timestamp, the requested modification time if copying
#
# Purpose: Syncronizes header to iheader
# Returns: 1 if successful, else 0.
######################################################################
sub syncHeader {
- my ($header, $iheader, $copy) = @_;
+ my ($header, $iheader, $copy, $ts) = @_;
$iheader =~ s=\\=/=g;
$header =~ s=\\=/=g;
return copyFile($iheader, $header) if($copy);
- unless(-e "$header") {
+ unless(-e $header) {
my $header_dir = dirname($header);
mkpath $header_dir, !$quiet;
@@ -333,6 +333,7 @@ sub syncHeader {
open HEADER, ">$header" || die "Could not open $header for writing!\n";
print HEADER "#include \"$iheader_out\"\n";
close HEADER;
+ utime(time, $ts, $header) or die "$iheader, $header";
return 1;
}
return 0;
@@ -368,7 +369,7 @@ sub fixPaths {
$dir =~ s=\\=/=g;
}
$dir =~ s,/cygdrive/([a-zA-Z])/,$1:/,g;
- return basename($file) if("$file_dir" eq "$dir");
+ return basename($file) if($file_dir eq $dir);
#guts
my $match_dir = 0;
@@ -430,7 +431,7 @@ sub fileCompare {
my $file2contents = fileContents($file2);
if (! -e $file1) { return 1; }
if (! -e $file2) { return -1; }
- return $file1contents ne $file2contents ? (stat("$file2"))[9] <=> (stat("$file1"))[9] : 0;
+ return $file1contents ne $file2contents ? (stat($file2))[9] <=> (stat($file1))[9] : 0;
}
######################################################################
@@ -467,21 +468,23 @@ sub copyFile
if ( $knowdiff || ($filecontents ne $ifilecontents) ) {
if ( $copy > 0 ) {
my $file_dir = dirname($file);
- mkpath $file_dir, !$quiet unless(-e "$file_dir");
+ mkpath $file_dir, !$quiet unless(-e $file_dir);
open(O, "> " . $file) || die "Could not open $file for writing (no write permission?)";
local $/;
binmode O;
print O $ifilecontents;
close O;
+ utime time, (stat($ifile))[9], $file;
return 1;
} elsif ( $copy < 0 ) {
my $ifile_dir = dirname($ifile);
- mkpath $ifile_dir, !$quiet unless(-e "$ifile_dir");
+ mkpath $ifile_dir, !$quiet unless(-e $ifile_dir);
open(O, "> " . $ifile) || die "Could not open $ifile for writing (no write permission?)";
local $/;
binmode O;
print O $filecontents;
close O;
+ utime time, (stat($file))[9], $ifile;
return 1;
}
}
@@ -567,102 +570,102 @@ while ( @ARGV ) {
#parse
my $arg = shift @ARGV;
- if ("$arg" eq "-h" || "$arg" eq "-help" || "$arg" eq "?") {
+ if ($arg eq "-h" || $arg eq "-help" || $arg eq "?") {
$var = "show_help";
$val = "yes";
- } elsif("$arg" eq "-copy") {
+ } elsif($arg eq "-copy") {
$var = "copy";
$val = "yes";
- } elsif("$arg" eq "-o" || "$arg" eq "-outdir") {
+ } elsif($arg eq "-o" || $arg eq "-outdir") {
$var = "output";
$val = shift @ARGV;
- } elsif("$arg" eq "-showonly" || "$arg" eq "-remove-stale" || "$arg" eq "-windows" ||
- "$arg" eq "-relative" || "$arg" eq "-check-includes") {
+ } elsif($arg eq "-showonly" || $arg eq "-remove-stale" || $arg eq "-windows" ||
+ $arg eq "-relative" || $arg eq "-check-includes") {
$var = substr($arg, 1);
$val = "yes";
- } elsif("$arg" =~ /^-no-(.*)$/) {
+ } elsif($arg =~ /^-no-(.*)$/) {
$var = $1;
$val = "no";
#these are for commandline compat
- } elsif("$arg" eq "-inc") {
+ } elsif($arg eq "-inc") {
$var = "output";
$val = shift @ARGV;
- } elsif("$arg" eq "-module") {
+ } elsif($arg eq "-module") {
$var = "module";
$val = shift @ARGV;
- } elsif("$arg" eq "-separate-module") {
+ } elsif($arg eq "-separate-module") {
$var = "separate-module";
$val = shift @ARGV;
- } elsif("$arg" eq "-show") {
+ } elsif($arg eq "-show") {
$var = "showonly";
$val = "yes";
- } elsif("$arg" eq "-quiet") {
+ } elsif($arg eq "-quiet") {
$var = "quiet";
$val = "yes";
- } elsif("$arg" eq "-base-dir") {
+ } elsif($arg eq "-base-dir") {
# skip, it's been dealt with at the top of the file
shift @ARGV;
next;
}
#do something
- if(!$var || "$var" eq "show_help") {
+ if(!$var || $var eq "show_help") {
print "Unknown option: $arg\n\n" if(!$var);
showUsage();
- } elsif ("$var" eq "copy") {
- if("$val" eq "yes") {
+ } elsif ($var eq "copy") {
+ if($val eq "yes") {
$copy_headers++;
} elsif($showonly) {
$copy_headers--;
}
- } elsif ("$var" eq "showonly") {
- if("$val" eq "yes") {
+ } elsif ($var eq "showonly") {
+ if($val eq "yes") {
$showonly++;
} elsif($showonly) {
$showonly--;
}
- } elsif ("$var" eq "quiet") {
- if("$val" eq "yes") {
+ } elsif ($var eq "quiet") {
+ if($val eq "yes") {
$quiet++;
} elsif($quiet) {
$quiet--;
}
- } elsif ("$var" eq "check-includes") {
- if("$val" eq "yes") {
+ } elsif ($var eq "check-includes") {
+ if($val eq "yes") {
$check_includes++;
} elsif($check_includes) {
$check_includes--;
}
- } elsif ("$var" eq "remove-stale") {
- if("$val" eq "yes") {
+ } elsif ($var eq "remove-stale") {
+ if($val eq "yes") {
$remove_stale++;
} elsif($remove_stale) {
$remove_stale--;
}
- } elsif ("$var" eq "windows") {
- if("$val" eq "yes") {
+ } elsif ($var eq "windows") {
+ if($val eq "yes") {
$force_win++;
} elsif($force_win) {
$force_win--;
}
- } elsif ("$var" eq "relative") {
- if("$val" eq "yes") {
+ } elsif ($var eq "relative") {
+ if($val eq "yes") {
$force_relative++;
} elsif($force_relative) {
$force_relative--;
}
- } elsif ("$var" eq "module") {
+ } elsif ($var eq "module") {
print "module :$val:\n" unless $quiet;
die "No such module: $val" unless(defined $modules{$val});
push @modules_to_sync, $val;
- } elsif ("$var" eq "separate-module") {
+ } elsif ($var eq "separate-module") {
my ($module, $prodir, $headerdir) = split(/:/, $val);
$modules{$module} = $prodir;
push @modules_to_sync, $module;
$moduleheaders{$module} = $headerdir;
$create_uic_class_map = 0;
$create_private_headers = 0;
- } elsif ("$var" eq "output") {
+ } elsif ($var eq "output") {
my $outdir = $val;
if(checkRelative($outdir)) {
$out_basedir = getcwd();
@@ -696,12 +699,11 @@ my %inject_headers;
# find the header by normal means.
%inject_headers = ( "$basedir/src/corelib/global" => ( "*qconfig.h" ) ) unless (-e "$basedir/src/corelib/global/qconfig.h");
-foreach (@modules_to_sync) {
+foreach my $lib (@modules_to_sync) {
#iteration info
- my $lib = $_;
- my $dir = "$modules{$lib}";
+ my $dir = $modules{$lib};
my $pathtoheaders = "";
- $pathtoheaders = "$moduleheaders{$lib}" if ($moduleheaders{$lib});
+ $pathtoheaders = $moduleheaders{$lib} if ($moduleheaders{$lib});
#information used after the syncing
my $pri_install_classes = "";
@@ -715,24 +717,23 @@ foreach (@modules_to_sync) {
#get dependencies
if(-e "$dir/" . basename($dir) . ".pro") {
if(open(F, "<$dir/" . basename($dir) . ".pro")) {
- while(<F>) {
- my $line = $_;
+ while(my $line = <F>) {
chomp $line;
if($line =~ /^ *QT *\+?= *([^\r\n]*)/) {
- foreach(split(/ /, "$1")) {
- $master_contents .= "#include <QtCore/QtCore>\n" if("$_" eq "core");
- $master_contents .= "#include <QtGui/QtGui>\n" if("$_" eq "gui");
- $master_contents .= "#include <QtNetwork/QtNetwork>\n" if("$_" eq "network");
- $master_contents .= "#include <QtSvg/QtSvg>\n" if("$_" eq "svg");
- $master_contents .= "#include <QtDeclarative/QtDeclarative>\n" if("$_" eq "declarative");
- $master_contents .= "#include <QtScript/QtScript>\n" if("$_" eq "script");
- $master_contents .= "#include <QtScriptTools/QtScriptTools>\n" if("$_" eq "scripttools");
- $master_contents .= "#include <Qt3Support/Qt3Support>\n" if("$_" eq "qt3support");
- $master_contents .= "#include <QtSql/QtSql>\n" if("$_" eq "sql");
- $master_contents .= "#include <QtXml/QtXml>\n" if("$_" eq "xml");
- $master_contents .= "#include <QtXmlPatterns/QtXmlPatterns>\n" if("$_" eq "xmlpatterns");
- $master_contents .= "#include <QtOpenGL/QtOpenGL>\n" if("$_" eq "opengl");
- $master_contents .= "#include <QtOpenVG/QtOpenVG>\n" if("$_" eq "openvg");
+ foreach(split(/ /, $1)) {
+ $master_contents .= "#include <QtCore/QtCore>\n" if($_ eq "core");
+ $master_contents .= "#include <QtGui/QtGui>\n" if($_ eq "gui");
+ $master_contents .= "#include <QtNetwork/QtNetwork>\n" if($_ eq "network");
+ $master_contents .= "#include <QtSvg/QtSvg>\n" if($_ eq "svg");
+ $master_contents .= "#include <QtDeclarative/QtDeclarative>\n" if($_ eq "declarative");
+ $master_contents .= "#include <QtScript/QtScript>\n" if($_ eq "script");
+ $master_contents .= "#include <QtScriptTools/QtScriptTools>\n" if($_ eq "scripttools");
+ $master_contents .= "#include <Qt3Support/Qt3Support>\n" if($_ eq "qt3support");
+ $master_contents .= "#include <QtSql/QtSql>\n" if($_ eq "sql");
+ $master_contents .= "#include <QtXml/QtXml>\n" if($_ eq "xml");
+ $master_contents .= "#include <QtXmlPatterns/QtXmlPatterns>\n" if($_ eq "xmlpatterns");
+ $master_contents .= "#include <QtOpenGL/QtOpenGL>\n" if($_ eq "opengl");
+ $master_contents .= "#include <QtOpenVG/QtOpenVG>\n" if($_ eq "openvg");
}
}
}
@@ -743,34 +744,31 @@ foreach (@modules_to_sync) {
#remove the old files
if($remove_stale) {
my @subdirs = ("$out_basedir/include/$lib");
- foreach (@subdirs) {
- my $subdir = "$_";
- if (opendir DIR, "$subdir") {
+ foreach my $subdir (@subdirs) {
+ if (opendir DIR, $subdir) {
while(my $t = readdir(DIR)) {
my $file = "$subdir/$t";
- if(-d "$file") {
- push @subdirs, "$file" unless($t eq "." || $t eq "..");
+ if(-d $file) {
+ push @subdirs, $file unless($t eq "." || $t eq "..");
} else {
- my @files = ("$file");
+ my @files = ($file);
#push @files, "$out_basedir/include/Qt/$t" if(-e "$out_basedir/include/Qt/$t");
- foreach (@files) {
- my $file = $_;
+ foreach my $file (@files) {
my $remove_file = 0;
if(open(F, "<$file")) {
- while(<F>) {
- my $line = $_;
+ while(my $line = <F>) {
chomp $line;
if($line =~ /^\#include \"([^\"]*)\"$/) {
my $include = $1;
$include = $subdir . "/" . $include unless(substr($include, 0, 1) eq "/");
- $remove_file = 1 unless(-e "$include");
+ $remove_file = 1 unless(-e $include);
} else {
$remove_file = 0;
last;
}
}
close(F);
- unlink "$file" if($remove_file);
+ unlink $file if($remove_file);
}
}
}
@@ -782,15 +780,13 @@ foreach (@modules_to_sync) {
}
#create the new ones
- foreach (split(/;/, $dir)) {
- my $current_dir = "$_";
+ foreach my $current_dir (split(/;/, $dir)) {
my $headers_dir = $current_dir;
$headers_dir .= "/$pathtoheaders" if ($pathtoheaders);
#calc subdirs
my @subdirs = ($headers_dir);
- foreach (@subdirs) {
- my $subdir = "$_";
- opendir DIR, "$subdir" or next;
+ foreach my $subdir (@subdirs) {
+ opendir DIR, $subdir or next;
while(my $t = readdir(DIR)) {
push @subdirs, "$subdir/$t" if(-d "$subdir/$t" && !($t eq ".") &&
!($t eq "..") && !($t eq ".obj") &&
@@ -801,16 +797,14 @@ foreach (@modules_to_sync) {
}
#calc files and "copy" them
- foreach (@subdirs) {
- my $subdir = "$_";
- my @headers = findFiles("$subdir", "^[-a-z0-9_]*\\.h\$" , 0);
+ foreach my $subdir (@subdirs) {
+ my @headers = findFiles($subdir, "^[-a-z0-9_]*\\.h\$" , 0);
push @headers, $inject_headers{$subdir} if (defined $inject_headers{$subdir});
- foreach (@headers) {
- my $header = "$_";
+ foreach my $header (@headers) {
my $shadow = ($header =~ s/^\*//);
- $header = 0 if("$header" =~ /^ui_.*.h/);
+ $header = 0 if($header =~ /^ui_.*.h/);
foreach (@ignore_headers) {
- $header = 0 if("$header" eq "$_");
+ $header = 0 if($header eq $_);
}
if($header) {
my $header_copies = 0;
@@ -820,7 +814,7 @@ foreach (@modules_to_sync) {
$public_header = 0;
} else {
foreach (@ignore_for_master_contents) {
- $public_header = 0 if("$header" eq "$_");
+ $public_header = 0 if($header eq $_);
}
}
@@ -833,13 +827,14 @@ foreach (@modules_to_sync) {
print "SYMBOL: $_\n";
}
} else {
+ my $ts = (stat($iheader))[9];
#find out all the places it goes..
my @headers;
if ($public_header) {
@headers = ( "$out_basedir/include/$lib/$header" );
# write forwarding headers to include/Qt
- if ("$lib" ne "phonon" && "$subdir" =~ /^$basedir\/src/) {
+ if ($lib ne "phonon" && $subdir =~ /^$basedir\/src/) {
my $file_name = "$out_basedir/include/Qt/$header";
my $file_op = '>';
my $header_content = '';
@@ -862,27 +857,27 @@ foreach (@modules_to_sync) {
close HEADERFILE;
}
- foreach(@classes) {
+ foreach my $full_class (@classes) {
my $header_base = basename($header);
- my $class = $_;
# Strip namespaces:
+ my $class = $full_class;
$class =~ s/^.*:://;
# if ($class =~ m/::/) {
# class =~ s,::,/,g;
# }
- $class_lib_map_contents .= "QT_CLASS_LIB($_, $lib, $header_base)\n";
- $header_copies++ if(syncHeader("$out_basedir/include/$lib/$class", "$out_basedir/include/$lib/$header", 0));
+ $class_lib_map_contents .= "QT_CLASS_LIB($full_class, $lib, $header_base)\n";
+ $header_copies++ if(syncHeader("$out_basedir/include/$lib/$class", "$out_basedir/include/$lib/$header", 0, $ts));
# KDE-Compat headers for Phonon
if ($lib eq "phonon") {
- $header_copies++ if (syncHeader("$out_basedir/include/phonon_compat/Phonon/$class", "$out_basedir/include/$lib/$header", 0));
+ $header_copies++ if (syncHeader("$out_basedir/include/phonon_compat/Phonon/$class", "$out_basedir/include/$lib/$header", 0, $ts));
}
}
} elsif ($create_private_headers) {
@headers = ( "$out_basedir/include/$lib/private/$header" );
}
foreach(@headers) { #sync them
- $header_copies++ if(syncHeader($_, $iheader, $copy_headers));
+ $header_copies++ if(syncHeader($_, $iheader, $copy_headers, $ts));
}
if($public_header) {
@@ -892,8 +887,7 @@ foreach (@modules_to_sync) {
#deal with the install directives
if($public_header) {
my $pri_install_iheader = fixPaths($iheader, $current_dir);
- foreach(@classes) {
- my $class = $_;
+ foreach my $class (@classes) {
# Strip namespaces:
$class =~ s/^.*:://;
# if ($class =~ m/::/) {
@@ -928,8 +922,8 @@ foreach (@modules_to_sync) {
foreach my $master_include (@master_includes) {
#generate the "master" include file
my @tmp = split(/;/,$modules{$lib});
- $pri_install_files .= fixPaths($master_include, "$tmp[0]") . " "; #get the master file installed too
- if($master_include && -e "$master_include") {
+ $pri_install_files .= fixPaths($master_include, $tmp[0]) . " "; #get the master file installed too
+ if($master_include && -e $master_include) {
open MASTERINCLUDE, "<$master_include";
local $/;
binmode MASTERINCLUDE;
@@ -943,7 +937,7 @@ foreach (@modules_to_sync) {
mkpath $master_dir, !$quiet;
print "header (master) created for $lib\n" unless $quiet;
open MASTERINCLUDE, ">$master_include";
- print MASTERINCLUDE "$master_contents";
+ print MASTERINCLUDE $master_contents;
close MASTERINCLUDE;
}
}
@@ -954,7 +948,7 @@ foreach (@modules_to_sync) {
$headers_pri_contents .= "SYNCQT.HEADER_CLASSES = $pri_install_classes\n";
$headers_pri_contents .= "SYNCQT.PRIVATE_HEADER_FILES = $pri_install_pfiles\n";
my $headers_pri_file = "$out_basedir/include/$lib/headers.pri";
- if(-e "$headers_pri_file") {
+ if(-e $headers_pri_file) {
open HEADERS_PRI_FILE, "<$headers_pri_file";
local $/;
binmode HEADERS_PRI_FILE;
@@ -968,14 +962,14 @@ foreach (@modules_to_sync) {
mkpath $headers_pri_dir, !$quiet;
print "headers.pri file created for $lib\n" unless $quiet;
open HEADERS_PRI_FILE, ">$headers_pri_file";
- print HEADERS_PRI_FILE "$headers_pri_contents";
+ print HEADERS_PRI_FILE $headers_pri_contents;
close HEADERS_PRI_FILE;
}
}
}
unless($showonly || !$create_uic_class_map) {
my $class_lib_map = "$out_basedir/src/tools/uic/qclass_lib_map.h";
- if(-e "$class_lib_map") {
+ if(-e $class_lib_map) {
open CLASS_LIB_MAP, "<$class_lib_map";
local $/;
binmode CLASS_LIB_MAP;
@@ -988,21 +982,17 @@ unless($showonly || !$create_uic_class_map) {
my $class_lib_map_dir = dirname($class_lib_map);
mkpath $class_lib_map_dir, !$quiet;
open CLASS_LIB_MAP, ">$class_lib_map";
- print CLASS_LIB_MAP "$class_lib_map_contents";
+ print CLASS_LIB_MAP $class_lib_map_contents;
close CLASS_LIB_MAP;
}
}
if($check_includes) {
- for (keys(%modules)) {
- #iteration info
- my $lib = $_;
- {
+ for my $lib (keys(%modules)) {
#calc subdirs
my @subdirs = ($modules{$lib});
- foreach (@subdirs) {
- my $subdir = "$_";
- opendir DIR, "$subdir" or die "Huh, directory ".$subdir." cannot be opened.";
+ foreach my $subdir (@subdirs) {
+ opendir DIR, $subdir or die "Huh, directory ".$subdir." cannot be opened.";
while(my $t = readdir(DIR)) {
push @subdirs, "$subdir/$t" if(-d "$subdir/$t" && !($t eq ".") &&
!($t eq "..") && !($t eq ".obj") &&
@@ -1012,22 +1002,20 @@ if($check_includes) {
closedir DIR;
}
- foreach (@subdirs) {
- my $subdir = "$_";
+ foreach my $subdir (@subdirs) {
my $header_skip_qt_module_test = 0;
foreach(@ignore_for_qt_module_check) {
foreach (split(/;/, $_)) {
- $header_skip_qt_module_test = 1 if ("$subdir" =~ /^$_/);
+ $header_skip_qt_module_test = 1 if ($subdir =~ /^$_/);
}
}
- my @headers = findFiles("$subdir", "^[-a-z0-9_]*\\.h\$" , 0);
- foreach (@headers) {
- my $header = "$_";
+ my @headers = findFiles($subdir, "^[-a-z0-9_]*\\.h\$" , 0);
+ foreach my $header (@headers) {
my $header_skip_qt_begin_header_test = 0;
my $header_skip_qt_begin_namespace_test = 0;
- $header = 0 if("$header" =~ /^ui_.*.h/);
+ $header = 0 if($header =~ /^ui_.*.h/);
foreach (@ignore_headers) {
- $header = 0 if("$header" eq "$_");
+ $header = 0 if($header eq $_);
}
if($header) {
my $public_header = $header;
@@ -1035,17 +1023,17 @@ if($check_includes) {
$public_header = 0;
} else {
foreach (@ignore_for_master_contents) {
- $public_header = 0 if("$header" eq "$_");
+ $public_header = 0 if($header eq $_);
}
if($public_header) {
foreach (@ignore_for_include_check) {
- $public_header = 0 if("$header" eq "$_");
+ $public_header = 0 if($header eq $_);
}
foreach(@ignore_for_qt_begin_header_check) {
- $header_skip_qt_begin_header_test = 1 if ("$header" eq "$_");
+ $header_skip_qt_begin_header_test = 1 if ($header eq $_);
}
foreach(@ignore_for_qt_begin_namespace_check) {
- $header_skip_qt_begin_namespace_test = 1 if ("$header" eq "$_");
+ $header_skip_qt_begin_namespace_test = 1 if ($header eq $_);
}
}
}
@@ -1074,8 +1062,7 @@ if($check_includes) {
$include = 0;
}
if($include) {
- for (keys(%modules)) {
- my $trylib = $_;
+ for my $trylib (keys(%modules)) {
if(-e "$out_basedir/include/$trylib/$include") {
print "WARNING: $iheader includes $include when it should include $trylib/$include\n";
}
@@ -1124,7 +1111,6 @@ if($check_includes) {
}
}
}
- }
}
}
diff --git a/configure.exe b/configure.exe
index 982e038..aba5872 100755
--- a/configure.exe
+++ b/configure.exe
Binary files differ
diff --git a/demos/browser/downloadmanager.cpp b/demos/browser/downloadmanager.cpp
index 876ec1d..ab68209 100644
--- a/demos/browser/downloadmanager.cpp
+++ b/demos/browser/downloadmanager.cpp
@@ -282,7 +282,7 @@ void DownloadItem::updateInfoLabel()
remaining = tr("- %4 %5 remaining")
.arg(timeRemaining)
.arg(timeRemainingString);
- info = QString(tr("%1 of %2 (%3/sec) %4"))
+ info = tr("%1 of %2 (%3/sec) %4")
.arg(dataString(m_bytesReceived))
.arg(bytesTotal == 0 ? tr("?") : dataString(bytesTotal))
.arg(dataString((int)speed))
diff --git a/demos/browser/settings.cpp b/demos/browser/settings.cpp
index 5ceca67..fba781b 100644
--- a/demos/browser/settings.cpp
+++ b/demos/browser/settings.cpp
@@ -89,7 +89,7 @@ void SettingsDialog::loadFromSettings()
{
QSettings settings;
settings.beginGroup(QLatin1String("MainWindow"));
- QString defaultHome = QLatin1String("http://qt.nokia.com");
+ QString defaultHome = QLatin1String("http://doc.qt.nokia.com");
homeLineEdit->setText(settings.value(QLatin1String("home"), defaultHome).toString());
settings.endGroup();
diff --git a/demos/declarative/samegame/SamegameCore/samegame.js b/demos/declarative/samegame/SamegameCore/samegame.js
index aa1b359..9266767 100755
--- a/demos/declarative/samegame/SamegameCore/samegame.js
+++ b/demos/declarative/samegame/SamegameCore/samegame.js
@@ -151,7 +151,8 @@ function victoryCheck()
gameDuration = new Date() - gameDuration;
nameInputDialog.show("You won! Please enter your name: ");
nameInputDialog.initialWidth = nameInputDialog.text.width + 20;
- nameInputDialog.width = nameInputDialog.initialWidth;
+ if(nameInputDialog.name == "")
+ nameInputDialog.width = nameInputDialog.initialWidth;
nameInputDialog.text.opacity = 0;//Just a spacer
}
}
diff --git a/demos/declarative/samegame/samegame.qml b/demos/declarative/samegame/samegame.qml
index 9504fb6..3e9c505 100644
--- a/demos/declarative/samegame/samegame.qml
+++ b/demos/declarative/samegame/samegame.qml
@@ -82,6 +82,7 @@ Rectangle {
id: nameInputDialog
property int initialWidth: 0
+ property alias name: nameInputText.text
anchors.centerIn: parent
z: 22;
diff --git a/demos/qtdemo/menumanager.cpp b/demos/qtdemo/menumanager.cpp
index 4ae9ca1..fe3c5aa 100644
--- a/demos/qtdemo/menumanager.cpp
+++ b/demos/qtdemo/menumanager.cpp
@@ -384,9 +384,7 @@ void MenuManager::launchQmlExample(const QString &name)
qmlRoot->setProperty("show", QVariant(true));
qmlRoot->setProperty("qmlFile", QUrl::fromLocalFile(file.fileName()));
#else
- QMessageBox::critical(0, tr("Failed to launch the example"),
- tr("This application was built without the QtDeclarative module, and therefore declarative examples have been disabled."),
- QMessageBox::Cancel);
+ exampleError(QProcess::UnknownError);
#endif
}
diff --git a/dist/changes-4.7.0 b/dist/changes-4.7.0
index 01ebf63..a5939e3 100644
--- a/dist/changes-4.7.0
+++ b/dist/changes-4.7.0
@@ -88,7 +88,10 @@ QtGui
- QComboBox
* [QTBUG-8796] Made ForegroundRole work for all styles.
-
+
+ - QCommandLinkButton
+ * [QTBUG-5995] Fixed text and icon alignment issues.
+
- QPrinter
* Obsoleted the slightly confusing setNumCopies() and numCopies()
functions, and replaced them with setCopyCount(), copyCount() and
@@ -133,6 +136,9 @@ QtGui
* [QTBUG-7982] Added QImage::bitPlaneCount().
* [QTBUG-9072] Fixed alpha check for 1-bit-per-pixel images.
+ - QLineEdit
+ * [QTBUG-9823] Placeholder text is now correctly aligned with text.
+
- QPicture
* [QTBUG-4974] Printing QPictures containing text to a high resolution
QPrinter would in many cases cause incorrect character spacing.
@@ -286,8 +292,9 @@ Qt for Linux/X11
----------------
- QGtkStyle
* Fixed rtl issues with sliders (QTBUG-8986)
- * Fixed missing pressed appearance on scroll bar handles. (QTBUG-10396)
-
+ * Fixed missing pressed appearance on scroll bar handles. (QTBUG-10396)
+ * Fixed crash when creating QGtkStyle before QApplication. (QTBUG-10758)
+
- QFontDatabase
* [QTBUG-4428] Fixed regression when using bitmap fonts on some
Linux systems.
@@ -303,7 +310,12 @@ Qt for Linux/X11
Qt for Windows
--------------
- Popup windows now implicitly activate when shown. (QTBUG-7386)
-
+ - QComboBox [QTBUG-7552] Fix an issue where only "..." would be shown for
+ QComboBox with certain DPI settings.
+ - Fixed a problem where menus exec'ed on system tray icons did not
+ disappear. (QTBUG-7386)
+ - Improved look and feel for QWizard on Windows 7 and Vista. (QTBUG-9873),
+ (QTBUG-11974) and (QTBUG-6120)
- QLocalSocket
* Pipe handle leak fixed, when closing a QLocalSocket that still has
unwritten data. (QTBUG-7815)
@@ -315,7 +327,9 @@ Qt for Mac OS X
---------------
- QMacStyle
* Removed frame around statusbar items. (QTBUG-3574)
- * More native appearance of item view headers and frames. (QTBUG-10047)
+ * More native appearance of item view headers and frames. (QTBUG-10047)
+ * Increased spacing between tree view items. (QTBUG-10190)
+ * Removed frame around status bar items. (QTBUG-3574)
- QFontEngine
* Enable fractional metrics for the font engine on Mac in all
diff --git a/doc/src/declarative/qml-intro.qdoc b/doc/src/declarative/qml-intro.qdoc
index 63d6825..9130be0 100644
--- a/doc/src/declarative/qml-intro.qdoc
+++ b/doc/src/declarative/qml-intro.qdoc
@@ -58,7 +58,12 @@ would be a property.
The basic syntax of an \l{QML Elements}{element} is
-\snippet doc/src/snippets/declarative/qml-intro/basic-syntax.qml basic syntax
+\code
+SomeElement {
+ id: myObject
+ ... some other things here ...
+}
+\endcode
Here we are defining a new object. We specify its 'type' first as SomeElement.
Then within matching braces { ... } we specify the various parts of our
diff --git a/doc/src/declarative/qmlruntime.qdoc b/doc/src/declarative/qmlruntime.qdoc
index d44e774..9a84237 100644
--- a/doc/src/declarative/qmlruntime.qdoc
+++ b/doc/src/declarative/qmlruntime.qdoc
@@ -104,20 +104,22 @@ can be constructed directly instead. In this case, \c application.qml is
loaded as a QDeclarativeComponent instance rather than placed into a view:
\code
- #include <QCoreApplication>
+ #include <QApplication>
#include <QDeclarativeEngine>
+ #include <QDeclarativeContext>
+ #include <QDeclarativeComponent>
int main(int argc, char *argv[])
{
- QCoreApplication app(argc, argv);
+ QApplication app(argc, argv);
QDeclarativeEngine engine;
- QDeclarativeContext *windowContext = new QDeclarativeContext(engine.rootContext());
+ QDeclarativeContext *objectContext = new QDeclarativeContext(engine.rootContext());
QDeclarativeComponent component(&engine, "application.qml");
- QObject *window = component.create(windowContext);
+ QObject *object = component.create(objectContext);
- // ... delete window and windowContext when necessary
+ // ... delete object and objectContext when necessary
return app.exec();
}
diff --git a/doc/src/getting-started/gettingstartedqml.qdoc b/doc/src/getting-started/gettingstartedqml.qdoc
index a19d281..405e791 100644
--- a/doc/src/getting-started/gettingstartedqml.qdoc
+++ b/doc/src/getting-started/gettingstartedqml.qdoc
@@ -404,13 +404,9 @@
\image qml-texteditor2_menubar.png
- */
+ \section1 Building a Text Editor
- /*!
- \page qml-textEditor3.html
- \title Building a Text Editor
-
- \section1 Declaring a TextArea
+ \section2 Declaring a TextArea
Our text editor is not a text editor if it didn't contain an editable text area.
QML's \l {TextEdit}{TextEdit} element allows the declaration of a multi-line
@@ -451,7 +447,7 @@
}
\endcode
- \section1 Combining Components for the Text Editor
+ \section2 Combining Components for the Text Editor
We are now ready to create the layout of our text editor using QML. The text
editor has two components, the menu bar we created and the text area. QML allows
@@ -494,12 +490,8 @@
\image qml-texteditor3_texteditor.png
- */
-
- /*!
- \page qml-textEditor4
- \title Decorating the Text Editor
- \section1 Implementing a Drawer Interface
+ \section1 Decorating the Text Editor
+ \section2 Implementing a Drawer Interface
Our text editor looks simple and we need to decorate it. Using QML, we can declare
transitions and animate our text editor. Our menu bar is occupying one-third of the
@@ -652,7 +644,7 @@
The first color starts at \c 0.0 and the last color is at \c 1.0.
- \section2 Where to Go from Here
+ \section3 Where to Go from Here
We are finished building the user interface of a very simple text editor.
Going forward, the user interface is complete, and we can implement the
@@ -661,7 +653,7 @@
\image qml-texteditor4_texteditor.png
- \section1 Extending QML using Qt C++
+ \section2 Extending QML using Qt C++
Now that we have our text editor layout, we may now implement the text editor
functionalities in C++. Using QML with C++ enables us to create our application
@@ -672,7 +664,7 @@
we shall implement the load and save functions in C++ and export it as a plugin.
This way, we only need to load the QML file directly instead of running an executable.
- \section2 Exposing C++ Classes to QML
+ \section3 Exposing C++ Classes to QML
We will be implementing file loading and saving using Qt and C++. C++ classes
and functions can be used in QML by registering them. The class also needs to be
@@ -687,7 +679,7 @@
\o A \c qmldir file telling the qmlviewer tool where to find the plugin
\endlist
- \section2 Building a Qt Plugin
+ \section3 Building a Qt Plugin
To build a plugin, we need to set the following in a Qt project file. First,
the necessary sources, headers, and Qt modules need to be added into our
@@ -721,7 +713,7 @@
parent's \c plugins directory.
- \section2 Registering a Class into QML
+ \section3 Registering a Class into QML
\code
In dialogPlugin.h:
@@ -771,7 +763,7 @@
file to generate the necessary meta-object code.
- \section2 Creating QML Properties in a C++ class
+ \section3 Creating QML Properties in a C++ class
We can create QML elements and properties using C++ and
\l {The Meta-Object System}{Qt's Meta-Object System}. We can implement
@@ -925,7 +917,7 @@
\c make to build and transfer the plugin to the \c plugins directory.
- \section2 Importing a Plugin in QML
+ \section3 Importing a Plugin in QML
The qmlviewer tool imports files that are in the same directory as the
application. We can also create a \c qmldir file containing the locations of
@@ -948,7 +940,7 @@
\c TARGET field in the project file. The compiled plugin is in the \c plugins directory.
- \section2 Integrating a File Dialog into the File Menu
+ \section3 Integrating a File Dialog into the File Menu
Our \c FileMenu needs to display the \c FileDialog element, containing a list of
the text files in a directory thus allowing the user to select the file by
@@ -1038,7 +1030,7 @@
\image qml-texteditor5_filemenu.png
- \section1 Text Editor Completion
+ \section2 Text Editor Completion
\image qml-texteditor5_newfile.png
diff --git a/doc/src/images/symbian-draw-pixmap-sequence.png b/doc/src/images/symbian-draw-pixmap-sequence.png
new file mode 100644
index 0000000..05e3739
--- /dev/null
+++ b/doc/src/images/symbian-draw-pixmap-sequence.png
Binary files differ
diff --git a/doc/src/images/symbian-qt-draw-pixmap-sequence.png b/doc/src/images/symbian-qt-draw-pixmap-sequence.png
new file mode 100644
index 0000000..f7546f4
--- /dev/null
+++ b/doc/src/images/symbian-qt-draw-pixmap-sequence.png
Binary files differ
diff --git a/doc/src/images/symbian-qt-rendering-stack-non-screenplay.png b/doc/src/images/symbian-qt-rendering-stack-non-screenplay.png
new file mode 100644
index 0000000..9e1997d
--- /dev/null
+++ b/doc/src/images/symbian-qt-rendering-stack-non-screenplay.png
Binary files differ
diff --git a/doc/src/images/symbian-rendering-stack-non-screenplay.png b/doc/src/images/symbian-rendering-stack-non-screenplay.png
new file mode 100644
index 0000000..80cb078
--- /dev/null
+++ b/doc/src/images/symbian-rendering-stack-non-screenplay.png
Binary files differ
diff --git a/doc/src/platforms/platform-notes.qdoc b/doc/src/platforms/platform-notes.qdoc
index 94b9856..6f533ae 100644
--- a/doc/src/platforms/platform-notes.qdoc
+++ b/doc/src/platforms/platform-notes.qdoc
@@ -526,6 +526,56 @@
platform in use. If available, it is loaded in preference over the MMF
plugin. If the Helix plugin fails to load, the MMF plugin, if present on
the device, will be loaded instead.
+
+ \section1 UI Performance in devices prior to Symbian^3
+
+ Qt uses the QPainter class to perform low-level painting on widgets and
+ other paint devices. QPainter provides functions to draw complex shapes,
+ aligned text and pixmaps. It can also do vector path clipping, coordinate
+ transformations and Porter-Duff composition. If the underlying graphics
+ architecture does not support all of these operations then Qt uses the
+ raster graphics system for rendering.
+
+ Most of the Symbian devices prior to Symbian^3 use a non-ScreenPlay
+ graphics architecture which does not have native support for all functions
+ provided by QPainter. In non-ScreenPlay devices Qt uses the raster
+ graphics system by default which has a performance penalty when compared
+ to native Symbian rendering.
+
+ In order to be able to perform all functions provided by QPainter, the
+ raster graphics system needs to have pixel level framebuffer access. To
+ make this possible in non-ScreenPlay devices Qt has to create an
+ additional offscreen buffer that is the target for all Qt rendering
+ operations. Qt renders the widget tree to the offscreen buffer and the
+ offscreen buffer is blitted to the framebuffer via Symbian Window Server.
+
+ The following table shows the rendering stacks of native Symbian and Qt in
+ non-ScreenPlay devices.
+
+ \table
+ \header \o Symbian
+ \o Qt
+ \row \o \image symbian-rendering-stack-non-screenplay.png
+ \o \image symbian-qt-rendering-stack-non-screenplay.png
+ \endtable
+
+ The following diagrams show a simplified sequence of drawing a pixmap in
+ a non-ScreenPlay device.
+
+ \table
+ \header \o Symbian
+ \row \o \image symbian-draw-pixmap-sequence.png
+ \endtable
+
+ \table
+ \header \o Qt
+ \row \o \image symbian-qt-draw-pixmap-sequence.png
+ \endtable
+
+ When compared to a native Symbian application, Qt does an additional blit
+ to the offscreen buffer before drawing to the framebuffer. That is the
+ performance penalty which needs to be paid to get all functionality
+ provided by QPainter in non-ScreenPlay architecture.
*/
/*!
diff --git a/doc/src/platforms/supported-platforms.qdoc b/doc/src/platforms/supported-platforms.qdoc
index bb80ae5..6e9fb3d 100644
--- a/doc/src/platforms/supported-platforms.qdoc
+++ b/doc/src/platforms/supported-platforms.qdoc
@@ -64,18 +64,22 @@
\row \o Linux (32 and 64-bit)
\o gcc 4.2
\row \o Microsoft Windows XP
- \o gcc 4.4 (MinGW) (32-bit), MSVC 2003, 2005 (32 and 64-bit)
+ \o gcc 4.4 (MinGW) (32-bit), MSVC 2005 (32 and 64-bit)
\row \o Microsoft Windows Vista
\o MSVC 2005, 2008
\row \o Microsoft Windows Vista 64bit
\o MSVC 2008
- \row \o Apple Mac OS X 10.5 "Leopard" x86_64 (Carbon, Cocoa 32 and 64bit)
+ \row \o Microsoft Windows 7
+ \o MSVC 2008
+ \row \o Apple Mac OS X 10.6 "Snow Leopard"
+ \o As provided by Apple
+ \row \o Apple Mac OS X 10.5 "Leopard" x86_64 (Cocoa 32 and 64bit)
\o As provided by Apple
\row \o Embedded Linux QWS (ARM)
\o gcc (\l{http://www.codesourcery.com/}{Codesourcery version)}
\row \o Windows CE 5.0 (ARMv4i, x86, MIPS)
\o MSVC 2005 WinCE 5.0 Standard (x86, pocket, smart, mipsii)
- \row \o Symbian (Symbian/S60 3.1, 3.2 and 5.0)
+ \row \o Symbian (Symbian/S60 5.0)
\o RVCT 2.2 [build 686 or later], WINSCW 3.2.5 [build 482 or later], GCCE (for applications)
\endtable
@@ -90,19 +94,15 @@
\table
\header \o Platform
\o Compilers
- \row \o Windows XP, Vista
- \o gcc 3.4.2 (MinGW)
\row \o Windows 7
- \o MSVC 2008
- \row \o Apple Mac OS X 10.6 "Snow Leopard"
+ \o MSVC 2010
+ \row \o Apple Mac OS X 10.4 "Tiger" (Carbon)
\o As provided by Apple
- \row \o Apple Mac OS X 10.4 "Tiger"
+ \row \o Apple Mac OS X 10.5 "Leopard" (Carbon)
\o As provided by Apple
- \row \o HPUXi 11.11
- \o aCC 3.57, gcc 3.4
\row \o HPUXi 11.23
\o aCC 6.10
- \row \o Solaris 10 (UltraSparc, x86)
+ \row \o Solaris 10 UltraSparc
\o Sun Studio 12
\row \o AIX 6
\o Power5 xlC 7
@@ -114,8 +114,14 @@
\o gcc (\l{http://www.codesourcery.com/}{Codesourcery version)}
\row \o Embedded Linux X11 (ARM)
\o gcc (\l{http://www.scratchbox.org/}{Scratchbox)}
+ \row \o Windows CE 5.0 (ARMv4i, x86, MIPS)
+ \o MSVC 2005 WinCE 5.0 Standard (x86, pocket, smart, mipsii)
\row \o Windows CE 6.0 (ARMv4i, x86, MIPS)
\o MSVC 2008 WinCE 6.0 Professional
+ \row \o Maemo 5(Linux, ARM, X11)
+ \o gcc (\l{http://www.scratchbox.org/}{Scratchbox)}
+ \row \o Symbian (Symbian/S60 3.1, 3.2)
+ \o RVCT 2.2 [build 686 or later], WINSCW 3.2.5 [build 482 or later], GCCE (for applications)
\endtable
\section1 Tier 3 Platforms (Not supported by Nokia)
@@ -142,20 +148,12 @@
implied warranties of merchantability, fitness for a particular purpose, title and
non-infringement with regard to the Licensed Software.
- \section1 Planned Changes for Qt 4.7
+ \section1 Planned Changes for Qt 4.8
The following changes to the list of supported platforms are at time of publishing
- planned for Qt 4.7:
+ planned for Qt 4.8:
\list
- \o Upgrade Windows 7 to Tier 1
- \o Upgrade Mac OS X 10.6 to Tier 1
- \o Add support for Visual Studio 2010 (Tier 2)
- \o Move support for Carbon implementation of Qt on Mac OS X from Tier 1 to Tier 2
- \o Drop support for MinGW 3.4
- \o Drop support for Visual Studio 2003
- \o Drop support for HP-UX on PA-RISC
- \o Drop support for Windows Mobile 5
- \o Drop support for OpenGL ES Common Lite 1.0
+ \o Plans not yet released
\endlist
*/
diff --git a/doc/src/snippets/declarative/qml-intro/basic-syntax.qml b/doc/src/snippets/declarative/qml-intro/basic-syntax.qml
deleted file mode 100644
index 686a927..0000000
--- a/doc/src/snippets/declarative/qml-intro/basic-syntax.qml
+++ /dev/null
@@ -1,48 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the QtDeclarative module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** You may use this file under the terms of the BSD license as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-** * Redistributions of source code must retain the above copyright
-** notice, this list of conditions and the following disclaimer.
-** * 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.
-** * Neither the name of Nokia Corporation 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.
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-// Note: this file is not intended to be run.
-
-//! [basic syntax]
-SomeElement {
- id: myObject
- ... some other things here ...
-}
-//! [basic syntax]
diff --git a/doc/src/snippets/declarative/qml-intro/sequential-animation3.qml b/doc/src/snippets/declarative/qml-intro/sequential-animation3.qml
index f83a966..6926f8a 100644
--- a/doc/src/snippets/declarative/qml-intro/sequential-animation3.qml
+++ b/doc/src/snippets/declarative/qml-intro/sequential-animation3.qml
@@ -39,6 +39,8 @@
****************************************************************************/
//! [document]
+import Qt 4.7
+
Rectangle {
id: mainRec
width: 600
diff --git a/examples/sql/masterdetail/mainwindow.cpp b/examples/sql/masterdetail/mainwindow.cpp
index b8c9df6..2ef8ad0 100644
--- a/examples/sql/masterdetail/mainwindow.cpp
+++ b/examples/sql/masterdetail/mainwindow.cpp
@@ -189,9 +189,9 @@ void MainWindow::deleteAlbum()
QMessageBox::StandardButton button;
button = QMessageBox::question(this, tr("Delete Album"),
- QString(tr("Are you sure you want to " \
- "delete '%1' by '%2'?"))
- .arg(title).arg(artist),
+ tr("Are you sure you want to "
+ "delete '%1' by '%2'?")
+ .arg(title, artist),
QMessageBox::Yes | QMessageBox::No);
if (button == QMessageBox::Yes) {
diff --git a/examples/tools/treemodelcompleter/mainwindow.cpp b/examples/tools/treemodelcompleter/mainwindow.cpp
index 0448e9d..cfe003a 100644
--- a/examples/tools/treemodelcompleter/mainwindow.cpp
+++ b/examples/tools/treemodelcompleter/mainwindow.cpp
@@ -241,6 +241,6 @@ void MainWindow::changeCase(int cs)
void MainWindow::updateContentsLabel(const QString& sep)
{
- contentsLabel->setText(QString(tr("Type path from model above with items at each level separated by a '%1'")).arg(sep));
+ contentsLabel->setText(tr("Type path from model above with items at each level separated by a '%1'").arg(sep));
}
diff --git a/examples/xmlpatterns/filetree/mainwindow.cpp b/examples/xmlpatterns/filetree/mainwindow.cpp
index 5b9b0c3..85348f3 100644
--- a/examples/xmlpatterns/filetree/mainwindow.cpp
+++ b/examples/xmlpatterns/filetree/mainwindow.cpp
@@ -140,7 +140,7 @@ void MainWindow::loadDirectory(const QString &directory)
QXmlFormatter formatter(query, &buffer);
query.evaluateTo(&formatter);
- treeInfo->setText((QString(tr("Model of %1 output as XML.")).arg(directory)));
+ treeInfo->setText(tr("Model of %1 output as XML.").arg(directory));
fileTree->setText(QString::fromLatin1(output.constData()));
evaluateResult();
//! [6]
diff --git a/mkspecs/common/symbian/symbian.conf b/mkspecs/common/symbian/symbian.conf
index 04b81b0..61cc7d9 100644
--- a/mkspecs/common/symbian/symbian.conf
+++ b/mkspecs/common/symbian/symbian.conf
@@ -117,11 +117,12 @@ QMAKE_GZIP = gzip -9f
QT_ARCH = symbian
+load(qt_config)
+
# These directories must match what configure uses for QT_INSTALL_PLUGINS and QT_INSTALL_IMPORTS
QT_PLUGINS_BASE_DIR = /resource/qt$${QT_LIBINFIX}/plugins
QT_IMPORTS_BASE_DIR = /resource/qt/imports
-load(qt_config)
load(symbian/platform_paths)
# The Symbian^3 PDK does not necessarily contain the required sis files.
diff --git a/mkspecs/features/win32/msvc_mp.prf b/mkspecs/features/win32/msvc_mp.prf
new file mode 100644
index 0000000..d6dea14
--- /dev/null
+++ b/mkspecs/features/win32/msvc_mp.prf
@@ -0,0 +1,2 @@
+QMAKE_CFLAGS += $$QMAKE_CFLAGS_MP
+QMAKE_CXXFLAGS += $$QMAKE_CXXFLAGS_MP
diff --git a/mkspecs/win32-msvc2008/qmake.conf b/mkspecs/win32-msvc2008/qmake.conf
index 9805e90..9a69aaa 100644
--- a/mkspecs/win32-msvc2008/qmake.conf
+++ b/mkspecs/win32-msvc2008/qmake.conf
@@ -23,6 +23,7 @@ QMAKE_CFLAGS_RELEASE = -O2 -MD
QMAKE_CFLAGS_DEBUG = -Zi -MDd
QMAKE_CFLAGS_YACC =
QMAKE_CFLAGS_LTCG = -GL
+QMAKE_CFLAGS_MP = -MP
QMAKE_CXX = $$QMAKE_CC
QMAKE_CXXFLAGS = $$QMAKE_CFLAGS
@@ -32,6 +33,7 @@ QMAKE_CXXFLAGS_RELEASE = $$QMAKE_CFLAGS_RELEASE
QMAKE_CXXFLAGS_DEBUG = $$QMAKE_CFLAGS_DEBUG
QMAKE_CXXFLAGS_YACC = $$QMAKE_CFLAGS_YACC
QMAKE_CXXFLAGS_LTCG = $$QMAKE_CFLAGS_LTCG
+QMAKE_CXXFLAGS_MP = $$QMAKE_CFLAGS_MP
QMAKE_CXXFLAGS_STL_ON = -EHsc
QMAKE_CXXFLAGS_STL_OFF =
QMAKE_CXXFLAGS_RTTI_ON = -GR
diff --git a/mkspecs/win32-msvc2010/qmake.conf b/mkspecs/win32-msvc2010/qmake.conf
index 28d4d3c..8331c14 100644
--- a/mkspecs/win32-msvc2010/qmake.conf
+++ b/mkspecs/win32-msvc2010/qmake.conf
@@ -23,6 +23,7 @@ QMAKE_CFLAGS_RELEASE = -O2 -MD
QMAKE_CFLAGS_DEBUG = -Zi -MDd
QMAKE_CFLAGS_YACC =
QMAKE_CFLAGS_LTCG = -GL
+QMAKE_CFLAGS_MP = -MP
QMAKE_CXX = $$QMAKE_CC
QMAKE_CXXFLAGS = $$QMAKE_CFLAGS
@@ -32,6 +33,7 @@ QMAKE_CXXFLAGS_RELEASE = $$QMAKE_CFLAGS_RELEASE
QMAKE_CXXFLAGS_DEBUG = $$QMAKE_CFLAGS_DEBUG
QMAKE_CXXFLAGS_YACC = $$QMAKE_CFLAGS_YACC
QMAKE_CXXFLAGS_LTCG = $$QMAKE_CFLAGS_LTCG
+QMAKE_CXXFLAGS_MP = $$QMAKE_CFLAGS_MP
QMAKE_CXXFLAGS_STL_ON = -EHsc
QMAKE_CXXFLAGS_STL_OFF =
QMAKE_CXXFLAGS_RTTI_ON = -GR
diff --git a/qmake/Makefile.win32 b/qmake/Makefile.win32
index b58757c..01387bf 100644
--- a/qmake/Makefile.win32
+++ b/qmake/Makefile.win32
@@ -24,9 +24,11 @@ LINK = link
#
!if "$(QMAKESPEC)" == "win32-msvc2005"
CFLAGS = /Zc:wchar_t-
+!elseif "$(QMAKESPEC)" == "win32-msvc2008" || "$(QMAKESPEC)" == "win32-msvc2010"
+CFLAGS = /MP
!endif
-CFLAGS = -c -Fo$@ \
+CFLAGS_BARE = -c -Fo./ \
-W3 -nologo -O2 \
-I. -Igenerators -Igenerators\unix -Igenerators\win32 -Igenerators\mac -Igenerators\symbian \
-I$(BUILD_PATH)\include -I$(BUILD_PATH)\include\QtCore \
@@ -37,42 +39,23 @@ CFLAGS = -c -Fo$@ \
-I$(SOURCE_PATH)\tools\shared \
-DQT_NO_TEXTCODEC -DQT_NO_UNICODETABLES -DQT_LITE_COMPONENT -DQT_NODLL -DQT_NO_STL \
-DQT_NO_COMPRESS -DUNICODE -DHAVE_QCONFIG_CPP -DQT_BUILD_QMAKE -DQT_NO_THREAD \
- -DQT_NO_QOBJECT -DQT_NO_GEOM_VARIANT -DQT_NO_DATASTREAM -DQT_NO_PCRE -DQT_BOOTSTRAPPED \
- $(CFLAGS)
-CXXFLAGS = $(CFLAGS)
+ -DQT_NO_QOBJECT -DQT_NO_GEOM_VARIANT -DQT_NO_DATASTREAM -DQT_NO_PCRE -DQT_BOOTSTRAPPED
+CFLAGS = -Yuqmake_pch.h -FIqmake_pch.h -Fpqmake_pch.pch $(CFLAGS_BARE) $(CFLAGS)
+
+CXXFLAGS_BARE = $(CFLAGS_BARE)
+CXXFLAGS = $(CFLAGS)
+
LFLAGS =
LIBS = ole32.lib advapi32.lib
LINKQMAKE = $(LINK) $(LFLAGS) -OUT:qmake.exe $(OBJS) $(QTOBJS) $(LIBS)
ADDCLEAN = vc60.pdb vc70.pdb qmake.pdb qmake.ilk
-!ELSE
-#
-# specific stuff for Borland make
-#
-!if !$d(BCB)
-BCB = $(MAKEDIR)\..
-!endif
-CXX = bcc32
-CFLAGS = -c -o$@ \
- -tWR -w -w-hid -w-use -O1 \
- -I. -Igenerators -Igenerators\unix -Igenerators\win32 -Igenerators\mac -Igenerators\symbian \
- -I$(BUILD_PATH)\include -I$(BUILD_PATH)\include\QtCore \
- -I$(SOURCE_PATH)\include -I$(SOURCE_PATH)\include\QtCore \
- -I$(BUILD_PATH)\src\corelib\global \
- -I$(SOURCE_PATH)\mkspecs\$(QMAKESPEC) \
- -I$(SOURCE_PATH)\tools\shared \
- -DQT_NO_TEXTCODEC -DQT_NO_UNICODETABLES -DQT_LITE_COMPONENT -DQT_NODLL -DQT_NO_STL \
- -DQT_NO_COMPRESS -DUNICODE -DHAVE_QCONFIG_CPP -DQT_BUILD_QMAKE -DQT_NO_THREAD \
- -DQT_NO_QOBJECT -DQT_NO_GEOM_VARIANT
-CXXFLAGS = $(CFLAGS)
-LFLAGS = -L$(BCB)\lib -c -x -Gn -ap -Tpe c0x32.obj
-LIBS = import32.lib cw32i.lib
-LINKQMAKE = ilink32 $(LFLAGS) $(OBJS) $(QTOBJS), qmake.exe,,$(LIBS)
-ADDCLEAN = qmake.tds
+!ELSE
+!ERROR Unsupported compiler for this Makefile
!ENDIF
#qmake code
-OBJS = project.obj main.obj makefile.obj unixmake.obj unixmake2.obj mingw_make.obj \
+OBJS = qmake_pch.obj project.obj main.obj makefile.obj unixmake.obj unixmake2.obj mingw_make.obj \
option.obj winmakefile.obj projectgenerator.obj property.obj meta.obj \
makefiledeps.obj metamakefile.obj xmloutput.obj pbuilder_pbx.obj \
borland_bmake.obj msvc_nmake.obj msvc_vcproj.obj msvc_vcxproj.obj \
@@ -137,77 +120,9 @@ qmake.exe: $(OBJS) $(QTOBJS)
-copy qmake.exe $(BUILD_PATH)\bin\qmake.exe
clean::
- -del qbitarray.obj
- -del qbuffer.obj
- -del qcryptographichash.obj
- -del qlinkedlist.obj
- -del qfsfileengine.obj
- -del qfsfileengine_iterator.obj
- -del qbytearray.obj
- -del qvsnprintf.obj
- -del qbytearraymatcher.obj
- -del qdatetime.obj
- -del qdir.obj
- -del qdiriterator.obj
- -del qfile.obj
- -del qtemporaryfile.obj
- -del qabstractfileengine.obj
- -del qfsfileengine_win.obj
- -del qfsfileengine_iterator_win.obj
- -del qfileinfo.obj
- -del qglobal.obj
- -del qhash.obj
- -del qiodevice.obj
- -del qlist.obj
- -del qlocale.obj
- -del qmalloc.obj
- -del qmap.obj
- -del qregexp.obj
- -del qtextcodec.obj
- -del qutfcodec.obj
- -del qstring.obj
- -del qstringlist.obj
- -del qtextstream.obj
- -del qdatastream.obj
- -del quuid.obj
- -del qvector.obj
- -del qsettings.obj
- -del qlibraryinfo.obj
- -del qvariant.obj
- -del qurl.obj
- -del qsettings_win.obj
- -del qmetatype.obj
- -del project.obj
- -del main.obj
- -del makefile.obj
- -del unixmake.obj
- -del unixmake2.obj
- -del mingw_make.obj
- -del option.obj
- -del winmakefile.obj
- -del projectgenerator.obj
- -del property.obj
- -del meta.obj
- -del makefiledeps.obj
- -del metamakefile.obj
- -del xmloutput.obj
- -del borland_bmake.obj
- -del msvc_nmake.obj
- -del msvc_vcproj.obj
- -del msvc_vcxproj.obj
- -del msvc_objectmodel.obj
- -del msbuild_objectmodel.obj
- -del symmake.obj
- -del symmake_abld.obj
- -del symmake_sbsv2.obj
- -del symbiancommon.obj
- -del initprojectdeploy_symbian.obj
- -del registry.obj
- -del epocroot.obj
- -del pbuilder_pbx.obj
- -del qxmlstream.obj
- -del qxmlutils.obj
- -del qnumeric.obj
+ -del $(QTOBJS)
+ -del $(OBJS)
+ -del qmake_pch.pch
-del vc60.pdb
-del vc70.pdb
-del qmake.pdb
@@ -229,227 +144,53 @@ distclean:: clean
.cxx.obj:
$(CXX) $(CXXFLAGS) $<
-qsettings_win.obj: $(SOURCE_PATH)\src\corelib\io\qsettings_win.cpp
- $(CXX) $(CXXFLAGS) $(SOURCE_PATH)\src\corelib\io\qsettings_win.cpp
-
-qsettings.obj: $(SOURCE_PATH)\src\corelib\io\qsettings.cpp
- $(CXX) $(CXXFLAGS) $(SOURCE_PATH)\src\corelib\io\qsettings.cpp
-
-qlibraryinfo.obj: $(SOURCE_PATH)\src\corelib\global\qlibraryinfo.cpp
- $(CXX) $(CXXFLAGS) $(SOURCE_PATH)\src\corelib\global\qlibraryinfo.cpp
-
-qnumeric.obj: $(SOURCE_PATH)\src\corelib\global\qnumeric.cpp
- $(CXX) $(CXXFLAGS) $(SOURCE_PATH)\src\corelib\global\qnumeric.cpp
-
-qvariant.obj: $(SOURCE_PATH)\src\corelib\kernel\qvariant.cpp
- $(CXX) $(CXXFLAGS) $(SOURCE_PATH)\src\corelib\kernel\qvariant.cpp
-
-qurl.obj: $(SOURCE_PATH)\src\corelib\io\qurl.cpp
- $(CXX) $(CXXFLAGS) $(SOURCE_PATH)\src\corelib\io\qurl.cpp
-
-qtextstream.obj: $(SOURCE_PATH)\src\corelib\io\qtextstream.cpp
- $(CXX) $(CXXFLAGS) $(SOURCE_PATH)\src\corelib\io\qtextstream.cpp
-
-qdatastream.obj: $(SOURCE_PATH)\src\corelib\io\qdatastream.cpp
- $(CXX) $(CXXFLAGS) $(SOURCE_PATH)\src\corelib\io\qdatastream.cpp
-
-qiodevice.obj: $(SOURCE_PATH)\src\corelib\io\qiodevice.cpp
- $(CXX) $(CXXFLAGS) $(SOURCE_PATH)\src\corelib\io\qiodevice.cpp
-
-qmalloc.obj: $(SOURCE_PATH)\src\corelib\global\qmalloc.cpp
- $(CXX) $(CXXFLAGS) $(SOURCE_PATH)\src\corelib\global\qmalloc.cpp
-
-qglobal.obj: $(SOURCE_PATH)\src\corelib\global\qglobal.cpp
- $(CXX) $(CXXFLAGS) $(SOURCE_PATH)\src\corelib\global\qglobal.cpp
-
-qhash.obj: $(SOURCE_PATH)\src\corelib\tools\qhash.cpp
- $(CXX) $(CXXFLAGS) $(SOURCE_PATH)\src\corelib\tools\qhash.cpp
-
-qbytearray.obj: $(SOURCE_PATH)\src\corelib\tools\qbytearray.cpp
- $(CXX) $(CXXFLAGS) $(SOURCE_PATH)\src\corelib\tools\qbytearray.cpp
-
-qcryptographichash.obj: $(SOURCE_PATH)\src\corelib\tools\qcryptographichash.cpp
- $(CXX) $(CXXFLAGS) $(SOURCE_PATH)\src\corelib\tools\qcryptographichash.cpp
-
-qvsnprintf.obj: $(SOURCE_PATH)\src\corelib\tools\qvsnprintf.cpp
- $(CXX) $(CXXFLAGS) $(SOURCE_PATH)\src\corelib\tools\qvsnprintf.cpp
-
-qbytearraymatcher.obj: $(SOURCE_PATH)\src\corelib\tools\qbytearraymatcher.cpp
- $(CXX) $(CXXFLAGS) $(SOURCE_PATH)\src\corelib\tools\qbytearraymatcher.cpp
-
-qchar.obj: $(SOURCE_PATH)\src\corelib\tools\qchar.cpp
- $(CXX) $(CXXFLAGS) $(SOURCE_PATH)\src\corelib\tools\qchar.cpp
-
-qutfcodec.obj: $(SOURCE_PATH)\src\corelib\codecs\qutfcodec.cpp
- $(CXX) $(CXXFLAGS) $(SOURCE_PATH)\src\corelib\codecs\qutfcodec.cpp
-
-qstring.obj: $(SOURCE_PATH)\src\corelib\tools\qstring.cpp
- $(CXX) $(CXXFLAGS) $(SOURCE_PATH)\src\corelib\tools\qstring.cpp
-
-qstringmatcher.obj: $(SOURCE_PATH)\src\corelib\tools\qstringmatcher.cpp
- $(CXX) $(CXXFLAGS) $(SOURCE_PATH)\src\corelib\tools\qstringmatcher.cpp
-
-qlocale.obj: $(SOURCE_PATH)\src\corelib\tools\qlocale.cpp
- $(CXX) $(CXXFLAGS) $(SOURCE_PATH)\src\corelib\tools\qlocale.cpp
-
-quuid.obj: $(SOURCE_PATH)\src\corelib\plugin\quuid.cpp
- $(CXX) $(CXXFLAGS) $(SOURCE_PATH)\src\corelib\plugin\quuid.cpp
-
-qbuffer.obj: $(SOURCE_PATH)\src\corelib\io\qbuffer.cpp
- $(CXX) $(CXXFLAGS) $(SOURCE_PATH)\src\corelib\io\qbuffer.cpp
-
-qlist.obj: $(SOURCE_PATH)\src\corelib\tools\qlist.cpp
- $(CXX) $(CXXFLAGS) $(SOURCE_PATH)\src\corelib\tools\qlist.cpp
-
-qlinkedlist.obj: $(SOURCE_PATH)\src\corelib\tools\qlinkedlist.cpp
- $(CXX) $(CXXFLAGS) $(SOURCE_PATH)\src\corelib\tools\qlinkedlist.cpp
-
-qfile.obj: $(SOURCE_PATH)\src\corelib\io\qfile.cpp
- $(CXX) $(CXXFLAGS) $(SOURCE_PATH)\src\corelib\io\qfile.cpp
-
-qtemporaryfile.obj: $(SOURCE_PATH)\src\corelib\io\qtemporaryfile.cpp
- $(CXX) $(CXXFLAGS) $(SOURCE_PATH)\src\corelib\io\qtemporaryfile.cpp
-
-qfsfileengine_win.obj: $(SOURCE_PATH)\src\corelib\io\qfsfileengine_win.cpp
- $(CXX) $(CXXFLAGS) $(SOURCE_PATH)\src\corelib\io\qfsfileengine_win.cpp
-
-qfsfileengine_iterator_win.obj: $(SOURCE_PATH)\src\corelib\io\qfsfileengine_iterator_win.cpp
- $(CXX) $(CXXFLAGS) $(SOURCE_PATH)\src\corelib\io\qfsfileengine_iterator_win.cpp
-
-qfsfileengine.obj: $(SOURCE_PATH)\src\corelib\io\qfsfileengine.cpp
- $(CXX) $(CXXFLAGS) $(SOURCE_PATH)\src\corelib\io\qfsfileengine.cpp
-
-qfsfileengine_iterator.obj: $(SOURCE_PATH)\src\corelib\io\qfsfileengine_iterator.cpp
- $(CXX) $(CXXFLAGS) $(SOURCE_PATH)\src\corelib\io\qfsfileengine_iterator.cpp
-
-qabstractfileengine.obj: $(SOURCE_PATH)\src\corelib\io\qabstractfileengine.cpp
- $(CXX) $(CXXFLAGS) $(SOURCE_PATH)\src\corelib\io\qabstractfileengine.cpp
-
-qtextcodec.obj: $(SOURCE_PATH)\src\corelib\codecs\qtextcodec.cpp
- $(CXX) $(CXXFLAGS) $(SOURCE_PATH)\src\corelib\codecs\qtextcodec.cpp
-
-qregexp.obj: $(SOURCE_PATH)\src\corelib\tools\qregexp.cpp
- $(CXX) $(CXXFLAGS) $(SOURCE_PATH)\src\corelib\tools\qregexp.cpp
-
-qvector.obj: $(SOURCE_PATH)\src\corelib\tools\qvector.cpp
- $(CXX) $(CXXFLAGS) $(SOURCE_PATH)\src\corelib\tools\qvector.cpp
+qmake_pch.obj:
+ $(CXX) $(CXXFLAGS_BARE) -c -Yc -Fpqmake_pch.pch -TP qmake_pch.h
-qbitarray.obj: $(SOURCE_PATH)\src\corelib\tools\qbitarray.cpp
- $(CXX) $(CXXFLAGS) $(SOURCE_PATH)\src\corelib\tools\qbitarray.cpp
-
-qdir.obj: $(SOURCE_PATH)\src\corelib\io\qdir.cpp
- $(CXX) $(CXXFLAGS) $(SOURCE_PATH)\src\corelib\io\qdir.cpp
-
-qdiriterator.obj: $(SOURCE_PATH)\src\corelib\io\qdiriterator.cpp
- $(CXX) $(CXXFLAGS) $(SOURCE_PATH)\src\corelib\io\qdiriterator.cpp
-
-qmetatype.obj: $(SOURCE_PATH)\src\corelib\kernel\qmetatype.cpp
- $(CXX) $(CXXFLAGS) $(SOURCE_PATH)\src\corelib\kernel\qmetatype.cpp
-
-qfileinfo.obj: $(SOURCE_PATH)\src\corelib\io\qfileinfo.cpp
- $(CXX) $(CXXFLAGS) $(SOURCE_PATH)\src\corelib\io\qfileinfo.cpp
-
-qdatetime.obj: $(SOURCE_PATH)\src\corelib\tools\qdatetime.cpp
- $(CXX) $(CXXFLAGS) $(SOURCE_PATH)\src\corelib\tools\qdatetime.cpp
-
-qstringlist.obj: $(SOURCE_PATH)\src\corelib\tools\qstringlist.cpp
- $(CXX) $(CXXFLAGS) $(SOURCE_PATH)\src\corelib\tools\qstringlist.cpp
-
-qmap.obj: $(SOURCE_PATH)\src\corelib\tools\qmap.cpp
- $(CXX) $(CXXFLAGS) $(SOURCE_PATH)\src\corelib\tools\qmap.cpp
-
-qunicodetables.obj: $(SOURCE_PATH)\src\corelib\tools\qunicodetables.cpp
- $(CXX) $(CXXFLAGS) $(SOURCE_PATH)\src\corelib\tools\qunicodetables.cpp
-
-makefile.obj: $(SOURCE_PATH)/qmake/generators\makefile.cpp
- $(CXX) $(CXXFLAGS) generators\makefile.cpp
-
-unixmake.obj: $(SOURCE_PATH)/qmake/generators\unix\unixmake.cpp
- $(CXX) $(CXXFLAGS) generators\unix\unixmake.cpp
-
-unixmake2.obj: $(SOURCE_PATH)/qmake/generators\unix\unixmake2.cpp
- $(CXX) $(CXXFLAGS) generators\unix\unixmake2.cpp
-
-winmakefile.obj: $(SOURCE_PATH)/qmake/generators/win32/winmakefile.cpp
- $(CXX) $(CXXFLAGS) generators/win32/winmakefile.cpp
-
-borland_bmake.obj: $(SOURCE_PATH)/qmake/generators/win32/borland_bmake.cpp
- $(CXX) $(CXXFLAGS) generators/win32/borland_bmake.cpp
-
-mingw_make.obj: $(SOURCE_PATH)/qmake/generators/win32/mingw_make.cpp
- $(CXX) $(CXXFLAGS) generators/win32/mingw_make.cpp
-
-msvc_nmake.obj: $(SOURCE_PATH)/qmake/generators/win32/msvc_nmake.cpp
- $(CXX) $(CXXFLAGS) generators/win32/msvc_nmake.cpp
-
-msvc_vcproj.obj: $(SOURCE_PATH)/qmake/generators/win32/msvc_vcproj.cpp
- $(CXX) $(CXXFLAGS) generators/win32/msvc_vcproj.cpp
-
-msvc_vcxproj.obj: $(SOURCE_PATH)/qmake/generators/win32/msvc_vcxproj.cpp
- $(CXX) $(CXXFLAGS) generators/win32/msvc_vcxproj.cpp
-
-msvc_objectmodel.obj: $(SOURCE_PATH)/qmake/generators/win32/msvc_objectmodel.cpp
- $(CXX) $(CXXFLAGS) generators/win32/msvc_objectmodel.cpp
-
-msbuild_objectmodel.obj: $(SOURCE_PATH)/qmake/generators/win32/msbuild_objectmodel.cpp
- $(CXX) $(CXXFLAGS) generators/win32/msbuild_objectmodel.cpp
-
-symmake.obj: $(SOURCE_PATH)/qmake/generators/symbian/symmake.cpp
- $(CXX) $(CXXFLAGS) generators/symbian/symmake.cpp
-
-symmake_abld.obj: $(SOURCE_PATH)/qmake/generators/symbian/symmake_abld.cpp
- $(CXX) $(CXXFLAGS) generators/symbian/symmake_abld.cpp
-
-symmake_sbsv2.obj: $(SOURCE_PATH)/qmake/generators/symbian/symmake_sbsv2.cpp
- $(CXX) $(CXXFLAGS) generators/symbian/symmake_sbsv2.cpp
-
-symbiancommon.obj: $(SOURCE_PATH)/qmake/generators/symbian/symbiancommon.cpp
- $(CXX) $(CXXFLAGS) generators/symbian/symbiancommon.cpp
-
-initprojectdeploy_symbian.obj: $(SOURCE_PATH)/qmake/generators/symbian/initprojectdeploy_symbian.cpp
- $(CXX) $(CXXFLAGS) generators/symbian/initprojectdeploy_symbian.cpp
+{$(SOURCE_PATH)\qmake\generators\mac}.cpp{}.obj::
+ $(CXX) $(CXXFLAGS) $<
-registry.obj: $(SOURCE_PATH)/tools/shared/windows/registry.cpp
- $(CXX) $(CXXFLAGS) $(SOURCE_PATH)/tools/shared/windows/registry.cpp
+{$(SOURCE_PATH)\qmake\generators\symbian}.cpp{}.obj::
+ $(CXX) $(CXXFLAGS) $<
-epocroot.obj: $(SOURCE_PATH)/tools/shared/symbian/epocroot.cpp
- $(CXX) $(CXXFLAGS) $(SOURCE_PATH)/tools/shared/symbian/epocroot.cpp
+{$(SOURCE_PATH)\qmake\generators\unix}.cpp{}.obj::
+ $(CXX) $(CXXFLAGS) $<
-md5.obj: $(SOURCE_PATH)\src\3rdparty\md5\md5.cpp
- $(CXX) $(CXXFLAGS) $(SOURCE_PATH)\src\3rdparty\md5\md5.cpp
+{$(SOURCE_PATH)\qmake\generators\win32}.cpp{}.obj::
+ $(CXX) $(CXXFLAGS) $<
-project.obj: $(SOURCE_PATH)/qmake/project.cpp $(SOURCE_PATH)/qmake/project.h $(SOURCE_PATH)/qmake/option.h
- $(CXX) $(CXXFLAGS) project.cpp
+{$(SOURCE_PATH)\qmake\generators}.cpp{}.obj::
+ $(CXX) $(CXXFLAGS) $<
-meta.obj: $(SOURCE_PATH)/qmake/meta.cpp $(SOURCE_PATH)/qmake/project.h $(SOURCE_PATH)/qmake/option.h
- $(CXX) $(CXXFLAGS) meta.cpp
+{$(SOURCE_PATH)\qmake}.cpp{}.obj::
+ $(CXX) $(CXXFLAGS) $<
-main.obj: $(SOURCE_PATH)/qmake/main.cpp $(SOURCE_PATH)/qmake/project.h
- $(CXX) $(CXXFLAGS) main.cpp
+{$(SOURCE_PATH)\src\3rdparty\md5}.cpp{}.obj::
+ $(CXX) $(CXXFLAGS) $<
-option.obj: $(SOURCE_PATH)/qmake/option.cpp $(SOURCE_PATH)/qmake/option.h
- $(CXX) $(CXXFLAGS) option.cpp
+{$(SOURCE_PATH)\src\corelib\codecs}.cpp{}.obj::
+ $(CXX) $(CXXFLAGS) $<
-property.obj: $(SOURCE_PATH)/qmake/property.cpp $(SOURCE_PATH)/qmake/project.h $(SOURCE_PATH)/qmake/option.h
- $(CXX) $(CXXFLAGS) property.cpp
+{$(SOURCE_PATH)\src\corelib\global}.cpp{}.obj::
+ $(CXX) $(CXXFLAGS) $<
-projectgenerator.obj: $(SOURCE_PATH)/qmake/generators/projectgenerator.cpp
- $(CXX) $(CXXFLAGS) generators/projectgenerator.cpp
+{$(SOURCE_PATH)\src\corelib\io}.cpp{}.obj::
+ $(CXX) $(CXXFLAGS) $<
-pbuilder_pbx.obj: $(SOURCE_PATH)/qmake/generators/mac/pbuilder_pbx.cpp
- $(CXX) $(CXXFLAGS) generators/mac/pbuilder_pbx.cpp
+{$(SOURCE_PATH)\src\corelib\kernel}.cpp{}.obj::
+ $(CXX) $(CXXFLAGS) $<
-makefiledeps.obj: $(SOURCE_PATH)/qmake/generators/makefiledeps.cpp
- $(CXX) $(CXXFLAGS) generators/makefiledeps.cpp
+{$(SOURCE_PATH)\src\corelib\plugin}.cpp{}.obj::
+ $(CXX) $(CXXFLAGS) $<
-metamakefile.obj: $(SOURCE_PATH)/qmake/generators/metamakefile.cpp
- $(CXX) $(CXXFLAGS) generators/metamakefile.cpp
+{$(SOURCE_PATH)\src\corelib\tools}.cpp{}.obj::
+ $(CXX) $(CXXFLAGS) $<
-xmloutput.obj: $(SOURCE_PATH)/qmake/generators/xmloutput.cpp
- $(CXX) $(CXXFLAGS) generators/xmloutput.cpp
+{$(SOURCE_PATH)\src\corelib\xml}.cpp{}.obj::
+ $(CXX) $(CXXFLAGS) $<
-qxmlstream.obj: $(SOURCE_PATH)\src\corelib\xml\qxmlstream.cpp
- $(CXX) $(CXXFLAGS) $(SOURCE_PATH)\src\corelib\xml\qxmlstream.cpp
+{$(SOURCE_PATH)\tools\shared\symbian}.cpp{}.obj::
+ $(CXX) $(CXXFLAGS) $<
-qxmlutils.obj: $(SOURCE_PATH)\src\corelib\xml\qxmlutils.cpp
- $(CXX) $(CXXFLAGS) $(SOURCE_PATH)\src\corelib\xml\qxmlutils.cpp
+{$(SOURCE_PATH)\tools\shared\windows}.cpp{}.obj::
+ $(CXX) $(CXXFLAGS) $<
diff --git a/src/3rdparty/javascriptcore/JavaScriptCore/ChangeLog b/src/3rdparty/javascriptcore/JavaScriptCore/ChangeLog
index 93431df..fbaf5d2 100644
--- a/src/3rdparty/javascriptcore/JavaScriptCore/ChangeLog
+++ b/src/3rdparty/javascriptcore/JavaScriptCore/ChangeLog
@@ -1,3 +1,39 @@
+2010-06-18 Tucker Jay <jay.tucker@nokia.com>
+
+ Reviewed by NOBODY (OOPS!).
+
+ [Symbian] Lazy commit of memory required in JSC register file
+ https://bugs.webkit.org/show_bug.cgi?id=34349
+
+ * JavaScriptCore.pro: Added 1 new Symbian source file
+ * interpreter/RegisterFile.cpp:
+ (JSC::RegisterFile::~RegisterFile):
+ * interpreter/RegisterFile.h:
+ (JSC::RegisterFile::):
+ (JSC::RegisterFile::start):
+ (JSC::RegisterFile::end):
+ (JSC::RegisterFile::size):
+ (JSC::RegisterFile::setNumGlobals):
+ (JSC::RegisterFile::numGlobals):
+ (JSC::RegisterFile::maxGlobals):
+ (JSC::RegisterFile::lastGlobal):
+ (JSC::RegisterFile::markGlobals):
+ (JSC::RegisterFile::markCallFrames):
+ (JSC::isPageAligned):
+ (JSC::RegisterFile::RegisterFile):
+ (JSC::RegisterFile::shrink):
+ (JSC::RegisterFile::grow):
+ * wtf/symbian/RegisterFileAllocatorSymbian.cpp: Added.
+ (WTF::RegisterFileAllocator::RegisterFileAllocator):
+ Helper class to allocate memory required by RegisterFile
+ more efficiently.
+ (WTF::RegisterFileAllocator::~RegisterFileAllocator):
+ (WTF::RegisterFileAllocator::buffer):
+ (WTF::RegisterFileAllocator::grow):
+ (WTF::RegisterFileAllocator::shrink):
+ * wtf/symbian/RegisterFileAllocatorSymbian.h: Added.
+ * wtf/symbian/SymbianDefines.h: Added.
+
2010-06-19 Thiago Macieira <thiago.macieira@nokia.com>
Reviewed by Kenneth Rohde Christiansen.
diff --git a/src/3rdparty/javascriptcore/JavaScriptCore/JavaScriptCore.pri b/src/3rdparty/javascriptcore/JavaScriptCore/JavaScriptCore.pri
index 75737ae..d75bd31 100644
--- a/src/3rdparty/javascriptcore/JavaScriptCore/JavaScriptCore.pri
+++ b/src/3rdparty/javascriptcore/JavaScriptCore/JavaScriptCore.pri
@@ -211,6 +211,7 @@ SOURCES += \
wtf/qt/ThreadingQt.cpp \
wtf/RandomNumber.cpp \
wtf/RefCountedLeakCounter.cpp \
+ wtf/symbian/RegisterFileAllocatorSymbian.cpp \
wtf/ThreadingNone.cpp \
wtf/Threading.cpp \
wtf/TypeTraits.cpp \
diff --git a/src/3rdparty/javascriptcore/JavaScriptCore/interpreter/RegisterFile.cpp b/src/3rdparty/javascriptcore/JavaScriptCore/interpreter/RegisterFile.cpp
index 939573b..293fc38 100644
--- a/src/3rdparty/javascriptcore/JavaScriptCore/interpreter/RegisterFile.cpp
+++ b/src/3rdparty/javascriptcore/JavaScriptCore/interpreter/RegisterFile.cpp
@@ -40,6 +40,8 @@ RegisterFile::~RegisterFile()
VirtualFree(m_buffer, DWORD(m_commitEnd) - DWORD(m_buffer), MEM_DECOMMIT);
#endif
VirtualFree(m_buffer, 0, MEM_RELEASE);
+#elif OS(SYMBIAN)
+ delete m_registerFileAllocator;
#else
fastFree(m_buffer);
#endif
diff --git a/src/3rdparty/javascriptcore/JavaScriptCore/interpreter/RegisterFile.h b/src/3rdparty/javascriptcore/JavaScriptCore/interpreter/RegisterFile.h
index 34e2504..49304d9 100644
--- a/src/3rdparty/javascriptcore/JavaScriptCore/interpreter/RegisterFile.h
+++ b/src/3rdparty/javascriptcore/JavaScriptCore/interpreter/RegisterFile.h
@@ -41,6 +41,10 @@
#include <sys/mman.h>
#endif
+#if OS(SYMBIAN)
+#include <wtf/symbian/RegisterFileAllocatorSymbian.h>
+#endif
+
namespace JSC {
/*
@@ -152,12 +156,21 @@ namespace JSC {
#if HAVE(VIRTUALALLOC)
Register* m_commitEnd;
#endif
+#if OS(SYMBIAN)
+ // Commits and frees a continguous chunk of memory as required
+ WTF::RegisterFileAllocator* m_registerFileAllocator;
+#endif
JSGlobalObject* m_globalObject; // The global object whose vars are currently stored in the register file.
};
// FIXME: Add a generic getpagesize() to WTF, then move this function to WTF as well.
- inline bool isPageAligned(size_t size) { return size != 0 && size % (8 * 1024) == 0; }
+ // This is still a hack that should be fixed later. We know that a Symbian page size is 4K.
+ #if OS(SYMBIAN)
+ inline bool isPageAligned(size_t size) { return size && !(size % (4 * 1024)); }
+ #else
+ inline bool isPageAligned(size_t size) { return size && !(size % (8 * 1024)); }
+ #endif
inline RegisterFile::RegisterFile(size_t capacity, size_t maxGlobals)
: m_numGlobals(0)
@@ -204,7 +217,13 @@ namespace JSC {
CRASH();
}
m_commitEnd = reinterpret_cast<Register*>(reinterpret_cast<char*>(m_buffer) + committedSize);
- #else
+ #elif OS(SYMBIAN)
+ m_registerFileAllocator = new WTF::RegisterFileAllocator(bufferLength);
+ m_buffer = (Register*)(m_registerFileAllocator->buffer());
+ // start by committing enough space to hold maxGlobals
+ void* newEnd = (void*)((int)m_buffer + (maxGlobals * sizeof(Register)));
+ m_registerFileAllocator->grow(newEnd);
+ #else
/*
* If neither MMAP nor VIRTUALALLOC are available - use fastMalloc instead.
*
@@ -226,8 +245,13 @@ namespace JSC {
if (newEnd >= m_end)
return;
m_end = newEnd;
- if (m_end == m_start && (m_maxUsed - m_start) > maxExcessCapacity)
+ if (m_end == m_start && (m_maxUsed - m_start) > maxExcessCapacity) {
+#if OS(SYMBIAN)
+ m_registerFileAllocator->shrink(newEnd);
+#endif
+
releaseExcessCapacity();
+ }
}
inline bool RegisterFile::grow(Register* newEnd)
@@ -252,6 +276,9 @@ namespace JSC {
m_commitEnd = reinterpret_cast<Register*>(reinterpret_cast<char*>(m_commitEnd) + size);
}
#endif
+#if OS(SYMBIAN)
+ m_registerFileAllocator->grow((void*)newEnd);
+#endif
if (newEnd > m_maxUsed)
m_maxUsed = newEnd;
diff --git a/src/3rdparty/javascriptcore/JavaScriptCore/wtf/symbian/RegisterFileAllocatorSymbian.cpp b/src/3rdparty/javascriptcore/JavaScriptCore/wtf/symbian/RegisterFileAllocatorSymbian.cpp
new file mode 100644
index 0000000..baa7841
--- /dev/null
+++ b/src/3rdparty/javascriptcore/JavaScriptCore/wtf/symbian/RegisterFileAllocatorSymbian.cpp
@@ -0,0 +1,111 @@
+/*
+ * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies)
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. 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.
+ * 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of
+ * its contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+
+#if OS(SYMBIAN)
+
+#include "RegisterFileAllocatorSymbian.h"
+
+namespace WTF {
+
+/** Efficiently allocates memory pools of size poolSize.
+ * Primarily designed for JSC RegisterFile's needs.
+ * Not thread-safe.
+ */
+RegisterFileAllocator::RegisterFileAllocator(TUint32 reservationSize, TUint32 poolSize) :
+ m_reserved(reservationSize), m_poolSize(poolSize)
+{
+ // Get system's page size value.
+ SYMBIAN_PAGESIZE(m_pageSize);
+
+ // We only accept multiples of system page size for both initial reservation
+ // and the alignment/pool size
+ m_reserved = SYMBIAN_ROUNDUPTOMULTIPLE(m_reserved, m_pageSize);
+ __ASSERT_ALWAYS(SYMBIAN_ROUNDUPTOMULTIPLE(m_poolSize, m_pageSize),
+ User::Panic(_L("RegisterFileAllocator1"), KErrArgument));
+
+ // Open a Symbian RChunk, and reserve requested virtual address range
+ // Any thread in this process can operate this RChunk due to EOwnerProcess access rights.
+ TInt ret = m_chunk.CreateDisconnectedLocal(0 , 0, (TInt)m_reserved , EOwnerProcess);
+ if (ret != KErrNone)
+ User::Panic(_L("RegisterFileAllocator2"), ret);
+
+ m_buffer = (void*)m_chunk.Base();
+ m_resEnd = (void*)(m_chunk.Base() + m_chunk.MaxSize());
+ m_comEnd = m_buffer;
+}
+
+RegisterFileAllocator::~RegisterFileAllocator()
+{
+ // release everything!
+ m_chunk.Decommit(0, m_chunk.MaxSize());
+ m_chunk.Close();
+}
+
+void* RegisterFileAllocator::buffer() const
+{
+ return m_buffer;
+}
+
+void RegisterFileAllocator::grow(void* newEnd)
+{
+ // trying to commit more memory than reserved!
+ if (newEnd > m_resEnd)
+ return;
+
+ if (newEnd > m_comEnd) {
+ TInt nBytes = (TInt)(newEnd) - (TInt)(m_comEnd);
+ nBytes = SYMBIAN_ROUNDUPTOMULTIPLE(nBytes, m_poolSize);
+ TInt offset = (TInt)m_comEnd - (TInt)m_buffer;
+
+ TInt ret = m_chunk.Commit(offset, nBytes);
+ if (ret == KErrNone)
+ m_comEnd = (void*)(m_chunk.Base() + m_chunk.Size());
+ }
+}
+
+void RegisterFileAllocator::shrink(void* newEnd)
+{
+ if (newEnd < m_comEnd) {
+ TInt nBytes = (TInt)newEnd - (TInt)m_comEnd;
+ if (nBytes >= m_poolSize) {
+ TInt offset = SYMBIAN_ROUNDUPTOMULTIPLE((TUint)newEnd, m_poolSize) - (TInt)m_buffer;
+ nBytes = (TInt)m_comEnd - offset - (TInt)m_buffer;
+ if (nBytes > 0) {
+ TInt ret = m_chunk.Decommit(offset, nBytes);
+ if (ret == KErrNone)
+ m_comEnd = (void*)(m_chunk.Base() + m_chunk.Size());
+ }
+ }
+ }
+}
+
+} // end of namespace
+
+#endif // SYMBIAN
diff --git a/src/3rdparty/javascriptcore/JavaScriptCore/wtf/symbian/RegisterFileAllocatorSymbian.h b/src/3rdparty/javascriptcore/JavaScriptCore/wtf/symbian/RegisterFileAllocatorSymbian.h
new file mode 100644
index 0000000..4cfc8c5
--- /dev/null
+++ b/src/3rdparty/javascriptcore/JavaScriptCore/wtf/symbian/RegisterFileAllocatorSymbian.h
@@ -0,0 +1,69 @@
+/*
+ * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies)
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. 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.
+ * 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of
+ * its contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef RegisterFileAllocatorSymbian_h
+#define RegisterFileAllocatorSymbian_h
+
+#include "SymbianDefines.h"
+
+namespace WTF {
+
+/**
+ * Allocates contiguous regions of size poolSize.
+ * poolSize must be a multiple of system page size (typically 4K on Symbian/ARM)
+ *
+ * @param reservationSize Virtual address range to be reserved upon creation of chunk (bytes).
+ * @param poolSize Size of a single allocation.
+ */
+class RegisterFileAllocator {
+
+public:
+ RegisterFileAllocator(
+ TUint32 reservationSize, TUint32 poolSize = SYMBIAN_REGFILEALLOC_DEFAULTPOOLSIZE);
+ ~RegisterFileAllocator();
+ void* buffer() const;
+ void grow(void* newEnd);
+ void shrink(void* newEnd);
+
+private:
+ RChunk m_chunk; // Symbian chunk that lets us reserve/commit/decommit
+
+ // all following values are in numbers of bytes
+ TInt m_pageSize; // cached value of system page size, typically 4K on Symbian
+ TUint32 m_reserved; // total number of reserved bytes in virtual memory
+ TUint32 m_poolSize; // size of one memory pool, set by default to 64K in wtf/symbian/SymbianDefines.h
+
+ void* m_buffer; // pointer to base of the chunk
+ void* m_comEnd; // pointer to end of currently committed memory
+ void* m_resEnd; // pointer to end of reserved memory
+
+};
+
+} // end of namespace
+
+#endif // RegisterFileAllocatorSymbian_h
diff --git a/src/3rdparty/javascriptcore/JavaScriptCore/wtf/symbian/SymbianDefines.h b/src/3rdparty/javascriptcore/JavaScriptCore/wtf/symbian/SymbianDefines.h
new file mode 100644
index 0000000..43e22b3
--- /dev/null
+++ b/src/3rdparty/javascriptcore/JavaScriptCore/wtf/symbian/SymbianDefines.h
@@ -0,0 +1,42 @@
+/*
+ * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies)
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. 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.
+ * 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of
+ * its contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef SymbianDefines_h
+#define SymbianDefines_h
+
+#include <e32cmn.h>
+#include <e32std.h>
+#include <hal.h>
+
+#define SYMBIAN_PAGESIZE(x) (HAL::Get(HALData::EMemoryPageSize, x));
+#define SYMBIAN_FREERAM(x) (HAL::Get(HALData::EMemoryRAMFree, x));
+#define SYMBIAN_ROUNDUPTOMULTIPLE(x, multipleof) ( (x + multipleof - 1) & ~(multipleof - 1) )
+
+#define SYMBIAN_REGFILEALLOC_DEFAULTPOOLSIZE 65536 // 64K
+
+#endif // SymbianDefines_h
diff --git a/src/3rdparty/phonon/gstreamer/mediaobject.cpp b/src/3rdparty/phonon/gstreamer/mediaobject.cpp
index 3e0addc..23a60c0 100644
--- a/src/3rdparty/phonon/gstreamer/mediaobject.cpp
+++ b/src/3rdparty/phonon/gstreamer/mediaobject.cpp
@@ -219,9 +219,9 @@ void MediaObject::noMorePadsAvailable ()
if ( status != GST_INSTALL_PLUGINS_STARTED_OK )
{
if( status == GST_INSTALL_PLUGINS_HELPER_MISSING )
- setError(QString(tr("Missing codec helper script assistant.")), Phonon::FatalError );
+ setError(tr("Missing codec helper script assistant."), Phonon::FatalError );
else
- setError(QString(tr("Plugin codec installation failed for codec: %0"))
+ setError(tr("Plugin codec installation failed for codec: %0")
.arg(m_missingCodecs[0].split("|")[3]), error);
}
m_missingCodecs.clear();
@@ -232,7 +232,7 @@ void MediaObject::noMorePadsAvailable ()
m_hasVideo = false;
emit hasVideoChanged(false);
}
- setError(QString(tr("A required codec is missing. You need to install the following codec(s) to play this content: %0")).arg(codecs), error);
+ setError(tr("A required codec is missing. You need to install the following codec(s) to play this content: %0").arg(codecs), error);
m_missingCodecs.clear();
#endif
}
diff --git a/src/corelib/global/global.pri b/src/corelib/global/global.pri
index 2505e72..260ed59 100644
--- a/src/corelib/global/global.pri
+++ b/src/corelib/global/global.pri
@@ -19,7 +19,7 @@ INCLUDEPATH += $$QT_BUILD_TREE/src/corelib/global
# Only used on platforms with CONFIG += precompile_header
PRECOMPILED_HEADER = global/qt_pch.h
-linux*:!static {
+linux*:!static:!linux-armcc:!linux-gcce {
QMAKE_LFLAGS += -Wl,-e,qt_core_boilerplate
prog=$$quote(if (/program interpreter: (.*)]/) { print $1; })
DEFINES += ELF_INTERPRETER=\\\"$$system(readelf -l /bin/ls | perl -n -e \'$$prog\')\\\"
diff --git a/src/corelib/kernel/qeventdispatcher_symbian.cpp b/src/corelib/kernel/qeventdispatcher_symbian.cpp
index 1bad8ed..5cc6ae3 100644
--- a/src/corelib/kernel/qeventdispatcher_symbian.cpp
+++ b/src/corelib/kernel/qeventdispatcher_symbian.cpp
@@ -232,8 +232,12 @@ void QTimerActiveObject::DoCancel()
void QTimerActiveObject::RunL()
{
- int error;
- QT_TRYCATCH_ERROR(error, Run());
+ int error = KErrNone;
+ if (iStatus == KErrNone) {
+ QT_TRYCATCH_ERROR(error, Run());
+ } else {
+ error = iStatus.Int();
+ }
// All Symbian error codes are negative.
if (error < 0) {
CActiveScheduler::Current()->Error(error); // stop and report here, as this timer will be deleted on scope exit
diff --git a/src/corelib/tools/qelapsedtimer_unix.cpp b/src/corelib/tools/qelapsedtimer_unix.cpp
index 2c4ea58..633fa00 100644
--- a/src/corelib/tools/qelapsedtimer_unix.cpp
+++ b/src/corelib/tools/qelapsedtimer_unix.cpp
@@ -40,22 +40,58 @@
****************************************************************************/
#include "qelapsedtimer.h"
-#include "qpair.h"
#include <sys/time.h>
#include <time.h>
#include <unistd.h>
-#if !defined(QT_NO_CLOCK_MONOTONIC)
-# if defined(QT_BOOTSTRAPPED)
-# define QT_NO_CLOCK_MONOTONIC
+#if defined(QT_NO_CLOCK_MONOTONIC) || defined(QT_BOOTSTRAPPED)
+// turn off the monotonic clock
+# ifdef _POSIX_MONOTONIC_CLOCK
+# undef _POSIX_MONOTONIC_CLOCK
# endif
+# define _POSIX_MONOTONIC_CLOCK -1
#endif
QT_BEGIN_NAMESPACE
-static qint64 fractionAdjustment()
+#if (_POSIX_MONOTONIC_CLOCK-0 != 0)
+static const bool monotonicClockChecked = true;
+static const bool monotonicClockAvailable = _POSIX_MONOTONIC_CLOCK > 0;
+#else
+static int monotonicClockChecked = false;
+static int monotonicClockAvailable = false;
+#endif
+
+#ifdef Q_CC_GNU
+# define is_likely(x) __builtin_expect((x), 1)
+#else
+# define is_likely(x) (x)
+#endif
+#define load_acquire(x) ((volatile const int&)(x))
+#define store_release(x,v) ((volatile int&)(x) = (v))
+
+static void unixCheckClockType()
+{
+#if (_POSIX_MONOTONIC_CLOCK-0 == 0)
+ if (is_likely(load_acquire(monotonicClockChecked)))
+ return;
+
+# if defined(_SC_MONOTONIC_CLOCK)
+ // detect if the system support monotonic timers
+ long x = sysconf(_SC_MONOTONIC_CLOCK);
+ store_release(monotonicClockAvailable, x >= 200112L);
+# endif
+
+ store_release(monotonicClockChecked, true);
+#endif
+}
+
+static inline qint64 fractionAdjustment()
{
- if (QElapsedTimer::isMonotonic()) {
+ // disabled, but otherwise indicates bad usage of QElapsedTimer
+ //Q_ASSERT(monotonicClockChecked);
+
+ if (monotonicClockAvailable) {
// the monotonic timer is measured in nanoseconds
// 1 ms = 1000000 ns
return 1000*1000ull;
@@ -68,90 +104,73 @@ static qint64 fractionAdjustment()
bool QElapsedTimer::isMonotonic()
{
-#if (_POSIX_MONOTONIC_CLOCK-0 > 0)
- return true;
-#else
- static int returnValue = 0;
-
- if (returnValue == 0) {
-# if (_POSIX_MONOTONIC_CLOCK-0 < 0) || !defined(_SC_MONOTONIC_CLOCK)
- returnValue = -1;
-# elif (_POSIX_MONOTONIC_CLOCK == 0)
- // detect if the system support monotonic timers
- long x = sysconf(_SC_MONOTONIC_CLOCK);
- returnValue = (x >= 200112L) ? 1 : -1;
-# endif
- }
-
- return returnValue != -1;
-#endif
+ unixCheckClockType();
+ return monotonicClockAvailable;
}
QElapsedTimer::ClockType QElapsedTimer::clockType()
{
- return isMonotonic() ? MonotonicClock : SystemTime;
+ unixCheckClockType();
+ return monotonicClockAvailable ? MonotonicClock : SystemTime;
}
-static inline QPair<long, long> do_gettime()
+static inline void do_gettime(qint64 *sec, qint64 *frac)
{
-#if (_POSIX_MONOTONIC_CLOCK-0 > 0)
- timespec ts;
- clock_gettime(CLOCK_MONOTONIC, &ts);
- return qMakePair<long,long>(ts.tv_sec, ts.tv_nsec);
-#else
-# if !defined(QT_NO_CLOCK_MONOTONIC) && !defined(QT_BOOTSTRAPPED)
- if (QElapsedTimer::isMonotonic()) {
+#if (_POSIX_MONOTONIC_CLOCK-0 >= 0)
+ unixCheckClockType();
+ if (is_likely(monotonicClockAvailable)) {
timespec ts;
clock_gettime(CLOCK_MONOTONIC, &ts);
- return qMakePair<long,long>(ts.tv_sec, ts.tv_nsec);
+ *sec = ts.tv_sec;
+ *frac = ts.tv_nsec;
+ return;
}
-# endif
+#endif
// use gettimeofday
timeval tv;
::gettimeofday(&tv, 0);
- return qMakePair<long,long>(tv.tv_sec, tv.tv_usec);
-#endif
+ *sec = tv.tv_sec;
+ *frac = tv.tv_usec;
}
// used in qcore_unix.cpp and qeventdispatcher_unix.cpp
timeval qt_gettime()
{
- QPair<long, long> r = do_gettime();
+ qint64 sec, frac;
+ do_gettime(&sec, &frac);
timeval tv;
- tv.tv_sec = r.first;
- tv.tv_usec = r.second;
- if (QElapsedTimer::isMonotonic())
+ tv.tv_sec = sec;
+ tv.tv_usec = frac;
+ if (monotonicClockAvailable)
tv.tv_usec /= 1000;
return tv;
}
+static qint64 elapsedAndRestart(qint64 sec, qint64 frac,
+ qint64 *nowsec, qint64 *nowfrac)
+{
+ do_gettime(nowsec, nowfrac);
+ sec = *nowsec - sec;
+ frac = *nowfrac - frac;
+ return sec * Q_INT64_C(1000) + frac / fractionAdjustment();
+}
+
void QElapsedTimer::start()
{
- QPair<long, long> r = do_gettime();
- t1 = r.first;
- t2 = r.second;
+ do_gettime(&t1, &t2);
}
qint64 QElapsedTimer::restart()
{
- QPair<long, long> r = do_gettime();
- qint64 oldt1 = t1;
- qint64 oldt2 = t2;
- t1 = r.first;
- t2 = r.second;
-
- r.first -= oldt1;
- r.second -= oldt2;
- return r.first * Q_INT64_C(1000) + r.second / fractionAdjustment();
+ return elapsedAndRestart(t1, t2, &t1, &t2);
}
qint64 QElapsedTimer::elapsed() const
{
- QElapsedTimer now;
- now.start();
- return msecsTo(now);
+ qint64 sec, frac;
+ return elapsedAndRestart(t1, t2, &sec, &frac);
}
qint64 QElapsedTimer::msecsSinceReference() const
diff --git a/src/corelib/tools/qsimd.cpp b/src/corelib/tools/qsimd.cpp
index 68ab033..7349432 100644
--- a/src/corelib/tools/qsimd.cpp
+++ b/src/corelib/tools/qsimd.cpp
@@ -140,56 +140,41 @@ static inline uint detectProcessorFeatures()
uint result = 0;
/* see p. 118 of amd64 instruction set manual Vol3 */
#if defined(Q_CC_GNU)
- asm ("push %%ebx\n"
- "pushf\n"
- "pop %%eax\n"
- "mov %%eax, %%ebx\n"
- "xor $0x00200000, %%eax\n"
- "push %%eax\n"
- "popf\n"
- "pushf\n"
- "pop %%eax\n"
- "xor %%edx, %%edx\n"
- "xor %%ebx, %%eax\n"
- "jz 1f\n"
-
- "mov $0x00000001, %%eax\n"
- "cpuid\n"
- "1:\n"
- "pop %%ebx\n"
- "mov %%edx, %0\n"
- "mov %%ecx, %1\n"
- : "=r" (result), "=r" (feature_result)
- :
- : "%eax", "%ecx", "%edx"
- );
-
- asm ("push %%ebx\n"
- "pushf\n"
- "pop %%eax\n"
- "mov %%eax, %%ebx\n"
- "xor $0x00200000, %%eax\n"
- "push %%eax\n"
+ long cpuid_supported, tmp1;
+ asm ("pushf\n"
+ "pop %0\n"
+ "mov %0, %1\n"
+ "xor $0x00200000, %0\n"
+ "push %0\n"
"popf\n"
"pushf\n"
- "pop %%eax\n"
- "xor %%edx, %%edx\n"
- "xor %%ebx, %%eax\n"
- "jz 2f\n"
-
- "mov $0x80000000, %%eax\n"
- "cpuid\n"
- "cmp $0x80000000, %%eax\n"
- "jbe 2f\n"
- "mov $0x80000001, %%eax\n"
- "cpuid\n"
- "2:\n"
- "pop %%ebx\n"
- "mov %%edx, %0\n"
- : "=r" (extended_result)
- :
- : "%eax", "%ecx", "%edx"
- );
+ "pop %0\n"
+ "xor %1, %0\n" // %eax is now 0 if CPUID is not supported
+ : "=a" (cpuid_supported), "=r" (tmp1)
+ );
+ if (cpuid_supported) {
+ asm ("xchg %%ebx, %2\n"
+ "cpuid\n"
+ "xchg %%ebx, %2\n"
+ : "=c" (feature_result), "=d" (result), "=&r" (tmp1)
+ : "a" (1));
+
+ asm ("xchg %%ebx, %1\n"
+ "cpuid\n"
+ "cmp $0x80000000, %%eax\n"
+ "jnbe 1f\n"
+ "xor %0, %0\n"
+ "jmp 2f\n"
+ "1:\n"
+ "mov $0x80000001, %%eax\n"
+ "cpuid\n"
+ "2:\n"
+ "xchg %%ebx, %1\n"
+ : "=d" (extended_result), "=&r" (tmp1)
+ : "a" (0x80000000)
+ : "%ecx"
+ );
+ }
#elif defined (Q_OS_WIN)
_asm {
@@ -289,27 +274,10 @@ static inline uint detectProcessorFeatures()
uint feature_result = 0;
#if defined(Q_CC_GNU)
- asm ("push %%rbx\n"
- "pushf\n"
- "pop %%rax\n"
- "mov %%eax, %%ebx\n"
- "xor $0x00200000, %%eax\n"
- "push %%rax\n"
- "popf\n"
- "pushf\n"
- "pop %%rax\n"
- "xor %%edx, %%edx\n"
- "xor %%ebx, %%eax\n"
- "jz 1f\n"
-
- "mov $0x00000001, %%eax\n"
- "cpuid\n"
- "1:\n"
- "pop %%rbx\n"
- "mov %%ecx, %0\n"
- : "=r" (feature_result)
- :
- : "%eax", "%ecx", "%edx"
+ asm ("cpuid"
+ : "=c" (feature_result)
+ : "a" (1)
+ : "%ebx", "%edx"
);
#elif defined (Q_OS_WIN64)
{
diff --git a/src/corelib/tools/qstring.cpp b/src/corelib/tools/qstring.cpp
index d940bf8..2813b29 100644
--- a/src/corelib/tools/qstring.cpp
+++ b/src/corelib/tools/qstring.cpp
@@ -173,19 +173,6 @@ static int ucstricmp(const ushort *a, const ushort *ae, const uchar *b)
return 1;
}
-// Unicode case-sensitive comparison
-static int ucstrcmp(const QChar *a, int alen, const QChar *b, int blen)
-{
- if (a == b && alen == blen)
- return 0;
- int l = qMin(alen, blen);
- while (l-- && *a == *b)
- a++,b++;
- if (l == -1)
- return (alen-blen);
- return a->unicode() - b->unicode();
-}
-
// Unicode case-sensitive compare two same-sized strings
static int ucstrncmp(const QChar *a, const QChar *b, int l)
{
@@ -196,6 +183,16 @@ static int ucstrncmp(const QChar *a, const QChar *b, int l)
return a->unicode() - b->unicode();
}
+// Unicode case-sensitive comparison
+static int ucstrcmp(const QChar *a, int alen, const QChar *b, int blen)
+{
+ if (a == b && alen == blen)
+ return 0;
+ int l = qMin(alen, blen);
+ int cmp = ucstrncmp(a, b, l);
+ return cmp ? cmp : (alen-blen);
+}
+
// Unicode case-insensitive compare two same-sized strings
static int ucstrnicmp(const ushort *a, const ushort *b, int l)
{
diff --git a/src/dbus/qdbusintegrator.cpp b/src/dbus/qdbusintegrator.cpp
index 7951177..3833874 100644
--- a/src/dbus/qdbusintegrator.cpp
+++ b/src/dbus/qdbusintegrator.cpp
@@ -714,6 +714,9 @@ QDBusCallDeliveryEvent* QDBusConnectionPrivate::prepareReply(QDBusConnectionPriv
if (metaTypes[n] == QDBusMetaTypeId::message)
--n;
+ if (msg.arguments().count() < n)
+ return 0; // too few arguments
+
// check that types match
for (int i = 0; i < n; ++i)
if (metaTypes.at(i + 1) != msg.arguments().at(i).userType() &&
diff --git a/src/declarative/graphicsitems/qdeclarativeflickable.cpp b/src/declarative/graphicsitems/qdeclarativeflickable.cpp
index 63a2a77..b302393 100644
--- a/src/declarative/graphicsitems/qdeclarativeflickable.cpp
+++ b/src/declarative/graphicsitems/qdeclarativeflickable.cpp
@@ -1258,6 +1258,7 @@ bool QDeclarativeFlickable::sendMouseEvent(QGraphicsSceneMouseEvent *event)
if (mouseEvent.type() == QEvent::GraphicsSceneMouseRelease) {
d->clearDelayedPress();
d->stealMouse = false;
+ d->pressed = false;
}
return false;
}
diff --git a/src/declarative/qml/parser/qdeclarativejslexer.cpp b/src/declarative/qml/parser/qdeclarativejslexer.cpp
index cd08658..1eb42e4 100644
--- a/src/declarative/qml/parser/qdeclarativejslexer.cpp
+++ b/src/declarative/qml/parser/qdeclarativejslexer.cpp
@@ -677,9 +677,9 @@ int Lexer::lex()
setDone(Other);
} else
state = Start;
- if (driver) driver->addComment(startpos, tokenLength(), startlineno, startcolumn);
+ if (driver) driver->addComment(startpos+2, tokenLength()-2, startlineno, startcolumn+2);
} else if (current == 0) {
- if (driver) driver->addComment(startpos, tokenLength(), startlineno, startcolumn);
+ if (driver) driver->addComment(startpos+2, tokenLength()-2, startlineno, startcolumn+2);
setDone(Eof);
}
@@ -689,14 +689,14 @@ int Lexer::lex()
setDone(Bad);
err = UnclosedComment;
errmsg = QCoreApplication::translate("QDeclarativeParser", "Unclosed comment at end of file");
- if (driver) driver->addComment(startpos, tokenLength(), startlineno, startcolumn);
+ if (driver) driver->addComment(startpos+2, tokenLength()-2, startlineno, startcolumn+2);
} else if (isLineTerminator()) {
shiftWindowsLineBreak();
yylineno++;
} else if (current == '*' && next1 == '/') {
state = Start;
shift(1);
- if (driver) driver->addComment(startpos, tokenLength(), startlineno, startcolumn);
+ if (driver) driver->addComment(startpos+2, tokenLength()-3, startlineno, startcolumn+2);
}
break;
diff --git a/src/declarative/qml/qdeclarativeobjectscriptclass.cpp b/src/declarative/qml/qdeclarativeobjectscriptclass.cpp
index 3af892d..f439151 100644
--- a/src/declarative/qml/qdeclarativeobjectscriptclass.cpp
+++ b/src/declarative/qml/qdeclarativeobjectscriptclass.cpp
@@ -192,7 +192,7 @@ QDeclarativeObjectScriptClass::queryProperty(QObject *obj, const Identifier &nam
if (!(hints & ImplicitObject)) {
local.coreIndex = -1;
lastData = &local;
- return QScriptClass::HandlesReadAccess | QScriptClass::HandlesWriteAccess;
+ return QScriptClass::HandlesWriteAccess;
}
return 0;
diff --git a/src/declarative/qml/qdeclarativevmemetaobject.cpp b/src/declarative/qml/qdeclarativevmemetaobject.cpp
index 689ed92..3e32006 100644
--- a/src/declarative/qml/qdeclarativevmemetaobject.cpp
+++ b/src/declarative/qml/qdeclarativevmemetaobject.cpp
@@ -707,11 +707,19 @@ void QDeclarativeVMEMetaObject::writeVarProperty(int id, const QScriptValue &val
void QDeclarativeVMEMetaObject::writeVarProperty(int id, const QVariant &value)
{
- if (value.userType() == QMetaType::QObjectStar)
+ bool needActivate = false;
+ if (value.userType() == QMetaType::QObjectStar) {
+ QObject *o = qvariant_cast<QObject *>(value);
+ needActivate = (data[id].dataType() != QMetaType::QObjectStar || data[id].asQObject() != o);
data[id].setValue(qvariant_cast<QObject *>(value));
- else
+ } else {
+ needActivate = (data[id].dataType() != qMetaTypeId<QVariant>() ||
+ data[id].asQVariant().userType() != value.userType() ||
+ data[id].asQVariant() != value);
data[id].setValue(value);
- activate(object, methodOffset + id, 0);
+ }
+ if (needActivate)
+ activate(object, methodOffset + id, 0);
}
void QDeclarativeVMEMetaObject::listChanged(int id)
diff --git a/src/declarative/util/qdeclarativeanimation.cpp b/src/declarative/util/qdeclarativeanimation.cpp
index 267642d..3c09747 100644
--- a/src/declarative/util/qdeclarativeanimation.cpp
+++ b/src/declarative/util/qdeclarativeanimation.cpp
@@ -332,7 +332,7 @@ void QDeclarativeAbstractAnimation::setAlwaysRunToEnd(bool f)
stopped - either by setting the \c running property to false, or by calling
the \c stop() method.
- In the following example, the rectangle will spin indefinately.
+ In the following example, the rectangle will spin indefinitely.
\code
Rectangle {
diff --git a/src/declarative/util/qdeclarativepixmapcache.cpp b/src/declarative/util/qdeclarativepixmapcache.cpp
index de2de21..4fc52f5 100644
--- a/src/declarative/util/qdeclarativepixmapcache.cpp
+++ b/src/declarative/util/qdeclarativepixmapcache.cpp
@@ -155,7 +155,7 @@ protected:
private:
friend class QDeclarativePixmapReaderThreadObject;
void processJobs();
- void processJob(QDeclarativePixmapReply *);
+ void processJob(QDeclarativePixmapReply *, const QUrl &, const QSize &);
void networkRequestDone(QNetworkReply *);
QList<QDeclarativePixmapReply*> jobs;
@@ -434,23 +434,24 @@ void QDeclarativePixmapReader::processJobs()
QDeclarativePixmapReply *runningJob = jobs.takeLast();
runningJob->loading = true;
+ QUrl url = runningJob->data->url;
+ QSize requestSize = runningJob->data->requestSize;
locker.unlock();
- processJob(runningJob);
+ processJob(runningJob, url, requestSize);
locker.relock();
}
}
}
-void QDeclarativePixmapReader::processJob(QDeclarativePixmapReply *runningJob)
+void QDeclarativePixmapReader::processJob(QDeclarativePixmapReply *runningJob, const QUrl &url,
+ const QSize &requestSize)
{
- QUrl url = runningJob->data->url;
-
// fetch
if (url.scheme() == QLatin1String("image")) {
// Use QmlImageProvider
QSize readSize;
QDeclarativeEnginePrivate *ep = QDeclarativeEnginePrivate::get(engine);
- QImage image = ep->getImageFromProvider(url, &readSize, runningJob->data->requestSize);
+ QImage image = ep->getImageFromProvider(url, &readSize, requestSize);
QDeclarativePixmapReply::ReadError errorCode = QDeclarativePixmapReply::NoError;
QString errorStr;
@@ -472,7 +473,7 @@ void QDeclarativePixmapReader::processJob(QDeclarativePixmapReply *runningJob)
QFile f(lf);
QSize readSize;
if (f.open(QIODevice::ReadOnly)) {
- if (!readImage(url, &f, &image, &errorStr, &readSize, runningJob->data->requestSize))
+ if (!readImage(url, &f, &image, &errorStr, &readSize, requestSize))
errorCode = QDeclarativePixmapReply::Loading;
} else {
errorStr = QDeclarativePixmap::tr("Cannot open: %1").arg(url.toString());
@@ -663,6 +664,7 @@ void QDeclarativePixmapStore::shrinkCache(int remove)
data->prevUnreferenced = 0;
remove -= data->cost();
+ m_unreferencedCost -= data->cost();
data->removeFromCache();
delete data;
}
diff --git a/src/gui/graphicsview/qgraphicsitem.cpp b/src/gui/graphicsview/qgraphicsitem.cpp
index 7a622f1..fc122d2 100644
--- a/src/gui/graphicsview/qgraphicsitem.cpp
+++ b/src/gui/graphicsview/qgraphicsitem.cpp
@@ -5666,9 +5666,6 @@ void QGraphicsItem::update(const QRectF &rect)
return;
}
- if (d_ptr->discardUpdateRequest())
- return;
-
if (d_ptr->scene)
d_ptr->scene->d_func()->markDirty(this, rect);
}
diff --git a/src/gui/inputmethod/qcoefepinputcontext_p.h b/src/gui/inputmethod/qcoefepinputcontext_p.h
index d5243c3..ac40bba 100644
--- a/src/gui/inputmethod/qcoefepinputcontext_p.h
+++ b/src/gui/inputmethod/qcoefepinputcontext_p.h
@@ -66,10 +66,10 @@
QT_BEGIN_NAMESPACE
-class QCoeFepInputContext : public QInputContext,
- public MCoeFepAwareTextEditor,
- public MCoeFepAwareTextEditor_Extension1,
- public MObjectProvider
+class Q_AUTOTEST_EXPORT QCoeFepInputContext : public QInputContext,
+ public MCoeFepAwareTextEditor,
+ public MCoeFepAwareTextEditor_Extension1,
+ public MObjectProvider
{
Q_OBJECT
@@ -84,6 +84,7 @@ public:
void update();
bool filterEvent(const QEvent *event);
+ bool symbianFilterEvent(QWidget *keyWidget, const QSymbianEvent *event);
void mouseHandler( int x, QMouseEvent *event);
bool isComposing() const { return !m_preeditString.isEmpty(); }
@@ -151,9 +152,10 @@ private:
int m_inlinePosition;
MFepInlineTextFormatRetriever *m_formatRetriever;
MFepPointerEventHandlerDuringInlineEdit *m_pointerHandler;
- int m_cursorPos;
QBasicTimer m_tempPreeditStringTimeout;
bool m_hasTempPreeditString;
+
+ friend class tst_QInputContext;
};
QT_END_NAMESPACE
diff --git a/src/gui/inputmethod/qcoefepinputcontext_s60.cpp b/src/gui/inputmethod/qcoefepinputcontext_s60.cpp
index c4d60a5..b08b9a9 100644
--- a/src/gui/inputmethod/qcoefepinputcontext_s60.cpp
+++ b/src/gui/inputmethod/qcoefepinputcontext_s60.cpp
@@ -47,6 +47,7 @@
#include <qgraphicsview.h>
#include <qgraphicsscene.h>
#include <qgraphicswidget.h>
+#include <qsymbianevent.h>
#include <private/qcore_symbian_p.h>
#include <fepitfr.h>
@@ -79,7 +80,6 @@ QCoeFepInputContext::QCoeFepInputContext(QObject *parent)
m_inlinePosition(0),
m_formatRetriever(0),
m_pointerHandler(0),
- m_cursorPos(0),
m_hasTempPreeditString(false)
{
m_fepState->SetObjectProvider(this);
@@ -237,11 +237,17 @@ bool QCoeFepInputContext::filterEvent(const QEvent *event)
break;
}
+ QString widgetText = focusWidget()->inputMethodQuery(Qt::ImSurroundingText).toString();
+ int maxLength = focusWidget()->inputMethodQuery(Qt::ImMaximumTextLength).toInt();
+ if (!keyEvent->text().isEmpty() && widgetText.size() + m_preeditString.size() >= maxLength) {
+ // Don't send key events with string content if the widget is "full".
+ return true;
+ }
+
if (keyEvent->type() == QEvent::KeyPress
&& focusWidget()->inputMethodHints() & Qt::ImhHiddenText
&& !keyEvent->text().isEmpty()) {
// Send some temporary preedit text in order to make text visible for a moment.
- m_cursorPos = focusWidget()->inputMethodQuery(Qt::ImCursorPosition).toInt();
m_preeditString = keyEvent->text();
QList<QInputMethodEvent::Attribute> attributes;
QInputMethodEvent imEvent(m_preeditString, attributes);
@@ -282,6 +288,18 @@ bool QCoeFepInputContext::filterEvent(const QEvent *event)
return false;
}
+bool QCoeFepInputContext::symbianFilterEvent(QWidget *keyWidget, const QSymbianEvent *event)
+{
+ Q_UNUSED(keyWidget);
+ if (event->type() == QSymbianEvent::CommandEvent)
+ // A command basically means the same as a button being pushed. With Qt buttons
+ // that would normally result in a reset of the input method due to the focus change.
+ // This should also happen for commands.
+ reset();
+
+ return false;
+}
+
void QCoeFepInputContext::timerEvent(QTimerEvent *timerEvent)
{
if (timerEvent->timerId() == m_tempPreeditStringTimeout.timerId())
@@ -297,10 +315,6 @@ void QCoeFepInputContext::commitTemporaryPreeditString()
return;
commitCurrentString(false);
-
- //update cursor position, now this pre-edit text has been committed.
- //this prevents next keypress overwriting it (QTBUG-11673)
- m_cursorPos = focusWidget()->inputMethodQuery(Qt::ImCursorPosition).toInt();
}
void QCoeFepInputContext::mouseHandler( int x, QMouseEvent *event)
@@ -596,8 +610,6 @@ void QCoeFepInputContext::StartFepInlineEditL(const TDesC& aInitialInlineText,
commitTemporaryPreeditString();
- m_cursorPos = w->inputMethodQuery(Qt::ImCursorPosition).toInt();
-
QList<QInputMethodEvent::Attribute> attributes;
m_cursorVisibility = aCursorVisibility ? 1 : 0;
@@ -612,9 +624,10 @@ void QCoeFepInputContext::StartFepInlineEditL(const TDesC& aInitialInlineText,
// Let's remove the selected text if aInitialInlineText is empty and there is selected text
if (m_preeditString.isEmpty()) {
int anchor = w->inputMethodQuery(Qt::ImAnchorPosition).toInt();
- int replacementLength = qAbs(m_cursorPos-anchor);
+ int cursorPos = w->inputMethodQuery(Qt::ImCursorPosition).toInt();
+ int replacementLength = qAbs(cursorPos-anchor);
if (replacementLength > 0) {
- int replacementStart = m_cursorPos < anchor ? 0 : -replacementLength;
+ int replacementStart = cursorPos < anchor ? 0 : -replacementLength;
QList<QInputMethodEvent::Attribute> clearSelectionAttributes;
QInputMethodEvent clearSelectionEvent(QLatin1String(""), clearSelectionAttributes);
clearSelectionEvent.setCommitString(QLatin1String(""), replacementStart, replacementLength);
@@ -647,8 +660,13 @@ void QCoeFepInputContext::UpdateFepInlineTextL(const TDesC& aNewInlineText,
m_inlinePosition,
m_cursorVisibility,
QVariant()));
- m_preeditString = qt_TDesC2QString(aNewInlineText);
- QInputMethodEvent event(m_preeditString, attributes);
+ QString newPreeditString = qt_TDesC2QString(aNewInlineText);
+ QInputMethodEvent event(newPreeditString, attributes);
+ if (newPreeditString.isEmpty() && m_preeditString.isEmpty()) {
+ // In Symbian world this means "erase last character".
+ event.setCommitString(QLatin1String(""), -1, 1);
+ }
+ m_preeditString = newPreeditString;
sendEvent(event);
}
@@ -818,25 +836,13 @@ void QCoeFepInputContext::DoCommitFepInlineEditL()
void QCoeFepInputContext::commitCurrentString(bool cancelFepTransaction)
{
- int longPress = 0;
-
- if (m_preeditString.size() == 0) {
- QWidget *w = focusWidget();
- if (!cancelFepTransaction && w) {
- // We must replace the last character only if the input box has already accepted one
- if (w->inputMethodQuery(Qt::ImCursorPosition).toInt() != m_cursorPos)
- longPress = 1;
- }
- }
-
QList<QInputMethodEvent::Attribute> attributes;
QInputMethodEvent event(QLatin1String(""), attributes);
- event.setCommitString(m_preeditString, 0-longPress, longPress);
+ event.setCommitString(m_preeditString, 0, 0);
m_preeditString.clear();
sendEvent(event);
m_hasTempPreeditString = false;
- longPress = 0;
if (cancelFepTransaction) {
CCoeFep* fep = CCoeEnv::Static()->Fep();
diff --git a/src/gui/kernel/qapplication_mac.mm b/src/gui/kernel/qapplication_mac.mm
index 321492d..dd819e5 100644
--- a/src/gui/kernel/qapplication_mac.mm
+++ b/src/gui/kernel/qapplication_mac.mm
@@ -737,9 +737,6 @@ static void qt_post_window_change_event(QWidget *widget)
*/
static void qt_mac_update_child_gl_widgets(QWidget *widget)
{
- if (widget->isWindow())
- return;
-
// Update all OpenGL child widgets for the given widget.
QList<QWidgetPrivate::GlWidgetInfo> &glWidgets = qt_widget_private(widget)->glWidgets;
QList<QWidgetPrivate::GlWidgetInfo>::iterator end = glWidgets.end();
diff --git a/src/gui/kernel/qapplication_s60.cpp b/src/gui/kernel/qapplication_s60.cpp
index e197dc5..e937918 100644
--- a/src/gui/kernel/qapplication_s60.cpp
+++ b/src/gui/kernel/qapplication_s60.cpp
@@ -129,7 +129,13 @@ void QS60Data::setStatusPaneAndButtonGroupVisibility(bool statusPaneVisible, boo
statusPaneVisibilityChanged = (s->IsVisible() != statusPaneVisible);
s->MakeVisible(statusPaneVisible);
}
- if (buttonGroupVisibilityChanged && !statusPaneVisibilityChanged)
+ if (buttonGroupVisibilityChanged || statusPaneVisibilityChanged) {
+ const QSize size = qt_TRect2QRect(static_cast<CEikAppUi*>(S60->appUi())->ClientRect()).size();
+ const QSize oldSize; // note that QDesktopWidget::resizeEvent ignores the QResizeEvent contents
+ QResizeEvent event(size, oldSize);
+ QApplication::instance()->sendEvent(QApplication::desktop(), &event);
+ }
+ if (buttonGroupVisibilityChanged && !statusPaneVisibilityChanged && QApplication::activeWindow())
// Ensure that control rectangle is updated
static_cast<QSymbianControl *>(QApplication::activeWindow()->winId())->handleClientAreaChange();
}
@@ -1242,17 +1248,28 @@ void QSymbianControl::FocusChanged(TDrawNow /* aDrawNow */)
S60->setStatusPaneAndButtonGroupVisibility(statusPaneVisibility, buttonGroupVisibility);
#endif
} else if (QApplication::activeWindow() == qwidget->window()) {
- if (CCoeEnv::Static()->AppUi()->IsDisplayingMenuOrDialog() || S60->menuBeingConstructed) {
- QWidget *fw = QApplication::focusWidget();
- if (fw) {
- QFocusEvent event(QEvent::FocusOut, Qt::PopupFocusReason);
- QCoreApplication::sendEvent(fw, &event);
- }
- m_symbianPopupIsOpen = true;
- return;
+ bool focusedControlFound = false;
+ WId winId = 0;
+ for (QWidget *w = qwidget->parentWidget(); w && (winId = w->internalWinId()); w = w->parentWidget()) {
+ if (winId->IsFocused() && winId->IsVisible()) {
+ focusedControlFound = true;
+ break;
+ } else if (w->isWindow())
+ break;
}
+ if (!focusedControlFound) {
+ if (CCoeEnv::Static()->AppUi()->IsDisplayingMenuOrDialog() || S60->menuBeingConstructed) {
+ QWidget *fw = QApplication::focusWidget();
+ if (fw) {
+ QFocusEvent event(QEvent::FocusOut, Qt::PopupFocusReason);
+ QCoreApplication::sendEvent(fw, &event);
+ }
+ m_symbianPopupIsOpen = true;
+ return;
+ }
- QApplication::setActiveWindow(0);
+ QApplication::setActiveWindow(0);
+ }
}
// else { We don't touch the active window unless we were explicitly activated or deactivated }
}
diff --git a/src/gui/kernel/qcocoasharedwindowmethods_mac_p.h b/src/gui/kernel/qcocoasharedwindowmethods_mac_p.h
index 6795149..16f5bd6 100644
--- a/src/gui/kernel/qcocoasharedwindowmethods_mac_p.h
+++ b/src/gui/kernel/qcocoasharedwindowmethods_mac_p.h
@@ -58,6 +58,8 @@ QT_BEGIN_NAMESPACE
extern Qt::MouseButton cocoaButton2QtButton(NSInteger buttonNum); // qcocoaview.mm
extern QPointer<QWidget> qt_button_down; //qapplication_mac.cpp
extern const QStringList& qEnabledDraggedTypes(); // qmime_mac.cpp
+extern void qt_event_request_window_change(QWidget *); // qapplication_mac.mm
+extern void qt_mac_send_posted_gl_updates(QWidget *widget); // qapplication_mac.mm
Q_GLOBAL_STATIC(QPointer<QWidget>, currentDragTarget);
@@ -227,6 +229,17 @@ QT_END_NAMESPACE
[self release];
}
+- (void)setInitialFirstResponder:(NSView *)view
+{
+ // This method is called the first time the window is placed on screen and
+ // is the earliest point in time we can connect OpenGL contexts to NSViews.
+ QWidget *qwidget = [[QT_MANGLE_NAMESPACE(QCocoaWindowDelegate) sharedDelegate] qt_qwidgetForWindow:self];
+ qt_event_request_window_change(qwidget);
+ qt_mac_send_posted_gl_updates(qwidget);
+
+ [super setInitialFirstResponder:view];
+}
+
- (BOOL)makeFirstResponder:(NSResponder *)responder
{
// For some reason Cocoa wants to flip the first responder
diff --git a/src/gui/kernel/qt_s60_p.h b/src/gui/kernel/qt_s60_p.h
index eb1aa18..7fd2baa 100644
--- a/src/gui/kernel/qt_s60_p.h
+++ b/src/gui/kernel/qt_s60_p.h
@@ -87,7 +87,7 @@ const TInt KInternalStatusPaneChange = 0x50000000;
//this macro exists because EColor16MAP enum value doesn't exist in Symbian OS 9.2
#define Q_SYMBIAN_ECOLOR16MAP TDisplayMode(13)
-class QS60ThreadLocalData
+class Q_AUTOTEST_EXPORT QS60ThreadLocalData
{
public:
QS60ThreadLocalData();
@@ -171,7 +171,7 @@ public:
#endif
};
-QS60Data* qGlobalS60Data();
+Q_AUTOTEST_EXPORT QS60Data* qGlobalS60Data();
#define S60 qGlobalS60Data()
class QAbstractLongTapObserver
diff --git a/src/gui/kernel/qwidget_s60.cpp b/src/gui/kernel/qwidget_s60.cpp
index fc13c93..c98c05a 100644
--- a/src/gui/kernel/qwidget_s60.cpp
+++ b/src/gui/kernel/qwidget_s60.cpp
@@ -503,8 +503,10 @@ void QWidgetPrivate::show_sys()
// Can't use AppUi directly because it privately inherits from MEikStatusPaneObserver.
QSymbianControl *desktopControl = static_cast<QSymbianControl *>(QApplication::desktop()->winId());
S60->statusPane()->SetObserver(desktopControl);
- if (isFullscreen)
- S60->statusPane()->MakeVisible(false);
+ if (isFullscreen) {
+ const bool cbaVisible = S60->buttonGroupContainer() && S60->buttonGroupContainer()->IsVisible();
+ S60->setStatusPaneAndButtonGroupVisibility(false, cbaVisible);
+ }
}
}
}
diff --git a/src/gui/painting/qblendfunctions.cpp b/src/gui/painting/qblendfunctions.cpp
index 24908ce..0edf256 100644
--- a/src/gui/painting/qblendfunctions.cpp
+++ b/src/gui/painting/qblendfunctions.cpp
@@ -254,10 +254,10 @@ void qt_scale_image_argb32_on_rgb16(uchar *destPixels, int dbpl,
}
}
-static void qt_blend_rgb16_on_rgb16(uchar *dst, int dbpl,
- const uchar *src, int sbpl,
- int w, int h,
- int const_alpha)
+void qt_blend_rgb16_on_rgb16(uchar *dst, int dbpl,
+ const uchar *src, int sbpl,
+ int w, int h,
+ int const_alpha)
{
#ifdef QT_DEBUG_DRAW
printf("qt_blend_rgb16_on_rgb16: dst=(%p, %d), src=(%p, %d), dim=(%d, %d) alpha=%d\n",
diff --git a/src/gui/painting/qdrawhelper.cpp b/src/gui/painting/qdrawhelper.cpp
index 5223458..5e1509d 100644
--- a/src/gui/painting/qdrawhelper.cpp
+++ b/src/gui/painting/qdrawhelper.cpp
@@ -8014,6 +8014,7 @@ void qInitDrawhelperAsm()
qBlendFunctions[QImage::Format_ARGB32_Premultiplied][QImage::Format_ARGB32_Premultiplied] = qt_blend_argb32_on_argb32_neon;
qBlendFunctions[QImage::Format_RGB16][QImage::Format_ARGB32_Premultiplied] = qt_blend_argb32_on_rgb16_neon;
qBlendFunctions[QImage::Format_ARGB32_Premultiplied][QImage::Format_RGB16] = qt_blend_rgb16_on_argb32_neon;
+ qBlendFunctions[QImage::Format_RGB16][QImage::Format_RGB16] = qt_blend_rgb16_on_rgb16_neon;
qScaleFunctions[QImage::Format_RGB16][QImage::Format_ARGB32_Premultiplied] = qt_scale_image_argb32_on_rgb16_neon;
qScaleFunctions[QImage::Format_RGB16][QImage::Format_RGB16] = qt_scale_image_rgb16_on_rgb16_neon;
diff --git a/src/gui/painting/qdrawhelper_neon.cpp b/src/gui/painting/qdrawhelper_neon.cpp
index ed15c5c..0afd077 100644
--- a/src/gui/painting/qdrawhelper_neon.cpp
+++ b/src/gui/painting/qdrawhelper_neon.cpp
@@ -167,6 +167,14 @@ pixman_composite_scanline_over_asm_neon (int32_t w,
const uint32_t *dst,
const uint32_t *src);
+extern "C" void
+pixman_composite_src_0565_0565_asm_neon (int32_t w,
+ int32_t h,
+ uint16_t *dst,
+ int32_t dst_stride,
+ uint16_t *src,
+ int32_t src_stride);
+
// qblendfunctions.cpp
void qt_blend_argb32_on_rgb16_const_alpha(uchar *destPixels, int dbpl,
const uchar *srcPixels, int sbpl,
@@ -200,6 +208,96 @@ void qt_blend_rgb16_on_argb32_neon(uchar *destPixels, int dbpl,
pixman_composite_src_0565_8888_asm_neon(w, h, dst, dbpl, src, sbpl);
}
+// qblendfunctions.cpp
+void qt_blend_rgb16_on_rgb16(uchar *dst, int dbpl,
+ const uchar *src, int sbpl,
+ int w, int h,
+ int const_alpha);
+
+template <int N>
+static inline void scanLineBlit16(quint16 *dst, quint16 *src, int dstride)
+{
+ if (N >= 2) {
+ ((quint32 *)dst)[0] = ((quint32 *)src)[0];
+ __builtin_prefetch(dst + dstride, 1, 0);
+ }
+ for (int i = 1; i < N/2; ++i)
+ ((quint32 *)dst)[i] = ((quint32 *)src)[i];
+ if (N & 1)
+ dst[N-1] = src[N-1];
+}
+
+template <int Width>
+static inline void blockBlit16(quint16 *dst, quint16 *src, int dstride, int sstride, int h)
+{
+ union {
+ quintptr address;
+ quint16 *pointer;
+ } u;
+
+ u.pointer = dst;
+
+ if (u.address & 2) {
+ while (h--) {
+ // align dst
+ dst[0] = src[0];
+ if (Width > 1)
+ scanLineBlit16<Width-1>(dst + 1, src + 1, dstride);
+ dst += dstride;
+ src += sstride;
+ }
+ } else {
+ while (h--) {
+ scanLineBlit16<Width>(dst, src, dstride);
+
+ dst += dstride;
+ src += sstride;
+ }
+ }
+}
+
+void qt_blend_rgb16_on_rgb16_neon(uchar *destPixels, int dbpl,
+ const uchar *srcPixels, int sbpl,
+ int w, int h,
+ int const_alpha)
+{
+ // testing show that the default memcpy is faster for widths 150 and up
+ if (const_alpha != 256 || w >= 150) {
+ qt_blend_rgb16_on_rgb16(destPixels, dbpl, srcPixels, sbpl, w, h, const_alpha);
+ return;
+ }
+
+ int dstride = dbpl / 2;
+ int sstride = sbpl / 2;
+
+ quint16 *dst = (quint16 *) destPixels;
+ quint16 *src = (quint16 *) srcPixels;
+
+ switch (w) {
+#define BLOCKBLIT(n) case n: blockBlit16<n>(dst, src, dstride, sstride, h); return;
+ BLOCKBLIT(1);
+ BLOCKBLIT(2);
+ BLOCKBLIT(3);
+ BLOCKBLIT(4);
+ BLOCKBLIT(5);
+ BLOCKBLIT(6);
+ BLOCKBLIT(7);
+ BLOCKBLIT(8);
+ BLOCKBLIT(9);
+ BLOCKBLIT(10);
+ BLOCKBLIT(11);
+ BLOCKBLIT(12);
+ BLOCKBLIT(13);
+ BLOCKBLIT(14);
+ BLOCKBLIT(15);
+#undef BLOCKBLIT
+ default:
+ break;
+ }
+
+ pixman_composite_src_0565_0565_asm_neon (w, h, dst, dstride, src, sstride);
+}
+
extern "C" void blend_8_pixels_argb32_on_rgb16_neon(quint16 *dst, const quint32 *src, int const_alpha);
void qt_blend_argb32_on_rgb16_neon(uchar *destPixels, int dbpl,
diff --git a/src/gui/painting/qdrawhelper_neon_p.h b/src/gui/painting/qdrawhelper_neon_p.h
index 451edbc..d25b7ec 100644
--- a/src/gui/painting/qdrawhelper_neon_p.h
+++ b/src/gui/painting/qdrawhelper_neon_p.h
@@ -84,6 +84,11 @@ void qt_blend_rgb16_on_argb32_neon(uchar *destPixels, int dbpl,
int w, int h,
int const_alpha);
+void qt_blend_rgb16_on_rgb16_neon(uchar *destPixels, int dbpl,
+ const uchar *srcPixels, int sbpl,
+ int w, int h,
+ int const_alpha);
+
void qt_alphamapblit_quint16_neon(QRasterBuffer *rasterBuffer,
int x, int y, quint32 color,
const uchar *bitmap,
diff --git a/src/gui/painting/qpainter.cpp b/src/gui/painting/qpainter.cpp
index 4e10671..c6046ac 100644
--- a/src/gui/painting/qpainter.cpp
+++ b/src/gui/painting/qpainter.cpp
@@ -9028,7 +9028,7 @@ void QPainter::drawPixmapFragments(const PixmapFragment *fragments, int fragment
{
Q_D(QPainter);
- if (!d->engine)
+ if (!d->engine || pixmap.isNull())
return;
#ifndef QT_NO_DEBUG
diff --git a/src/gui/styles/qcleanlooksstyle.cpp b/src/gui/styles/qcleanlooksstyle.cpp
index ada5293..306219d 100644
--- a/src/gui/styles/qcleanlooksstyle.cpp
+++ b/src/gui/styles/qcleanlooksstyle.cpp
@@ -2157,7 +2157,7 @@ void QCleanlooksStyle::drawControl(ControlElement element, const QStyleOption *o
}
if (button->features & QStyleOptionButton::HasMenu)
- ir = ir.adjusted(0, 0, -pixelMetric(PM_MenuButtonIndicator, button, widget), 0);
+ ir = ir.adjusted(0, 0, -proxy()->pixelMetric(PM_MenuButtonIndicator, button, widget), 0);
proxy()->drawItemText(painter, ir, tf, button->palette, (button->state & State_Enabled),
button->text, QPalette::ButtonText);
}
@@ -4014,8 +4014,8 @@ QRect QCleanlooksStyle::subControlRect(ComplexControl control, const QStyleOptio
switch (subControl) {
case SC_SliderHandle: {
if (slider->orientation == Qt::Horizontal) {
- rect.setHeight(pixelMetric(PM_SliderThickness));
- rect.setWidth(pixelMetric(PM_SliderLength));
+ rect.setHeight(proxy()->pixelMetric(PM_SliderThickness));
+ rect.setWidth(proxy()->pixelMetric(PM_SliderLength));
int centerY = slider->rect.center().y() - rect.height() / 2;
if (slider->tickPosition & QSlider::TicksAbove)
centerY += tickSize;
@@ -4023,8 +4023,8 @@ QRect QCleanlooksStyle::subControlRect(ComplexControl control, const QStyleOptio
centerY -= tickSize;
rect.moveTop(centerY);
} else {
- rect.setWidth(pixelMetric(PM_SliderThickness));
- rect.setHeight(pixelMetric(PM_SliderLength));
+ rect.setWidth(proxy()->pixelMetric(PM_SliderThickness));
+ rect.setHeight(proxy()->pixelMetric(PM_SliderLength));
int centerX = slider->rect.center().x() - rect.width() / 2;
if (slider->tickPosition & QSlider::TicksAbove)
centerX += tickSize;
diff --git a/src/gui/styles/qs60style.cpp b/src/gui/styles/qs60style.cpp
index e28403b..0ba1bc6 100644
--- a/src/gui/styles/qs60style.cpp
+++ b/src/gui/styles/qs60style.cpp
@@ -2340,16 +2340,20 @@ void QS60Style::drawPrimitive(PrimitiveElement element, const QStyleOption *opti
tableView = true;
QS60StylePrivate::SkinElements element;
+ bool themeGraphicDefined = false;
QRect elementRect = option->rect;
//draw item is drawn as pressed, if it already has focus.
if (isPressed && (hasFocus || isSelected)) {
+ themeGraphicDefined = true;
element = tableView ? QS60StylePrivate::SE_TableItemPressed : QS60StylePrivate::SE_ListItemPressed;
} else if (hasFocus || (isSelected && selectionBehavior != QAbstractItemView::SelectItems)) {
element = QS60StylePrivate::SE_ListHighlight;
elementRect = highlightRect;
+ themeGraphicDefined = true;
}
- QS60StylePrivate::drawSkinElement(element, painter, elementRect, flags);
+ if (themeGraphicDefined)
+ QS60StylePrivate::drawSkinElement(element, painter, elementRect, flags);
} else {
QCommonStyle::drawPrimitive(element, option, painter, widget);
}
diff --git a/src/gui/text/qfont_s60.cpp b/src/gui/text/qfont_s60.cpp
index ccd17a2..2d547a9 100644
--- a/src/gui/text/qfont_s60.cpp
+++ b/src/gui/text/qfont_s60.cpp
@@ -40,15 +40,26 @@
****************************************************************************/
#include "qfont.h"
+#include "qfont_p.h"
#include <private/qt_s60_p.h>
#include <private/qpixmap_s60_p.h>
#include "qmutex.h"
QT_BEGIN_NAMESPACE
-#if 1
#ifdef QT_NO_FREETYPE
Q_GLOBAL_STATIC(QMutex, lastResortFamilyMutex);
+Q_GLOBAL_STATIC_WITH_INITIALIZER(QStringList, fontFamiliesOnFontServer, {
+ QSymbianFbsHeapLock lock(QSymbianFbsHeapLock::Unlock);
+ const int numTypeFaces = S60->screenDevice()->NumTypefaces();
+ for (int i = 0; i < numTypeFaces; i++) {
+ TTypefaceSupport typefaceSupport;
+ S60->screenDevice()->TypefaceSupport(typefaceSupport, i);
+ const QString familyName((const QChar *)typefaceSupport.iTypeface.iName.Ptr(), typefaceSupport.iTypeface.iName.Length());
+ x->append(familyName);
+ }
+ lock.relock();
+});
#endif // QT_NO_FREETYPE
QString QFont::lastResortFamily() const
@@ -70,7 +81,7 @@ QString QFont::lastResortFamily() const
lock.relock();
}
return family;
-#else
+#else // QT_NO_FREETYPE
// For the FreeType case we just hard code the face name, since otherwise on
// East Asian systems we may get a name for a stroke based (non-ttf) font.
@@ -82,15 +93,24 @@ QString QFont::lastResortFamily() const
return QLatin1String(isJapaneseOrChineseSystem?"Heisei Kaku Gothic S60":"Series 60 Sans");
#endif // QT_NO_FREETYPE
}
-#else // 0
-QString QFont::lastResortFamily() const
-{
- return QLatin1String("Series 60 Sans");
-}
-#endif // 0
QString QFont::defaultFamily() const
{
+#ifdef QT_NO_FREETYPE
+ switch(d->request.styleHint) {
+ case QFont::SansSerif: {
+ static const char* const preferredSansSerif[] = {"Nokia Sans S60", "Series 60 Sans"};
+ for (int i = 0; i < sizeof preferredSansSerif / sizeof preferredSansSerif[0]; ++i) {
+ const QString sansSerif = QLatin1String(preferredSansSerif[i]);
+ if (fontFamiliesOnFontServer()->contains(sansSerif))
+ return sansSerif;
+ }
+ }
+ // No break. Intentional fall through.
+ default:
+ return lastResortFamily();
+ }
+#endif // QT_NO_FREETYPE
return lastResortFamily();
}
diff --git a/src/gui/text/qfontengine.cpp b/src/gui/text/qfontengine.cpp
index 3f758b1..1e8461f 100644
--- a/src/gui/text/qfontengine.cpp
+++ b/src/gui/text/qfontengine.cpp
@@ -874,8 +874,8 @@ const uchar *QFontEngine::getCMap(const uchar *table, uint tableSize, bool *isSy
enum {
Invalid,
- Symbol,
AppleRoman,
+ Symbol,
Unicode11,
Unicode,
MicrosoftUnicode,
@@ -939,7 +939,7 @@ const uchar *QFontEngine::getCMap(const uchar *table, uint tableSize, bool *isSy
return 0;
resolveTable:
- *isSymbolFont = (score == Symbol);
+ *isSymbolFont = (symbolTable > -1);
unsigned int unicode_table = qFromBigEndian<quint32>(maps + 8*tableToUse + 4);
diff --git a/src/gui/text/qfontengine_ft.cpp b/src/gui/text/qfontengine_ft.cpp
index 2c4fbab..a9b25f5 100644
--- a/src/gui/text/qfontengine_ft.cpp
+++ b/src/gui/text/qfontengine_ft.cpp
@@ -94,6 +94,13 @@ QT_BEGIN_NAMESPACE
#define Y_SIZE(face,i) ((face)->available_sizes[i].height << 6)
#endif
+/* FreeType 2.1.10 starts to provide FT_GlyphSlot_Embolden */
+#if (FREETYPE_MAJOR*10000+FREETYPE_MINOR*100+FREETYPE_PATCH) >= 20110
+#define Q_FT_GLYPHSLOT_EMBOLDEN(slot) FT_GlyphSlot_Embolden(slot)
+#else
+#define Q_FT_GLYPHSLOT_EMBOLDEN(slot)
+#endif
+
#define FLOOR(x) ((x) & -64)
#define CEIL(x) (((x)+63) & -64)
#define TRUNC(x) ((x) >> 6)
@@ -794,7 +801,7 @@ QFontEngineFT::Glyph *QFontEngineFT::loadGlyphMetrics(QGlyphSet *set, uint glyph
}
FT_GlyphSlot slot = face->glyph;
- if (embolden) FT_GlyphSlot_Embolden(slot);
+ if (embolden) Q_FT_GLYPHSLOT_EMBOLDEN(slot);
int left = slot->metrics.horiBearingX;
int right = slot->metrics.horiBearingX + slot->metrics.width;
int top = slot->metrics.horiBearingY;
@@ -940,7 +947,7 @@ QFontEngineFT::Glyph *QFontEngineFT::loadGlyph(QGlyphSet *set, uint glyph, Glyph
return 0;
FT_GlyphSlot slot = face->glyph;
- if (embolden) FT_GlyphSlot_Embolden(slot);
+ if (embolden) Q_FT_GLYPHSLOT_EMBOLDEN(slot);
FT_Library library = qt_getFreetype();
info.xOff = TRUNC(ROUND(slot->advance.x));
@@ -1558,8 +1565,6 @@ bool QFontEngineFT::stringToCMap(const QChar *str, int len, QGlyphLayout *glyphs
FT_Face face = freetype->face;
for ( int i = 0; i < len; ++i ) {
unsigned int uc = getChar(str, i, len);
- if (mirrored)
- uc = QChar::mirroredChar(uc);
glyphs->glyphs[glyph_pos] = uc < QFreetypeFace::cmapCacheSize ? freetype->cmapCache[uc] : 0;
if ( !glyphs->glyphs[glyph_pos] ) {
glyph_t glyph;
diff --git a/src/gui/text/qfontengine_qpf.cpp b/src/gui/text/qfontengine_qpf.cpp
index a0593cc..53b6910 100644
--- a/src/gui/text/qfontengine_qpf.cpp
+++ b/src/gui/text/qfontengine_qpf.cpp
@@ -578,8 +578,6 @@ bool QFontEngineQPF::stringToCMap(const QChar *str, int len, QGlyphLayout *glyph
if (symbol) {
for (int i = 0; i < len; ++i) {
unsigned int uc = getChar(str, i, len);
- if (mirrored)
- uc = QChar::mirroredChar(uc);
glyphs->glyphs[glyph_pos] = getTrueTypeGlyphIndex(cmap, uc);
if(!glyphs->glyphs[glyph_pos] && uc < 0x100)
glyphs->glyphs[glyph_pos] = getTrueTypeGlyphIndex(cmap, uc + 0xf000);
diff --git a/src/gui/text/qfontengine_s60.cpp b/src/gui/text/qfontengine_s60.cpp
index 2cc3f50..5980f20 100644
--- a/src/gui/text/qfontengine_s60.cpp
+++ b/src/gui/text/qfontengine_s60.cpp
@@ -166,6 +166,11 @@ const uchar *QSymbianTypeFaceExtras::cmap() const
return reinterpret_cast<const uchar *>(m_cmapTable.constData());
}
+bool QSymbianTypeFaceExtras::isSymbolCMap() const
+{
+ return m_symbolCMap;
+}
+
CFont *QSymbianTypeFaceExtras::fontOwner() const
{
return m_cFont;
@@ -256,7 +261,7 @@ bool QFontEngineS60::stringToCMap(const QChar *characters, int len, QGlyphLayout
for (int i = 0; i < len; ++i) {
const unsigned int uc = getChar(characters, i, len);
*g++ = QFontEngine::getTrueTypeGlyphIndex(cmap,
- isRtl ? QChar::mirroredChar(uc) : uc);
+ (isRtl && !m_extras->isSymbolCMap()) ? QChar::mirroredChar(uc) : uc);
}
glyphs->numGlyphs = g - glyphs->glyphs;
diff --git a/src/gui/text/qfontengine_s60_p.h b/src/gui/text/qfontengine_s60_p.h
index d65f13b..d05c23c 100644
--- a/src/gui/text/qfontengine_s60_p.h
+++ b/src/gui/text/qfontengine_s60_p.h
@@ -81,6 +81,7 @@ public:
bool getSfntTableData(uint tag, uchar *buffer, uint *length) const;
const uchar *cmap() const;
CFont *fontOwner() const;
+ bool isSymbolCMap() const;
private:
CFont* m_cFont;
diff --git a/src/gui/widgets/qlinecontrol.cpp b/src/gui/widgets/qlinecontrol.cpp
index 7f0c6c8..b6dfd13 100644
--- a/src/gui/widgets/qlinecontrol.cpp
+++ b/src/gui/widgets/qlinecontrol.cpp
@@ -419,7 +419,7 @@ void QLineControl::processInputMethodEvent(QInputMethodEvent *event)
int c = m_cursor; // cursor position after insertion of commit string
- if (event->replacementStart() == 0)
+ if (event->replacementStart() <= 0)
c += event->commitString().length() + qMin(-event->replacementStart(), event->replacementLength());
m_cursor += event->replacementStart();
@@ -464,8 +464,6 @@ void QLineControl::processInputMethodEvent(QInputMethodEvent *event)
if (a.type == QInputMethodEvent::Cursor) {
m_preeditCursor = a.start;
m_hideCursor = !a.length;
- if (m_hideCursor)
- setCursorBlinkPeriod(0);
} else if (a.type == QInputMethodEvent::TextFormat) {
QTextCharFormat f = qvariant_cast<QTextFormat>(a.value).toCharFormat();
if (f.isValid()) {
@@ -529,7 +527,7 @@ void QLineControl::draw(QPainter *painter, const QPoint &offset, const QRect &cl
int cursor = m_cursor;
if (m_preeditCursor != -1)
cursor += m_preeditCursor;
- if (!m_hideCursor && (!m_blinkPeriod || m_blinkStatus))
+ if(!m_blinkPeriod || m_blinkStatus)
m_textLayout.drawCursor(painter, offset, cursor, m_cursorWidth);
}
}
diff --git a/src/network/bearer/qnetworkconfigmanager.cpp b/src/network/bearer/qnetworkconfigmanager.cpp
index 65014a6..23d7800 100644
--- a/src/network/bearer/qnetworkconfigmanager.cpp
+++ b/src/network/bearer/qnetworkconfigmanager.cpp
@@ -45,12 +45,33 @@
#include "qbearerengine_p.h"
#include <QtCore/qstringlist.h>
+#include <QtCore/qcoreapplication.h>
#ifndef QT_NO_BEARERMANAGEMENT
QT_BEGIN_NAMESPACE
-Q_GLOBAL_STATIC(QNetworkConfigurationManagerPrivate, connManager);
+#define Q_GLOBAL_STATIC_QAPP_DESTRUCTION(TYPE, NAME) \
+ Q_GLOBAL_STATIC_INIT(TYPE, NAME); \
+ static void NAME##_cleanup() \
+ { \
+ delete this_##NAME.pointer; \
+ this_##NAME.pointer = 0; \
+ this_##NAME.destroyed = true; \
+ } \
+ static TYPE *NAME() \
+ { \
+ if (!this_##NAME.pointer && !this_##NAME.destroyed) { \
+ TYPE *x = new TYPE; \
+ if (!this_##NAME.pointer.testAndSetOrdered(0, x)) \
+ delete x; \
+ else \
+ qAddPostRoutine(NAME##_cleanup); \
+ } \
+ return this_##NAME.pointer; \
+ }
+
+Q_GLOBAL_STATIC_QAPP_DESTRUCTION(QNetworkConfigurationManagerPrivate, connManager);
QNetworkConfigurationManagerPrivate *qNetworkConfigurationManagerPrivate()
{
diff --git a/src/opengl/qgl_mac.mm b/src/opengl/qgl_mac.mm
index 66fe7d3..f023a97 100644
--- a/src/opengl/qgl_mac.mm
+++ b/src/opengl/qgl_mac.mm
@@ -697,9 +697,17 @@ void QGLContext::updatePaintDevice()
QWidget *w = (QWidget *)d->paintDevice;
NSView *view = qt_mac_nativeview_for(w);
- // ideally we would use QWidget::isVisible(), but we get "invalid drawable" errors
- if (![(NSWindow *)qt_mac_window_for(w) isVisible])
- return;
+ // Trying to attach the GL context to the NSView will fail with
+ // "invalid drawable" if done too soon, but we have to make sure
+ // the connection is made before the first paint event. Using
+ // the NSView do to this check fails as the NSView is visible
+ // before it's safe to connect, and using the NSWindow fails as
+ // the NSWindow will become visible after the first paint event.
+ // This leaves us with the QWidget, who's visible state seems
+ // to match the point in time when it's safe to connect.
+ if (!w || !w->isVisible())
+ return; // Not safe to attach GL context to view yet
+
if ([static_cast<NSOpenGLContext *>(d->cx) view] != view && ![view isHidden])
[static_cast<NSOpenGLContext *>(d->cx) setView:view];
} else if (d->paintDevice->devType() == QInternal::Pixmap) {
diff --git a/src/plugins/bearer/symbian/qnetworksession_impl.cpp b/src/plugins/bearer/symbian/qnetworksession_impl.cpp
index 32eb61a..7f81397 100644
--- a/src/plugins/bearer/symbian/qnetworksession_impl.cpp
+++ b/src/plugins/bearer/symbian/qnetworksession_impl.cpp
@@ -48,6 +48,14 @@
#include <stdapis/sys/socket.h>
#include <stdapis/net/if.h>
+#ifdef SNAP_FUNCTIONALITY_AVAILABLE
+#include <cmmanager.h>
+#endif
+
+#if defined(OCC_FUNCTIONALITY_AVAILABLE) && defined(SNAP_FUNCTIONALITY_AVAILABLE)
+#include <extendedconnpref.h>
+#endif
+
#ifndef QT_NO_BEARERMANAGEMENT
QT_BEGIN_NAMESPACE
@@ -103,17 +111,19 @@ QNetworkSessionPrivateImpl::~QNetworkSessionPrivateImpl()
Cancel();
iSocketServ.Close();
- // Restore default interface to system default
- restoreDefaultIf();
+ // Close global 'Open C' RConnection
+ // Clears also possible unsetdefaultif() flags.
+ setdefaultif(0);
iConnectionMonitor.Close();
iOpenCLibrary.Close();
#ifdef QT_BEARERMGMT_SYMBIAN_DEBUG
- qDebug() << "QNS this : " << QString::number((uint)this) << " - destroyed (and restoreDefaultIf())";
+ qDebug() << "QNS this : " << QString::number((uint)this)
+ << " - destroyed (and setdefaultif(0))";
#endif
}
-void QNetworkSessionPrivateImpl::configurationStateChanged(TUint32 accessPointId, TUint32 connMonId, QNetworkSession::State newState)
+void QNetworkSessionPrivateImpl::configurationStateChanged(quint32 accessPointId, quint32 connMonId, QNetworkSession::State newState)
{
if (iHandleStateNotificationsFromManager) {
#ifdef QT_BEARERMGMT_SYMBIAN_DEBUG
@@ -170,8 +180,10 @@ void QNetworkSessionPrivateImpl::syncStateWithInterface()
return;
if (iFirstSync) {
- QObject::connect(engine, SIGNAL(configurationStateChanged(TUint32, TUint32, QNetworkSession::State)),
- this, SLOT(configurationStateChanged(TUint32, TUint32, QNetworkSession::State)));
+ QObject::connect(engine,
+ SIGNAL(configurationStateChanged(quint32,quint32,QNetworkSession::State)),
+ this,
+ SLOT(configurationStateChanged(quint32,quint32,QNetworkSession::State)));
// Listen to configuration removals, so that in case the configuration
// this session is based on is removed, session knows to enter Invalid -state.
QObject::connect(engine, SIGNAL(configurationRemoved(QNetworkConfigurationPrivatePointer)),
@@ -523,8 +535,15 @@ void QNetworkSessionPrivateImpl::close(bool allowSignals)
Cancel(); // closes iConnection
iSocketServ.Close();
- // Restore default interface to system default
- restoreDefaultIf();
+ // Close global 'Open C' RConnection. If OpenC supports,
+ // close the defaultif for good to avoid difficult timing
+ // and bouncing issues of network going immediately back up
+ // because of e.g. select() thread etc.
+ if (iDynamicUnSetdefaultif) {
+ iDynamicUnSetdefaultif();
+ } else {
+ setdefaultif(0);
+ }
// If UserChoice, go down immediately. If some other configuration,
// go down immediately if there is no reports expected from the platform;
@@ -902,13 +921,13 @@ QNetworkConfiguration QNetworkSessionPrivateImpl::activeConfiguration(TUint32 ia
if (iapId == 0) {
_LIT(KSetting, "IAP\\Id");
iConnection.GetIntSetting(KSetting, iapId);
-#if defined(OCC_FUNCTIONALITY_AVAILABLE) && defined(SNAP_FUNCTIONALITY_AVAILABLE)
+#ifdef SNAP_FUNCTIONALITY_AVAILABLE
// Check if this is an Easy WLAN configuration. On Symbian^3 RConnection may report
// the used configuration as 'EasyWLAN' IAP ID if someone has just opened the configuration
// from WLAN Scan dialog, _and_ that connection is still up. We need to find the
// real matching configuration. Function alters the Easy WLAN ID to real IAP ID (only if
// easy WLAN):
- engine->easyWlanTrueIapId(iapId);
+ easyWlanTrueIapId(iapId);
#endif
}
@@ -948,12 +967,18 @@ QNetworkConfiguration QNetworkSessionPrivateImpl::activeConfiguration(TUint32 ia
}
}
} else {
-#if defined(OCC_FUNCTIONALITY_AVAILABLE) && defined(SNAP_FUNCTIONALITY_AVAILABLE)
- // On Symbian^3 (only, not earlier or Symbian^4) if the SNAP was not reachable, it triggers
- // user choice type of activity (EasyWLAN). As a result, a new IAP may be created, and
- // hence if was not found yet. Therefore update configurations and see if there is something new.
+#ifdef SNAP_FUNCTIONALITY_AVAILABLE
+ // On Symbian^3 (only, not earlier or Symbian^4) if the SNAP was not reachable, it
+ // triggers user choice type of activity (EasyWLAN). As a result, a new IAP may be
+ // created, and hence if was not found yet. Therefore update configurations and see if
+ // there is something new.
+
// 1. Update knowledge from the databases.
- engine->requestUpdate();
+ if (thread() != engine->thread())
+ QMetaObject::invokeMethod(engine, "requestUpdate", Qt::BlockingQueuedConnection);
+ else
+ engine->requestUpdate();
+
// 2. Check if new configuration was created during connection creation
QList<QString> knownConfigs = engine->accessPointConfigurationIdentifiers();
#ifdef QT_BEARERMGMT_SYMBIAN_DEBUG
@@ -1006,7 +1031,12 @@ QNetworkConfiguration QNetworkSessionPrivateImpl::activeConfiguration(TUint32 ia
} else {
// Check if new (WLAN) IAP was created in IAP/SNAP dialog
// 1. Sync internal configurations array to commsdb first
- engine->updateConfigurations();
+ if (thread() != engine->thread()) {
+ QMetaObject::invokeMethod(engine, "requestUpdate",
+ Qt::BlockingQueuedConnection);
+ } else {
+ engine->requestUpdate();
+ }
// 2. Check if new configuration was created during connection creation
QStringList knownConfigs = engine->accessPointConfigurationIdentifiers();
if (knownConfigs.count() > iKnownConfigsBeforeConnectionStart.count()) {
@@ -1319,7 +1349,7 @@ bool QNetworkSessionPrivateImpl::newState(QNetworkSession::State newState, TUint
}
}
}
-#if defined(OCC_FUNCTIONALITY_AVAILABLE) && defined(SNAP_FUNCTIONALITY_AVAILABLE)
+#ifdef SNAP_FUNCTIONALITY_AVAILABLE
// If the retVal is not true here, it means that the status update may apply to an IAP outside of
// SNAP (session is based on SNAP but follows IAP outside of it), which may occur on Symbian^3 EasyWlan.
if (retVal == false && activeConfig.isValid() &&
@@ -1449,28 +1479,63 @@ void QNetworkSessionPrivateImpl::handleSymbianConnectionStatusChange(TInt aConne
}
}
-void QNetworkSessionPrivateImpl::restoreDefaultIf()
+#if defined(SNAP_FUNCTIONALITY_AVAILABLE)
+bool QNetworkSessionPrivateImpl::easyWlanTrueIapId(TUint32 &trueIapId) const
{
- QNetworkConfigurationPrivatePointer config = engine->defaultConfiguration();
+ RCmManager iCmManager;
+ TRAPD(err, iCmManager.OpenL());
+ if (err != KErrNone)
+ return false;
- QMutexLocker locker(&config->mutex);
+ // Check if this is easy wlan id in the first place
+ if (trueIapId != iCmManager.EasyWlanIdL()) {
+ iCmManager.Close();
+ return false;
+ }
- ifreq ifr;
- memset(&ifr, 0, sizeof(ifreq));
+ iCmManager.Close();
- switch (config->type) {
- case QNetworkConfiguration::InternetAccessPoint:
- strcpy(ifr.ifr_name, config->name.toUtf8().constData());
- break;
- case QNetworkConfiguration::ServiceNetwork:
- ifr.ifr_ifru.snap_id = toSymbianConfig(config)->numericId;
- break;
- default:
- ;
- };
+ // Loop through all connections that connection monitor is aware
+ // and check for IAPs based on easy WLAN
+ TRequestStatus status;
+ TUint connectionCount;
+ iConnectionMonitor.GetConnectionCount(connectionCount, status);
+ User::WaitForRequest(status);
+ TUint connectionId;
+ TUint subConnectionCount;
+ TUint apId;
+ if (status.Int() == KErrNone) {
+ for (TUint i = 1; i <= connectionCount; i++) {
+ iConnectionMonitor.GetConnectionInfo(i, connectionId, subConnectionCount);
+ iConnectionMonitor.GetUintAttribute(connectionId, subConnectionCount,
+ KIAPId, apId, status);
+ User::WaitForRequest(status);
+ if (apId == trueIapId) {
+ TBuf<50>easyWlanNetworkName;
+ iConnectionMonitor.GetStringAttribute(connectionId, 0, KNetworkName,
+ easyWlanNetworkName, status);
+ User::WaitForRequest(status);
+ if (status.Int() != KErrNone)
+ continue;
+
+ const QString ssid = QString::fromUtf16(easyWlanNetworkName.Ptr(),
+ easyWlanNetworkName.Length());
- setdefaultif(&ifr);
+ QNetworkConfigurationPrivatePointer ptr = engine->configurationFromSsid(ssid);
+ if (ptr) {
+#ifdef QT_BEARERMGMT_SYMBIAN_DEBUG
+ qDebug() << "QNCM easyWlanTrueIapId(), found true IAP ID: "
+ << toSymbianConfig(ptr)->numericIdentifier();
+#endif
+ trueIapId = toSymbianConfig(ptr)->numericIdentifier();
+ return true;
+ }
+ }
+ }
+ }
+ return false;
}
+#endif
ConnectionProgressNotifier::ConnectionProgressNotifier(QNetworkSessionPrivateImpl& owner, RConnection& connection)
: CActive(CActive::EPriorityUserInput), iOwner(owner), iConnection(connection)
diff --git a/src/plugins/bearer/symbian/qnetworksession_impl.h b/src/plugins/bearer/symbian/qnetworksession_impl.h
index 1b0e968..8e3e997 100644
--- a/src/plugins/bearer/symbian/qnetworksession_impl.h
+++ b/src/plugins/bearer/symbian/qnetworksession_impl.h
@@ -64,9 +64,6 @@
#ifdef SNAP_FUNCTIONALITY_AVAILABLE
#include <comms-infras/cs_mobility_apiext.h>
#endif
-#if defined(OCC_FUNCTIONALITY_AVAILABLE) && defined(SNAP_FUNCTIONALITY_AVAILABLE)
- #include <extendedconnpref.h>
-#endif
QT_BEGIN_NAMESPACE
@@ -132,7 +129,8 @@ protected: // From CActive
void DoCancel();
private Q_SLOTS:
- void configurationStateChanged(TUint32 accessPointId, TUint32 connMonId, QNetworkSession::State newState);
+ void configurationStateChanged(quint32 accessPointId, quint32 connMonId,
+ QNetworkSession::State newState);
void configurationRemoved(QNetworkConfigurationPrivatePointer config);
void configurationAdded(QNetworkConfigurationPrivatePointer config);
@@ -143,11 +141,15 @@ private:
void handleSymbianConnectionStatusChange(TInt aConnectionStatus, TInt aError, TUint accessPointId = 0);
QNetworkConfiguration bestConfigFromSNAP(const QNetworkConfiguration& snapConfig) const;
QNetworkConfiguration activeConfiguration(TUint32 iapId = 0) const;
- void restoreDefaultIf();
#ifndef QT_NO_NETWORKINTERFACE
QNetworkInterface interface(TUint iapId) const;
#endif
+#if defined(SNAP_FUNCTIONALITY_AVAILABLE)
+ bool easyWlanTrueIapId(TUint32 &trueIapId) const;
+#endif
+
+
private: // data
SymbianEngine *engine;
diff --git a/src/plugins/bearer/symbian/symbianengine.cpp b/src/plugins/bearer/symbian/symbianengine.cpp
index 9593461..2e2b671 100644
--- a/src/plugins/bearer/symbian/symbianengine.cpp
+++ b/src/plugins/bearer/symbian/symbianengine.cpp
@@ -692,7 +692,7 @@ void SymbianEngine::updateActiveAccessPoints()
User::WaitForRequest(status);
QString ident = QT_BEARERMGMT_CONFIGURATION_IAP_PREFIX+QString::number(qHash(apId));
QNetworkConfigurationPrivatePointer ptr = accessPointConfigurations.value(ident);
-#if defined(OCC_FUNCTIONALITY_AVAILABLE) && defined(SNAP_FUNCTIONALITY_AVAILABLE)
+#ifdef SNAP_FUNCTIONALITY_AVAILABLE
if (!ptr) {
// If IAP was not found, check if the update was about EasyWLAN
ptr = configurationFromEasyWlan(apId, connectionId);
@@ -1054,7 +1054,7 @@ void SymbianEngine::EventL(const CConnMonEventBase& aEvent)
QString ident = QT_BEARERMGMT_CONFIGURATION_IAP_PREFIX+QString::number(qHash(apId));
QNetworkConfigurationPrivatePointer ptr = accessPointConfigurations.value(ident);
-#if defined(OCC_FUNCTIONALITY_AVAILABLE) && defined(SNAP_FUNCTIONALITY_AVAILABLE)
+#ifdef SNAP_FUNCTIONALITY_AVAILABLE
if (!ptr) {
// Check if status was regarding EasyWLAN
ptr = configurationFromEasyWlan(apId, connectionId);
@@ -1079,7 +1079,7 @@ void SymbianEngine::EventL(const CConnMonEventBase& aEvent)
User::WaitForRequest(status);
QString ident = QT_BEARERMGMT_CONFIGURATION_IAP_PREFIX+QString::number(qHash(apId));
QNetworkConfigurationPrivatePointer ptr = accessPointConfigurations.value(ident);
-#if defined(OCC_FUNCTIONALITY_AVAILABLE) && defined(SNAP_FUNCTIONALITY_AVAILABLE)
+#ifdef SNAP_FUNCTIONALITY_AVAILABLE
if (!ptr) {
// Check for EasyWLAN
ptr = configurationFromEasyWlan(apId, connectionId);
@@ -1189,7 +1189,7 @@ void SymbianEngine::EventL(const CConnMonEventBase& aEvent)
User::WaitForRequest(status);
QString ident = QT_BEARERMGMT_CONFIGURATION_IAP_PREFIX+QString::number(qHash(apId));
QNetworkConfigurationPrivatePointer ptr = accessPointConfigurations.value(ident);
-#if defined(OCC_FUNCTIONALITY_AVAILABLE) && defined(SNAP_FUNCTIONALITY_AVAILABLE)
+#ifdef SNAP_FUNCTIONALITY_AVAILABLE
if (!ptr) {
// If IAP was not found, check if the update was about EasyWLAN
ptr = configurationFromEasyWlan(apId, connectionId);
@@ -1210,11 +1210,39 @@ void SymbianEngine::EventL(const CConnMonEventBase& aEvent)
}
}
-#if defined(OCC_FUNCTIONALITY_AVAILABLE) && defined(SNAP_FUNCTIONALITY_AVAILABLE)
+/*
+ Returns the network configuration that matches the given SSID.
+*/
+QNetworkConfigurationPrivatePointer SymbianEngine::configurationFromSsid(const QString &ssid)
+{
+ QMutexLocker locker(&mutex);
+
+ // Browser through all items and check their name for match
+ QHash<QString, QNetworkConfigurationPrivatePointer>::ConstIterator i =
+ accessPointConfigurations.constBegin();
+ while (i != accessPointConfigurations.constEnd()) {
+ QNetworkConfigurationPrivatePointer ptr = i.value();
+
+ QMutexLocker configLocker(&ptr->mutex);
+
+ if (ptr->name == ssid) {
+#ifdef QT_BEARERMGMT_SYMBIAN_DEBUG
+ qDebug() << "QNCM EasyWlan uses real SSID: " << ssid;
+#endif
+ return ptr;
+ }
+ ++i;
+ }
+
+ return QNetworkConfigurationPrivatePointer();
+}
+
+#ifdef SNAP_FUNCTIONALITY_AVAILABLE
// Tries to derive configuration from EasyWLAN.
// First checks if the interface brought up was EasyWLAN, then derives the real SSID,
// and looks up configuration based on that one.
-QNetworkConfigurationPrivatePointer SymbianEngine::configurationFromEasyWlan(TUint32 apId, TUint connectionId)
+QNetworkConfigurationPrivatePointer SymbianEngine::configurationFromEasyWlan(TUint32 apId,
+ TUint connectionId)
{
if (apId == iCmManager.EasyWlanIdL()) {
TRequestStatus status;
@@ -1223,11 +1251,12 @@ QNetworkConfigurationPrivatePointer SymbianEngine::configurationFromEasyWlan(TUi
easyWlanNetworkName, status );
User::WaitForRequest(status);
if (status.Int() == KErrNone) {
- QString realSSID = QString::fromUtf16(easyWlanNetworkName.Ptr(), easyWlanNetworkName.Length());
+ const QString realSSID = QString::fromUtf16(easyWlanNetworkName.Ptr(),
+ easyWlanNetworkName.Length());
// Browser through all items and check their name for match
- QHash<QString, QExplicitlySharedDataPointer<QNetworkConfigurationPrivate> >::const_iterator i =
- accessPointConfigurations.constBegin();
+ QHash<QString, QNetworkConfigurationPrivatePointer>::ConstIterator i =
+ accessPointConfigurations.constBegin();
while (i != accessPointConfigurations.constEnd()) {
QNetworkConfigurationPrivatePointer ptr = i.value();
@@ -1245,45 +1274,6 @@ QNetworkConfigurationPrivatePointer SymbianEngine::configurationFromEasyWlan(TUi
}
return QNetworkConfigurationPrivatePointer();
}
-
-bool SymbianEngine::easyWlanTrueIapId(TUint32& trueIapId)
-{
- // Check if this is easy wlan id in the first place
- if (trueIapId != iCmManager.EasyWlanIdL())
- return false;
-
- // Loop through all connections that connection monitor is aware
- // and check for IAPs based on easy WLAN
- TRequestStatus status;
- TUint connectionCount;
- iConnectionMonitor.GetConnectionCount(connectionCount, status);
- User::WaitForRequest(status);
- TUint connectionId;
- TUint subConnectionCount;
- TUint apId;
- if (status.Int() == KErrNone) {
- for (TUint i = 1; i <= connectionCount; i++) {
- iConnectionMonitor.GetConnectionInfo(i, connectionId, subConnectionCount);
- iConnectionMonitor.GetUintAttribute(connectionId, subConnectionCount,
- KIAPId, apId, status);
- User::WaitForRequest(status);
- if (apId == trueIapId) {
- QNetworkConfigurationPrivatePointer ptr =
- configurationFromEasyWlan(apId, connectionId);
- if (ptr) {
-#ifdef QT_BEARERMGMT_SYMBIAN_DEBUG
- qDebug() << "QNCM easyWlanTrueIapId(), found true IAP ID: "
- << toSymbianConfig(ptr)->numericIdentifier();
-#endif
- trueIapId = toSymbianConfig(ptr)->numericIdentifier();
- return true;
- }
- }
- }
- }
- return false;
-}
-
#endif
// Sessions may use this function to report configuration state changes,
diff --git a/src/plugins/bearer/symbian/symbianengine.h b/src/plugins/bearer/symbian/symbianengine.h
index 1fe6395..7c1076e 100644
--- a/src/plugins/bearer/symbian/symbianengine.h
+++ b/src/plugins/bearer/symbian/symbianengine.h
@@ -138,10 +138,15 @@ public:
QStringList accessPointConfigurationIdentifiers();
+ QNetworkConfigurationPrivatePointer configurationFromSsid(const QString &ssid);
+
+ // For QNetworkSessionPrivateImpl to indicate about state changes
+ void configurationStateChangeReport(TUint32 accessPointId, QNetworkSession::State newState);
+
Q_SIGNALS:
void onlineStateChanged(bool isOnline);
- void configurationStateChanged(TUint32 accessPointId, TUint32 connMonId,
+ void configurationStateChanged(quint32 accessPointId, quint32 connMonId,
QNetworkSession::State newState);
public Q_SLOTS:
@@ -187,12 +192,9 @@ protected:
private:
// MConnectionMonitorObserver
void EventL(const CConnMonEventBase& aEvent);
- // For QNetworkSessionPrivate to indicate about state changes
- void configurationStateChangeReport(TUint32 accessPointId,
- QNetworkSession::State newState);
-#ifdef OCC_FUNCTIONALITY_AVAILABLE
- QNetworkConfigurationPrivatePointer configurationFromEasyWlan(TUint32 apId, TUint connectionId);
- bool easyWlanTrueIapId(TUint32& trueIapId);
+#ifdef SNAP_FUNCTIONALITY_AVAILABLE
+ QNetworkConfigurationPrivatePointer configurationFromEasyWlan(TUint32 apId,
+ TUint connectionId);
#endif
private: // Data
@@ -212,7 +214,6 @@ private: // Data
friend class QNetworkSessionPrivate;
friend class AccessPointsAvailabilityScanner;
- friend class QNetworkSessionPrivateImpl;
#ifdef SNAP_FUNCTIONALITY_AVAILABLE
RCmManager iCmManager;
diff --git a/src/script/script.pro b/src/script/script.pro
index 55217e0..4ee86d7 100644
--- a/src/script/script.pro
+++ b/src/script/script.pro
@@ -79,7 +79,10 @@ INCLUDEPATH += $$PWD
include(script.pri)
-symbian:TARGET.UID3=0x2001B2E1
+symbian {
+ TARGET.UID3=0x2001B2E1
+ LIBS += -lhal
+}
# WebKit doesn't compile in C++0x mode
*-g++*:QMAKE_CXXFLAGS -= -std=c++0x -std=gnu++0x
diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/in.qml b/tests/auto/declarative/qdeclarativeecmascript/data/in.qml
new file mode 100644
index 0000000..0b5b0ba
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeecmascript/data/in.qml
@@ -0,0 +1,7 @@
+import Qt 4.7
+
+Item {
+ id: root
+ property bool test1: "x" in root
+ property bool test2: !("foo" in root)
+}
diff --git a/tests/auto/declarative/qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp b/tests/auto/declarative/qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp
index 496cc05..76ca964 100644
--- a/tests/auto/declarative/qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp
+++ b/tests/auto/declarative/qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp
@@ -159,6 +159,7 @@ private slots:
void qtbug_11600();
void nonscriptable();
void deleteLater();
+ void in();
void include();
@@ -2553,6 +2554,16 @@ void tst_qdeclarativeecmascript::deleteLater()
delete o;
}
+void tst_qdeclarativeecmascript::in()
+{
+ QDeclarativeComponent component(&engine, TEST_FILE("in.qml"));
+ QObject *o = component.create();
+ QVERIFY(o != 0);
+ QCOMPARE(o->property("test1").toBool(), true);
+ QCOMPARE(o->property("test2").toBool(), true);
+ delete o;
+}
+
QTEST_MAIN(tst_qdeclarativeecmascript)
#include "tst_qdeclarativeecmascript.moc"
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/variantNotify.qml b/tests/auto/declarative/qdeclarativelanguage/data/variantNotify.qml
new file mode 100644
index 0000000..e7aaf16
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/variantNotify.qml
@@ -0,0 +1,13 @@
+import Qt 4.7
+
+QtObject {
+ property int notifyCount: 0
+
+ property variant foo
+ onFooChanged: notifyCount++
+
+ Component.onCompleted: {
+ foo = 1;
+ foo = 1;
+ }
+}
diff --git a/tests/auto/declarative/qdeclarativelanguage/tst_qdeclarativelanguage.cpp b/tests/auto/declarative/qdeclarativelanguage/tst_qdeclarativelanguage.cpp
index fc78663..dc00e16 100644
--- a/tests/auto/declarative/qdeclarativelanguage/tst_qdeclarativelanguage.cpp
+++ b/tests/auto/declarative/qdeclarativelanguage/tst_qdeclarativelanguage.cpp
@@ -142,8 +142,8 @@ private slots:
void importsOrder();
void qmlAttachedPropertiesObjectMethod();
-
void customOnProperty();
+ void variantNotify();
// regression tests for crashes
void crash1();
@@ -1685,6 +1685,20 @@ void tst_qdeclarativelanguage::customOnProperty()
delete object;
}
+// QTBUG-12601
+void tst_qdeclarativelanguage::variantNotify()
+{
+ QDeclarativeComponent component(&engine, TEST_FILE("variantNotify.qml"));
+
+ VERIFY_ERRORS(0);
+ QObject *object = component.create();
+ QVERIFY(object != 0);
+
+ QCOMPARE(object->property("notifyCount").toInt(), 1);
+
+ delete object;
+}
+
void tst_qdeclarativelanguage::initTestCase()
{
registerTypes();
diff --git a/tests/auto/declarative/qdeclarativepixmapcache/tst_qdeclarativepixmapcache.cpp b/tests/auto/declarative/qdeclarativepixmapcache/tst_qdeclarativepixmapcache.cpp
index 6b36224..b20d8ec 100644
--- a/tests/auto/declarative/qdeclarativepixmapcache/tst_qdeclarativepixmapcache.cpp
+++ b/tests/auto/declarative/qdeclarativepixmapcache/tst_qdeclarativepixmapcache.cpp
@@ -42,6 +42,7 @@
#include <QtTest/QtTest>
#include <private/qdeclarativepixmapcache_p.h>
#include <QtDeclarative/qdeclarativeengine.h>
+#include <QtDeclarative/qdeclarativeimageprovider.h>
#include <QNetworkReply>
#include "testhttpserver.h"
#include "../../../shared/util.h"
@@ -72,6 +73,7 @@ private slots:
void parallel_data();
void massive();
void cancelcrash();
+ void shrinkcache();
private:
QDeclarativeEngine engine;
@@ -326,6 +328,31 @@ void tst_qdeclarativepixmapcache::cancelcrash()
}
}
+class MyPixmapProvider : public QDeclarativeImageProvider
+{
+public:
+ MyPixmapProvider()
+ : QDeclarativeImageProvider(Pixmap) {}
+
+ virtual QPixmap requestPixmap(const QString &d, QSize *, const QSize &) {
+ QPixmap pix(800, 600);
+ pix.fill(Qt::red);
+ return pix;
+ }
+};
+
+// QTBUG-13345
+void tst_qdeclarativepixmapcache::shrinkcache()
+{
+ QDeclarativeEngine engine;
+ engine.addImageProvider(QLatin1String("mypixmaps"), new MyPixmapProvider);
+
+ for (int ii = 0; ii < 4000; ++ii) {
+ QUrl url("image://mypixmaps/" + QString::number(ii));
+ QDeclarativePixmap p(&engine, url);
+ }
+}
+
QTEST_MAIN(tst_qdeclarativepixmapcache)
#include "tst_qdeclarativepixmapcache.moc"
diff --git a/tests/auto/linguist/lupdate/testdata/good/parseqml/main.qml b/tests/auto/linguist/lupdate/testdata/good/parseqml/main.qml
new file mode 100644
index 0000000..172bd65
--- /dev/null
+++ b/tests/auto/linguist/lupdate/testdata/good/parseqml/main.qml
@@ -0,0 +1,97 @@
+import Qt 4.7
+
+QtObject {
+ function translate() {
+ qsTr("One");
+ qsTranslate("FooContext", "Two");
+
+ var greeting_strings = [
+ QT_TR_NOOP("Hello"),
+ QT_TRANSLATE_NOOP("FooContext", "Goodbye")
+ ];
+
+ qsTr("One", "not the same one");
+
+ //: My first comment.
+ qsTr("See comment");
+
+ //: My second comment.
+ qsTranslate("BarContext", "See other comment");
+
+ //: My third comment
+ //: spans two lines.
+ qsTr("The comment explains it all");
+
+ //: My fourth comment
+ //: spans a whopping
+ //: three lines.
+ qsTranslate("BazContext", "It should be clear by now");
+
+ /*: C-style comment. */
+ qsTr("I love C++");
+
+ /*: Another C-style comment. */
+ qsTranslate("FooContext", "I really love C++");
+
+ /*: C-style comment, followed by */
+ /*: another one. */
+ qsTr("Qt is the best");
+
+ /*: Another C-style comment, followed by */
+ /*: yet another one. */
+ qsTranslate("BarContext", "Qt is the very best");
+
+ // This comment doesn't have any effect.
+ qsTr("The comment had no effect");
+
+ // This comment doesn't have any effect either.
+ qsTranslate("BazContext", "The comment had no effect, really");
+
+ /* This C-style comment doesn't have any effect. */
+ qsTr("No comment to your comment");
+
+ /* This C-style comment doesn't have any effect either. */
+ qsTranslate("FooContext", "I refuse to comment on that");
+
+ //= id_foo
+ qsTr("This string has an identifier");
+
+ //= id_bar
+ qsTranslate("BarContext", "This string also has an identifier");
+
+ //~ loc-blank False
+ qsTr("This string has meta-data");
+
+ //~ loc-layout_id foo_dialog
+ qsTranslate("BazContext", "This string also has meta-data");
+
+ // This comment is to be ignored.
+ //: This is a comment for the translator.
+ //= id_baz
+ //~ foo 123
+ //~ magic-stuff This means something special.
+ qsTr("This string has a lot of information");
+
+ // This comment is also to be ignored.
+ //: This is another comment for the translator.
+ //= id_babar
+ //~ foo-bar Important stuff
+ //~ needle-in-haystack Found
+ //~ overflow True
+ qsTranslate("FooContext", "This string has even more information");
+
+ qsTr("This string has disambiguation", "Disambiguation");
+
+ qsTranslate("BarContext", "This string also has disambiguation", "Another disambiguation");
+
+ qsTr("This string contains plurals", "", 10);
+
+ qsTrId("qtn_foo_bar");
+
+ var more_greeting_strings = [ QT_TRID_NOOP("qtn_needle"), QT_TRID_NOOP("qtn_haystack") ];
+
+ //: qsTrId() with comment, meta-data and plurals.
+ //~ well-tested True
+ qsTrId("qtn_bar_baz", 10);
+ }
+}
diff --git a/tests/auto/linguist/lupdate/testdata/good/parseqml/project.pro b/tests/auto/linguist/lupdate/testdata/good/parseqml/project.pro
new file mode 100644
index 0000000..1040e22
--- /dev/null
+++ b/tests/auto/linguist/lupdate/testdata/good/parseqml/project.pro
@@ -0,0 +1,3 @@
+SOURCES += main.qml
+
+TRANSLATIONS = project.ts
diff --git a/tests/auto/linguist/lupdate/testdata/good/parseqml/project.ts.result b/tests/auto/linguist/lupdate/testdata/good/parseqml/project.ts.result
new file mode 100644
index 0000000..7dac8cb
--- /dev/null
+++ b/tests/auto/linguist/lupdate/testdata/good/parseqml/project.ts.result
@@ -0,0 +1,195 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE TS>
+<TS version="2.0">
+<context>
+ <name></name>
+ <message id="qtn_foo_bar">
+ <location filename="main.qml" line="89"/>
+ <source></source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message id="qtn_needle">
+ <location filename="main.qml" line="91"/>
+ <source></source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message id="qtn_haystack">
+ <location filename="main.qml" line="91"/>
+ <source></source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message id="qtn_bar_baz" numerus="yes">
+ <location filename="main.qml" line="95"/>
+ <source></source>
+ <extracomment>qsTrId() with comment, meta-data and plurals.</extracomment>
+ <translation type="unfinished">
+ <numerusform></numerusform>
+ </translation>
+ <extra-well-tested>True</extra-well-tested>
+ </message>
+</context>
+<context>
+ <name>BarContext</name>
+ <message>
+ <location filename="main.qml" line="19"/>
+ <source>See other comment</source>
+ <extracomment>My second comment.</extracomment>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="main.qml" line="42"/>
+ <source>Qt is the very best</source>
+ <extracomment>Another C-style comment, followed by yet another one.</extracomment>
+ <translation type="unfinished"></translation>
+ </message>
+ <message id="id_bar">
+ <location filename="main.qml" line="60"/>
+ <source>This string also has an identifier</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="main.qml" line="85"/>
+ <source>This string also has disambiguation</source>
+ <comment>Another disambiguation</comment>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+<context>
+ <name>BazContext</name>
+ <message>
+ <location filename="main.qml" line="28"/>
+ <source>It should be clear by now</source>
+ <extracomment>My fourth comment spans a whopping three lines.</extracomment>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="main.qml" line="48"/>
+ <source>The comment had no effect, really</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="main.qml" line="66"/>
+ <source>This string also has meta-data</source>
+ <translation type="unfinished"></translation>
+ <extra-loc-layout_id>foo_dialog</extra-loc-layout_id>
+ </message>
+</context>
+<context>
+ <name>FooContext</name>
+ <message>
+ <location filename="main.qml" line="6"/>
+ <source>Two</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="main.qml" line="10"/>
+ <source>Goodbye</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="main.qml" line="34"/>
+ <source>I really love C++</source>
+ <extracomment>Another C-style comment.</extracomment>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="main.qml" line="54"/>
+ <source>I refuse to comment on that</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message id="id_babar">
+ <location filename="main.qml" line="81"/>
+ <source>This string has even more information</source>
+ <extracomment>This is another comment for the translator.</extracomment>
+ <translation type="unfinished"></translation>
+ <extra-needle-in-haystack>Found</extra-needle-in-haystack>
+ <extra-overflow>True</extra-overflow>
+ <extra-foo-bar>Important stuff</extra-foo-bar>
+ </message>
+</context>
+<context>
+ <name>main</name>
+ <message>
+ <location filename="main.qml" line="5"/>
+ <source>One</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="main.qml" line="9"/>
+ <source>Hello</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="main.qml" line="13"/>
+ <source>One</source>
+ <comment>not the same one</comment>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="main.qml" line="16"/>
+ <source>See comment</source>
+ <extracomment>My first comment.</extracomment>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="main.qml" line="23"/>
+ <source>The comment explains it all</source>
+ <extracomment>My third comment spans two lines.</extracomment>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="main.qml" line="31"/>
+ <source>I love C++</source>
+ <extracomment>C-style comment.</extracomment>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="main.qml" line="38"/>
+ <source>Qt is the best</source>
+ <extracomment>C-style comment, followed by another one.</extracomment>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="main.qml" line="45"/>
+ <source>The comment had no effect</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="main.qml" line="51"/>
+ <source>No comment to your comment</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message id="id_foo">
+ <location filename="main.qml" line="57"/>
+ <source>This string has an identifier</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="main.qml" line="63"/>
+ <source>This string has meta-data</source>
+ <translation type="unfinished"></translation>
+ <extra-loc-blank>False</extra-loc-blank>
+ </message>
+ <message id="id_baz">
+ <location filename="main.qml" line="73"/>
+ <source>This string has a lot of information</source>
+ <extracomment>This is a comment for the translator.</extracomment>
+ <translation type="unfinished"></translation>
+ <extra-foo>123</extra-foo>
+ <extra-magic-stuff>This means something special.</extra-magic-stuff>
+ </message>
+ <message>
+ <location filename="main.qml" line="83"/>
+ <source>This string has disambiguation</source>
+ <comment>Disambiguation</comment>
+ <translation type="unfinished"></translation>
+ </message>
+ <message numerus="yes">
+ <location filename="main.qml" line="87"/>
+ <source>This string contains plurals</source>
+ <translation type="unfinished">
+ <numerusform></numerusform>
+ </translation>
+ </message>
+</context>
+</TS>
diff --git a/tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp b/tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp
index 3634ce9..4476084 100644
--- a/tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp
+++ b/tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp
@@ -4578,7 +4578,7 @@ void tst_QGraphicsItem::itemChange()
QCOMPARE(tester.changes.at(tester.changes.size() - 1), QGraphicsItem::ItemFlagsHaveChanged);
QVariant expectedFlags = qVariantFromValue<quint32>(QGraphicsItem::GraphicsItemFlags(QGraphicsItem::ItemIsSelectable | QGraphicsItem::ItemSendsGeometryChanges));
QCOMPARE(tester.values.at(tester.values.size() - 2), expectedFlags);
- QCOMPARE(tester.values.at(tester.values.size() - 1), qVariantFromValue<quint32>(QGraphicsItem::ItemIsSelectable));
+ QCOMPARE(tester.values.at(tester.values.size() - 1), qVariantFromValue<quint32>((quint32)QGraphicsItem::ItemIsSelectable));
}
{
// ItemSelectedChange
diff --git a/tests/auto/qinputcontext/qinputcontext.pro b/tests/auto/qinputcontext/qinputcontext.pro
index b3ea8c2..ec6831e 100644
--- a/tests/auto/qinputcontext/qinputcontext.pro
+++ b/tests/auto/qinputcontext/qinputcontext.pro
@@ -1,2 +1,6 @@
load(qttest_p4)
SOURCES += tst_qinputcontext.cpp
+
+symbian {
+ LIBS += -lws32 -lcone
+}
diff --git a/tests/auto/qinputcontext/tst_qinputcontext.cpp b/tests/auto/qinputcontext/tst_qinputcontext.cpp
index 644b463..52e655b 100644
--- a/tests/auto/qinputcontext/tst_qinputcontext.cpp
+++ b/tests/auto/qinputcontext/tst_qinputcontext.cpp
@@ -48,17 +48,27 @@
#include <qlayout.h>
#include <qradiobutton.h>
#include <qwindowsstyle.h>
+#include <qdesktopwidget.h>
+#include <qpushbutton.h>
+
+#ifdef Q_OS_SYMBIAN
+#include <private/qt_s60_p.h>
+#include <private/qcoefepinputcontext_p.h>
+
+#include <w32std.h>
+#include <coecntrl.h>
+#endif
class tst_QInputContext : public QObject
{
Q_OBJECT
public:
- tst_QInputContext() {}
+ tst_QInputContext() : m_phoneIsQwerty(false) {}
virtual ~tst_QInputContext() {}
public slots:
- void initTestCase() {}
+ void initTestCase();
void cleanupTestCase() {}
void init() {}
void cleanup() {}
@@ -69,8 +79,178 @@ private slots:
void closeSoftwareInputPanel();
void selections();
void focusProxy();
+ void symbianTestCoeFepInputContext_data();
+ void symbianTestCoeFepInputContext();
+ void symbianTestCoeFepAutoCommit_data();
+ void symbianTestCoeFepAutoCommit();
+
+private:
+ bool m_phoneIsQwerty;
+};
+
+#ifdef Q_OS_SYMBIAN
+class KeyEvent : public TWsEvent
+{
+public:
+ KeyEvent(QWidget *w, TInt type, TInt scanCode, TUint code, TUint modifiers, TInt repeats) {
+ iHandle = w->effectiveWinId()->DrawableWindow()->WindowGroupId();
+ iType = type;
+ SetTimeNow();
+ TKeyEvent *keyEvent = reinterpret_cast<TKeyEvent *>(iEventData);
+ keyEvent->iScanCode = scanCode;
+ keyEvent->iCode = code;
+ keyEvent->iModifiers = modifiers;
+ keyEvent->iRepeats = repeats;
+ }
};
+class FepReplayEvent
+{
+public:
+ enum Type {
+ Pause,
+ Key,
+ CompleteKey
+ };
+
+ FepReplayEvent(int msecsToPause)
+ : m_type(Pause)
+ , m_msecsToPause(msecsToPause)
+ {
+ }
+
+ FepReplayEvent(TInt keyType, TInt scanCode, TUint code, TUint modifiers, TInt repeats)
+ : m_type(Key)
+ , m_keyType(keyType)
+ , m_scanCode(scanCode)
+ , m_code(code)
+ , m_modifiers(modifiers)
+ , m_repeats(repeats)
+ {
+ }
+
+ FepReplayEvent(TInt scanCode, TUint code, TUint modifiers, TInt repeats)
+ : m_type(CompleteKey)
+ , m_scanCode(scanCode)
+ , m_code(code)
+ , m_modifiers(modifiers)
+ , m_repeats(repeats)
+ {
+ }
+
+ void sendEvent(QWidget *w, TInt type, TInt scanCode, TUint code, TUint modifiers, TInt repeats)
+ {
+ KeyEvent event(w, type, scanCode, code, modifiers, repeats);
+ S60->wsSession().SendEventToWindowGroup(w->effectiveWinId()->DrawableWindow()->WindowGroupId(), event);
+ }
+
+ void pause(int msecs)
+ {
+ // Don't use qWait here. The polling nature of that function screws up the test.
+ QTimer timer;
+ QEventLoop loop;
+ QObject::connect(&timer, SIGNAL(timeout()), &loop, SLOT(quit()));
+ timer.setSingleShot(true);
+ timer.start(msecs);
+ loop.exec();
+ }
+
+ // For some reason, the test fails if using processEvents instead of an event loop
+ // with a zero timer to quit it, so use the timer.
+#define KEY_WAIT 0
+
+ void replay(QWidget *w)
+ {
+ if (m_type == Pause) {
+ pause(m_msecsToPause);
+ } else if (m_type == Key) {
+ sendEvent(w, m_keyType, m_scanCode, m_code, m_modifiers, m_repeats);
+ if (m_keyType != EEventKeyDown)
+ // EEventKeyDown events should have no pause before the EEventKey event.
+ pause(KEY_WAIT);
+ } else if (m_type == CompleteKey) {
+ sendEvent(w, EEventKeyDown, m_scanCode, 0, m_modifiers, m_repeats);
+ // EEventKeyDown events should have no pause before the EEventKey event.
+ sendEvent(w, EEventKey, m_scanCode, m_code, m_modifiers, m_repeats);
+ pause(KEY_WAIT);
+ sendEvent(w, EEventKeyUp, m_scanCode, 0, m_modifiers, m_repeats);
+ pause(KEY_WAIT);
+ }
+ }
+
+private:
+ Type m_type;
+ int m_msecsToPause;
+ TInt m_keyType;
+ TInt m_scanCode;
+ TUint m_code;
+ TUint m_modifiers;
+ TInt m_repeats;
+};
+
+Q_DECLARE_METATYPE(QList<FepReplayEvent>)
+Q_DECLARE_METATYPE(Qt::InputMethodHints)
+Q_DECLARE_METATYPE(QLineEdit::EchoMode);
+
+#endif // Q_OS_SYMBIAN
+
+void tst_QInputContext::initTestCase()
+{
+#ifdef Q_OS_SYMBIAN
+ // Sanity test. Checks FEP for:
+ // - T9 mode is default (it will attempt to fix this)
+ // - Language is English (it cannot fix this; bail out if not correct)
+ QWidget w;
+ QLayout *layout = new QVBoxLayout;
+ w.setLayout(layout);
+ QLineEdit *lineedit = new QLineEdit;
+ layout->addWidget(lineedit);
+ lineedit->setFocus();
+#ifdef QT_KEYPAD_NAVIGATION
+ lineedit->setEditFocus(true);
+#endif
+ w.show();
+
+ QDesktopWidget desktop;
+ QRect screenSize = desktop.screenGeometry(&w);
+ if (screenSize.width() > screenSize.height()) {
+ // Crude way of finding out we are running on a qwerty phone.
+ m_phoneIsQwerty = true;
+ return;
+ }
+
+ for (int iterations = 0; iterations < 16; iterations++) {
+ QTest::qWait(500);
+
+ QList<FepReplayEvent> keyEvents;
+
+ keyEvents << FepReplayEvent('9', '9', 0, 0);
+ keyEvents << FepReplayEvent('6', '6', 0, 0);
+ keyEvents << FepReplayEvent('8', '8', 0, 0);
+ keyEvents << FepReplayEvent(EStdKeyRightArrow, EKeyRightArrow, 0, 0);
+
+ foreach(FepReplayEvent event, keyEvents) {
+ event.replay(lineedit);
+ }
+
+ QApplication::processEvents();
+
+ if (lineedit->text().endsWith("you", Qt::CaseInsensitive)) {
+ // Success!
+ return;
+ }
+
+ // Try changing modes.
+ // After 8 iterations, try to press the mode switch twice before typing.
+ for (int c = 0; c <= iterations / 8; c++) {
+ FepReplayEvent(EStdKeyHash, '#', 0, 0).replay(lineedit);
+ }
+ }
+
+ QFAIL("FEP sanity test failed. Either the phone is not set to English, or the test was unable to enable T9");
+#endif
+}
+
void tst_QInputContext::maximumTextLength()
{
QLineEdit le;
@@ -271,7 +451,6 @@ void tst_QInputContext::focusProxy()
QInputContext *gic = qApp->inputContext();
QVERIFY(gic);
- qDebug() << gic->focusWidget() << &proxy;
QCOMPARE(gic->focusWidget(), &proxy);
// then change the focus proxy and check that input context is valid
@@ -285,5 +464,601 @@ void tst_QInputContext::focusProxy()
QCOMPARE(gic->focusWidget(), &proxy);
}
+void tst_QInputContext::symbianTestCoeFepInputContext_data()
+{
+#ifdef Q_OS_SYMBIAN
+ QTest::addColumn<bool> ("inputMethodEnabled");
+ QTest::addColumn<Qt::InputMethodHints> ("inputMethodHints");
+ QTest::addColumn<int> ("maxLength"); // Zero for no limit
+ QTest::addColumn<QLineEdit::EchoMode> ("echoMode");
+ QTest::addColumn<QList<FepReplayEvent> > ("keyEvents");
+ QTest::addColumn<QString> ("finalString");
+ QTest::addColumn<QString> ("preeditString");
+ QList<FepReplayEvent> events;
+
+ events << FepReplayEvent(EStdKeyBackspace, EKeyBackspace, 0, 0);
+ events << FepReplayEvent(EStdKeyBackspace, EKeyBackspace, 0, 0);
+ events << FepReplayEvent('5', '5', 0, 0);
+ events << FepReplayEvent('4', '4', 0, 0);
+ events << FepReplayEvent('6', '6', 0, 0);
+ events << FepReplayEvent(EStdKeyBackspace, EKeyBackspace, 0, 0);
+ events << FepReplayEvent(EStdKeyBackspace, EKeyBackspace, 0, 0);
+ events << FepReplayEvent('1', '1', 0, 0);
+ events << FepReplayEvent(EStdKeyBackspace, EKeyBackspace, 0, 0);
+ events << FepReplayEvent('2', '2', 0, 0);
+ events << FepReplayEvent('1', '1', 0, 0);
+ QTest::newRow("Numbers (no FEP)")
+ << false
+ << Qt::InputMethodHints(Qt::ImhNone)
+ << 0
+ << QLineEdit::Normal
+ << events
+ << QString("521")
+ << QString("");
+ QTest::newRow("Numbers and password mode (no FEP)")
+ << false
+ << Qt::InputMethodHints(Qt::ImhNone)
+ << 0
+ << QLineEdit::Password
+ << events
+ << QString("521")
+ << QString("");
+ QTest::newRow("Numbers")
+ << true
+ << Qt::InputMethodHints(Qt::ImhDigitsOnly)
+ << 0
+ << QLineEdit::Normal
+ << events
+ << QString("521")
+ << QString("");
+ QTest::newRow("Numbers max length (no FEP)")
+ << false
+ << Qt::InputMethodHints(Qt::ImhNone)
+ << 2
+ << QLineEdit::Normal
+ << events
+ << QString("21")
+ << QString("");
+ QTest::newRow("Numbers max length")
+ << true
+ << Qt::InputMethodHints(Qt::ImhDigitsOnly)
+ << 2
+ << QLineEdit::Normal
+ << events
+ << QString("21")
+ << QString("");
+ events.clear();
+
+ events << FepReplayEvent(EEventKeyDown, '5', 0, 0, 0);
+ events << FepReplayEvent(EEventKey, '5', '5', 0, 0);
+ events << FepReplayEvent(EEventKey, '5', '5', 0, 1);
+ events << FepReplayEvent(EEventKey, '5', '5', 0, 1);
+ events << FepReplayEvent(EEventKeyUp, '5', 0, 0, 0);
+ QTest::newRow("Numbers and autorepeat (no FEP)")
+ << false
+ << Qt::InputMethodHints(Qt::ImhNone)
+ << 0
+ << QLineEdit::Normal
+ << events
+ << QString("555")
+ << QString("");
+ events.clear();
+
+ events << FepReplayEvent(EStdKeyBackspace, EKeyBackspace, 0, 0);
+ events << FepReplayEvent('2', '2', 0, 0);
+ events << FepReplayEvent('3', '3', 0, 0);
+ events << FepReplayEvent('4', '4', 0, 0);
+ events << FepReplayEvent('4', '4', 0, 0);
+ events << FepReplayEvent('5', '5', 0, 0);
+ events << FepReplayEvent('5', '5', 0, 0);
+ events << FepReplayEvent(EStdKeyBackspace, EKeyBackspace, 0, 0);
+ QTest::newRow("Multitap")
+ << true
+ << Qt::InputMethodHints(Qt::ImhNoPredictiveText)
+ << 0
+ << QLineEdit::Normal
+ << events
+ << QString("Adh")
+ << QString("");
+ QTest::newRow("Multitap with no auto uppercase")
+ << true
+ << Qt::InputMethodHints(Qt::ImhNoPredictiveText | Qt::ImhNoAutoUppercase)
+ << 0
+ << QLineEdit::Normal
+ << events
+ << QString("adh")
+ << QString("");
+ QTest::newRow("Multitap with uppercase")
+ << true
+ << Qt::InputMethodHints(Qt::ImhNoPredictiveText | Qt::ImhPreferUppercase)
+ << 0
+ << QLineEdit::Normal
+ << events
+ << QString("ADH")
+ << QString("");
+ QTest::newRow("Multitap with lowercase")
+ << true
+ << Qt::InputMethodHints(Qt::ImhNoPredictiveText | Qt::ImhPreferLowercase)
+ << 0
+ << QLineEdit::Normal
+ << events
+ << QString("adh")
+ << QString("");
+ QTest::newRow("Multitap with forced uppercase")
+ << true
+ << Qt::InputMethodHints(Qt::ImhNoPredictiveText | Qt::ImhUppercaseOnly)
+ << 0
+ << QLineEdit::Normal
+ << events
+ << QString("ADH")
+ << QString("");
+ QTest::newRow("Multitap with forced lowercase")
+ << true
+ << Qt::InputMethodHints(Qt::ImhNoPredictiveText | Qt::ImhLowercaseOnly)
+ << 0
+ << QLineEdit::Normal
+ << events
+ << QString("adh")
+ << QString("");
+ events.clear();
+
+ events << FepReplayEvent(EStdKeyHash, '#', 0, 0);
+ events << FepReplayEvent('2', '2', 0, 0);
+ events << FepReplayEvent('2', '2', 0, 0);
+ events << FepReplayEvent('3', '3', 0, 0);
+ events << FepReplayEvent('4', '4', 0, 0);
+ events << FepReplayEvent('4', '4', 0, 0);
+ events << FepReplayEvent('5', '5', 0, 0);
+ events << FepReplayEvent('5', '5', 0, 0);
+ events << FepReplayEvent(EStdKeyBackspace, EKeyBackspace, 0, 0);
+ QTest::newRow("Multitap with mode switch")
+ << true
+ << Qt::InputMethodHints(Qt::ImhNoPredictiveText)
+ << 0
+ << QLineEdit::Normal
+ << events
+ << QString("bdh")
+ << QString("");
+ events.clear();
+
+ events << FepReplayEvent('7', '7', 0, 0);
+ events << FepReplayEvent('7', '7', 0, 0);
+ events << FepReplayEvent('8', '8', 0, 0);
+ events << FepReplayEvent('9', '9', 0, 0);
+ events << FepReplayEvent('9', '9', 0, 0);
+ QTest::newRow("Multitap with unfinished text")
+ << true
+ << Qt::InputMethodHints(Qt::ImhNoPredictiveText)
+ << 0
+ << QLineEdit::Normal
+ << events
+ << QString("Qt")
+ << QString("x");
+ events << FepReplayEvent(2000);
+ QTest::newRow("Multitap with committed text")
+ << true
+ << Qt::InputMethodHints(Qt::ImhNoPredictiveText)
+ << 0
+ << QLineEdit::Normal
+ << events
+ << QString("Qtx")
+ << QString("");
+ events.clear();
+
+ events << FepReplayEvent('4', '4', 0, 0);
+ events << FepReplayEvent('4', '4', 0, 0);
+ // Simulate holding down hash key.
+ events << FepReplayEvent(EEventKeyDown, EStdKeyHash, 0, 0, 0);
+ events << FepReplayEvent(EEventKey, EStdKeyHash, '#', 0, 0);
+ events << FepReplayEvent(500);
+ events << FepReplayEvent(EEventKey, EStdKeyHash, '#', 0, 1);
+ events << FepReplayEvent(EEventKey, EStdKeyHash, '#', 0, 1);
+ events << FepReplayEvent(EEventKey, EStdKeyHash, '#', 0, 1);
+ events << FepReplayEvent(EEventKeyUp, EStdKeyHash, 0, 0, 0);
+ events << FepReplayEvent('7', '7', 0, 0);
+ events << FepReplayEvent('7', '7', 0, 0);
+ events << FepReplayEvent('8', '8', 0, 0);
+ // QTBUG-9867: Switch back as well to make sure we don't get extra symbols
+ events << FepReplayEvent(EEventKeyDown, EStdKeyHash, 0, 0, 0);
+ events << FepReplayEvent(EEventKey, EStdKeyHash, '#', 0, 0);
+ events << FepReplayEvent(500);
+ events << FepReplayEvent(EEventKey, EStdKeyHash, '#', 0, 1);
+ events << FepReplayEvent(EEventKey, EStdKeyHash, '#', 0, 1);
+ events << FepReplayEvent(EEventKey, EStdKeyHash, '#', 0, 1);
+ events << FepReplayEvent(EEventKeyUp, EStdKeyHash, 0, 0, 0);
+ events << FepReplayEvent('9', '9', 0, 0);
+ events << FepReplayEvent('6', '6', 0, 0);
+ events << FepReplayEvent('8', '8', 0, 0);
+ events << FepReplayEvent(2000);
+ events << FepReplayEvent(EStdKeyDevice3, EKeyDevice3, 0, 0); // Select key
+ QTest::newRow("Multitap and numbers")
+ << true
+ << Qt::InputMethodHints(Qt::ImhNoPredictiveText)
+ << 0
+ << QLineEdit::Normal
+ << events
+ << QString("H778wmt")
+ << QString("");
+ QTest::newRow("T9 and numbers")
+ << true
+ << Qt::InputMethodHints(Qt::ImhPreferLowercase)
+ << 0
+ << QLineEdit::Normal
+ << events
+ << QString("hi778you")
+ << QString("");
+ events.clear();
+
+ events << FepReplayEvent('4', '4', 0, 0);
+ events << FepReplayEvent('4', '4', 0, 0);
+ events << FepReplayEvent(EStdKeyDevice3, EKeyDevice3, 0, 0); // Select key
+ QTest::newRow("T9")
+ << true
+ << Qt::InputMethodHints(Qt::ImhPreferLowercase)
+ << 0
+ << QLineEdit::Normal
+ << events
+ << QString("hi")
+ << QString("");
+ QTest::newRow("T9 with uppercase")
+ << true
+ << Qt::InputMethodHints(Qt::ImhPreferUppercase)
+ << 0
+ << QLineEdit::Normal
+ << events
+ << QString("HI")
+ << QString("");
+ QTest::newRow("T9 with forced lowercase")
+ << true
+ << Qt::InputMethodHints(Qt::ImhLowercaseOnly)
+ << 0
+ << QLineEdit::Normal
+ << events
+ << QString("hi")
+ << QString("");
+ QTest::newRow("T9 with forced uppercase")
+ << true
+ << Qt::InputMethodHints(Qt::ImhUppercaseOnly)
+ << 0
+ << QLineEdit::Normal
+ << events
+ << QString("HI")
+ << QString("");
+ QTest::newRow("T9 with maxlength")
+ << true
+ << Qt::InputMethodHints(Qt::ImhLowercaseOnly)
+ << 1
+ << QLineEdit::Normal
+ << events
+ << QString("i")
+ << QString("");
+ events.clear();
+
+ events << FepReplayEvent('4', '4', 0, 0);
+ events << FepReplayEvent('4', '4', 0, 0);
+ events << FepReplayEvent(EStdKeyLeftArrow, EKeyLeftArrow, 0, 0);
+ events << FepReplayEvent(EStdKeyLeftArrow, EKeyLeftArrow, 0, 0);
+ events << FepReplayEvent('9', '9', 0, 0);
+ events << FepReplayEvent('6', '6', 0, 0);
+ events << FepReplayEvent('8', '8', 0, 0);
+ events << FepReplayEvent('0', '0', 0, 0);
+ events << FepReplayEvent(EStdKeyRightArrow, EKeyRightArrow, 0, 0);
+ events << FepReplayEvent(EStdKeyRightArrow, EKeyRightArrow, 0, 0);
+ events << FepReplayEvent('8', '8', 0, 0);
+ events << FepReplayEvent('8', '8', 0, 0);
+ QTest::newRow("T9 with movement and unfinished text")
+ << true
+ << Qt::InputMethodHints(Qt::ImhPreferLowercase)
+ << 0
+ << QLineEdit::Normal
+ << events
+ << QString("you hi")
+ << QString("tv");
+ QTest::newRow("T9 with movement, password and unfinished text")
+ << true
+ << Qt::InputMethodHints(Qt::ImhPreferLowercase)
+ << 0
+ << QLineEdit::Password
+ << events
+ << QString("wmt h")
+ << QString("u");
+ QTest::newRow("T9 with movement, maxlength, password and unfinished text")
+ << true
+ << Qt::InputMethodHints(Qt::ImhPreferLowercase)
+ << 2
+ << QLineEdit::Password
+ << events
+ << QString("wh")
+ << QString("");
+ QTest::newRow("T9 with movement, maxlength and unfinished text")
+ << true
+ << Qt::InputMethodHints(Qt::ImhPreferLowercase)
+ << 2
+ << QLineEdit::Normal
+ << events
+ << QString("hi")
+ << QString("");
+ QTest::newRow("Multitap with movement and unfinished text")
+ << true
+ << Qt::InputMethodHints(Qt::ImhNoPredictiveText | Qt::ImhPreferLowercase)
+ << 0
+ << QLineEdit::Normal
+ << events
+ << QString("wmt h")
+ << QString("u");
+ QTest::newRow("Multitap with movement, maxlength and unfinished text")
+ << true
+ << Qt::InputMethodHints(Qt::ImhNoPredictiveText | Qt::ImhPreferLowercase)
+ << 2
+ << QLineEdit::Normal
+ << events
+ << QString("wh")
+ << QString("");
+ QTest::newRow("Numbers with movement")
+ << true
+ << Qt::InputMethodHints(Qt::ImhDigitsOnly)
+ << 0
+ << QLineEdit::Normal
+ << events
+ << QString("96804488")
+ << QString("");
+ QTest::newRow("Numbers with movement and maxlength")
+ << true
+ << Qt::InputMethodHints(Qt::ImhDigitsOnly)
+ << 2
+ << QLineEdit::Normal
+ << events
+ << QString("44")
+ << QString("");
+ QTest::newRow("Numbers with movement, password and unfinished text")
+ << true
+ << Qt::InputMethodHints(Qt::ImhDigitsOnly)
+ << 0
+ << QLineEdit::Password
+ << events
+ << QString("9680448")
+ << QString("8");
+ QTest::newRow("Numbers with movement, maxlength, password and unfinished text")
+ << true
+ << Qt::InputMethodHints(Qt::ImhDigitsOnly)
+ << 2
+ << QLineEdit::Password
+ << events
+ << QString("44")
+ << QString("");
+ events << FepReplayEvent(EStdKeyRightArrow, EKeyRightArrow, 0, 0);
+ QTest::newRow("T9 with movement")
+ << true
+ << Qt::InputMethodHints(Qt::ImhPreferLowercase)
+ << 0
+ << QLineEdit::Normal
+ << events
+ << QString("you htvi")
+ << QString("");
+ QTest::newRow("T9 with movement and password")
+ << true
+ << Qt::InputMethodHints(Qt::ImhPreferLowercase)
+ << 0
+ << QLineEdit::Password
+ << events
+ << QString("wmt hu")
+ << QString("");
+ QTest::newRow("T9 with movement, maxlength and password")
+ << true
+ << Qt::InputMethodHints(Qt::ImhPreferLowercase)
+ << 2
+ << QLineEdit::Password
+ << events
+ << QString("wh")
+ << QString("");
+ QTest::newRow("Multitap with movement")
+ << true
+ << Qt::InputMethodHints(Qt::ImhNoPredictiveText | Qt::ImhPreferLowercase)
+ << 0
+ << QLineEdit::Normal
+ << events
+ << QString("wmt hu")
+ << QString("");
+ QTest::newRow("Multitap with movement and maxlength")
+ << true
+ << Qt::InputMethodHints(Qt::ImhNoPredictiveText | Qt::ImhPreferLowercase)
+ << 2
+ << QLineEdit::Normal
+ << events
+ << QString("wh")
+ << QString("");
+ QTest::newRow("Numbers with movement and password")
+ << true
+ << Qt::InputMethodHints(Qt::ImhDigitsOnly)
+ << 0
+ << QLineEdit::Password
+ << events
+ << QString("96804488")
+ << QString("");
+ QTest::newRow("Numbers with movement, maxlength and password")
+ << true
+ << Qt::InputMethodHints(Qt::ImhDigitsOnly)
+ << 2
+ << QLineEdit::Password
+ << events
+ << QString("44")
+ << QString("");
+ events.clear();
+#endif
+}
+
+void tst_QInputContext::symbianTestCoeFepInputContext()
+{
+#ifndef Q_OS_SYMBIAN
+ QSKIP("This is a Symbian-only test", SkipAll);
+#else
+ QCoeFepInputContext *ic = qobject_cast<QCoeFepInputContext *>(qApp->inputContext());
+ if (!ic) {
+ QSKIP("coefep is not the active input context; skipping test", SkipAll);
+ }
+
+ QFETCH(bool, inputMethodEnabled);
+ QFETCH(Qt::InputMethodHints, inputMethodHints);
+ QFETCH(int, maxLength);
+ QFETCH(QLineEdit::EchoMode, echoMode);
+ QFETCH(QList<FepReplayEvent>, keyEvents);
+ QFETCH(QString, finalString);
+ QFETCH(QString, preeditString);
+
+ if (inputMethodEnabled && m_phoneIsQwerty) {
+ QSKIP("Skipping advanced input method tests on QWERTY phones", SkipSingle);
+ }
+
+ QWidget w;
+ QLayout *layout = new QVBoxLayout;
+ w.setLayout(layout);
+ QLineEdit *lineedit = new QLineEdit;
+ layout->addWidget(lineedit);
+ lineedit->setFocus();
+#ifdef QT_KEYPAD_NAVIGATION
+ lineedit->setEditFocus(true);
+#endif
+ w.show();
+
+ lineedit->setAttribute(Qt::WA_InputMethodEnabled, inputMethodEnabled);
+ lineedit->setInputMethodHints(inputMethodHints);
+ if (maxLength > 0)
+ lineedit->setMaxLength(maxLength);
+ lineedit->setEchoMode(echoMode);
+
+ QTest::qWait(200);
+
+ foreach(FepReplayEvent event, keyEvents) {
+ event.replay(lineedit);
+ }
+
+ QApplication::processEvents();
+
+ QCOMPARE(lineedit->text(), finalString);
+ QCOMPARE(ic->m_preeditString, preeditString);
+#endif
+}
+
+void tst_QInputContext::symbianTestCoeFepAutoCommit_data()
+{
+#ifdef Q_OS_SYMBIAN
+ QTest::addColumn<Qt::InputMethodHints> ("inputMethodHints");
+ QTest::addColumn<QLineEdit::EchoMode> ("echoMode");
+ QTest::addColumn<QList<FepReplayEvent> > ("keyEvents");
+ QTest::addColumn<QString> ("finalString");
+
+ QList<FepReplayEvent> events;
+
+ events << FepReplayEvent('4', '4', 0, 0);
+ events << FepReplayEvent('4', '4', 0, 0);
+ events << FepReplayEvent('0', '0', 0, 0);
+ events << FepReplayEvent('9', '9', 0, 0);
+ events << FepReplayEvent('6', '6', 0, 0);
+ events << FepReplayEvent('8', '8', 0, 0);
+ QTest::newRow("Numbers")
+ << Qt::InputMethodHints(Qt::ImhDigitsOnly)
+ << QLineEdit::Normal
+ << events
+ << QString("440968");
+ QTest::newRow("Numbers and password")
+ << Qt::InputMethodHints(Qt::ImhDigitsOnly)
+ << QLineEdit::Password
+ << events
+ << QString("440968");
+ QTest::newRow("Multitap")
+ << Qt::InputMethodHints(Qt::ImhPreferLowercase | Qt::ImhNoPredictiveText)
+ << QLineEdit::Normal
+ << events
+ << QString("h wmt");
+ QTest::newRow("T9")
+ << Qt::InputMethodHints(Qt::ImhPreferLowercase)
+ << QLineEdit::Normal
+ << events
+ << QString("hi you");
+ QTest::newRow("Multitap with password")
+ << Qt::InputMethodHints(Qt::ImhPreferLowercase | Qt::ImhNoPredictiveText)
+ << QLineEdit::Password
+ << events
+ << QString("h wmt");
+ QTest::newRow("T9 with password")
+ << Qt::InputMethodHints(Qt::ImhPreferLowercase)
+ << QLineEdit::Password
+ << events
+ << QString("h wmt");
+#endif
+}
+
+void tst_QInputContext::symbianTestCoeFepAutoCommit()
+{
+#ifndef Q_OS_SYMBIAN
+ QSKIP("This is a Symbian-only test", SkipAll);
+#else
+ QCoeFepInputContext *ic = qobject_cast<QCoeFepInputContext *>(qApp->inputContext());
+ if (!ic) {
+ QSKIP("coefep is not the active input context; skipping test", SkipAll);
+ }
+
+ QFETCH(Qt::InputMethodHints, inputMethodHints);
+ QFETCH(QLineEdit::EchoMode, echoMode);
+ QFETCH(QList<FepReplayEvent>, keyEvents);
+ QFETCH(QString, finalString);
+
+ if (m_phoneIsQwerty) {
+ QSKIP("Skipping advanced input method tests on QWERTY phones", SkipSingle);
+ }
+
+ QWidget w;
+ QLayout *layout = new QVBoxLayout;
+ w.setLayout(layout);
+ QLineEdit *lineedit = new QLineEdit;
+ layout->addWidget(lineedit);
+ lineedit->setFocus();
+#ifdef QT_KEYPAD_NAVIGATION
+ lineedit->setEditFocus(true);
+#endif
+ QPushButton *pushButton = new QPushButton("Done");
+ layout->addWidget(pushButton);
+ QAction softkey("Done", &w);
+ softkey.setSoftKeyRole(QAction::PositiveSoftKey);
+ w.addAction(&softkey);
+ w.show();
+
+ lineedit->setInputMethodHints(inputMethodHints);
+ lineedit->setEchoMode(echoMode);
+
+ QTest::qWait(200);
+ foreach(FepReplayEvent event, keyEvents) {
+ event.replay(lineedit);
+ }
+ QApplication::processEvents();
+
+ QTest::mouseClick(pushButton, Qt::LeftButton);
+
+ QCOMPARE(lineedit->text(), finalString);
+ QVERIFY(ic->m_preeditString.isEmpty());
+
+#ifdef Q_WS_S60
+ lineedit->inputContext()->reset();
+ lineedit->clear();
+ lineedit->setFocus();
+#ifdef QT_KEYPAD_NAVIGATION
+ lineedit->setEditFocus(true);
+#endif
+
+ QTest::qWait(200);
+ foreach(FepReplayEvent event, keyEvents) {
+ event.replay(lineedit);
+ }
+ QApplication::processEvents();
+
+ FepReplayEvent(EStdKeyDevice0, EKeyDevice0, 0, 0).replay(lineedit); // Left softkey
+
+ QCOMPARE(lineedit->text(), finalString);
+ QVERIFY(ic->m_preeditString.isEmpty());
+
+#endif // Q_WS_S60
+#endif // Q_OS_SYMBIAN
+}
+
QTEST_MAIN(tst_QInputContext)
#include "tst_qinputcontext.moc"
diff --git a/tests/auto/qkeysequence/tst_qkeysequence.cpp b/tests/auto/qkeysequence/tst_qkeysequence.cpp
index 1faae6a..60f022f 100644
--- a/tests/auto/qkeysequence/tst_qkeysequence.cpp
+++ b/tests/auto/qkeysequence/tst_qkeysequence.cpp
@@ -532,20 +532,20 @@ void tst_QKeySequence::translated_data()
QTest::addColumn<QString>("transKey");
QTest::addColumn<QString>("compKey");
- QTest::newRow("Shift++") << QString(tr("Shift++")) << QString("Umschalt++");
- QTest::newRow("Ctrl++") << QString(tr("Ctrl++")) << QString("Strg++");
- QTest::newRow("Alt++") << QString(tr("Alt++")) << QString("Alt++");
- QTest::newRow("Meta++") << QString(tr("Meta++")) << QString("Meta++");
-
- QTest::newRow("Shift+,, Shift++") << QString(tr("Shift+,, Shift++")) << QString("Umschalt+,, Umschalt++");
- QTest::newRow("Shift+,, Ctrl++") << QString(tr("Shift+,, Ctrl++")) << QString("Umschalt+,, Strg++");
- QTest::newRow("Shift+,, Alt++") << QString(tr("Shift+,, Alt++")) << QString("Umschalt+,, Alt++");
- QTest::newRow("Shift+,, Meta++") << QString(tr("Shift+,, Meta++")) << QString("Umschalt+,, Meta++");
-
- QTest::newRow("Ctrl+,, Shift++") << QString(tr("Ctrl+,, Shift++")) << QString("Strg+,, Umschalt++");
- QTest::newRow("Ctrl+,, Ctrl++") << QString(tr("Ctrl+,, Ctrl++")) << QString("Strg+,, Strg++");
- QTest::newRow("Ctrl+,, Alt++") << QString(tr("Ctrl+,, Alt++")) << QString("Strg+,, Alt++");
- QTest::newRow("Ctrl+,, Meta++") << QString(tr("Ctrl+,, Meta++")) << QString("Strg+,, Meta++");
+ QTest::newRow("Shift++") << tr("Shift++") << QString("Umschalt++");
+ QTest::newRow("Ctrl++") << tr("Ctrl++") << QString("Strg++");
+ QTest::newRow("Alt++") << tr("Alt++") << QString("Alt++");
+ QTest::newRow("Meta++") << tr("Meta++") << QString("Meta++");
+
+ QTest::newRow("Shift+,, Shift++") << tr("Shift+,, Shift++") << QString("Umschalt+,, Umschalt++");
+ QTest::newRow("Shift+,, Ctrl++") << tr("Shift+,, Ctrl++") << QString("Umschalt+,, Strg++");
+ QTest::newRow("Shift+,, Alt++") << tr("Shift+,, Alt++") << QString("Umschalt+,, Alt++");
+ QTest::newRow("Shift+,, Meta++") << tr("Shift+,, Meta++") << QString("Umschalt+,, Meta++");
+
+ QTest::newRow("Ctrl+,, Shift++") << tr("Ctrl+,, Shift++") << QString("Strg+,, Umschalt++");
+ QTest::newRow("Ctrl+,, Ctrl++") << tr("Ctrl+,, Ctrl++") << QString("Strg+,, Strg++");
+ QTest::newRow("Ctrl+,, Alt++") << tr("Ctrl+,, Alt++") << QString("Strg+,, Alt++");
+ QTest::newRow("Ctrl+,, Meta++") << tr("Ctrl+,, Meta++") << QString("Strg+,, Meta++");
qApp->removeTranslator(ourTranslator);
qApp->removeTranslator(qtTranslator);
diff --git a/tests/auto/qtimer/tst_qtimer.cpp b/tests/auto/qtimer/tst_qtimer.cpp
index 8d213ed..b651187 100644
--- a/tests/auto/qtimer/tst_qtimer.cpp
+++ b/tests/auto/qtimer/tst_qtimer.cpp
@@ -161,8 +161,9 @@ void tst_QTimer::singleShotTimeout()
QCOMPARE(helper.count, 1);
}
-#if defined(Q_OS_SYMBIAN) && defined(Q_CC_NOKIAX86)
-// Increase wait as emulator startup can cause unexpected delays
+#if defined(Q_OS_SYMBIAN)
+// Increase wait as emulator startup can cause unexpected delays, and
+// on hardware there are sometimes spikes right after process startup.
#define TIMEOUT_TIMEOUT 2000
#else
#define TIMEOUT_TIMEOUT 200
diff --git a/tests/auto/qwidget/tst_qwidget.cpp b/tests/auto/qwidget/tst_qwidget.cpp
index ef05b91..098ce3c 100644
--- a/tests/auto/qwidget/tst_qwidget.cpp
+++ b/tests/auto/qwidget/tst_qwidget.cpp
@@ -402,6 +402,8 @@ private slots:
#endif // QT_MAC_USE_COCOA
#endif
+ void nativeChildFocus();
+
private:
bool ensureScreenSize(int width, int height);
QWidget *testWidget;
@@ -10531,5 +10533,28 @@ void tst_QWidget::taskQTBUG_11373()
#endif // QT_MAC_USE_COCOA
#endif
+void tst_QWidget::nativeChildFocus()
+{
+ QWidget w;
+ QLayout *layout = new QVBoxLayout;
+ w.setLayout(layout);
+ QLineEdit *p1 = new QLineEdit;
+ QLineEdit *p2 = new QLineEdit;
+ layout->addWidget(p1);
+ layout->addWidget(p2);
+ p1->setObjectName("p1");
+ p2->setObjectName("p2");
+ w.show();
+ w.activateWindow();
+ p1->setFocus();
+ p1->setAttribute(Qt::WA_NativeWindow);
+ p2->setAttribute(Qt::WA_NativeWindow);
+ QApplication::processEvents();
+ QTest::qWaitForWindowShown(&w);
+
+ QCOMPARE(QApplication::activeWindow(), &w);
+ QCOMPARE(QApplication::focusWidget(), p1);
+}
+
QTEST_MAIN(tst_QWidget)
#include "tst_qwidget.moc"
diff --git a/tools/activeqt/testcon/changeproperties.cpp b/tools/activeqt/testcon/changeproperties.cpp
index e2ad601..00a2cab 100644
--- a/tools/activeqt/testcon/changeproperties.cpp
+++ b/tools/activeqt/testcon/changeproperties.cpp
@@ -111,10 +111,10 @@ void ChangeProperties::on_buttonSet_clicked()
value = qVariantFromValue(col);
} else {
QMessageBox::warning(this, tr("Can't parse input"),
- QString(tr("Failed to create a color from %1\n"
+ tr("Failed to create a color from %1\n"
"The string has to be a valid color name (e.g. 'red')\n"
"or a RGB triple of format '#rrggbb'."
- ).arg(editValue->text())));
+ ).arg(editValue->text()));
}
}
break;
@@ -125,10 +125,10 @@ void ChangeProperties::on_buttonSet_clicked()
value = qVariantFromValue(fnt);
} else {
QMessageBox::warning(this, tr("Can't parse input"),
- (tr("Failed to create a font from %1\n"
+ tr("Failed to create a font from %1\n"
"The string has to have a format family,<point size> or\n"
"family,pointsize,stylehint,weight,italic,underline,strikeout,fixedpitch,rawmode."
- ).arg(editValue->text())));
+ ).arg(editValue->text()));
}
}
break;
diff --git a/tools/assistant/tools/assistant/bookmarkitem.cpp b/tools/assistant/tools/assistant/bookmarkitem.cpp
index 2e81e38..2c92113 100644
--- a/tools/assistant/tools/assistant/bookmarkitem.cpp
+++ b/tools/assistant/tools/assistant/bookmarkitem.cpp
@@ -41,6 +41,7 @@
#include "bookmarkitem.h"
+#include <QtCore/QCoreApplication>
#include <QtCore/QDebug>
QT_BEGIN_NAMESPACE
@@ -147,7 +148,9 @@ BookmarkItem::insertChildren(bool isFolder, int position, int count)
for (int row = 0; row < count; ++row) {
m_children.insert(position, new BookmarkItem(DataVector()
- << QObject::tr(isFolder ? "New Folder" : "Untitled")
+ << (isFolder
+ ? QCoreApplication::translate("BookmarkItem", "New Folder")
+ : QCoreApplication::translate("BookmarkItem", "Untitled"))
<< (isFolder ? "Folder" : "about:blank") << false, this));
}
diff --git a/tools/assistant/tools/assistant/cmdlineparser.cpp b/tools/assistant/tools/assistant/cmdlineparser.cpp
index b6c0beb..1cf2915 100644
--- a/tools/assistant/tools/assistant/cmdlineparser.cpp
+++ b/tools/assistant/tools/assistant/cmdlineparser.cpp
@@ -48,7 +48,7 @@
QT_BEGIN_NAMESPACE
-const QString CmdLineParser::m_helpMessage = QLatin1String(
+static const char helpMessage[] = QT_TRANSLATE_NOOP("CmdLineParser",
"Usage: assistant [Options]\n\n"
"-collectionFile file Uses the specified collection\n"
" file instead of the default one\n"
@@ -138,10 +138,10 @@ CmdLineParser::Result CmdLineParser::parse()
}
if (!m_error.isEmpty()) {
- showMessage(m_error + QLatin1String("\n\n\n") + m_helpMessage, true);
+ showMessage(m_error + QLatin1String("\n\n\n") + tr(helpMessage), true);
return Error;
} else if (showHelp) {
- showMessage(m_helpMessage, false);
+ showMessage(tr(helpMessage), false);
return Help;
}
return Ok;
diff --git a/tools/assistant/tools/assistant/cmdlineparser.h b/tools/assistant/tools/assistant/cmdlineparser.h
index 5573081..db66494 100644
--- a/tools/assistant/tools/assistant/cmdlineparser.h
+++ b/tools/assistant/tools/assistant/cmdlineparser.h
@@ -93,7 +93,6 @@ private:
QStringList m_arguments;
int m_pos;
- static const QString m_helpMessage;
QString m_collectionFile;
QString m_cloneFile;
QString m_helpFile;
diff --git a/tools/assistant/tools/assistant/mainwindow.cpp b/tools/assistant/tools/assistant/mainwindow.cpp
index 913e342..65a58c0 100644
--- a/tools/assistant/tools/assistant/mainwindow.cpp
+++ b/tools/assistant/tools/assistant/mainwindow.cpp
@@ -831,7 +831,7 @@ void MainWindow::showAboutDialog()
aboutDia.setWindowTitle(aboutDia.documentTitle());
} else {
QByteArray resources;
- aboutDia.setText(QString::fromLatin1("<center>"
+ aboutDia.setText(tr("<center>"
"<h3>%1</h3>"
"<p>Version %2</p></center>"
"<p>Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).</p>")
diff --git a/tools/assistant/tools/qcollectiongenerator/main.cpp b/tools/assistant/tools/qcollectiongenerator/main.cpp
index b3f6bd9..46e301c 100644
--- a/tools/assistant/tools/qcollectiongenerator/main.cpp
+++ b/tools/assistant/tools/qcollectiongenerator/main.cpp
@@ -49,15 +49,21 @@
#include <QtCore/QDir>
#include <QtCore/QMap>
#include <QtCore/QFileInfo>
-#include <QtCore/QCoreApplication>
#include <QtCore/QDateTime>
#include <QtCore/QBuffer>
+#include <QtCore/QTranslator>
+#include <QtCore/QLocale>
+#include <QtCore/QLibraryInfo>
#include <QtHelp/QHelpEngineCore>
#include <QtXml/QXmlStreamReader>
QT_USE_NAMESPACE
+class QCG {
+ Q_DECLARE_TR_FUNCTIONS(QCollectionGenerator)
+};
+
class CollectionConfigReader : public QXmlStreamReader
{
public:
@@ -123,9 +129,7 @@ private:
void CollectionConfigReader::raiseErrorWithLine()
{
- raiseError(QCoreApplication::translate("QCollectionGenerator",
- "Unknown token at line %1.")
- .arg(lineNumber()));
+ raiseError(QCG::tr("Unknown token at line %1.").arg(lineNumber()));
}
void CollectionConfigReader::readData(const QByteArray &contents)
@@ -144,9 +148,8 @@ void CollectionConfigReader::readData(const QByteArray &contents)
&& attributes().value(QLatin1String("version")) == QLatin1String("1.0"))
readConfig();
else
- raiseError(QCoreApplication::translate("QCollectionGenerator",
- "Unknown token at line %1. "
- "Expected \"QtHelpCollectionProject\"!")
+ raiseError(QCG::tr("Unknown token at line %1. "
+ "Expected \"QtHelpCollectionProject\".")
.arg(lineNumber()));
}
}
@@ -169,7 +172,7 @@ void CollectionConfigReader::readConfig()
}
}
if (!ok && !hasError())
- raiseError(QLatin1String("Missing end tags."));
+ raiseError(QCG::tr("Missing end tags."));
}
void CollectionConfigReader::readAssistantSettings()
@@ -311,7 +314,7 @@ void CollectionConfigReader::readFiles()
}
}
if (input.isEmpty() || output.isEmpty()) {
- raiseError(QLatin1String("Missing input or output file for help file generation!"));
+ raiseError(QCG::tr("Missing input or output file for help file generation."));
return;
}
m_filesToGenerate.insert(input, output);
@@ -350,6 +353,20 @@ int main(int argc, char *argv[])
bool showHelp = false;
bool showVersion = false;
+ QCoreApplication app(argc, argv);
+ QTranslator translator;
+ QTranslator qtTranslator;
+ QTranslator qt_helpTranslator;
+ QString sysLocale = QLocale::system().name();
+ QString resourceDir = QLibraryInfo::location(QLibraryInfo::TranslationsPath);
+ if (translator.load(QLatin1String("assistant_") + sysLocale, resourceDir)
+ && qtTranslator.load(QLatin1String("qt_") + sysLocale, resourceDir)
+ && qt_helpTranslator.load(QLatin1String("qt_help_") + sysLocale, resourceDir)) {
+ app.installTranslator(&translator);
+ app.installTranslator(&qtTranslator);
+ app.installTranslator(&qt_helpTranslator);
+ }
+
for (int i=1; i<argc; ++i) {
arg = QString::fromLocal8Bit(argv[i]);
if (arg == QLatin1String("-o")) {
@@ -357,8 +374,7 @@ int main(int argc, char *argv[])
QFileInfo fi(QString::fromLocal8Bit(argv[i]));
collectionFile = fi.absoluteFilePath();
} else {
- error = QCoreApplication::translate("QCollectionGenerator",
- "Missing output file name!");
+ error = QCG::tr("Missing output file name.");
}
} else if (arg == QLatin1String("-h")) {
showHelp = true;
@@ -372,16 +388,15 @@ int main(int argc, char *argv[])
}
if (showVersion) {
- fprintf(stdout, "Qt Collection Generator version 1.0 (Qt %s)\n",
- QT_VERSION_STR);
+ fputs(qPrintable(QCG::tr("Qt Collection Generator version 1.0 (Qt %1)\n")
+ .arg(QT_VERSION_STR)), stdout);
return 0;
}
if (configFile.isEmpty() && !showHelp)
- error = QCoreApplication::translate("QCollectionGenerator",
- "Missing collection config file!");
+ error = QCG::tr("Missing collection config file.");
- QString help = QCoreApplication::translate("QCollectionGenerator", "\nUsage:\n\n"
+ QString help = QCG::tr("\nUsage:\n\n"
"qcollectiongenerator <collection-config-file> [options]\n\n"
" -o <collection-file> Generates a collection file\n"
" called <collection-file>. If\n"
@@ -391,7 +406,7 @@ int main(int argc, char *argv[])
" qcollectiongenerator.\n\n");
if (showHelp) {
- fprintf(stdout, "%s", qPrintable(help));
+ fputs(qPrintable(help), stdout);
return 0;
}else if (!error.isEmpty()) {
fprintf(stderr, "%s\n\n%s", qPrintable(error), qPrintable(help));
@@ -400,7 +415,7 @@ int main(int argc, char *argv[])
QFile file(configFile);
if (!file.open(QIODevice::ReadOnly)) {
- fprintf(stderr, "Could not open %s!\n", qPrintable(configFile));
+ fputs(qPrintable(QCG::tr("Could not open %1.\n").arg(configFile)), stderr);
return -1;
}
@@ -410,19 +425,18 @@ int main(int argc, char *argv[])
+ fi.baseName() + QLatin1String(".qhc");
}
- QCoreApplication app(argc, argv);
-
- fprintf(stdout, "Reading collection config file...\n");
+ fputs(qPrintable(QCG::tr("Reading collection config file...\n")), stdout);
CollectionConfigReader config;
config.readData(file.readAll());
if (config.hasError()) {
- fprintf(stderr, "Collection config file error: %s\n", qPrintable(config.errorString()));
+ fputs(qPrintable(QCG::tr("Collection config file error: %1\n")
+ .arg(config.errorString())), stderr);
return -1;
}
QMap<QString, QString>::const_iterator it = config.filesToGenerate().constBegin();
while (it != config.filesToGenerate().constEnd()) {
- fprintf(stdout, "Generating help for %s...\n", qPrintable(it.key()));
+ fputs(qPrintable(QCG::tr("Generating help for %1...\n").arg(it.key())), stdout);
QHelpProjectData helpData;
if (!helpData.readData(absoluteFileName(basePath, it.key()))) {
fprintf(stderr, "%s\n", qPrintable(helpData.errorMessage()));
@@ -437,12 +451,13 @@ int main(int argc, char *argv[])
++it;
}
- fprintf(stdout, "Creating collection file...\n");
+ fputs(qPrintable(QCG::tr("Creating collection file...\n")), stdout);
QFileInfo colFi(collectionFile);
if (colFi.exists()) {
if (!colFi.dir().remove(colFi.fileName())) {
- fprintf(stderr, "The file %s cannot be overwritten!\n", qPrintable(collectionFile));
+ fputs(qPrintable(QCG::tr("The file %1 cannot be overwritten.\n")
+ .arg(collectionFile)), stderr);
return -1;
}
}
@@ -500,7 +515,7 @@ int main(int argc, char *argv[])
if (!config.applicationIcon().isEmpty()) {
QFile icon(absoluteFileName(basePath, config.applicationIcon()));
if (!icon.open(QIODevice::ReadOnly)) {
- fprintf(stderr, "Cannot open %s!\n", qPrintable(icon.fileName()));
+ fputs(qPrintable(QCG::tr("Cannot open %1.\n").arg(icon.fileName())), stderr);
return -1;
}
CollectionConfiguration::setApplicationIcon(helpEngine, icon.readAll());
@@ -521,7 +536,7 @@ int main(int argc, char *argv[])
if (!config.aboutIcon().isEmpty()) {
QFile icon(absoluteFileName(basePath, config.aboutIcon()));
if (!icon.open(QIODevice::ReadOnly)) {
- fprintf(stderr, "Cannot open %s!\n", qPrintable(icon.fileName()));
+ fputs(qPrintable(QCG::tr("Cannot open %1.\n").arg(icon.fileName())), stderr);
return -1;
}
CollectionConfiguration::setAboutIcon(helpEngine, icon.readAll());
@@ -543,7 +558,7 @@ int main(int argc, char *argv[])
QFileInfo fi(absoluteFileName(basePath, it.value()));
QFile f(fi.absoluteFilePath());
if (!f.open(QIODevice::ReadOnly)) {
- fprintf(stderr, "Cannot open %s!\n", qPrintable(f.fileName()));
+ fputs(qPrintable(QCG::tr("Cannot open %1.\n").arg(f.fileName())), stderr);
return -1;
}
QByteArray data = f.readAll();
@@ -565,8 +580,8 @@ int main(int argc, char *argv[])
if (!imgData.contains(src))
imgData.insert(src, img.readAll());
} else {
- fprintf(stderr, "Cannot open referenced image file %s!\n",
- qPrintable(img.fileName()));
+ fputs(qPrintable(QCG::tr("Cannot open referenced image file %1.\n")
+ .arg(img.fileName())), stderr);
}
}
}
diff --git a/tools/assistant/tools/qhelpconverter/filterpage.cpp b/tools/assistant/tools/qhelpconverter/filterpage.cpp
index 7f86980..c782943 100644
--- a/tools/assistant/tools/qhelpconverter/filterpage.cpp
+++ b/tools/assistant/tools/qhelpconverter/filterpage.cpp
@@ -127,7 +127,7 @@ void FilterPage::addFilter()
{
QTreeWidgetItem *item = new QTreeWidgetItem(m_ui.customFilterWidget);
item->setFlags(Qt::ItemIsEnabled|Qt::ItemIsEditable|Qt::ItemIsSelectable);
- item->setText(0, QLatin1String("unfiltered"));
+ item->setText(0, tr("unfiltered", "list of available documentation"));
item->setText(1, QLatin1String(""));
m_ui.customFilterWidget->editItem(item, 0);
m_ui.removeButton->setDisabled(false);
diff --git a/tools/assistant/tools/qhelpconverter/finishpage.cpp b/tools/assistant/tools/qhelpconverter/finishpage.cpp
index 0be3a1b..f0228e3 100644
--- a/tools/assistant/tools/qhelpconverter/finishpage.cpp
+++ b/tools/assistant/tools/qhelpconverter/finishpage.cpp
@@ -52,8 +52,7 @@ FinishPage::FinishPage(QWidget *parent)
: QWizardPage(parent)
{
setTitle(tr("Converting File"));
- setSubTitle(QLatin1String("Creating the new Qt help files from the "
- "old .adp file."));
+ setSubTitle(tr("Creating the new Qt help files from the old ADP file."));
setFinalPage(true);
QVBoxLayout *layout = new QVBoxLayout(this);
diff --git a/tools/assistant/tools/qhelpconverter/helpwindow.cpp b/tools/assistant/tools/qhelpconverter/helpwindow.cpp
index 9cc1a85..2c7e030 100644
--- a/tools/assistant/tools/qhelpconverter/helpwindow.cpp
+++ b/tools/assistant/tools/qhelpconverter/helpwindow.cpp
@@ -64,7 +64,7 @@ HelpWindow::HelpWindow(QWidget *parent)
layout = new QVBoxLayout(frame);
layout->setMargin(2);
- QLabel *l = new QLabel(QLatin1String("<center><b>Wizard Assistant</b></center>"));
+ QLabel *l = new QLabel(tr("<center><b>Wizard Assistant</b></center>"));
layout->addWidget(l);
m_textEdit = new QTextEdit();
m_textEdit->setFrameStyle(QFrame::NoFrame);
diff --git a/tools/assistant/tools/qhelpconverter/main.cpp b/tools/assistant/tools/qhelpconverter/main.cpp
index 4b1d815..5ee624d 100644
--- a/tools/assistant/tools/qhelpconverter/main.cpp
+++ b/tools/assistant/tools/qhelpconverter/main.cpp
@@ -40,6 +40,9 @@
****************************************************************************/
#include <QtCore/QFileInfo>
+#include <QtCore/QTranslator>
+#include <QtCore/QLocale>
+#include <QtCore/QLibraryInfo>
#include <QtGui/QApplication>
#include "conversionwizard.h"
@@ -49,6 +52,18 @@ QT_USE_NAMESPACE
int main(int argc, char *argv[])
{
QApplication app(argc, argv);
+ QTranslator translator;
+ QTranslator qtTranslator;
+ QTranslator qt_helpTranslator;
+ QString sysLocale = QLocale::system().name();
+ QString resourceDir = QLibraryInfo::location(QLibraryInfo::TranslationsPath);
+ if (translator.load(QLatin1String("assistant_") + sysLocale, resourceDir)
+ && qtTranslator.load(QLatin1String("qt_") + sysLocale, resourceDir)
+ && qt_helpTranslator.load(QLatin1String("qt_help_") + sysLocale, resourceDir)) {
+ app.installTranslator(&translator);
+ app.installTranslator(&qtTranslator);
+ app.installTranslator(&qt_helpTranslator);
+ }
ConversionWizard w;
if (argc == 2) {
diff --git a/tools/assistant/tools/qhelpgenerator/main.cpp b/tools/assistant/tools/qhelpgenerator/main.cpp
index a309f42..637786c 100644
--- a/tools/assistant/tools/qhelpgenerator/main.cpp
+++ b/tools/assistant/tools/qhelpgenerator/main.cpp
@@ -44,11 +44,18 @@
#include <QtCore/QDir>
#include <QtCore/QFileInfo>
#include <QtCore/QCoreApplication>
+#include <QtCore/QTranslator>
+#include <QtCore/QLocale>
+#include <QtCore/QLibraryInfo>
#include <private/qhelpprojectdata_p.h>
QT_USE_NAMESPACE
+class QHG {
+ Q_DECLARE_TR_FUNCTIONS(QHelpGenerator)
+};
+
int main(int argc, char *argv[])
{
QString error;
@@ -60,6 +67,20 @@ int main(int argc, char *argv[])
bool showVersion = false;
bool checkLinks = false;
+ QCoreApplication app(argc, argv);
+ QTranslator translator;
+ QTranslator qtTranslator;
+ QTranslator qt_helpTranslator;
+ QString sysLocale = QLocale::system().name();
+ QString resourceDir = QLibraryInfo::location(QLibraryInfo::TranslationsPath);
+ if (translator.load(QLatin1String("assistant_") + sysLocale, resourceDir)
+ && qtTranslator.load(QLatin1String("qt_") + sysLocale, resourceDir)
+ && qt_helpTranslator.load(QLatin1String("qt_help_") + sysLocale, resourceDir)) {
+ app.installTranslator(&translator);
+ app.installTranslator(&qtTranslator);
+ app.installTranslator(&qt_helpTranslator);
+ }
+
for (int i = 1; i < argc; ++i) {
arg = QString::fromLocal8Bit(argv[i]);
if (arg == QLatin1String("-o")) {
@@ -67,8 +88,7 @@ int main(int argc, char *argv[])
QFileInfo fi(QString::fromLocal8Bit(argv[i]));
compressedFile = fi.absoluteFilePath();
} else {
- error = QCoreApplication::translate("QHelpGenerator",
- "Missing output file name!");
+ error = QHG::tr("Missing output file name.");
}
} else if (arg == QLatin1String("-v")) {
showVersion = true;
@@ -84,16 +104,15 @@ int main(int argc, char *argv[])
}
if (showVersion) {
- fprintf(stdout, "Qt Help Generator version 1.0 (Qt %s)\n",
- QT_VERSION_STR);
+ fputs(qPrintable(QHG::tr("Qt Help Generator version 1.0 (Qt %1)\n")
+ .arg(QT_VERSION_STR)), stdout);
return 0;
}
if (projectFile.isEmpty() && !showHelp)
- error = QCoreApplication::translate("QHelpGenerator",
- "Missing Qt help project file!");
+ error = QHG::tr("Missing Qt help project file.");
- QString help = QCoreApplication::translate("QHelpGenerator", "\nUsage:\n\n"
+ QString help = QHG::tr("\nUsage:\n\n"
"qhelpgenerator <help-project-file> [options]\n\n"
" -o <compressed-file> Generates a Qt compressed help\n"
" file called <compressed-file>.\n"
@@ -105,7 +124,7 @@ int main(int argc, char *argv[])
" qhelpgenerator.\n\n");
if (showHelp) {
- fprintf(stdout, "%s", qPrintable(help));
+ fputs(qPrintable(help), stdout);
return 0;
}else if (!error.isEmpty()) {
fprintf(stderr, "%s\n\n%s", qPrintable(error), qPrintable(help));
@@ -114,7 +133,7 @@ int main(int argc, char *argv[])
QFile file(projectFile);
if (!file.open(QIODevice::ReadOnly)) {
- fprintf(stderr, "Could not open %s!\n", qPrintable(projectFile));
+ fputs(qPrintable(QHG::tr("Could not open %1.\n").arg(projectFile)), stderr);
return -1;
}
@@ -130,8 +149,8 @@ int main(int argc, char *argv[])
QDir parentDir = fi.dir();
if (!parentDir.exists()) {
if (!parentDir.mkpath(QLatin1String("."))) {
- fprintf(stderr, "Could not create output directory: %s\n",
- qPrintable(parentDir.path()));
+ fputs(qPrintable(QHG::tr("Could not create output directory: %1\n")
+ .arg(parentDir.path())), stderr);
}
}
}
@@ -142,7 +161,6 @@ int main(int argc, char *argv[])
return -1;
}
- QCoreApplication app(argc, argv);
HelpGenerator generator;
bool success = true;
if (checkLinks)
diff --git a/tools/assistant/tools/shared/helpgenerator.cpp b/tools/assistant/tools/shared/helpgenerator.cpp
index 12008e6..4812bc5 100644
--- a/tools/assistant/tools/shared/helpgenerator.cpp
+++ b/tools/assistant/tools/shared/helpgenerator.cpp
@@ -73,12 +73,12 @@ QString HelpGenerator::error() const
void HelpGenerator::printStatus(const QString &msg)
{
- fprintf(stdout, "%s\n", qPrintable(msg));
+ puts(qPrintable(msg));
}
void HelpGenerator::printWarning(const QString &msg)
{
- fprintf(stdout, "Warning: %s\n", qPrintable(msg));
+ puts(qPrintable(tr("Warning: %1").arg(msg)));
}
QT_END_NAMESPACE
diff --git a/tools/configure/configureapp.cpp b/tools/configure/configureapp.cpp
index 09da581..89d3ef0 100644
--- a/tools/configure/configureapp.cpp
+++ b/tools/configure/configureapp.cpp
@@ -381,6 +381,7 @@ Configure::Configure(int& argc, char** argv)
dictionary[ "INCREDIBUILD_XGE" ] = "auto";
dictionary[ "LTCG" ] = "no";
dictionary[ "NATIVE_GESTURES" ] = "yes";
+ dictionary[ "MSVC_MP" ] = "no";
}
Configure::~Configure()
@@ -534,6 +535,13 @@ void Configure::parseCmdLine()
else if (configCmdLine.at(i) == "-no-ltcg") {
dictionary[ "LTCG" ] = "no";
}
+ else if (configCmdLine.at(i) == "-mp") {
+ dictionary[ "MSVC_MP" ] = "yes";
+ }
+ else if (configCmdLine.at(i) == "-no-mp") {
+ dictionary[ "MSVC_MP" ] = "no";
+ }
+
#endif
else if (configCmdLine.at(i) == "-platform") {
@@ -1848,6 +1856,8 @@ bool Configure::displayHelp()
desc("STYLE_S60" , "yes", "", " s60\n", ' ');
desc("NATIVE_GESTURES", "no", "-no-native-gestures", "Do not use native gestures on Windows 7.");
desc("NATIVE_GESTURES", "yes", "-native-gestures", "Use native gestures on Windows 7.");
+ desc("MSVC_MP", "no", "-no-mp", "Do not use multiple processors for compiling with MSVC");
+ desc("MSVC_MP", "yes", "-mp", "Use multiple processors for compiling with MSVC (-MP)");
/* We do not support -qconfig on Windows yet
@@ -2822,7 +2832,7 @@ void Configure::generateCachefile()
for (QStringList::Iterator var = qmakeVars.begin(); var != qmakeVars.end(); ++var) {
cacheStream << (*var) << endl;
}
- cacheStream << "CONFIG += " << qmakeConfig.join(" ") << " incremental create_prl link_prl depend_includepath QTDIR_build" << endl;
+ cacheStream << "CONFIG += " << qmakeConfig.join(" ") << " incremental msvc_mp create_prl link_prl depend_includepath QTDIR_build" << endl;
QStringList buildParts;
buildParts << "libs" << "tools" << "examples" << "demos" << "docs" << "translations";
@@ -2885,6 +2895,8 @@ void Configure::generateCachefile()
if (dictionary[ "LTCG" ] == "yes")
configStream << " ltcg";
+ if (dictionary[ "MSVC_MP" ] == "yes")
+ configStream << " msvc_mp";
if (dictionary[ "STL" ] == "yes")
configStream << " stl";
if (dictionary[ "EXCEPTIONS" ] == "yes")
diff --git a/tools/designer/src/components/taskmenu/itemlisteditor.cpp b/tools/designer/src/components/taskmenu/itemlisteditor.cpp
index 94959fd..9f8e9c8 100644
--- a/tools/designer/src/components/taskmenu/itemlisteditor.cpp
+++ b/tools/designer/src/components/taskmenu/itemlisteditor.cpp
@@ -114,20 +114,20 @@ void AbstractItemEditor::keyPressEvent(QKeyEvent *e)
}
static const char * const itemFlagNames[] = {
- "Selectable",
- "Editable",
- "DragEnabled",
- "DropEnabled",
- "UserCheckable",
- "Enabled",
- "Tristate",
+ QT_TRANSLATE_NOOP("AbstractItemEditor", "Selectable"),
+ QT_TRANSLATE_NOOP("AbstractItemEditor", "Editable"),
+ QT_TRANSLATE_NOOP("AbstractItemEditor", "DragEnabled"),
+ QT_TRANSLATE_NOOP("AbstractItemEditor", "DropEnabled"),
+ QT_TRANSLATE_NOOP("AbstractItemEditor", "UserCheckable"),
+ QT_TRANSLATE_NOOP("AbstractItemEditor", "Enabled"),
+ QT_TRANSLATE_NOOP("AbstractItemEditor", "Tristate"),
0
};
static const char * const checkStateNames[] = {
- "Unchecked",
- "PartiallyChecked",
- "Checked",
+ QT_TRANSLATE_NOOP("AbstractItemEditor", "Unchecked"),
+ QT_TRANSLATE_NOOP("AbstractItemEditor", "PartiallyChecked"),
+ QT_TRANSLATE_NOOP("AbstractItemEditor", "Checked"),
0
};
@@ -135,7 +135,7 @@ static QStringList c2qStringList(const char * const in[])
{
QStringList out;
for (int i = 0; in[i]; i++)
- out << QLatin1String(in[i]);
+ out << AbstractItemEditor::tr(in[i]);
return out;
}
diff --git a/tools/designer/src/lib/shared/plugindialog.cpp b/tools/designer/src/lib/shared/plugindialog.cpp
index 3e88043..63ba81c 100644
--- a/tools/designer/src/lib/shared/plugindialog.cpp
+++ b/tools/designer/src/lib/shared/plugindialog.cpp
@@ -102,7 +102,7 @@ void PluginDialog::populateTreeWidget()
const QStringList fileNames = pluginManager->registeredPlugins();
if (!fileNames.isEmpty()) {
- QTreeWidgetItem *topLevelItem = setTopLevelItem(QLatin1String("Loaded Plugins"));
+ QTreeWidgetItem *topLevelItem = setTopLevelItem(tr("Loaded Plugins"));
QFont boldFont = topLevelItem->font(0);
foreach (const QString &fileName, fileNames) {
@@ -125,7 +125,7 @@ void PluginDialog::populateTreeWidget()
const QStringList notLoadedPlugins = pluginManager->failedPlugins();
if (!notLoadedPlugins.isEmpty()) {
- QTreeWidgetItem *topLevelItem = setTopLevelItem(QLatin1String("Failed Plugins"));
+ QTreeWidgetItem *topLevelItem = setTopLevelItem(tr("Failed Plugins"));
const QFont boldFont = topLevelItem->font(0);
foreach (const QString &plugin, notLoadedPlugins) {
const QString failureReason = pluginManager->failureReason(plugin);
diff --git a/tools/designer/src/plugins/phononwidgets/seeksliderplugin.cpp b/tools/designer/src/plugins/phononwidgets/seeksliderplugin.cpp
index c508fa2..7f597ff 100644
--- a/tools/designer/src/plugins/phononwidgets/seeksliderplugin.cpp
+++ b/tools/designer/src/plugins/phononwidgets/seeksliderplugin.cpp
@@ -66,12 +66,12 @@ QString SeekSliderPlugin::group() const
QString SeekSliderPlugin::toolTip() const
{
- return QString(QLatin1String(toolTipC));
+ return tr(toolTipC);
}
QString SeekSliderPlugin::whatsThis() const
{
- return QString(QLatin1String(toolTipC));
+ return tr(toolTipC);
}
QString SeekSliderPlugin::includeFile() const
diff --git a/tools/designer/src/plugins/phononwidgets/videoplayerplugin.cpp b/tools/designer/src/plugins/phononwidgets/videoplayerplugin.cpp
index d4af121..489a08c 100644
--- a/tools/designer/src/plugins/phononwidgets/videoplayerplugin.cpp
+++ b/tools/designer/src/plugins/phononwidgets/videoplayerplugin.cpp
@@ -72,12 +72,12 @@ QString VideoPlayerPlugin::group() const
QString VideoPlayerPlugin::toolTip() const
{
- return QString(QLatin1String(toolTipC));
+ return tr(toolTipC);
}
QString VideoPlayerPlugin::whatsThis() const
{
- return QString(QLatin1String(toolTipC));
+ return tr(toolTipC);
}
QString VideoPlayerPlugin::includeFile() const
diff --git a/tools/designer/src/plugins/phononwidgets/volumesliderplugin.cpp b/tools/designer/src/plugins/phononwidgets/volumesliderplugin.cpp
index becd5d9..24eb829 100644
--- a/tools/designer/src/plugins/phononwidgets/volumesliderplugin.cpp
+++ b/tools/designer/src/plugins/phononwidgets/volumesliderplugin.cpp
@@ -66,12 +66,12 @@ QString VolumeSliderPlugin::group() const
QString VolumeSliderPlugin::toolTip() const
{
- return QString(QLatin1String(toolTipC));
+ return tr(toolTipC);
}
QString VolumeSliderPlugin::whatsThis() const
{
- return QString(QLatin1String(toolTipC));
+ return tr(toolTipC);
}
QString VolumeSliderPlugin::includeFile() const
diff --git a/tools/designer/src/plugins/qdeclarativeview/qdeclarativeview_plugin.cpp b/tools/designer/src/plugins/qdeclarativeview/qdeclarativeview_plugin.cpp
index b352a9b..7148ad0 100644
--- a/tools/designer/src/plugins/qdeclarativeview/qdeclarativeview_plugin.cpp
+++ b/tools/designer/src/plugins/qdeclarativeview/qdeclarativeview_plugin.cpp
@@ -69,12 +69,12 @@ QString QDeclarativeViewPlugin::group() const
QString QDeclarativeViewPlugin::toolTip() const
{
- return QString(QLatin1String(toolTipC));
+ return tr(toolTipC);
}
QString QDeclarativeViewPlugin::whatsThis() const
{
- return QString(QLatin1String(toolTipC));
+ return tr(toolTipC);
}
QString QDeclarativeViewPlugin::includeFile() const
diff --git a/tools/designer/src/plugins/qwebview/qwebview_plugin.cpp b/tools/designer/src/plugins/qwebview/qwebview_plugin.cpp
index 61f7e66..c90e191 100644
--- a/tools/designer/src/plugins/qwebview/qwebview_plugin.cpp
+++ b/tools/designer/src/plugins/qwebview/qwebview_plugin.cpp
@@ -69,12 +69,12 @@ QString QWebViewPlugin::group() const
QString QWebViewPlugin::toolTip() const
{
- return QString(QLatin1String(toolTipC));
+ return tr(toolTipC);
}
QString QWebViewPlugin::whatsThis() const
{
- return QString(QLatin1String(toolTipC));
+ return tr(toolTipC);
}
QString QWebViewPlugin::includeFile() const
diff --git a/tools/linguist/lconvert/main.cpp b/tools/linguist/lconvert/main.cpp
index 094406c..d691548 100644
--- a/tools/linguist/lconvert/main.cpp
+++ b/tools/linguist/lconvert/main.cpp
@@ -45,11 +45,17 @@
#include <QtCore/QDebug>
#include <QtCore/QString>
#include <QtCore/QStringList>
+#include <QtCore/QTranslator>
+#include <QtCore/QLibraryInfo>
#include <iostream>
QT_USE_NAMESPACE
+class LC {
+ Q_DECLARE_TR_FUNCTIONS(LConvert)
+};
+
static int usage(const QStringList &args)
{
Q_UNUSED(args);
@@ -59,7 +65,7 @@ static int usage(const QStringList &args)
foreach (Translator::FileFormat format, Translator::registeredFileFormats())
loaders += line.arg(format.extension, -5).arg(format.description);
- std::cerr << qPrintable(QString(QLatin1String("\nUsage:\n"
+ std::cerr << qPrintable(LC::tr("\nUsage:\n"
" lconvert [options] <infile> [<infile>...]\n\n"
"lconvert is part of Qt's Linguist tool chain. It can be used as a\n"
"stand-alone tool to convert and filter translation data files.\n"
@@ -121,7 +127,7 @@ static int usage(const QStringList &args)
" 0 on success\n"
" 1 on command line parse failures\n"
" 2 on read failures\n"
- " 3 on write failures\n")).arg(loaders));
+ " 3 on write failures\n").arg(loaders));
return 1;
}
@@ -134,8 +140,17 @@ struct File
int main(int argc, char *argv[])
{
QCoreApplication app(argc, argv);
- QStringList args = app.arguments();
+ QTranslator translator;
+ QTranslator qtTranslator;
+ QString sysLocale = QLocale::system().name();
+ QString resourceDir = QLibraryInfo::location(QLibraryInfo::TranslationsPath);
+ if (translator.load(QLatin1String("linguist_") + sysLocale, resourceDir)
+ && qtTranslator.load(QLatin1String("qt_") + sysLocale, resourceDir)) {
+ app.installTranslator(&translator);
+ app.installTranslator(&qtTranslator);
+ }
+ QStringList args = app.arguments();
QList<File> inFiles;
QString inFormat(QLatin1String("auto"));
QString outFileName;
diff --git a/tools/linguist/linguist/phrase.cpp b/tools/linguist/linguist/phrase.cpp
index 254daf4..709ec35 100644
--- a/tools/linguist/linguist/phrase.cpp
+++ b/tools/linguist/linguist/phrase.cpp
@@ -188,10 +188,9 @@ bool QphHandler::characters(const QString &ch)
bool QphHandler::fatalError(const QXmlParseException &exception)
{
if (ferrorCount++ == 0) {
- QString msg;
- msg.sprintf("Parse error at line %d, column %d (%s).",
- exception.lineNumber(), exception.columnNumber(),
- exception.message().toLatin1().constData());
+ QString msg = PhraseBook::tr("Parse error at line %1, column %2 (%3).")
+ .arg(exception.lineNumber()).arg(exception.columnNumber())
+ .arg(exception.message());
QMessageBox::information(0,
QObject::tr("Qt Linguist"), msg);
}
diff --git a/tools/linguist/lrelease/main.cpp b/tools/linguist/lrelease/main.cpp
index b5cff90..19377ef 100644
--- a/tools/linguist/lrelease/main.cpp
+++ b/tools/linguist/lrelease/main.cpp
@@ -65,6 +65,17 @@ static void initBinaryDir(
const char *argv0
#endif
);
+
+struct LR {
+ static inline QString tr(const char *sourceText, const char *comment = 0)
+ {
+ return QCoreApplication::translate("LRelease", sourceText, comment);
+ }
+};
+#else
+class LR {
+ Q_DECLARE_TR_FUNCTIONS(LRelease)
+};
#endif
static void printOut(const QString & out)
@@ -75,7 +86,7 @@ static void printOut(const QString & out)
static void printUsage()
{
- printOut(QCoreApplication::tr(
+ printOut(LR::tr(
"Usage:\n"
" lrelease [options] project-file\n"
" lrelease [options] ts-files [-qm qm-file]\n\n"
@@ -108,7 +119,7 @@ static bool loadTsFile(Translator &tor, const QString &tsFileName, bool /* verbo
ConversionData cd;
bool ok = tor.load(tsFileName, cd, QLatin1String("auto"));
if (!ok) {
- std::cerr << "lrelease error: " << qPrintable(cd.error());
+ std::cerr << qPrintable(LR::tr("lrelease error: %1").arg(cd.error()));
} else {
if (!cd.errors().isEmpty())
printOut(cd.error());
@@ -123,17 +134,17 @@ static bool releaseTranslator(Translator &tor, const QString &qmFileName,
tor.reportDuplicates(tor.resolveDuplicates(), qmFileName, cd.isVerbose());
if (cd.isVerbose())
- printOut(QCoreApplication::tr( "Updating '%1'...\n").arg(qmFileName));
+ printOut(LR::tr("Updating '%1'...\n").arg(qmFileName));
if (removeIdentical) {
if (cd.isVerbose())
- printOut(QCoreApplication::tr( "Removing translations equal to source text in '%1'...\n").arg(qmFileName));
+ printOut(LR::tr("Removing translations equal to source text in '%1'...\n").arg(qmFileName));
tor.stripIdenticalSourceTranslations();
}
QFile file(qmFileName);
if (!file.open(QIODevice::WriteOnly)) {
- std::cerr << "lrelease error: cannot create '" << qPrintable(qmFileName)
- << "': " << qPrintable(file.errorString()) << std::endl;
+ std::cerr << qPrintable(LR::tr("lrelease error: cannot create '%1': %2\n")
+ .arg(qmFileName, file.errorString()));
return false;
}
@@ -142,8 +153,8 @@ static bool releaseTranslator(Translator &tor, const QString &qmFileName,
file.close();
if (!ok) {
- std::cerr << "lrelease error: cannot save '" << qPrintable(qmFileName)
- << "': " << qPrintable(cd.error());
+ std::cerr << qPrintable(LR::tr("lrelease error: cannot save '%1': %2")
+ .arg(qmFileName, cd.error()));
} else if (!cd.errors().isEmpty()) {
printOut(cd.error());
}
@@ -181,8 +192,14 @@ int main(int argc, char **argv)
#else
QCoreApplication app(argc, argv);
QTranslator translator;
- if (translator.load(QLatin1String("lrelease_") + QLocale::system().name()))
+ QTranslator qtTranslator;
+ QString sysLocale = QLocale::system().name();
+ QString resourceDir = QLibraryInfo::location(QLibraryInfo::TranslationsPath);
+ if (translator.load(QLatin1String("linguist_") + sysLocale, resourceDir)
+ && qtTranslator.load(QLatin1String("qt_") + sysLocale, resourceDir)) {
app.installTranslator(&translator);
+ app.installTranslator(&qtTranslator);
+ }
#endif
ConversionData cd;
@@ -221,7 +238,7 @@ int main(int argc, char **argv)
cd.m_verbose = true;
continue;
} else if (!strcmp(argv[i], "-version")) {
- printOut(QCoreApplication::tr( "lrelease version %1\n").arg(QLatin1String(QT_VERSION_STR)) );
+ printOut(LR::tr("lrelease version %1\n").arg(QLatin1String(QT_VERSION_STR)));
return 0;
} else if (!strcmp(argv[i], "-qm")) {
if (i == argc - 1) {
@@ -255,20 +272,23 @@ int main(int argc, char **argv)
visitor.setVerbose(cd.isVerbose());
if (!visitor.queryProFile(&pro)) {
- std::cerr << "lrelease error: cannot read project file '"
- << qPrintable(inputFile) << "'.\n";
+ std::cerr << qPrintable(LR::tr(
+ "lrelease error: cannot read project file '%1'.\n")
+ .arg(inputFile));
continue;
}
if (!visitor.accept(&pro)) {
- std::cerr << "lrelease error: cannot process project file '"
- << qPrintable(inputFile) << "'.\n";
+ std::cerr << qPrintable(LR::tr(
+ "lrelease error: cannot process project file '%1'.\n")
+ .arg(inputFile));
continue;
}
QStringList translations = visitor.values(QLatin1String("TRANSLATIONS"));
if (translations.isEmpty()) {
- std::cerr << "lrelease warning: Met no 'TRANSLATIONS' entry in project file '"
- << qPrintable(inputFile) << "'\n";
+ std::cerr << qPrintable(LR::tr(
+ "lrelease warning: Met no 'TRANSLATIONS' entry in project file '%1'\n")
+ .arg(inputFile));
} else {
QDir proDir(fi.absolutePath());
foreach (const QString &trans, translations)
diff --git a/tools/linguist/lupdate/cpp.cpp b/tools/linguist/lupdate/cpp.cpp
index bc9bb26..970d44b 100644
--- a/tools/linguist/lupdate/cpp.cpp
+++ b/tools/linguist/lupdate/cpp.cpp
@@ -50,6 +50,7 @@
#include <QtCore/QString>
#include <QtCore/QTextCodec>
#include <QtCore/QTextStream>
+#include <QtCore/QCoreApplication>
#include <iostream>
@@ -57,6 +58,10 @@
QT_BEGIN_NAMESPACE
+class LU {
+ Q_DECLARE_TR_FUNCTIONS(LUpdate)
+};
+
/* qmake ignore Q_OBJECT */
static QString MagicComment(QLatin1String("TRANSLATOR"));
@@ -624,8 +629,8 @@ uint CppParser::getToken()
|| yyBraceDepth != is.braceDepth1st
|| yyParenDepth != is.parenDepth1st)
yyMsg(is.elseLine)
- << "Parenthesis/bracket/brace mismatch between "
- "#if and #else branches; using #if branch\n";
+ << qPrintable(LU::tr("Parenthesis/bracket/brace mismatch between "
+ "#if and #else branches; using #if branch\n"));
} else {
is.bracketDepth1st = yyBracketDepth;
is.braceDepth1st = yyBraceDepth;
@@ -647,8 +652,8 @@ uint CppParser::getToken()
|| yyBraceDepth != is.braceDepth1st
|| yyParenDepth != is.parenDepth1st)
yyMsg(is.elseLine)
- << "Parenthesis/brace mismatch between "
- "#if and #else branches; using #if branch\n";
+ << qPrintable(LU::tr("Parenthesis/brace mismatch between "
+ "#if and #else branches; using #if branch\n"));
yyBracketDepth = is.bracketDepth1st;
yyBraceDepth = is.braceDepth1st;
yyParenDepth = is.parenDepth1st;
@@ -674,7 +679,7 @@ uint CppParser::getToken()
forever {
yyCh = getChar();
if (yyCh == EOF) {
- yyMsg() << "Unterminated C++ comment\n";
+ yyMsg() << qPrintable(LU::tr("Unterminated C++ comment\n"));
break;
}
@@ -804,7 +809,7 @@ uint CppParser::getToken()
forever {
yyCh = getChar();
if (yyCh == EOF) {
- yyMsg() << "Unterminated C++ comment\n";
+ yyMsg() << qPrintable(LU::tr("Unterminated C++ comment\n"));
break;
}
*ptr++ = yyCh;
@@ -837,7 +842,7 @@ uint CppParser::getToken()
yyWord.resize(ptr - (ushort *)yyWord.unicode());
if (yyCh != '"')
- yyMsg() << "Unterminated C++ string\n";
+ yyMsg() << qPrintable(LU::tr("Unterminated C++ string\n"));
else
yyCh = getChar();
return Tok_String;
@@ -894,8 +899,8 @@ uint CppParser::getToken()
if (yyBraceDepth == yyMinBraceDepth) {
if (!inDefine)
yyMsg(yyCurLineNo)
- << "Excess closing brace in C++ code"
- " (or abuse of the C++ preprocessor)\n";
+ << qPrintable(LU::tr("Excess closing brace in C++ code"
+ " (or abuse of the C++ preprocessor)\n"));
// Avoid things getting messed up even more
yyCh = getChar();
return Tok_Semicolon;
@@ -912,8 +917,8 @@ uint CppParser::getToken()
case ')':
if (yyParenDepth == 0)
yyMsg(yyCurLineNo)
- << "Excess closing parenthesis in C++ code"
- " (or abuse of the C++ preprocessor)\n";
+ << qPrintable(LU::tr("Excess closing parenthesis in C++ code"
+ " (or abuse of the C++ preprocessor)\n"));
else
yyParenDepth--;
yyCh = getChar();
@@ -927,8 +932,8 @@ uint CppParser::getToken()
case ']':
if (yyBracketDepth == 0)
yyMsg(yyCurLineNo)
- << "Excess closing bracket in C++ code"
- " (or abuse of the C++ preprocessor)\n";
+ << qPrintable(LU::tr("Excess closing bracket in C++ code"
+ " (or abuse of the C++ preprocessor)\n"));
else
yyBracketDepth--;
yyCh = getChar();
@@ -1296,7 +1301,7 @@ void CppParser::processInclude(const QString &file, ConversionData &cd,
QString cleanFile = QDir::cleanPath(file);
if (inclusions.contains(cleanFile)) {
- yyMsg() << "circular inclusion of " << qPrintable(cleanFile) << std::endl;
+ yyMsg() << qPrintable(LU::tr("circular inclusion of %1\n").arg(cleanFile));
return;
}
@@ -1320,9 +1325,7 @@ void CppParser::processInclude(const QString &file, ConversionData &cd,
QFile f(cleanFile);
if (!f.open(QIODevice::ReadOnly)) {
- yyMsg()
- << "Cannot open " << qPrintable(cleanFile) << ": "
- << qPrintable(f.errorString()) << std::endl;
+ yyMsg() << qPrintable(LU::tr("Cannot open %1: %2\n").arg(cleanFile, f.errorString()));
return;
}
@@ -1766,7 +1769,7 @@ void CppParser::parseInternal(ConversionData &cd, QSet<QString> &inclusions)
if (!tor)
goto case_default;
if (!sourcetext.isEmpty())
- yyMsg() << "//% cannot be used with tr() / QT_TR_NOOP(). Ignoring\n";
+ yyMsg() << qPrintable(LU::tr("//% cannot be used with tr() / QT_TR_NOOP(). Ignoring\n"));
utf8 = (yyTok == Tok_trUtf8);
line = yyLineNo;
yyTok = getToken();
@@ -1787,9 +1790,8 @@ void CppParser::parseInternal(ConversionData &cd, QSet<QString> &inclusions)
QStringList unresolved;
if (!fullyQualify(namespaces, pendingContext, true, &functionContext, &unresolved)) {
functionContextUnresolved = unresolved.join(strColons);
- yyMsg() << "Qualifying with unknown namespace/class "
- << qPrintable(stringifyNamespace(functionContext)) << "::"
- << qPrintable(unresolved.first()) << std::endl;
+ yyMsg() << qPrintable(LU::tr("Qualifying with unknown namespace/class %1::%2\n")
+ .arg(stringifyNamespace(functionContext)).arg(unresolved.first()));
}
pendingContext.clear();
}
@@ -1797,7 +1799,7 @@ void CppParser::parseInternal(ConversionData &cd, QSet<QString> &inclusions)
if (functionContextUnresolved.isEmpty()) {
int idx = functionContext.length();
if (idx < 2) {
- yyMsg() << "tr() cannot be called without context\n";
+ yyMsg() << qPrintable(LU::tr("tr() cannot be called without context\n"));
break;
}
Namespace *fctx;
@@ -1806,8 +1808,8 @@ void CppParser::parseInternal(ConversionData &cd, QSet<QString> &inclusions)
context = stringifyNamespace(functionContext);
fctx = findNamespace(functionContext)->classDef;
if (!fctx->complained) {
- yyMsg() << "Class '" << qPrintable(context)
- << "' lacks Q_OBJECT macro\n";
+ yyMsg() << qPrintable(LU::tr("Class '%1' lacks Q_OBJECT macro\n")
+ .arg(context));
fctx->complained = true;
}
goto gotctx;
@@ -1835,8 +1837,8 @@ void CppParser::parseInternal(ConversionData &cd, QSet<QString> &inclusions)
int last = prefix.lastIndexOf(strColons);
QString className = prefix.mid(last == -1 ? 0 : last + 2);
if (!className.isEmpty() && className == functionName) {
- yyMsg() << "It is not recommended to call tr() from within a constructor '"
- << qPrintable(className) << "::" << qPrintable(functionName) << "'\n";
+ yyMsg() << qPrintable(LU::tr("It is not recommended to call tr() from within a constructor '%1::%2'\n")
+ .arg(className).arg(functionName));
}
#endif
prefix.chop(2);
@@ -1851,7 +1853,7 @@ void CppParser::parseInternal(ConversionData &cd, QSet<QString> &inclusions)
context = fctx->trQualification;
}
if (!fctx->hasTrFunctions && !fctx->complained) {
- yyMsg() << "Class '" << qPrintable(context) << "' lacks Q_OBJECT macro\n";
+ yyMsg() << qPrintable(LU::tr("Class '%1' lacks Q_OBJECT macro\n").arg(context));
fctx->complained = true;
}
} else {
@@ -1873,7 +1875,7 @@ void CppParser::parseInternal(ConversionData &cd, QSet<QString> &inclusions)
if (!tor)
goto case_default;
if (!sourcetext.isEmpty())
- yyMsg() << "//% cannot be used with translate() / QT_TRANSLATE_NOOP(). Ignoring\n";
+ yyMsg() << qPrintable(LU::tr("//% cannot be used with translate() / QT_TRANSLATE_NOOP(). Ignoring\n"));
utf8 = (yyTok == Tok_translateUtf8);
line = yyLineNo;
yyTok = getToken();
@@ -1928,7 +1930,7 @@ void CppParser::parseInternal(ConversionData &cd, QSet<QString> &inclusions)
if (!tor)
goto case_default;
if (!msgid.isEmpty())
- yyMsg() << "//= cannot be used with qtTrId() / QT_TRID_NOOP(). Ignoring\n";
+ yyMsg() << qPrintable(LU::tr("//= cannot be used with qtTrId() / QT_TRID_NOOP(). Ignoring\n"));
//utf8 = false; // Maybe use //%% or something like that
line = yyLineNo;
yyTok = getToken();
@@ -1995,13 +1997,13 @@ void CppParser::parseInternal(ConversionData &cd, QSet<QString> &inclusions)
if (isspace(c))
continue;
if (c != '"') {
- yyMsg() << "Unexpected character in meta string\n";
+ yyMsg() << qPrintable(LU::tr("Unexpected character in meta string\n"));
break;
}
forever {
if (p >= yyWord.length()) {
whoops:
- yyMsg() << "Unterminated meta string\n";
+ yyMsg() << qPrintable(LU::tr("Unterminated meta string\n"));
break;
}
c = yyWord.unicode()[p++].unicode();
@@ -2054,7 +2056,7 @@ void CppParser::parseInternal(ConversionData &cd, QSet<QString> &inclusions)
case Tok_Arrow:
yyTok = getToken();
if (yyTok == Tok_tr || yyTok == Tok_trUtf8)
- yyMsg() << "Cannot invoke tr() like this\n";
+ yyMsg() << qPrintable(LU::tr("Cannot invoke tr() like this\n"));
break;
case Tok_ColonColon:
if (yyBraceDepth == namespaceDepths.count() && yyParenDepth == 0 && !yyTokColonSeen)
@@ -2087,7 +2089,7 @@ void CppParser::parseInternal(ConversionData &cd, QSet<QString> &inclusions)
prospectiveContext.clear();
prefix.clear();
if (!sourcetext.isEmpty() || !extracomment.isEmpty() || !msgid.isEmpty() || !extra.isEmpty()) {
- yyMsg() << "Discarding unconsumed meta data\n";
+ yyMsg() << qPrintable(LU::tr("Discarding unconsumed meta data\n"));
sourcetext.clear();
extracomment.clear();
msgid.clear();
@@ -2127,16 +2129,16 @@ void CppParser::parseInternal(ConversionData &cd, QSet<QString> &inclusions)
if (yyBraceDepth != 0)
yyMsg(yyBraceLineNo)
- << "Unbalanced opening brace in C++ code"
- " (or abuse of the C++ preprocessor)\n";
+ << qPrintable(LU::tr("Unbalanced opening brace in C++ code"
+ " (or abuse of the C++ preprocessor)\n"));
else if (yyParenDepth != 0)
yyMsg(yyParenLineNo)
- << "Unbalanced opening parenthesis in C++ code"
- " (or abuse of the C++ preprocessor)\n";
+ << qPrintable(LU::tr("Unbalanced opening parenthesis in C++ code"
+ " (or abuse of the C++ preprocessor)\n"));
else if (yyBracketDepth != 0)
yyMsg(yyBracketLineNo)
- << "Unbalanced opening bracket in C++ code"
- " (or abuse of the C++ preprocessor)\n";
+ << qPrintable(LU::tr("Unbalanced opening bracket in C++ code"
+ " (or abuse of the C++ preprocessor)\n"));
}
const ParseResults *CppParser::recordResults(bool isHeader)
@@ -2197,8 +2199,7 @@ void loadCPP(Translator &translator, const QStringList &filenames, ConversionDat
QFile file(filename);
if (!file.open(QIODevice::ReadOnly)) {
- cd.appendError(QString::fromLatin1("Cannot open %1: %2")
- .arg(filename, file.errorString()));
+ cd.appendError(LU::tr("Cannot open %1: %2").arg(filename, file.errorString()));
continue;
}
diff --git a/tools/linguist/lupdate/java.cpp b/tools/linguist/lupdate/java.cpp
index dc66e2b..165b6a3 100644
--- a/tools/linguist/lupdate/java.cpp
+++ b/tools/linguist/lupdate/java.cpp
@@ -50,6 +50,7 @@
#include <QtCore/QStack>
#include <QtCore/QString>
#include <QtCore/QTextCodec>
+#include <QtCore/QCoreApplication>
#include <iostream>
@@ -57,6 +58,10 @@
QT_BEGIN_NAMESPACE
+class LU {
+ Q_DECLARE_TR_FUNCTIONS(LUpdate)
+};
+
enum { Tok_Eof, Tok_class, Tok_return, Tok_tr,
Tok_translate, Tok_Ident, Tok_Package,
Tok_Comment, Tok_String, Tok_Colon, Tok_Dot,
@@ -196,7 +201,7 @@ static int getToken()
while ( !metAsterSlash ) {
yyCh = getChar();
if ( yyCh == EOF ) {
- yyMsg() << "Unterminated Java comment.\n";
+ yyMsg() << qPrintable(LU::tr("Unterminated Java comment.\n"));
return Tok_Comment;
}
@@ -232,7 +237,7 @@ static int getToken()
else {
int sub(yyCh.toLower().toAscii() - 87);
if( sub > 15 || sub < 10) {
- yyMsg() << "Invalid Unicode value.\n";
+ yyMsg() << qPrintable(LU::tr("Invalid Unicode value.\n"));
break;
}
unicode += sub;
@@ -255,7 +260,7 @@ static int getToken()
}
if ( yyCh != QLatin1Char('"') )
- yyMsg() << "Unterminated string.\n";
+ yyMsg() << qPrintable(LU::tr("Unterminated string.\n"));
yyCh = getChar();
@@ -368,8 +373,9 @@ static bool matchString( QString &s )
if (yyTok == Tok_String)
s += yyString;
else {
- yyMsg() << "String used in translation can contain only literals"
- " concatenated with other literals, not expressions or numbers.\n";
+ yyMsg() << qPrintable(LU::tr(
+ "String used in translation can contain only literals"
+ " concatenated with other literals, not expressions or numbers.\n"));
return false;
}
yyTok = getToken();
@@ -477,7 +483,7 @@ static void parse( Translator *tor )
yyScope.push(new Scope(yyIdent, Scope::Clazz, yyLineNo));
}
else {
- yyMsg() << "'class' must be followed by a class name.\n";
+ yyMsg() << qPrintable(LU::tr("'class' must be followed by a class name.\n"));
break;
}
while (!match(Tok_LeftBrace)) {
@@ -549,7 +555,7 @@ static void parse( Translator *tor )
case Tok_RightBrace:
if ( yyScope.isEmpty() ) {
- yyMsg() << "Excess closing brace.\n";
+ yyMsg() << qPrintable(LU::tr("Excess closing brace.\n"));
}
else
delete (yyScope.pop());
@@ -578,7 +584,7 @@ static void parse( Translator *tor )
yyPackage.append(QLatin1String("."));
break;
default:
- yyMsg() << "'package' must be followed by package name.\n";
+ yyMsg() << qPrintable(LU::tr("'package' must be followed by package name.\n"));
break;
}
yyTok = getToken();
@@ -591,9 +597,9 @@ static void parse( Translator *tor )
}
if ( !yyScope.isEmpty() )
- yyMsg(yyScope.top()->line) << "Unbalanced opening brace.\n";
+ yyMsg(yyScope.top()->line) << qPrintable(LU::tr("Unbalanced opening brace.\n"));
else if ( yyParenDepth != 0 )
- yyMsg(yyParenLineNo) << "Unbalanced opening parenthesis.\n";
+ yyMsg(yyParenLineNo) << qPrintable(LU::tr("Unbalanced opening parenthesis.\n"));
}
@@ -601,8 +607,7 @@ bool loadJava(Translator &translator, const QString &filename, ConversionData &c
{
QFile file(filename);
if (!file.open(QIODevice::ReadOnly)) {
- cd.appendError(QString::fromLatin1("Cannot open %1: %2")
- .arg(filename, file.errorString()));
+ cd.appendError(LU::tr("Cannot open %1: %2").arg(filename, file.errorString()));
return false;
}
diff --git a/tools/linguist/lupdate/main.cpp b/tools/linguist/lupdate/main.cpp
index a575192..d96e205 100644
--- a/tools/linguist/lupdate/main.cpp
+++ b/tools/linguist/lupdate/main.cpp
@@ -52,6 +52,8 @@
#include <QtCore/QString>
#include <QtCore/QStringList>
#include <QtCore/QTextCodec>
+#include <QtCore/QTranslator>
+#include <QtCore/QLibraryInfo>
#include <iostream>
@@ -79,7 +81,7 @@ static void recursiveFileInfoList(const QDir &dir,
static void printUsage()
{
- printOut(QObject::tr(
+ printOut(LU::tr(
"Usage:\n"
" lupdate [options] [project-file]...\n"
" lupdate [options] [source-file|path|@lst-file]... -ts ts-files|@lst-file\n\n"
@@ -186,7 +188,7 @@ static void updateTsFiles(const Translator &fetchedTor, const QStringList &tsFil
else if (options & AbsoluteLocations)
tor.setLocationsType(Translator::AbsoluteLocations);
if (options & Verbose)
- printOut(QObject::tr("Updating '%1'...\n").arg(fn));
+ printOut(LU::tr("Updating '%1'...\n").arg(fn));
UpdateOptions theseOptions = options;
if (tor.locationsType() == Translator::NoLocations) // Could be set from file
@@ -201,7 +203,7 @@ static void updateTsFiles(const Translator &fetchedTor, const QStringList &tsFil
}
if (options & PluralOnly) {
if (options & Verbose)
- printOut(QObject::tr("Stripping non plural forms in '%1'...\n").arg(fn));
+ printOut(LU::tr("Stripping non plural forms in '%1'...\n").arg(fn));
out.stripNonPluralForms();
}
if (options & NoObsolete)
@@ -359,12 +361,12 @@ static void processProjects(
if (visitor.contains(QLatin1String("TRANSLATIONS"))) {
if (parentTor) {
if (topLevel) {
- std::cerr << "lupdate warning: TS files from command line "
- "will override TRANSLATIONS in " << qPrintable(proFile) << ".\n";
+ std::cerr << qPrintable(LU::tr("lupdate warning: TS files from command line "
+ "will override TRANSLATIONS in %1.\n").arg(proFile));
goto noTrans;
} else if (nestComplain) {
- std::cerr << "lupdate warning: TS files from command line "
- "prevent recursing into " << qPrintable(proFile) << ".\n";
+ std::cerr << qPrintable(LU::tr("lupdate warning: TS files from command line "
+ "prevent recursing into %1.\n").arg(proFile));
continue;
}
}
@@ -395,8 +397,8 @@ static void processProjects(
noTrans:
if (!parentTor) {
if (topLevel)
- std::cerr << "lupdate warning: no TS files specified. Only diagnostics "
- "will be produced for '" << qPrintable(proFile) << "'.\n";
+ std::cerr << qPrintable(LU::tr("lupdate warning: no TS files specified. Only diagnostics "
+ "will be produced for '%1'.\n").arg(proFile));
Translator tor;
processProject(nestComplain, pfi, visitor, options, codecForSource,
targetLanguage, sourceLanguage, &tor, fail);
@@ -410,6 +412,16 @@ static void processProjects(
int main(int argc, char **argv)
{
QCoreApplication app(argc, argv);
+ QTranslator translator;
+ QTranslator qtTranslator;
+ QString sysLocale = QLocale::system().name();
+ QString resourceDir = QLibraryInfo::location(QLibraryInfo::TranslationsPath);
+ if (translator.load(QLatin1String("linguist_") + sysLocale, resourceDir)
+ && qtTranslator.load(QLatin1String("qt_") + sysLocale, resourceDir)) {
+ app.installTranslator(&translator);
+ app.installTranslator(&qtTranslator);
+ }
+
m_defaultExtensions = QLatin1String("java,jui,ui,c,c++,cc,cpp,cxx,ch,h,h++,hh,hpp,hxx,js,qs,qml");
QStringList args = app.arguments();
@@ -613,7 +625,7 @@ int main(int argc, char **argv)
proFiles << file;
} else if (fi.isDir()) {
if (options & Verbose)
- printOut(QObject::tr("Scanning directory '%1'...\n").arg(file));
+ printOut(LU::tr("Scanning directory '%1'...\n").arg(file));
QDir dir = QDir(fi.filePath());
projectRoots.insert(dir.absolutePath() + QLatin1Char('/'));
if (extensionsNameFilters.isEmpty()) {
diff --git a/tools/linguist/lupdate/merge.cpp b/tools/linguist/lupdate/merge.cpp
index fffdf9b..87c150c 100644
--- a/tools/linguist/lupdate/merge.cpp
+++ b/tools/linguist/lupdate/merge.cpp
@@ -44,15 +44,19 @@
#include "simtexth.h"
#include "translator.h"
+#include <QtCore/QCoreApplication>
#include <QtCore/QDebug>
#include <QtCore/QMap>
#include <QtCore/QStringList>
#include <QtCore/QTextCodec>
#include <QtCore/QVector>
-
QT_BEGIN_NAMESPACE
+class LU {
+ Q_DECLARE_TR_FUNCTIONS(LUpdate)
+};
+
static bool isDigitFriendly(QChar c)
{
return c.isPunct() || c.isSpace();
@@ -485,24 +489,24 @@ Translator merge(const Translator &tor, const Translator &virginTor,
if (options & Verbose) {
int totalFound = neww + known;
- err += QObject::tr(" Found %n source text(s) (%1 new and %2 already existing)\n", 0, totalFound).arg(neww).arg(known);
+ err += LU::tr(" Found %n source text(s) (%1 new and %2 already existing)\n", 0, totalFound).arg(neww).arg(known);
if (obsoleted) {
if (options & NoObsolete) {
- err += QObject::tr(" Removed %n obsolete entries\n", 0, obsoleted);
+ err += LU::tr(" Removed %n obsolete entries\n", 0, obsoleted);
} else {
- err += QObject::tr(" Kept %n obsolete entries\n", 0, obsoleted);
+ err += LU::tr(" Kept %n obsolete entries\n", 0, obsoleted);
}
}
if (sameNumberHeuristicCount)
- err += QObject::tr(" Number heuristic provided %n translation(s)\n",
+ err += LU::tr(" Number heuristic provided %n translation(s)\n",
0, sameNumberHeuristicCount);
if (sameTextHeuristicCount)
- err += QObject::tr(" Same-text heuristic provided %n translation(s)\n",
+ err += LU::tr(" Same-text heuristic provided %n translation(s)\n",
0, sameTextHeuristicCount);
if (similarTextHeuristicCount)
- err += QObject::tr(" Similar-text heuristic provided %n translation(s)\n",
+ err += LU::tr(" Similar-text heuristic provided %n translation(s)\n",
0, similarTextHeuristicCount);
}
return outTor;
diff --git a/tools/linguist/lupdate/qdeclarative.cpp b/tools/linguist/lupdate/qdeclarative.cpp
index 2377416..01b9a1d 100644
--- a/tools/linguist/lupdate/qdeclarative.cpp
+++ b/tools/linguist/lupdate/qdeclarative.cpp
@@ -65,8 +65,26 @@
QT_BEGIN_NAMESPACE
+class LU {
+ Q_DECLARE_TR_FUNCTIONS(LUpdate)
+};
+
using namespace QDeclarativeJS;
+class Comment
+{
+public:
+ Comment() : lastLine(-1) {}
+ QString extracomment;
+ QString msgid;
+ TranslatorMessage::ExtraData extra;
+ QString sourcetext;
+ int lastLine;
+
+ bool isValid() const
+ { return !extracomment.isEmpty() || !msgid.isEmpty() || !sourcetext.isEmpty() || !extra.isEmpty(); }
+};
+
class FindTrCalls: protected AST::Visitor
{
public:
@@ -78,6 +96,8 @@ public:
accept(node);
}
+ QList<Comment> comments;
+
protected:
using AST::Visitor::visit;
using AST::Visitor::endVisit;
@@ -114,10 +134,23 @@ protected:
plural = true;
}
+ QString id;
+ QString extracomment;
+ TranslatorMessage::ExtraData extra;
+ Comment scomment = findComment(node->firstSourceLocation().startLine);
+ if (scomment.isValid()) {
+ extracomment = scomment.extracomment;
+ extra = scomment.extra;
+ id = scomment.msgid;
+ }
+
TranslatorMessage msg(m_component, source,
comment, QString(), m_fileName,
node->firstSourceLocation().startLine, QStringList(),
TranslatorMessage::Unfinished, plural);
+ msg.setExtraComment(extracomment.simplified());
+ msg.setId(id);
+ msg.setExtras(extra);
m_translator->extend(msg);
}
} else if (idExpr->name->asString() == QLatin1String("qsTranslate") ||
@@ -140,6 +173,17 @@ protected:
}
if (!literal && m_bSource.isEmpty())
return;
+
+ QString id;
+ QString extracomment;
+ TranslatorMessage::ExtraData extra;
+ Comment scomment = findComment(node->firstSourceLocation().startLine);
+ if (scomment.isValid()) {
+ extracomment = scomment.extracomment;
+ extra = scomment.extra;
+ id = scomment.msgid;
+ }
+
source = literal ? literal->value->asString() : m_bSource;
AST::ArgumentList *commentNode = sourceNode->next;
if (commentNode && AST::cast<AST::StringLiteral *>(commentNode->expression)) {
@@ -155,15 +199,48 @@ protected:
comment, QString(), m_fileName,
node->firstSourceLocation().startLine, QStringList(),
TranslatorMessage::Unfinished, plural);
+ msg.setExtraComment(extracomment.simplified());
+ msg.setId(id);
+ msg.setExtras(extra);
m_translator->extend(msg);
}
+ } else if (idExpr->name->asString() == QLatin1String("qsTrId") ||
+ idExpr->name->asString() == QLatin1String("QT_TRID_NOOP")) {
+ if (!node->arguments)
+ return;
+ AST::StringLiteral *literal = AST::cast<AST::StringLiteral *>(node->arguments->expression);
+ if (literal) {
+
+ QString extracomment;
+ QString sourcetext;
+ TranslatorMessage::ExtraData extra;
+ Comment comment = findComment(node->firstSourceLocation().startLine);
+ if (comment.isValid()) {
+ extracomment = comment.extracomment;
+ sourcetext = comment.sourcetext;
+ extra = comment.extra;
+ }
+
+ const QString id = literal->value->asString();
+ bool plural = node->arguments->next;
+
+ TranslatorMessage msg(QString(), QString(),
+ QString(), QString(), m_fileName,
+ node->firstSourceLocation().startLine, QStringList(),
+ TranslatorMessage::Unfinished, plural);
+ msg.setExtraComment(extracomment.simplified());
+ msg.setId(id);
+ msg.setExtras(extra);
+ m_translator->extend(msg);
+ }
}
}
}
private:
- bool createString(AST::BinaryExpression *b) {
+ bool createString(AST::BinaryExpression *b)
+ {
if (!b || b->op != 0)
return false;
AST::BinaryExpression *l = AST::cast<AST::BinaryExpression *>(b->left);
@@ -187,6 +264,23 @@ private:
return true;
}
+ Comment findComment(int loc)
+ {
+ if (comments.isEmpty())
+ return Comment();
+
+ int i = 0;
+ int commentLoc = comments.at(i).lastLine;
+ while (commentLoc <= loc) {
+ if (commentLoc == loc)
+ return comments.at(i);
+ if (i == comments.count()-1)
+ break;
+ commentLoc = comments.at(++i).lastLine;
+ }
+ return Comment();
+ }
+
Translator *m_translator;
QString m_fileName;
QString m_component;
@@ -236,13 +330,60 @@ QString createErrorString(const QString &filename, const QString &code, Parser &
return errorString;
}
+bool processComment(const QChar *chars, int length, Comment &comment)
+{
+ // Try to match the logic of the QtScript parser.
+ if (!length)
+ return comment.isValid();
+ if (*chars == QLatin1Char(':') && chars[1].isSpace()) {
+ comment.extracomment += QString(chars+1, length-1);
+ } else if (*chars == QLatin1Char('=') && chars[1].isSpace()) {
+ comment.msgid = QString(chars+2, length-2).simplified();
+ } else if (*chars == QLatin1Char('~') && chars[1].isSpace()) {
+ QString text = QString(chars+2, length-2).trimmed();
+ int k = text.indexOf(QLatin1Char(' '));
+ if (k > -1)
+ comment.extra.insert(text.left(k), text.mid(k + 1).trimmed());
+ } else if (*chars == QLatin1Char('%') && chars[1].isSpace()) {
+ comment.sourcetext.reserve(comment.sourcetext.length() + length-2);
+ ushort *ptr = (ushort *)comment.sourcetext.data() + comment.sourcetext.length();
+ int p = 2, c;
+ forever {
+ if (p >= length)
+ break;
+ c = chars[p++].unicode();
+ if (isspace(c))
+ continue;
+ if (c != '"')
+ break;
+ forever {
+ if (p >= length)
+ break;
+ c = chars[p++].unicode();
+ if (c == '"')
+ break;
+ if (c == '\\') {
+ if (p >= length)
+ break;
+ c = chars[p++].unicode();
+ if (c == '\n')
+ break;
+ *ptr++ = '\\';
+ }
+ *ptr++ = c;
+ }
+ }
+ comment.sourcetext.resize(ptr - (ushort *)comment.sourcetext.data());
+ }
+ return comment.isValid();
+}
+
bool loadQml(Translator &translator, const QString &filename, ConversionData &cd)
{
cd.m_sourceFileName = filename;
QFile file(filename);
if (!file.open(QIODevice::ReadOnly)) {
- cd.appendError(QString::fromLatin1("Cannot open %1: %2")
- .arg(filename, file.errorString()));
+ cd.appendError(LU::tr("Cannot open %1: %2").arg(filename, file.errorString()));
return false;
}
@@ -260,6 +401,25 @@ bool loadQml(Translator &translator, const QString &filename, ConversionData &cd
if (parser.parse()) {
FindTrCalls trCalls;
+
+ // build up a list of comments that contain translation information.
+ for (int i = 0; i < driver.comments().size(); ++i) {
+ AST::SourceLocation loc = driver.comments().at(i);
+ QString commentStr = code.mid(loc.offset, loc.length);
+
+ if (trCalls.comments.isEmpty() || trCalls.comments.last().lastLine != int(loc.startLine)) {
+ Comment comment;
+ comment.lastLine = loc.startLine+1;
+ if (processComment(commentStr.constData(), commentStr.length(), comment))
+ trCalls.comments.append(comment);
+ } else {
+ Comment &lastComment = trCalls.comments.last();
+ lastComment.lastLine += 1;
+ processComment(commentStr.constData(), commentStr.length(), lastComment);
+ }
+ }
+
+ //find all tr calls in the code
trCalls(&translator, filename, parser.ast());
} else {
QString error = createErrorString(filename, code, parser);
diff --git a/tools/linguist/lupdate/qscript.cpp b/tools/linguist/lupdate/qscript.cpp
index 7ca0987..5323022 100644
--- a/tools/linguist/lupdate/qscript.cpp
+++ b/tools/linguist/lupdate/qscript.cpp
@@ -47,6 +47,7 @@
#include <translator.h>
+#include <QtCore/QCoreApplication>
#include <QtCore/qdebug.h>
#include <QtCore/qnumeric.h>
#include <QtCore/qstring.h>
@@ -62,6 +63,10 @@
QT_BEGIN_NAMESPACE
+class LU {
+ Q_DECLARE_TR_FUNCTIONS(LUpdate)
+};
+
class QScriptGrammar
{
public:
@@ -1486,7 +1491,7 @@ int QScript::Lexer::lex()
else {
setDone(Bad);
err = IllegalCharacter;
- errmsg = QLatin1String("Illegal character");
+ errmsg = LU::tr("Illegal character");
}
}
break;
@@ -1497,7 +1502,7 @@ int QScript::Lexer::lex()
} else if (current == 0 || isLineTerminator()) {
setDone(Bad);
err = UnclosedStringLiteral;
- errmsg = QLatin1String("Unclosed string at end of line");
+ errmsg = LU::tr("Unclosed string at end of line");
} else if (current == '\\') {
state = InEscapeSequence;
} else {
@@ -1523,7 +1528,7 @@ int QScript::Lexer::lex()
} else {
setDone(Bad);
err = IllegalEscapeSequence;
- errmsg = QLatin1String("Illegal escape squence");
+ errmsg = LU::tr("Illegal escape squence");
}
} else if (current == 'x')
state = InHexEscape;
@@ -1562,7 +1567,7 @@ int QScript::Lexer::lex()
} else {
setDone(Bad);
err = IllegalUnicodeEscapeSequence;
- errmsg = QLatin1String("Illegal unicode escape sequence");
+ errmsg = LU::tr("Illegal unicode escape sequence");
}
break;
case InSingleLineComment:
@@ -1590,7 +1595,7 @@ int QScript::Lexer::lex()
if (current == 0) {
setDone(Bad);
err = UnclosedComment;
- errmsg = QLatin1String("Unclosed comment at end of file");
+ errmsg = LU::tr("Unclosed comment at end of file");
} else if (isLineTerminator()) {
shiftWindowsLineBreak();
yylineno++;
@@ -1678,7 +1683,7 @@ int QScript::Lexer::lex()
} else {
setDone(Bad);
err = IllegalExponentIndicator;
- errmsg = QLatin1String("Illegal syntax for exponential number");
+ errmsg = LU::tr("Illegal syntax for exponential number");
}
break;
case InExponent:
@@ -1704,7 +1709,7 @@ int QScript::Lexer::lex()
&& isIdentLetter(current)) {
state = Bad;
err = IllegalIdentifier;
- errmsg = QLatin1String("Identifier cannot start with numeric literal");
+ errmsg = LU::tr("Identifier cannot start with numeric literal");
}
// terminate string
@@ -2023,7 +2028,7 @@ bool QScript::Lexer::scanRegExp(RegExpBodyPrefix prefix)
while (1) {
if (isLineTerminator() || current == 0) {
- errmsg = QLatin1String("Unterminated regular expression literal");
+ errmsg = LU::tr("Unterminated regular expression literal");
return false;
}
else if (current != '/' || lastWasEscape == true)
@@ -2267,14 +2272,14 @@ case 66: {
QString name = sym(1).toString();
if ((name == QLatin1String("qsTranslate")) || (name == QLatin1String("QT_TRANSLATE_NOOP"))) {
if (!sourcetext.isEmpty())
- yyMsg(identLineNo) << "//% cannot be used with " << qPrintable(name) << "(). Ignoring\n";
+ yyMsg(identLineNo) << qPrintable(LU::tr("//% cannot be used with %1(). Ignoring\n").arg(name));
QVariantList args = sym(2).toList();
if (args.size() < 2) {
- yyMsg(identLineNo) << qPrintable(name) << "() requires at least two arguments.\n";
+ yyMsg(identLineNo) << qPrintable(LU::tr("%1() requires at least two arguments.\n").arg(name));
} else {
if ((args.at(0).type() != QVariant::String)
|| (args.at(1).type() != QVariant::String)) {
- yyMsg(identLineNo) << qPrintable(name) << "(): both arguments must be literal strings.\n";
+ yyMsg(identLineNo) << qPrintable(LU::tr("%1(): both arguments must be literal strings.\n").arg(name));
} else {
QString context = args.at(0).toString();
QString text = args.at(1).toString();
@@ -2290,13 +2295,13 @@ case 66: {
extra.clear();
} else if ((name == QLatin1String("qsTr")) || (name == QLatin1String("QT_TR_NOOP"))) {
if (!sourcetext.isEmpty())
- yyMsg(identLineNo) << "//% cannot be used with " << qPrintable(name) << "(). Ignoring\n";
+ yyMsg(identLineNo) << qPrintable(LU::tr("//% cannot be used with %1(). Ignoring\n").arg(name));
QVariantList args = sym(2).toList();
if (args.size() < 1) {
- yyMsg(identLineNo) << qPrintable(name) << "() requires at least one argument.\n";
+ yyMsg(identLineNo) << qPrintable(LU::tr("%1() requires at least one argument.\n").arg(name));
} else {
if (args.at(0).type() != QVariant::String) {
- yyMsg(identLineNo) << qPrintable(name) << "(): text to translate must be a literal string.\n";
+ yyMsg(identLineNo) << qPrintable(LU::tr("%1(): text to translate must be a literal string.\n").arg(name));
} else {
QString context = QFileInfo(fileName()).baseName();
QString text = args.at(0).toString();
@@ -2312,13 +2317,13 @@ case 66: {
extra.clear();
} else if ((name == QLatin1String("qsTrId")) || (name == QLatin1String("QT_TRID_NOOP"))) {
if (!msgid.isEmpty())
- yyMsg(identLineNo) << "//= cannot be used with " << qPrintable(name) << "(). Ignoring\n";
+ yyMsg(identLineNo) << qPrintable(LU::tr("//= cannot be used with %1(). Ignoring\n").arg(name));
QVariantList args = sym(2).toList();
if (args.size() < 1) {
- yyMsg(identLineNo) << qPrintable(name) << "() requires at least one argument.\n";
+ yyMsg(identLineNo) << qPrintable(LU::tr("%1() requires at least one argument.\n").arg(name));
} else {
if (args.at(0).type() != QVariant::String) {
- yyMsg(identLineNo) << qPrintable(name) << "(): identifier must be a literal string.\n";
+ yyMsg(identLineNo) << qPrintable(LU::tr("%1(): identifier must be a literal string.\n").arg(name));
} else {
msgid = args.at(0).toString();
bool plural = (args.size() > 1);
@@ -2386,7 +2391,7 @@ case 94: {
case 185:
if (!sourcetext.isEmpty() || !extracomment.isEmpty() || !msgid.isEmpty() || !extra.isEmpty()) {
- yyMsg() << "Discarding unconsumed meta data\n";
+ yyMsg() << qPrintable(LU::tr("Discarding unconsumed meta data\n"));
sourcetext.clear();
extracomment.clear();
msgid.clear();
@@ -2448,7 +2453,9 @@ case 94: {
for (int s = 0; s < shifts; ++s)
{
if (first)
- error_message += QLatin1String ("Expected ");
+ //: Beginning of the string that contains
+ //: comma-separated list of expected tokens
+ error_message += LU::tr("Expected ");
else
error_message += QLatin1String (", ");
@@ -2502,13 +2509,13 @@ void QScriptParser::processComment(const QChar *chars, int length)
if (isspace(c))
continue;
if (c != '"') {
- yyMsg() << "Unexpected character in meta string\n";
+ yyMsg() << qPrintable(LU::tr("Unexpected character in meta string\n"));
break;
}
forever {
if (p >= length) {
whoops:
- yyMsg() << "Unterminated meta string\n";
+ yyMsg() << qPrintable(LU::tr("Unterminated meta string\n"));
break;
}
c = chars[p++].unicode();
@@ -2534,8 +2541,7 @@ bool loadQScript(Translator &translator, const QString &filename, ConversionData
{
QFile file(filename);
if (!file.open(QIODevice::ReadOnly)) {
- cd.appendError(QString::fromLatin1("Cannot open %1: %2")
- .arg(filename, file.errorString()));
+ cd.appendError(LU::tr("Cannot open %1: %2").arg(filename, file.errorString()));
return false;
}
QTextStream ts(&file);
diff --git a/tools/linguist/lupdate/qscript.g b/tools/linguist/lupdate/qscript.g
index e4c2d22..3655f2e 100644
--- a/tools/linguist/lupdate/qscript.g
+++ b/tools/linguist/lupdate/qscript.g
@@ -84,6 +84,7 @@
/.
#include <translator.h>
+#include <QtCore/QCoreApplication>
#include <QtCore/qdebug.h>
#include <QtCore/qnumeric.h>
#include <QtCore/qstring.h>
@@ -99,6 +100,10 @@
QT_BEGIN_NAMESPACE
+class LU {
+ Q_DECLARE_TR_FUNCTIONS(LUpdate)
+};
+
static void recordMessage(
Translator *tor, const QString &context, const QString &text, const QString &comment,
const QString &extracomment, const QString &msgid, const TranslatorMessage::ExtraData &extra,
@@ -817,7 +822,7 @@ int QScript::Lexer::lex()
else {
setDone(Bad);
err = IllegalCharacter;
- errmsg = QLatin1String("Illegal character");
+ errmsg = LU::tr("Illegal character");
}
}
break;
@@ -828,7 +833,7 @@ int QScript::Lexer::lex()
} else if (current == 0 || isLineTerminator()) {
setDone(Bad);
err = UnclosedStringLiteral;
- errmsg = QLatin1String("Unclosed string at end of line");
+ errmsg = LU::tr("Unclosed string at end of line");
} else if (current == '\\') {
state = InEscapeSequence;
} else {
@@ -854,7 +859,7 @@ int QScript::Lexer::lex()
} else {
setDone(Bad);
err = IllegalEscapeSequence;
- errmsg = QLatin1String("Illegal escape squence");
+ errmsg = LU::tr("Illegal escape squence");
}
} else if (current == 'x')
state = InHexEscape;
@@ -893,7 +898,7 @@ int QScript::Lexer::lex()
} else {
setDone(Bad);
err = IllegalUnicodeEscapeSequence;
- errmsg = QLatin1String("Illegal unicode escape sequence");
+ errmsg = LU::tr("Illegal unicode escape sequence");
}
break;
case InSingleLineComment:
@@ -921,7 +926,7 @@ int QScript::Lexer::lex()
if (current == 0) {
setDone(Bad);
err = UnclosedComment;
- errmsg = QLatin1String("Unclosed comment at end of file");
+ errmsg = LU::tr("Unclosed comment at end of file");
} else if (isLineTerminator()) {
shiftWindowsLineBreak();
yylineno++;
@@ -1009,7 +1014,7 @@ int QScript::Lexer::lex()
} else {
setDone(Bad);
err = IllegalExponentIndicator;
- errmsg = QLatin1String("Illegal syntax for exponential number");
+ errmsg = LU::tr("Illegal syntax for exponential number");
}
break;
case InExponent:
@@ -1035,7 +1040,7 @@ int QScript::Lexer::lex()
&& isIdentLetter(current)) {
state = Bad;
err = IllegalIdentifier;
- errmsg = QLatin1String("Identifier cannot start with numeric literal");
+ errmsg = LU::tr("Identifier cannot start with numeric literal");
}
// terminate string
@@ -1354,7 +1359,7 @@ bool QScript::Lexer::scanRegExp(RegExpBodyPrefix prefix)
while (1) {
if (isLineTerminator() || current == 0) {
- errmsg = QLatin1String("Unterminated regular expression literal");
+ errmsg = LU::tr("Unterminated regular expression literal");
return false;
}
else if (current != '/' || lastWasEscape == true)
@@ -1683,14 +1688,14 @@ case $rule_number: {
QString name = sym(1).toString();
if ((name == QLatin1String("qsTranslate")) || (name == QLatin1String("QT_TRANSLATE_NOOP"))) {
if (!sourcetext.isEmpty())
- yyMsg(identLineNo) << "//% cannot be used with " << qPrintable(name) << "(). Ignoring\n";
+ yyMsg(identLineNo) << qPrintable(LU::tr("//% cannot be used with %1(). Ignoring\n").arg(name));
QVariantList args = sym(2).toList();
if (args.size() < 2) {
- yyMsg(identLineNo) << qPrintable(name) << "() requires at least two arguments.\n";
+ yyMsg(identLineNo) << qPrintable(LU::tr("%1() requires at least two arguments.\n").arg(name));
} else {
if ((args.at(0).type() != QVariant::String)
|| (args.at(1).type() != QVariant::String)) {
- yyMsg(identLineNo) << qPrintable(name) << "(): both arguments must be literal strings.\n";
+ yyMsg(identLineNo) << qPrintable(LU::tr("%1(): both arguments must be literal strings.\n").arg(name));
} else {
QString context = args.at(0).toString();
QString text = args.at(1).toString();
@@ -1706,13 +1711,13 @@ case $rule_number: {
extra.clear();
} else if ((name == QLatin1String("qsTr")) || (name == QLatin1String("QT_TR_NOOP"))) {
if (!sourcetext.isEmpty())
- yyMsg(identLineNo) << "//% cannot be used with " << qPrintable(name) << "(). Ignoring\n";
+ yyMsg(identLineNo) << qPrintable(LU::tr("//% cannot be used with %1(). Ignoring\n").arg(name));
QVariantList args = sym(2).toList();
if (args.size() < 1) {
- yyMsg(identLineNo) << qPrintable(name) << "() requires at least one argument.\n";
+ yyMsg(identLineNo) << qPrintable(LU::tr("%1() requires at least one argument.\n").arg(name));
} else {
if (args.at(0).type() != QVariant::String) {
- yyMsg(identLineNo) << qPrintable(name) << "(): text to translate must be a literal string.\n";
+ yyMsg(identLineNo) << qPrintable(LU::tr("%1(): text to translate must be a literal string.\n").arg(name));
} else {
QString context = QFileInfo(fileName()).baseName();
QString text = args.at(0).toString();
@@ -1728,13 +1733,13 @@ case $rule_number: {
extra.clear();
} else if ((name == QLatin1String("qsTrId")) || (name == QLatin1String("QT_TRID_NOOP"))) {
if (!msgid.isEmpty())
- yyMsg(identLineNo) << "//= cannot be used with " << qPrintable(name) << "(). Ignoring\n";
+ yyMsg(identLineNo) << qPrintable(LU::tr("//= cannot be used with %1(). Ignoring\n").arg(name));
QVariantList args = sym(2).toList();
if (args.size() < 1) {
- yyMsg(identLineNo) << qPrintable(name) << "() requires at least one argument.\n";
+ yyMsg(identLineNo) << qPrintable(LU::tr("%1() requires at least one argument.\n").arg(name));
} else {
if (args.at(0).type() != QVariant::String) {
- yyMsg(identLineNo) << qPrintable(name) << "(): identifier must be a literal string.\n";
+ yyMsg(identLineNo) << qPrintable(LU::tr("%1(): identifier must be a literal string.\n").arg(name));
} else {
msgid = args.at(0).toString();
bool plural = (args.size() > 1);
@@ -1950,7 +1955,7 @@ Statement: DebuggerStatement ;
/.
case $rule_number:
if (!sourcetext.isEmpty() || !extracomment.isEmpty() || !msgid.isEmpty() || !extra.isEmpty()) {
- yyMsg() << "Discarding unconsumed meta data\n";
+ yyMsg() << qPrintable(LU::tr("Discarding unconsumed meta data\n"));
sourcetext.clear();
extracomment.clear();
msgid.clear();
@@ -2096,6 +2101,9 @@ PropertyNameAndValueListOpt: PropertyNameAndValueList ;
{
if (first)
error_message += QLatin1String ("Expected ");
+ //: Beginning of the string that contains
+ //: comma-separated list of expected tokens
+ error_message += LU::tr("Expected ");
else
error_message += QLatin1String (", ");
@@ -2149,13 +2157,13 @@ void QScriptParser::processComment(const QChar *chars, int length)
if (isspace(c))
continue;
if (c != '"') {
- yyMsg() << "Unexpected character in meta string\n";
+ yyMsg() << qPrintable(LU::tr("Unexpected character in meta string\n"));
break;
}
forever {
if (p >= length) {
whoops:
- yyMsg() << "Unterminated meta string\n";
+ yyMsg() << qPrintable(LU::tr("Unterminated meta string\n"));
break;
}
c = chars[p++].unicode();
@@ -2181,8 +2189,7 @@ bool loadQScript(Translator &translator, const QString &filename, ConversionData
{
QFile file(filename);
if (!file.open(QIODevice::ReadOnly)) {
- cd.appendError(QString::fromLatin1("Cannot open %1: %2")
- .arg(filename, file.errorString()));
+ cd.appendError(LU::tr("Cannot open %1: %2").arg(filename, file.errorString()));
return false;
}
QTextStream ts(&file);
diff --git a/tools/linguist/lupdate/ui.cpp b/tools/linguist/lupdate/ui.cpp
index 9e22922..797ab1f 100644
--- a/tools/linguist/lupdate/ui.cpp
+++ b/tools/linguist/lupdate/ui.cpp
@@ -43,6 +43,7 @@
#include <translator.h>
+#include <QtCore/QCoreApplication>
#include <QtCore/QDebug>
#include <QtCore/QFile>
#include <QtCore/QString>
@@ -55,6 +56,10 @@
QT_BEGIN_NAMESPACE
+class LU {
+ Q_DECLARE_TR_FUNCTIONS(LUpdate)
+};
+
class UiReader : public QXmlDefaultHandler
{
public:
@@ -152,11 +157,10 @@ bool UiReader::characters(const QString &ch)
bool UiReader::fatalError(const QXmlParseException &exception)
{
- QString msg;
- msg.sprintf("XML error: Parse error at line %d, column %d (%s).",
- exception.lineNumber(), exception.columnNumber(),
- exception.message().toLatin1().data());
- m_cd.appendError(msg);
+ QString msg = LU::tr("XML error: Parse error at line %1, column %2 (%3).")
+ .arg(exception.lineNumber()).arg(exception.columnNumber())
+ .arg(exception.message());
+ m_cd.appendError(msg);
return false;
}
@@ -181,8 +185,7 @@ bool loadUI(Translator &translator, const QString &filename, ConversionData &cd)
cd.m_sourceFileName = filename;
QFile file(filename);
if (!file.open(QIODevice::ReadOnly)) {
- cd.appendError(QString::fromLatin1("Cannot open %1: %2")
- .arg(filename, file.errorString()));
+ cd.appendError(LU::tr("Cannot open %1: %2").arg(filename, file.errorString()));
return false;
}
QXmlInputSource in(&file);
@@ -196,7 +199,7 @@ bool loadUI(Translator &translator, const QString &filename, ConversionData &cd)
reader.setErrorHandler(&handler);
bool result = reader.parse(in);
if (!result)
- cd.appendError(QLatin1String("Parse error in UI file"));
+ cd.appendError(LU::tr("Parse error in UI file"));
reader.setContentHandler(0);
reader.setErrorHandler(0);
return result;
diff --git a/tools/qdoc3/main.cpp b/tools/qdoc3/main.cpp
index fa7efee..2bfe38e 100644
--- a/tools/qdoc3/main.cpp
+++ b/tools/qdoc3/main.cpp
@@ -148,7 +148,7 @@ static void printHelp()
*/
static void printVersion()
{
- QString s = QString(tr("qdoc version ")) + QString(QT_VERSION_STR);
+ QString s = tr("qdoc version %1").arg(QT_VERSION_STR);
Location::information(s);
}
diff --git a/tools/shared/qtpropertybrowser/qtpropertymanager.cpp b/tools/shared/qtpropertybrowser/qtpropertymanager.cpp
index a0bef0a..8c7835c 100644
--- a/tools/shared/qtpropertybrowser/qtpropertymanager.cpp
+++ b/tools/shared/qtpropertybrowser/qtpropertymanager.cpp
@@ -2643,8 +2643,8 @@ QString QtPointPropertyManager::valueText(const QtProperty *property) const
if (it == d_ptr->m_values.constEnd())
return QString();
const QPoint v = it.value();
- return QString(tr("(%1, %2)").arg(QString::number(v.x()))
- .arg(QString::number(v.y())));
+ return tr("(%1, %2)").arg(QString::number(v.x()))
+ .arg(QString::number(v.y()));
}
/*!
@@ -2884,8 +2884,8 @@ QString QtPointFPropertyManager::valueText(const QtProperty *property) const
return QString();
const QPointF v = it.value().val;
const int dec = it.value().decimals;
- return QString(tr("(%1, %2)").arg(QString::number(v.x(), 'f', dec))
- .arg(QString::number(v.y(), 'f', dec)));
+ return tr("(%1, %2)").arg(QString::number(v.x(), 'f', dec))
+ .arg(QString::number(v.y(), 'f', dec));
}
/*!
@@ -3204,8 +3204,8 @@ QString QtSizePropertyManager::valueText(const QtProperty *property) const
if (it == d_ptr->m_values.constEnd())
return QString();
const QSize v = it.value().val;
- return QString(tr("%1 x %2").arg(QString::number(v.width()))
- .arg(QString::number(v.height())));
+ return tr("%1 x %2").arg(QString::number(v.width()))
+ .arg(QString::number(v.height()));
}
/*!
@@ -3569,8 +3569,8 @@ QString QtSizeFPropertyManager::valueText(const QtProperty *property) const
return QString();
const QSizeF v = it.value().val;
const int dec = it.value().decimals;
- return QString(tr("%1 x %2").arg(QString::number(v.width(), 'f', dec))
- .arg(QString::number(v.height(), 'f', dec)));
+ return tr("%1 x %2").arg(QString::number(v.width(), 'f', dec))
+ .arg(QString::number(v.height(), 'f', dec));
}
/*!
@@ -3962,10 +3962,10 @@ QString QtRectPropertyManager::valueText(const QtProperty *property) const
if (it == d_ptr->m_values.constEnd())
return QString();
const QRect v = it.value().val;
- return QString(tr("[(%1, %2), %3 x %4]").arg(QString::number(v.x()))
- .arg(QString::number(v.y()))
- .arg(QString::number(v.width()))
- .arg(QString::number(v.height())));
+ return tr("[(%1, %2), %3 x %4]").arg(QString::number(v.x()))
+ .arg(QString::number(v.y()))
+ .arg(QString::number(v.width()))
+ .arg(QString::number(v.height()));
}
/*!
diff --git a/translations/assistant_uk.ts b/translations/assistant_uk.ts
index c7aad83..d08003e 100644
--- a/translations/assistant_uk.ts
+++ b/translations/assistant_uk.ts
@@ -41,7 +41,7 @@
Reason:
%2</source>
- <translation>Не можу зареєструвати файл документації
+ <translation>Не вдалось зареєструвати файл документації
%1
Причина:
@@ -57,7 +57,7 @@ Reason:
Reason:
%2</source>
- <translation>Не можу скасувати реєстрацію файлу документації
+ <translation>Не вдалось скасувати реєстрацію файлу документації
%1
Причина:
@@ -77,7 +77,7 @@ Reason:
</message>
<message>
<source>Cannot load sqlite database driver!</source>
- <translation>Не можу завантажити драйвер бази даних SQLite!</translation>
+ <translation>Неможливо завантажити драйвер бази даних SQLite!</translation>
</message>
</context>
<context>
@@ -108,6 +108,17 @@ Reason:
</message>
</context>
<context>
+ <name>BookmarkItem</name>
+ <message>
+ <source>New Folder</source>
+ <translation>Нова тека</translation>
+ </message>
+ <message>
+ <source>Untitled</source>
+ <translation>Без назви</translation>
+ </message>
+</context>
+<context>
<name>BookmarkManager</name>
<message>
<source>Untitled</source>
@@ -313,6 +324,60 @@ Reason:
<context>
<name>CmdLineParser</name>
<message>
+ <source>Usage: assistant [Options]
+
+-collectionFile file Uses the specified collection
+ file instead of the default one
+-showUrl url Shows the document with the
+ url.
+-enableRemoteControl Enables Assistant to be
+ remotely controlled.
+-show widget Shows the specified dockwidget
+ which can be &quot;contents&quot;, &quot;index&quot;,
+ &quot;bookmarks&quot; or &quot;search&quot;.
+-activate widget Activates the specified dockwidget
+ which can be &quot;contents&quot;, &quot;index&quot;,
+ &quot;bookmarks&quot; or &quot;search&quot;.
+-hide widget Hides the specified dockwidget
+ which can be &quot;contents&quot;, &quot;index&quot;
+ &quot;bookmarks&quot; or &quot;search&quot;.
+-register helpFile Registers the specified help file
+ (.qch) in the given collection
+ file.
+-unregister helpFile Unregisters the specified help file
+ (.qch) from the give collection
+ file.
+-setCurrentFilter filter Set the filter as the active filter.
+-remove-search-index Removes the full text search index.
+-rebuild-search-index Re-builds the full text search index (potentially slow).
+-quiet Does not display any error or
+ status message.
+-help Displays this help.
+</source>
+ <translation>Використання: assistant [Опції]
+
+-collectionFile файл Використати вказаний файл колекції
+ замість типового
+-showUrl URL Показати документ з URL.
+-enableRemoteControl Увімкнути віддалене керування Assistant.
+-show віджет Показати вказаний віджет (може бути:
+ &quot;contents&quot;, &quot;index&quot;, &quot;bookmarks&quot; чи &quot;search&quot;).
+-activate віджет Активувати вказаний віджет (може бути:
+ &quot;contents&quot;, &quot;index&quot;, &quot;bookmarks&quot; чи &quot;search&quot;).
+-hide віджет Сховати вказаний віджет (може бути:
+ &quot;contents&quot;, &quot;index&quot;, &quot;bookmarks&quot; чи &quot;search&quot;).
+-register файлДовідки Зареєструвати вказаний файл довідки
+ (.qch) в даному файлі колекції.
+-unregister файлДовідки Скасувати реєстрацію вказаного файлу довідки
+ (.qch) в даному файлі колекції.
+-setCurrentFilter фільтр Встановити фільтр в якості активного.
+-remove-search-index Видалити повнотекстовий пошуковий індекс.
+-rebuild-search-index Перебудувати повнотекстовий пошуковий індекс (можливо довго).
+-quiet Не показувати жодних помилок чи статусних повідомлень.
+-help Показати цю довідку.
+</translation>
+ </message>
+ <message>
<source>Unknown option: %1</source>
<translation>Невідома опція: %1</translation>
</message>
@@ -487,6 +552,11 @@ Reason:
<source>The attributes for custom filter &apos;%1&apos; are defined multiple times.</source>
<translation>Атрибути для користувацького фільтра &apos;%1&apos; визначено декілька раз.</translation>
</message>
+ <message>
+ <source>unfiltered</source>
+ <comment>list of available documentation</comment>
+ <translation>без фільтра</translation>
+ </message>
</context>
<context>
<name>FindWidget</name>
@@ -513,6 +583,10 @@ Reason:
<source>Converting File</source>
<translation>Конвертування файлу</translation>
</message>
+ <message>
+ <source>Creating the new Qt help files from the old ADP file.</source>
+ <translation>Створення нових файлів довідки Qt зі старого файлу ADP.</translation>
+ </message>
</context>
<context>
<name>FontPanel</name>
@@ -577,6 +651,13 @@ Reason:
</message>
</context>
<context>
+ <name>HelpGenerator</name>
+ <message>
+ <source>Warning: %1</source>
+ <translation>Попередження: %1</translation>
+ </message>
+</context>
+<context>
<name>HelpViewer</name>
<message>
<source>&lt;title&gt;about:blank&lt;/title&gt;</source>
@@ -584,7 +665,7 @@ Reason:
</message>
<message>
<source>&lt;title&gt;Error 404...&lt;/title&gt;&lt;div align=&quot;center&quot;&gt;&lt;br&gt;&lt;br&gt;&lt;h1&gt;The page could not be found&lt;/h1&gt;&lt;br&gt;&lt;h3&gt;&apos;%1&apos;&lt;/h3&gt;&lt;/div&gt;</source>
- <translation>&lt;title&gt;Помилка 404...&lt;/title&gt;&lt;div align=&quot;center&quot;&gt;&lt;br&gt;&lt;br&gt;&lt;h1&gt;Неможливо знайти сторінку&lt;/h1&gt;&lt;br&gt;&lt;h3&gt;&apos;%1&apos;&lt;/h3&gt;&lt;/div&gt;</translation>
+ <translation>&lt;title&gt;Помилка 404...&lt;/title&gt;&lt;div align=&quot;center&quot;&gt;&lt;br&gt;&lt;br&gt;&lt;h1&gt;Не вдалось знайти сторінку&lt;/h1&gt;&lt;br&gt;&lt;h3&gt;&apos;%1&apos;&lt;/h3&gt;&lt;/div&gt;</translation>
</message>
<message>
<source>Copy &amp;Link Location</source>
@@ -600,6 +681,13 @@ Reason:
</message>
</context>
<context>
+ <name>HelpWindow</name>
+ <message>
+ <source>&lt;center&gt;&lt;b&gt;Wizard Assistant&lt;/b&gt;&lt;/center&gt;</source>
+ <translation>&lt;center&gt;&lt;b&gt;Майстер Assistant&lt;/b&gt;&lt;/center&gt;</translation>
+ </message>
+</context>
+<context>
<name>IdentifierPage</name>
<message>
<source>Form</source>
@@ -736,7 +824,7 @@ Reason:
</message>
<message>
<source>Unable to save the file %1: %2.</source>
- <translation>Не можу зберегти файл %1: %2.</translation>
+ <translation>Неможливо зберегти файл %1: %2.</translation>
</message>
<message>
<source>Downloading %1...</source>
@@ -988,6 +1076,10 @@ Reason:
<translation>Не вдалось знайти елемент, пов&apos;язаний зі змістом.</translation>
</message>
<message>
+ <source>&lt;center&gt;&lt;h3&gt;%1&lt;/h3&gt;&lt;p&gt;Version %2&lt;/p&gt;&lt;/center&gt;&lt;p&gt;Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).&lt;/p&gt;</source>
+ <translation>&lt;center&gt;&lt;h3&gt;%1&lt;/h3&gt;&lt;p&gt;Версія %2&lt;/p&gt;&lt;/center&gt;&lt;p&gt;Copyright (C) 2010 Корпорація Nokia та/або її дочірні компанії.&lt;/p&gt;</translation>
+ </message>
+ <message>
<source>About %1</source>
<translation>Про %1</translation>
</message>
@@ -997,7 +1089,7 @@ Reason:
</message>
<message>
<source>Could not register file &apos;%1&apos;: %2</source>
- <translation>Не можу зареєструвати файл &apos;%1&apos;: %2</translation>
+ <translation>Не вдалось зареєструвати файл &apos;%1&apos;: %2</translation>
</message>
</context>
<context>
@@ -1221,45 +1313,20 @@ Do you want to remove it?</source>
</message>
</context>
<context>
- <name>QCLuceneResultWidget</name>
- <message>
- <source>Search Results</source>
- <translation>Результати пошуку</translation>
- </message>
- <message>
- <source>Note:</source>
- <translation>Примітка:</translation>
- </message>
- <message>
- <source>The search results may not be complete since the documentation is still being indexed!</source>
- <translation>Результати пошуку можуть бути не повні, оскільки документація досі індексується!</translation>
- </message>
- <message>
- <source>Your search did not match any documents.</source>
- <translation>Ваш пошук не повернув результатів.</translation>
- </message>
- <message>
- <source>(The reason for this might be that the documentation is still being indexed.)</source>
- <translation>(Причиною цього може бути те, що документація досі індексується.)</translation>
- </message>
-</context>
-<context>
<name>QCollectionGenerator</name>
<message>
<source>Unknown token at line %1.</source>
<translation>Невідомий токен в рядку %1.</translation>
</message>
<message>
- <source>Unknown token at line %1. Expected &quot;QtHelpCollectionProject&quot;!</source>
- <translation>Невідомий токен в рядку %1. Очікувався &quot;QtHelpCollectionProject&quot;!</translation>
+ <source>Missing end tags.</source>
+ <translation>Відсутні кінцеві теги.</translation>
</message>
<message>
- <source>Missing output file name!</source>
- <translation>Відсутнє ім&apos;я вихідного файлу!</translation>
- </message>
- <message>
- <source>Missing collection config file!</source>
- <translation>Відсутній файл налаштувань колекції!</translation>
+ <source>Qt Collection Generator version 1.0 (Qt %1)
+</source>
+ <translation>Qt Collection Generator версії 1.0 (Qt %1)
+</translation>
</message>
<message>
<source>
@@ -1288,209 +1355,92 @@ qcollectiongenerator &lt;файл-налаштувань-колекції&gt; [
</translation>
</message>
-</context>
-<context>
- <name>QHelp</name>
<message>
- <source>Untitled</source>
- <translation>Без назви</translation>
- </message>
-</context>
-<context>
- <name>QHelpCollectionHandler</name>
- <message>
- <source>The collection file &apos;%1&apos; is not set up yet!</source>
- <translation>Файл колекції &apos;%1&apos; ще не встановлено!</translation>
- </message>
- <message>
- <source>Cannot load sqlite database driver!</source>
- <translation>Не можу завантажити драйвер бази даних SQLite!</translation>
- </message>
- <message>
- <source>Cannot open collection file: %1</source>
- <translation>Неможливо відкрити файл колекції: %1</translation>
- </message>
- <message>
- <source>Cannot create tables in file %1!</source>
- <translation>Неможливо створити таблиці в файлі %1!</translation>
- </message>
- <message>
- <source>The collection file &apos;%1&apos; already exists!</source>
- <translation>Файл колекції &apos;%1&apos; вже існує!</translation>
- </message>
- <message>
- <source>Cannot create directory: %1</source>
- <translation>Неможливо створити теку: %1</translation>
- </message>
- <message>
- <source>Cannot copy collection file: %1</source>
- <translation>Неможливо скопіювати файл колекції: %1</translation>
+ <source>Unknown token at line %1. Expected &quot;QtHelpCollectionProject&quot;.</source>
+ <translation>Невідомий токен в рядку %1. Очікувався &quot;QtHelpCollectionProject&quot;.</translation>
</message>
<message>
- <source>Unknown filter &apos;%1&apos;!</source>
- <translation>Невідомий фільтр &apos;%1&apos;!</translation>
+ <source>Missing input or output file for help file generation.</source>
+ <translation>Відсутній вхідний чи вихідний файл для генерації файлу довідки.</translation>
</message>
<message>
- <source>Cannot register filter %1!</source>
- <translation>Неможливо зареєструвати фільтр %1!</translation>
+ <source>Missing output file name.</source>
+ <translation>Відсутнє ім&apos;я вихідного файлу.</translation>
</message>
<message>
- <source>Cannot open documentation file %1!</source>
- <translation>Неможливо відкрити файл документації %1!</translation>
+ <source>Missing collection config file.</source>
+ <translation>Відсутній файл налаштувань колекції.</translation>
</message>
<message>
- <source>Invalid documentation file &apos;%1&apos;!</source>
- <translation>Неправильний файл документації &apos;%1&apos;!</translation>
+ <source>Could not open %1.
+</source>
+ <translation>Не вдалось відкрити %1.
+</translation>
</message>
<message>
- <source>The namespace %1 was not registered!</source>
- <translation>Простір імен %1 не зареєстровано!</translation>
+ <source>Reading collection config file...
+</source>
+ <translation>Читання файлу налаштувань колекції...
+</translation>
</message>
<message>
- <source>Namespace %1 already exists!</source>
- <translation>Простір імен %1 вже існує!</translation>
+ <source>Collection config file error: %1
+</source>
+ <translation>Помилка файлу налаштувань колекції: %1
+</translation>
</message>
<message>
- <source>Cannot register namespace &apos;%1&apos;!</source>
- <translation>Неможливо зареєструвати простір імен &apos;%1&apos;!</translation>
+ <source>Generating help for %1...
+</source>
+ <translation>Генерування довідки для %1...
+</translation>
</message>
<message>
- <source>Cannot open database &apos;%1&apos; to optimize!</source>
- <translation>Неможливо відкрити базу даних &apos;%1&apos; для оптимізації!</translation>
+ <source>Creating collection file...
+</source>
+ <translation>Створення файлу колекції...
+</translation>
</message>
-</context>
-<context>
- <name>QHelpDBReader</name>
<message>
- <source>Cannot open database &apos;%1&apos; &apos;%2&apos;: %3</source>
- <extracomment>The placeholders are: %1 - The name of the database which cannot be opened %2 - The unique id for the connection %3 - The actual error string</extracomment>
- <translation>Неможливо відкрити базу даних: &apos;%1&apos; &apos;%2&apos;: %3</translation>
+ <source>The file %1 cannot be overwritten.
+</source>
+ <translation>Неможливо перезаписати файл %1.
+</translation>
</message>
-</context>
-<context>
- <name>QHelpEngineCore</name>
<message>
- <source>Cannot open documentation file %1: %2!</source>
- <translation>Неможливо файл документації %1: %2!</translation>
+ <source>Cannot open %1.
+</source>
+ <translation>Неможливо відкрити %1.
+</translation>
</message>
<message>
- <source>The specified namespace does not exist!</source>
- <translation>Вказаний простір імен не існує!</translation>
+ <source>Cannot open referenced image file %1.
+</source>
+ <translation>Неможливо відкрити файл зображення %1, на який є посилання.
+</translation>
</message>
</context>
<context>
<name>QHelpGenerator</name>
<message>
- <source>Invalid help data!</source>
- <translation>Неправильні дані довідки!</translation>
- </message>
- <message>
- <source>No output file name specified!</source>
- <translation>Не вказане ім&apos;я вихідного файлу!</translation>
- </message>
- <message>
- <source>The file %1 cannot be overwritten!</source>
- <translation>Неможливо перезаписати файл %1!</translation>
- </message>
- <message>
- <source>Building up file structure...</source>
- <translation>Побудова структури файлу....</translation>
- </message>
- <message>
- <source>Cannot open data base file %1!</source>
- <translation>Неможливо відкрити файл бази даних %1!</translation>
+ <source>Missing output file name.</source>
+ <translation>Відсутнє ім&apos;я вихідного файлу.</translation>
</message>
<message>
- <source>Cannot register namespace %1!</source>
- <translation>Неможливо зареєструвати простір імен %1!</translation>
- </message>
- <message>
- <source>Insert custom filters...</source>
- <translation>Вставка фільтрів користувача...</translation>
- </message>
- <message>
- <source>Insert help data for filter section (%1 of %2)...</source>
- <translation>Вставка даних довідки для розділу фільтра (%1 з %2)...</translation>
- </message>
- <message>
- <source>Documentation successfully generated.</source>
- <translation>Документацію успішно згенеровано.</translation>
- </message>
- <message>
- <source>Some tables already exist!</source>
- <translation>Деякі таблиці вже існують!</translation>
- </message>
- <message>
- <source>Cannot create tables!</source>
- <translation>Неможливо створити таблиці!</translation>
- </message>
- <message>
- <source>Cannot register virtual folder!</source>
- <translation>Неможливо зареєструвати віртуальну теку!</translation>
- </message>
- <message>
- <source>Insert files...</source>
- <translation>Вставка файлів...</translation>
- </message>
- <message>
- <source>The referenced file %1 must be inside or within a subdirectory of (%2). Skipping it.</source>
- <translation>Файл %1 має бути всередині підтеки (%2). Пропускаємо його.</translation>
- </message>
- <message>
- <source>The file %1 does not exist! Skipping it.</source>
- <translation>Файл %1 не існує! Пропускаємо його.</translation>
- </message>
- <message>
- <source>Cannot open file %1! Skipping it.</source>
- <translation>Неможливо відкрити файл %1! Пропускаємо його.</translation>
- </message>
- <message>
- <source>The filter %1 is already registered!</source>
- <translation>Фільтр %1 вже зареєстровано!</translation>
- </message>
- <message>
- <source>Cannot register filter %1!</source>
- <translation>Неможливо зареєструвати фільтр %1!</translation>
- </message>
- <message>
- <source>Insert indices...</source>
- <translation>Вставка індексів...</translation>
- </message>
- <message>
- <source>Insert contents...</source>
- <translation>Вставка змісту...</translation>
- </message>
- <message>
- <source>Cannot insert contents!</source>
- <translation>Неможливо вставити зміст!</translation>
- </message>
- <message>
- <source>Cannot register contents!</source>
- <translation>Неможливо зареєструвати зміст!</translation>
- </message>
- <message>
- <source>File &apos;%1&apos; does not exist.</source>
- <translation>Файл &apos;%1&apos; не існує.</translation>
- </message>
- <message>
- <source>File &apos;%1&apos; cannot be opened.</source>
- <translation>Неможливо відкрити файл &apos;%1&apos;.</translation>
- </message>
- <message>
- <source>File &apos;%1&apos; contains an invalid link to file &apos;%2&apos;</source>
- <translation>Файл &apos;%1&apos; містить неправильне посилання до файлу &apos;%2&apos;</translation>
- </message>
- <message>
- <source>Invalid links in HTML files.</source>
- <translation>Неправильні посилання в файлах HTML.</translation>
+ <source>Qt Help Generator version 1.0 (Qt %1)
+</source>
+ <translation>Qt Help Generator версії 1.0 (Qt %1)
+</translation>
</message>
<message>
- <source>Missing output file name!</source>
- <translation>Відсутнє ім&apos;я вихідного файлу!</translation>
+ <source>Missing Qt help project file.</source>
+ <translation>Відсутній файл проекту колекції довідки Qt.</translation>
</message>
<message>
- <source>Missing Qt help project file!</source>
- <translation>Відсутній файл проекту колекції довідки Qt!</translation>
+ <source>Could not open %1.
+</source>
+ <translation>Не вдалось відкрити %1.
+</translation>
</message>
<message>
<source>
@@ -1524,102 +1474,11 @@ qhelpgenerator &lt;файл-проекту-довідки&gt; [опції]
</translation>
</message>
-</context>
-<context>
- <name>QHelpProject</name>
- <message>
- <source>Unknown token.</source>
- <translation>Невідомий токен.</translation>
- </message>
- <message>
- <source>Unknown token. Expected &quot;QtHelpProject&quot;!</source>
- <translation>Невідомий токен. Очікувався &quot;QtHelpProject&quot;!</translation>
- </message>
- <message>
- <source>Error in line %1: %2</source>
- <translation>Помилка в рядку %1: %2</translation>
- </message>
- <message>
- <source>Virtual folder has invalid syntax.</source>
- <translation>Віртуальна тека має неправильний синтаксис.</translation>
- </message>
- <message>
- <source>Namespace has invalid syntax.</source>
- <translation>Простір імен має неправильний синтаксис.</translation>
- </message>
- <message>
- <source>Missing namespace in QtHelpProject.</source>
- <translation>Відсутній простір імен в QtHelpProject.</translation>
- </message>
- <message>
- <source>Missing virtual folder in QtHelpProject</source>
- <translation>Відсутня віртуальна тека в QtHelpProject</translation>
- </message>
- <message>
- <source>Missing attribute in keyword at line %1.</source>
- <translation>Відсутній атрибут в ключовому слові на рядку %1.</translation>
- </message>
- <message>
- <source>The input file %1 could not be opened!</source>
- <translation>Неможливо відкрити вхідний файл %1!</translation>
- </message>
-</context>
-<context>
- <name>QHelpSearchQueryWidget</name>
- <message>
- <source>Search for:</source>
- <translation>Шукати:</translation>
- </message>
<message>
- <source>Previous search</source>
- <translation>Попередній пошук</translation>
- </message>
- <message>
- <source>Next search</source>
- <translation>Наступний пошук</translation>
- </message>
- <message>
- <source>Search</source>
- <translation>Пошук</translation>
- </message>
- <message>
- <source>Advanced search</source>
- <translation>Розширений пошук</translation>
- </message>
- <message>
- <source>words &lt;B&gt;similar&lt;/B&gt; to:</source>
- <translation>слова &lt;B&gt;схожі&lt;/B&gt; на:</translation>
- </message>
- <message>
- <source>&lt;B&gt;without&lt;/B&gt; the words:</source>
- <translation>&lt;B&gt;без&lt;/B&gt; слів:</translation>
- </message>
- <message>
- <source>with &lt;B&gt;exact phrase&lt;/B&gt;:</source>
- <translation>з &lt;B&gt;точною фразою&lt;/B&gt;:</translation>
- </message>
- <message>
- <source>with &lt;B&gt;all&lt;/B&gt; of the words:</source>
- <translation>з &lt;B&gt;усіма&lt;/B&gt; словами:</translation>
- </message>
- <message>
- <source>with &lt;B&gt;at least one&lt;/B&gt; of the words:</source>
- <translation>з &lt;B&gt;щонайменше одним&lt;/B&gt; зі слів:</translation>
- </message>
-</context>
-<context>
- <name>QHelpSearchResultWidget</name>
- <message numerus="yes">
- <source>%1 - %2 of %n Hits</source>
- <translation>
- <numerusform>%1 - %2 з %n збігу</numerusform>
- <numerusform>%1 - %2 з %n збігів</numerusform>
- <numerusform>%1 - %2 з %n збігів</numerusform>
- </translation>
- </message>
- <message>
- <source>0 - 0 of 0 Hits</source>
- <translation>0 - 0 of 0 збігів</translation>
+ <source>Could not create output directory: %1
+</source>
+ <translation>Не вдалось створити вихідну теку: %1
+</translation>
</message>
</context>
<context>
diff --git a/translations/designer_uk.ts b/translations/designer_uk.ts
index ae27e67..12e60e6 100644
--- a/translations/designer_uk.ts
+++ b/translations/designer_uk.ts
@@ -25,6 +25,49 @@
</message>
</context>
<context>
+ <name>AbstractItemEditor</name>
+ <message>
+ <source>Selectable</source>
+ <translation>Можна вибирати</translation>
+ </message>
+ <message>
+ <source>Editable</source>
+ <translation>Можна редагувати</translation>
+ </message>
+ <message>
+ <source>DragEnabled</source>
+ <translation>Можна тягти</translation>
+ </message>
+ <message>
+ <source>DropEnabled</source>
+ <translation>Можна кидати</translation>
+ </message>
+ <message>
+ <source>UserCheckable</source>
+ <translation>Користувач може позначати</translation>
+ </message>
+ <message>
+ <source>Enabled</source>
+ <translation>Увімкнено</translation>
+ </message>
+ <message>
+ <source>Tristate</source>
+ <translation>Три стани</translation>
+ </message>
+ <message>
+ <source>Unchecked</source>
+ <translation>Не позначено</translation>
+ </message>
+ <message>
+ <source>PartiallyChecked</source>
+ <translation>Частково позначено</translation>
+ </message>
+ <message>
+ <source>Checked</source>
+ <translation>Позначено</translation>
+ </message>
+</context>
+<context>
<name>AddLinkDialog</name>
<message>
<source>Insert Link</source>
@@ -62,7 +105,7 @@
</message>
<message>
<source>The font file &apos;%1&apos; could not be loaded.</source>
- <translation>Неможливо завантажити файл шрифт &apos;%1&apos;.</translation>
+ <translation>Не вдалось завантажити файл шрифт &apos;%1&apos;.</translation>
</message>
<message>
<source>&apos;%1&apos; is not a valid font id.</source>
@@ -74,7 +117,7 @@
</message>
<message>
<source>The font &apos;%1&apos; (%2) could not be unloaded.</source>
- <translation>Неможливо вивантажити шрифт &apos;%1&apos; (%2).</translation>
+ <translation>Не вдалось вивантажити шрифт &apos;%1&apos; (%2).</translation>
</message>
</context>
<context>
@@ -639,7 +682,7 @@
</message>
<message>
<source>The converted file could not be read.</source>
- <translation>Неможливо прочитати конвертований файл.</translation>
+ <translation>Не вдалось прочитати конвертований файл.</translation>
</message>
<message>
<source>This file was created using Designer from Qt-%1 and will be converted to a new form by Qt Designer.</source>
@@ -652,7 +695,7 @@
<message>
<source>This file was created using Designer from Qt-%1 and could not be read:
%2</source>
- <translation>Неможливо прочитати файл, бо його було створено з використанням Designer з Qt-%1:
+ <translation>Не вдалось прочитати файл, бо його було створено з використанням Designer з Qt-%1:
%2</translation>
</message>
<message>
@@ -672,14 +715,14 @@
</message>
<message>
<source>&apos;%1&apos; could not be converted to an enumeration value of type &apos;%2&apos;.</source>
- <translation>Неможливо сконвертувати &apos;%1&apos;до типу значень переліку &apos;%2&apos;.</translation>
+ <translation>Не вдалось сконвертувати &apos;%1&apos;до типу значень переліку &apos;%2&apos;.</translation>
</message>
</context>
<context>
<name>DesignerMetaFlags</name>
<message>
<source>&apos;%1&apos; could not be converted to a flag value of type &apos;%2&apos;.</source>
- <translation>&apos;%1&apos; не можу бути сконвертовано до прапорця типу &apos;%2&apos;.</translation>
+ <translation>Не вдалось перетворити &apos;%1&apos; прапорця типу &apos;%2&apos;.</translation>
</message>
</context>
<context>
@@ -721,7 +764,7 @@
<name>DeviceSkin</name>
<message>
<source>The image file &apos;%1&apos; could not be loaded.</source>
- <translation>Неможливо завантажити файл зображення &apos;%1&apos;.</translation>
+ <translation>Не вдалось завантажити файл зображення &apos;%1&apos;.</translation>
</message>
<message>
<source>The skin directory &apos;%1&apos; does not contain a configuration file.</source>
@@ -729,11 +772,11 @@
</message>
<message>
<source>The skin configuration file &apos;%1&apos; could not be opened.</source>
- <translation>Неможливо відкрити файл налаштувань &apos;%1&apos;.</translation>
+ <translation>Не вдалось відкрити файл налаштувань &apos;%1&apos;.</translation>
</message>
<message>
<source>The skin configuration file &apos;%1&apos; could not be read: %2</source>
- <translation>Неможливо прочитати файл налаштувань &apos;%1&apos;: %2</translation>
+ <translation>Не вдалось прочитати файл налаштувань &apos;%1&apos;: %2</translation>
</message>
<message>
<source>Syntax error: %1</source>
@@ -1044,11 +1087,11 @@ Parsing grid layout minimum size values</extracomment>
</message>
<message>
<source>A temporary form file could not be created in %1.</source>
- <translation>Неможливо створити тимчасовий файл форми в %1.</translation>
+ <translation>Не вдалось створити тимчасовий файл форми в %1.</translation>
</message>
<message>
<source>The temporary form file %1 could not be written.</source>
- <translation>Неможливо записати тимчасовий файл форми %1.</translation>
+ <translation>Не вдалось записати тимчасовий файл форми %1.</translation>
</message>
</context>
<context>
@@ -1179,7 +1222,7 @@ This indicates an inconsistency in the ui-file.</source>
</message>
<message>
<source>While applying tab stops: The widget &apos;%1&apos; could not be found.</source>
- <translation>Під час застосування позицій табуляції: Неможливо знайти віджет &apos;%1&apos;.</translation>
+ <translation>Під час застосування позицій табуляції: Не вдалось знайти віджет &apos;%1&apos;.</translation>
</message>
<message>
<source>Invalid QButtonGroup reference &apos;%1&apos; referenced by &apos;%2&apos;.</source>
@@ -1464,13 +1507,13 @@ Do you want to update the file location or generate a new form?</source>
</message>
<message>
<source>Could not open file</source>
- <translation>Неможливо відкрити файл</translation>
+ <translation>Не вдалось відкрити файл</translation>
</message>
<message>
<source>The file %1 could not be opened.
Reason: %2
Would you like to retry or select a different file?</source>
- <translation>Неможливо відкрити файл %1.
+ <translation>Не вдалось відкрити файл %1.
Причина: %2
Чи не хотіли б ви спробувати ще раз чи вибрати інший файл?</translation>
</message>
@@ -1480,7 +1523,7 @@ Would you like to retry or select a different file?</source>
</message>
<message>
<source>Could not write file</source>
- <translation>Неможливо записати файл</translation>
+ <translation>Не вдалось записати файл</translation>
</message>
<message>
<source>It was not possible to write the entire file %1 to disk.
@@ -1500,15 +1543,15 @@ Would you like to retry?</source>
</message>
<message>
<source>The backup file %1 could not be written.</source>
- <translation>Неможливо записати файл резервної копії %1.</translation>
+ <translation>Не вдалось записати файл резервної копії %1.</translation>
</message>
<message>
<source>The backup directory %1 could not be created.</source>
- <translation>Неможливо створити теку резервних копій %1.</translation>
+ <translation>Не вдалось створити теку резервних копій %1.</translation>
</message>
<message>
<source>The temporary backup directory %1 could not be created.</source>
- <translation>Неможливо створити тимчасову теку резервних копій %1.</translation>
+ <translation>Не вдалось створити тимчасову теку резервних копій %1.</translation>
</message>
<message>
<source>Preview failed</source>
@@ -1528,7 +1571,7 @@ Would you like to retry?</source>
</message>
<message>
<source>The file %1 could not be written.</source>
- <translation>Неможливо записати файл %1.</translation>
+ <translation>Не вдалось записати файл %1.</translation>
</message>
<message>
<source>Please close all forms to enable the loading of additional fonts.</source>
@@ -1735,7 +1778,7 @@ Container pages should only be added by specifying them in XML returned by the d
<name>QDesignerSharedSettings</name>
<message>
<source>The template path %1 could not be created.</source>
- <translation>Неможливо створити шлях до шаблону %1.</translation>
+ <translation>Не вдалось створити шлях до шаблону %1.</translation>
</message>
<message>
<source>An error has been encountered while parsing device profile XML: %1</source>
@@ -1845,7 +1888,7 @@ Container pages should only be added by specifying them in XML returned by the d
</message>
<message>
<source>The file &lt;b&gt;%1&lt;/b&gt; could not be opened.</source>
- <translation>Неможливо відкрити файл &lt;b&gt;%1&lt;/b&gt;.</translation>
+ <translation>Не вдалось відкрити файл &lt;b&gt;%1&lt;/b&gt;.</translation>
</message>
<message>
<source>The file &lt;b&gt;%1&lt;/b&gt; is not a valid Designer UI file.</source>
@@ -1877,11 +1920,11 @@ Empty class name passed to widget factory method</extracomment>
</message>
<message>
<source>The set-type property %1 could not be read.</source>
- <translation>Неможливо прочитати властивість %1 типу &quot;множина&quot;.</translation>
+ <translation>Не вдалось прочитати властивість %1 типу &quot;множина&quot;.</translation>
</message>
<message>
<source>The enumeration-type property %1 could not be read.</source>
- <translation>Неможливо прочитати властивість %1 типу &quot;перелік&quot;.</translation>
+ <translation>Не вдалось прочитати властивість %1 типу &quot;перелік&quot;.</translation>
</message>
<message>
<source>Reading properties of the type %1 is not supported yet.</source>
@@ -1889,7 +1932,7 @@ Empty class name passed to widget factory method</extracomment>
</message>
<message>
<source>The property %1 could not be written. The type %2 is not supported yet.</source>
- <translation>Неможливо записати властивість %1. Тип %2 ще не підтримується.</translation>
+ <translation>Не вдалось записати властивість %1. Тип %2 ще не підтримується.</translation>
</message>
<message>
<source>The enumeration-value &apos;%1&apos; is invalid. The default value &apos;%2&apos; will be used instead.</source>
@@ -2513,6 +2556,10 @@ Empty class name passed to widget factory method</extracomment>
<context>
<name>QtLocalePropertyManager</name>
<message>
+ <source>&lt;Invalid&gt;</source>
+ <translation>&lt;Неправильний&gt;</translation>
+ </message>
+ <message>
<source>%1, %2</source>
<translation>%1, %2</translation>
</message>
@@ -2740,14 +2787,14 @@ This could for example be a language extension like &quot;_de&quot;.</source>
</message>
<message>
<source>Could not overwrite %1.</source>
- <translation>Неможливо перезаписати %1.</translation>
+ <translation>Не вдалось перезаписати %1.</translation>
</message>
<message>
<source>Could not copy
%1
to
%2</source>
- <translation>Неможливо копіювати
+ <translation>Не вдалось скопіювати
%1
до
%2</translation>
@@ -2764,7 +2811,7 @@ to
</message>
<message>
<source>Could not write %1: %2</source>
- <translation>Неможливо записати %1: %2</translation>
+ <translation>Не вдалось записати %1: %2</translation>
</message>
<message>
<source>Edit Resources</source>
@@ -3480,11 +3527,11 @@ Do you want overwrite the template?</source>
</message>
<message>
<source>A temporary form file could not be created in %1.</source>
- <translation>Неможливо створити тимчасовий файл форми в %1.</translation>
+ <translation>Не вдалось створити тимчасовий файл форми в %1.</translation>
</message>
<message>
<source>The temporary form file %1 could not be written.</source>
- <translation>Неможливо записати тимчасовий файл форми %1.</translation>
+ <translation>Не вдалось записати тимчасовий файл форми %1.</translation>
</message>
<message>
<source>%1 - [Code]</source>
@@ -3500,11 +3547,11 @@ Do you want overwrite the template?</source>
</message>
<message>
<source>The file %1 could not be opened: %2</source>
- <translation>Неможливо відкрити файл %1: %2</translation>
+ <translation>Не вдалось відкрити файл %1: %2</translation>
</message>
<message>
<source>The file %1 could not be written: %2</source>
- <translation>Неможливо записати файл %1: %2</translation>
+ <translation>Не вдалось записати файл %1: %2</translation>
</message>
<message>
<source>%1 - Error</source>
@@ -3951,7 +3998,7 @@ Do you want overwrite the template?</source>
</message>
<message>
<source>Cannot paste widgets. Designer could not find a container without a layout to paste into.</source>
- <translation>Неможливо вставити віджети. Qt Designer не зміг знайти контейнер без розташування для вставки.</translation>
+ <translation>Неможливо вставити віджети. Qt Designer&apos;у не вдалось знайти контейнер без розташування для вставки.</translation>
</message>
<message>
<source>Break the layout of the container you want to paste into, select this container and then paste again.</source>
@@ -4150,7 +4197,7 @@ Do you want overwrite the template?</source>
<message>
<source>Could not create form preview</source>
<comment>Title of warning message box</comment>
- <translation>Неможливо створити попередній перегляд форми</translation>
+ <translation>Не вдалось створити попередній перегляд форми</translation>
</message>
<message>
<source>Form Settings - %1</source>
@@ -4225,7 +4272,7 @@ Do you want overwrite the template?</source>
</message>
<message>
<source>The file &apos;%1&apos; could not be read: %2</source>
- <translation>Неможливо прочитати файл &apos;%1&apos;: %2</translation>
+ <translation>Не вдалось прочитати файл &apos;%1&apos;: %2</translation>
</message>
<message>
<source>Choose a Pixmap</source>
@@ -4740,8 +4787,16 @@ Please select another name.</source>
<translation>Шукати нові встановлені додатки користувацьких віджетів.</translation>
</message>
<message>
+ <source>Loaded Plugins</source>
+ <translation>Завантажені додатки</translation>
+ </message>
+ <message>
+ <source>Failed Plugins</source>
+ <translation>Проблемні додатки</translation>
+ </message>
+ <message>
<source>Qt Designer couldn&apos;t find any plugins</source>
- <translation>Qt Designer не зміг знайти жодного додатку</translation>
+ <translation>Qt Designer&apos;у не вдалось знайти жодного додатку</translation>
</message>
<message>
<source>Qt Designer found the following plugins</source>
@@ -5014,7 +5069,7 @@ Class: %2</source>
</message>
<message>
<source>The specified qrc file &lt;p&gt;&lt;b&gt;%1&lt;/b&gt;&lt;/p&gt;&lt;p&gt;could not be found. Do you want to update the file location?&lt;/p&gt;</source>
- <translation>Неможливо знайти вказаний файл qrc &lt;p&gt;&lt;b&gt;%1&lt;/b&gt;&lt;/p&gt;&lt;p&gt;. Бажаєте оновити розташування файлу?&lt;/p&gt;</translation>
+ <translation>Не вдалось знайти вказаний файл qrc &lt;p&gt;&lt;b&gt;%1&lt;/b&gt;&lt;/p&gt;&lt;p&gt;. Бажаєте оновити розташування файлу?&lt;/p&gt;</translation>
</message>
<message>
<source>New location for %1</source>
@@ -5152,7 +5207,7 @@ Class: %2</source>
</message>
<message>
<source>A widget element could not be found.</source>
- <translation>Неможливо знайти елемент віджета.</translation>
+ <translation>Не вдалось знайти елемент віджета.</translation>
</message>
</context>
<context>
@@ -5741,7 +5796,7 @@ Class: %2</source>
</message>
<message>
<source>The current page of the container &apos;%1&apos; (%2) could not be determined while creating a layout.This indicates an inconsistency in the ui-file, probably a layout being constructed on a container widget.</source>
- <translation>Неможливо визначити поточну сторінку контейнера &apos;%1&apos; (%2) під час створення розташування. Це вказує на некоректність файлу UI, можливо, розташування було створене на контейнерному віджеті.</translation>
+ <translation>Не вдалось визначити поточну сторінку контейнера &apos;%1&apos; (%2) під час створення розташування. Це вказує на некоректність файлу UI, можливо, розташування було створене на контейнерному віджеті.</translation>
</message>
<message>
<source>Attempt to add a layout to a widget &apos;%1&apos; (%2) which already has an unmanaged layout of type %3.
diff --git a/translations/linguist_uk.ts b/translations/linguist_uk.ts
index 6e58be5..ca326d6 100644
--- a/translations/linguist_uk.ts
+++ b/translations/linguist_uk.ts
@@ -113,7 +113,7 @@ Will assume a single universal form.</source>
</message>
<message>
<source>Cannot create &apos;%2&apos;: %1</source>
- <translation>Не можу створити &apos;%2&apos;: %1</translation>
+ <translation>Неможливо створити &apos;%2&apos;: %1</translation>
</message>
<message>
<source>Universal Form</source>
@@ -259,6 +259,186 @@ Will assume a single universal form.</source>
</message>
</context>
<context>
+ <name>LConvert</name>
+ <message>
+ <source>
+Usage:
+ lconvert [options] &lt;infile&gt; [&lt;infile&gt;...]
+
+lconvert is part of Qt&apos;s Linguist tool chain. It can be used as a
+stand-alone tool to convert and filter translation data files.
+The following file formats are supported:
+
+%1
+If multiple input files are specified, they are merged with
+translations from later files taking precedence.
+
+Options:
+ -h
+ --help Display this information and exit.
+
+ -i &lt;infile&gt;
+ --input-file &lt;infile&gt;
+ Specify input file. Use if &lt;infile&gt; might start with a dash.
+ This option can be used several times to merge inputs.
+ May be &apos;-&apos; (standard input) for use in a pipe.
+
+ -o &lt;outfile&gt;
+ --output-file &lt;outfile&gt;
+ Specify output file. Default is &apos;-&apos; (standard output).
+
+ -if &lt;informat&gt;
+ --input-format &lt;format&gt;
+ Specify input format for subsequent &lt;infile&gt;s.
+ The format is auto-detected from the file name and defaults to &apos;ts&apos;.
+
+ -of &lt;outformat&gt;
+ --output-format &lt;outformat&gt;
+ Specify output format. See -if.
+
+ --input-codec &lt;codec&gt;
+ Specify encoding for QM and PO input files. Default is &apos;Latin1&apos;
+ for QM and &apos;UTF-8&apos; for PO files. UTF-8 is always tried as well for
+ QM, corresponding to the possible use of the trUtf8() function.
+
+ --output-codec &lt;codec&gt;
+ Specify encoding for PO output files. Default is &apos;UTF-8&apos;.
+
+ --drop-tags &lt;regexp&gt;
+ Drop named extra tags when writing TS or XLIFF files.
+ May be specified repeatedly.
+
+ --drop-translations
+ Drop existing translations and reset the status to &apos;unfinished&apos;.
+ Note: this implies --no-obsolete.
+
+ --source-language &lt;language&gt;[_&lt;region&gt;]
+ Specify/override the language of the source strings. Defaults to
+ POSIX if not specified and the file does not name it yet.
+
+ --target-language &lt;language&gt;[_&lt;region&gt;]
+ Specify/override the language of the translation.
+ The target language is guessed from the file name if this option
+ is not specified and the file contents name no language yet.
+
+ --no-obsolete
+ Drop obsolete messages.
+
+ --no-finished
+ Drop finished messages.
+
+ --sort-contexts
+ Sort contexts in output TS file alphabetically.
+
+ --locations {absolute|relative|none}
+ Override how source code references are saved in TS files.
+ Default is absolute.
+
+ --no-ui-lines
+ Drop line numbers from references to UI files.
+
+ --verbose
+ be a bit more verbose
+
+Long options can be specified with only one leading dash, too.
+
+Return value:
+ 0 on success
+ 1 on command line parse failures
+ 2 on read failures
+ 3 on write failures
+</source>
+ <translation>
+Використання:
+ lconvert [опції] &lt;вхідний_файл&gt; [&lt;вхідний_файл&gt;...]
+
+lconvert - це частина набору програм Qt Linguist. Вона може використовуватись,
+як окремий інструмент, для конвертування та фільтрування файлів перекладу.
+Підтримуються наступні формати файлів:
+
+%1
+Якщо вказано декілька вхідних файлів, то вони об&apos;єднується з перекладами з
+попередньо вказаних файлів з урахуванням порядку задання.
+
+Опції:
+ -h
+ --help Показати цю інформацію та вийти.
+
+ -i &lt;вхідний_файл&gt;
+ --input-file &lt;вхідний_файл&gt;
+ Вказати вхідний файл. Використовуйте, якщо &lt;вхідний_файл&gt;
+ починається з дефіса. Ця опція може бути використана декілька
+ раз, щоб об&apos;єднати вхідні дані.
+ Може бути &apos;-&apos; (стандартний вхід) для використання в конвеєрі.
+
+ -o &lt;вихідний_файл&gt;
+ --output-file &lt;вихідний_файл&gt;
+ Вказати вихідний файл. Типово - &apos;-&apos; (стандартний вихід).
+
+ -if &lt;формат&gt;
+ --input-format &lt;формат&gt;
+ Вказати вхідний формат для наступних &lt;вхідних_файлів&gt;.
+ Формат автоматично визначається з імені файлу. Типово - &apos;ts&apos;.
+
+ -of &lt;формат&gt;
+ --output-format &lt;формат&gt;
+ Вказати вихідний формат. Дивіться -if.
+
+ --input-codec &lt;кодек&gt;
+ Вказати кодування для вхідних файлів QM та PO. Типово - &apos;Latin1&apos;
+ для QM та &apos;UTF-8&apos; файлів PO. Для QM також здійснюється спроба
+ використати UTF-8, відповідно до можливого застосування функції trUtf8().
+
+ --output-codec &lt;кодек&gt;
+ Вказати кодування для вихідних файлів PO. Типово - &apos;UTF-8&apos;.
+
+ --drop-tags &lt;регулярний_вираз&gt;
+ Видалити вказані додаткові теги під час запису файлів TS чи XLIFF.
+ Може вказуватись декілька раз.
+
+ --drop-translations
+ Видаляти існуючі переклади та скидати статус в &apos;незавершений&apos;.
+ Примітка: це включає --no-obsolete.
+
+ --source-language &lt;мова&gt;[_&lt;регіон&gt;]
+ Вказати/замінити мову оригінальних рядків. Типово - POSIX,
+ якщо не вказано та не встановлено в файлі.
+
+ --target-language &lt;мова&gt;[_&lt;регіон&gt;]
+ Вказати/замінити мову перекладу.
+ Якщо ця опція не вказана і у вмісті файлу мова не задана, то
+ мова перекладу вгадується з імені файлу.
+
+ --no-obsolete
+ Відкинути застарілі повідомлення.
+
+ --no-finished
+ Відкинути завершені повідомлення.
+
+ --sort-contexts
+ Сортувати контексти в вихідному файлі TS за абеткою.
+
+ --locations {absolute|relative|none}
+ Замінити як посилання на код зберігаються в файлі TS.
+ Типово - абсолютно.
+
+ --no-ui-lines
+ Видалити номери рядків з посилань на файли UI.
+
+ --verbose
+ бути трохи більш детальним
+
+Довгі опції також можуть вказуватись лише з одним дефісом.
+
+Коди повернення:
+ 0 при успіху
+ 1 при помилці розбору командного рядка
+ 2 при помилках читання
+ 3 при помилках запису
+</translation>
+ </message>
+</context>
+<context>
<name>LRelease</name>
<message numerus="yes">
<source>Dropped %n message(s) which had no ID.</source>
@@ -292,10 +472,231 @@ Will assume a single universal form.</source>
<numerusform> Зігноровано %n неперекладених оригінальних текстів</numerusform>
</translation>
</message>
+ <message>
+ <source>Usage:
+ lrelease [options] project-file
+ lrelease [options] ts-files [-qm qm-file]
+
+lrelease is part of Qt&apos;s Linguist tool chain. It can be used as a
+stand-alone tool to convert XML-based translations files in the TS
+format into the &apos;compiled&apos; QM format used by QTranslator objects.
+
+Options:
+ -help Display this information and exit
+ -idbased
+ Use IDs instead of source strings for message keying
+ -compress
+ Compress the QM files
+ -nounfinished
+ Do not include unfinished translations
+ -removeidentical
+ If the translated text is the same as
+ the source text, do not include the message
+ -markuntranslated &lt;prefix&gt;
+ If a message has no real translation, use the source text
+ prefixed with the given string instead
+ -silent
+ Do not explain what is being done
+ -version
+ Display the version of lrelease and exit
+</source>
+ <translation>Використання:
+ lrelease [опції] файл-проект
+ lrelease [опції] файли-ts [-qm файл-qm]
+
+lrelease - це частина набору програм Qt Linguist. Вона може використовуватися
+як окремий засіб для перетворення файлів перекладу на базі XML в форматі TS
+до &apos;скомпільованого&apos; формату QM, що використовується об&apos;єктами QTranslator.
+
+Опції:
+ -help Показати цю інформацію та вийти
+ -idbased
+ Використовувати ID замість рядків оригіналу як ключі повідомлень
+ -compress
+ Стискати файли QM
+ -nounfinished
+ Не включати незавершені переклади
+ -removeidentical
+ Якщо перекладений текст однаковий з оригіналом, то
+ не включати повідомлення
+ -markuntranslated &lt;prefix&gt;
+ If a message has no real translation, use the source text
+ prefixed with the given string instead
+ -silent
+ Не пояснювати, що відбувається
+ -version
+ Показати версію lrelease та вийти
+</translation>
+ </message>
+ <message>
+ <source>lrelease error: %1</source>
+ <translation>помилка lrelease: %1</translation>
+ </message>
+ <message>
+ <source>Updating &apos;%1&apos;...
+</source>
+ <translation>Оновлюю &apos;%1&apos;...
+</translation>
+ </message>
+ <message>
+ <source>Removing translations equal to source text in &apos;%1&apos;...
+</source>
+ <translation>Видалення перекладів однакових з оригінальним текстом в &apos;%1&apos;...
+</translation>
+ </message>
+ <message>
+ <source>lrelease error: cannot create &apos;%1&apos;: %2
+</source>
+ <translation>помилка lrelease: неможливо створити &apos;%1&apos;: %2
+</translation>
+ </message>
+ <message>
+ <source>lrelease error: cannot save &apos;%1&apos;: %2</source>
+ <translation>помилка lrelease: неможливо зберегти &apos;%1&apos;: %2
+</translation>
+ </message>
+ <message>
+ <source>lrelease version %1
+</source>
+ <translation>lrelease версії %1
+</translation>
+ </message>
+ <message>
+ <source>lrelease error: cannot read project file &apos;%1&apos;.
+</source>
+ <translation>помилка lrelease: неможливо прочитати файл проекту &apos;%1&apos;.
+</translation>
+ </message>
+ <message>
+ <source>lrelease error: cannot process project file &apos;%1&apos;.
+</source>
+ <translation>помилка lrelease: неможливо обробити файл проекту &apos;%1&apos;.
+</translation>
+ </message>
+ <message>
+ <source>lrelease warning: Met no &apos;TRANSLATIONS&apos; entry in project file &apos;%1&apos;
+</source>
+ <translation>попередження lrelease: в файлу проекту &apos;%1&apos; не знайдено елементу &apos;TRANSLATIONS&apos;
+</translation>
+ </message>
</context>
<context>
<name>LUpdate</name>
<message>
+ <source>Usage:
+ lupdate [options] [project-file]...
+ lupdate [options] [source-file|path|@lst-file]... -ts ts-files|@lst-file
+
+lupdate is part of Qt&apos;s Linguist tool chain. It extracts translatable
+messages from Qt UI files, C++, Java and JavaScript/QtScript source code.
+Extracted messages are stored in textual translation source files (typically
+Qt TS XML). New and modified messages can be merged into existing TS files.
+
+Options:
+ -help Display this information and exit.
+ -no-obsolete
+ Drop all obsolete strings.
+ -extensions &lt;ext&gt;[,&lt;ext&gt;]...
+ Process files with the given extensions only.
+ The extension list must be separated with commas, not with whitespace.
+ Default: &apos;%1&apos;.
+ -pluralonly
+ Only include plural form messages.
+ -silent
+ Do not explain what is being done.
+ -no-sort
+ Do not sort contexts in TS files.
+ -no-recursive
+ Do not recursively scan the following directories.
+ -recursive
+ Recursively scan the following directories (default).
+ -I &lt;includepath&gt; or -I&lt;includepath&gt;
+ Additional location to look for include files.
+ May be specified multiple times.
+ -locations {absolute|relative|none}
+ Specify/override how source code references are saved in TS files.
+ Default is absolute.
+ -no-ui-lines
+ Do not record line numbers in references to UI files.
+ -disable-heuristic {sametext|similartext|number}
+ Disable the named merge heuristic. Can be specified multiple times.
+ -pro &lt;filename&gt;
+ Name of a .pro file. Useful for files with .pro file syntax but
+ different file suffix. Projects are recursed into and merged.
+ -source-language &lt;language&gt;[_&lt;region&gt;]
+ Specify the language of the source strings for new files.
+ Defaults to POSIX if not specified.
+ -target-language &lt;language&gt;[_&lt;region&gt;]
+ Specify the language of the translations for new files.
+ Guessed from the file name if not specified.
+ -ts &lt;ts-file&gt;...
+ Specify the output file(s). This will override the TRANSLATIONS
+ and nullify the CODECFORTR from possibly specified project files.
+ -codecfortr &lt;codec&gt;
+ Specify the codec assumed for tr() calls. Effective only with -ts.
+ -version
+ Display the version of lupdate and exit.
+ @lst-file
+ Read additional file names (one per line) from lst-file.
+</source>
+ <translation>Використання:
+ lupdate [опції] [файл-проект]...
+ lupdate [опції] [вхідний-файл|шлях|@файл-список]... -ts ts-файли|@файл-список
+
+lupdate - це частина набору програм Qt Linguist. Вона It витягає придатні для перекладу
+повідомлення з файлів Qt UI, коду C++, Java та JavaScript/QtScript. Витягнуті повідомлення
+зберігаються в текстовому файлі перекладу (типово Qt TS XML). Нові та модифіковані
+повідомлення можуть бути об&apos;єднанні з існуючими файлами TS.
+
+Опції:
+ -help Показати цю інформацію та вийти.
+ -no-obsolete
+ Видалити всі застарілі рядки.
+ -extensions &lt;розширення&gt;[,&lt;розширення&gt;]...
+ Обробляти файли лише з вказаними розширеннями.
+ Список розширень має розділюватись комами, а не пропусками.
+ Типово: &apos;%1&apos;.
+ -pluralonly
+ Включати лише повідомлення з формою множини.
+ -silent
+ Не пояснювати, що відбувається.
+ -no-sort
+ Не сортувати контексти в файлах TS.
+ -no-recursive
+ Не сканувати рекурсивно наступні теки.
+ -recursive
+ Рекурсивно сканувати наступні теки (типово).
+ -I &lt;шлях-включення&gt; або -I&lt;шлях-включення&gt;
+ Додаткові місця для пошуку файлів включення.
+ Може бути вказано декілька разів.
+ -locations {absolute|relative|none}
+ Вказати/замістити як посилання на код зберігаються в файлі TS.
+ Типово - абсолютно.
+ -no-ui-lines
+ Не записувати номери рядків в посиланнях на файли UI.
+ -disable-heuristic {sametext|similartext|number}
+ Вимкнути вказану евристику об&apos;єдання. Може бути вказано декілька разів.
+ -pro &lt;ім&apos;я-файлу&gt;
+ Ім&apos;я .pro файлу. Корисно для файлів із синтаксисом фалів .pro, але з
+ іншим розширенням. Projects are recursed into and merged.
+ -source-language &lt;мова&gt;[_&lt;регіон&gt;]
+ Вказати мову оригінальних рядків для нових файлів.
+ Типово, якщо не вказано - POSIX.
+ -target-language &lt;мова&gt;[_&lt;регіон&gt;]
+ Вказати мову перекладу для нових файлів.
+ Вгадується з імені файла, якщо не вказано.
+ -ts &lt;файл-ts&gt;...
+ Вказати вихідний файл(и). Це замістить TRANSLATIONS
+ та скине CODECFORTR з, можливо, вказаних файлів проекту.
+ -codecfortr &lt;кодек&gt;
+ Вказати кодек, що Specify the codec вживається для викликів tr(). Ефективно лише з -ts.
+ -version
+ Показати версію lupdate та вийти.
+ @файл-список
+ Читати додаткові імена файлів (одне на рядок) з файла-списку.
+</translation>
+ </message>
+ <message>
<source>lupdate warning: Codec for tr() &apos;%1&apos; disagrees with existing file&apos;s codec &apos;%2&apos;. Expect trouble.
</source>
<translation>попередження lupdate: Кодек для tr() &apos;%1&apos; не узгоджується з існуючим кодеком файлу &apos;%2&apos;. Очікуйте неприємностей.
@@ -314,12 +715,42 @@ Will assume a single universal form.</source>
</translation>
</message>
<message>
+ <source>Updating &apos;%1&apos;...
+</source>
+ <translation>Оновлюю &apos;%1&apos;...
+</translation>
+ </message>
+ <message>
+ <source>Stripping non plural forms in &apos;%1&apos;...
+</source>
+ <translation>Видалення не множинних форм в &apos;%1&apos;...
+</translation>
+ </message>
+ <message>
<source>lupdate warning: Codec for source &apos;%1&apos; is invalid. Falling back to codec for tr().
</source>
<translation>попередження lupdate: Кодек для джерела &apos;%1&apos; неправильний. Повертаємось до використання кодеку для tr().
</translation>
</message>
<message>
+ <source>lupdate warning: TS files from command line will override TRANSLATIONS in %1.
+</source>
+ <translation>попередження lupdate: файл-TS з командного рядка замінять TRANSLATIONS в %1.
+</translation>
+ </message>
+ <message>
+ <source>lupdate warning: TS files from command line prevent recursing into %1.
+</source>
+ <translation>попередження lupdate: файли TS з командного рядка перешкоджають рекурсивному проходу %1.
+</translation>
+ </message>
+ <message>
+ <source>lupdate warning: no TS files specified. Only diagnostics will be produced for &apos;%1&apos;.
+</source>
+ <translation>попередження lupdate: не вказано файлів TS. Здійснюватиметься лише діагностика для &apos;%1&apos;.
+</translation>
+ </message>
+ <message>
<source>The option -target-language requires a parameter.
</source>
<translation>Опція -target-language вимагає параметра.
@@ -410,6 +841,12 @@ Will assume a single universal form.</source>
</translation>
</message>
<message>
+ <source>Scanning directory &apos;%1&apos;...
+</source>
+ <translation>Сканування теки &apos;%1&apos;...
+</translation>
+ </message>
+ <message>
<source>lupdate warning: -target-language usually only makes sense with exactly one TS file.
</source>
<translation>попередження lupdate: Використання -target-language, зазвичай, має сенс лише з одним файлом TS.
@@ -433,6 +870,360 @@ Will assume a single universal form.</source>
<translation>помилка lupdate: Одночасно вказані файл проекту та вхідні файли / шляхи для включення.
</translation>
</message>
+ <message>
+ <source>Parenthesis/bracket/brace mismatch between #if and #else branches; using #if branch
+</source>
+ <translation>Круглі/квадратні/фігурні дужки не збігаються між гілками #if та #else, використовую гілку #if
+</translation>
+ </message>
+ <message>
+ <source>Parenthesis/brace mismatch between #if and #else branches; using #if branch
+</source>
+ <translation>Круглі/фігурні дужки не збігаються між гілками #if та #else, використовую гілку #if
+</translation>
+ </message>
+ <message>
+ <source>Unterminated C++ comment
+</source>
+ <translation>Незавершений коментар C++
+</translation>
+ </message>
+ <message>
+ <source>Unterminated C++ string
+</source>
+ <translation>Незавершений рядок C++
+</translation>
+ </message>
+ <message>
+ <source>Excess closing brace in C++ code (or abuse of the C++ preprocessor)
+</source>
+ <translation>Забагато закриваючих фігурних дужок в коді C++ (або неправильне застосування препроцесора C++)
+</translation>
+ </message>
+ <message>
+ <source>Excess closing parenthesis in C++ code (or abuse of the C++ preprocessor)
+</source>
+ <translation>Забагато закриваючих круглих дужок в коді C++ (або неправильне застосування препроцесора C++)
+</translation>
+ </message>
+ <message>
+ <source>Excess closing bracket in C++ code (or abuse of the C++ preprocessor)
+</source>
+ <translation>Забагато закриваючих квадратних дужок в коді C++ (або неправильне застосування препроцесора C++)
+</translation>
+ </message>
+ <message>
+ <source>Cannot open %1: %2</source>
+ <translation>Неможливо відкрити %1: %2</translation>
+ </message>
+ <message>
+ <source>//% cannot be used with tr() / QT_TR_NOOP(). Ignoring
+</source>
+ <translation>//% не може бути використаний разом з tr() / QT_TR_NOOP(). Ігнорую
+</translation>
+ </message>
+ <message>
+ <source>circular inclusion of %1
+</source>
+ <translation>циклічне вкладення %1
+</translation>
+ </message>
+ <message>
+ <source>Cannot open %1: %2
+</source>
+ <translation>Неможливо відкрити %1: %2
+</translation>
+ </message>
+ <message>
+ <source>Qualifying with unknown namespace/class %1::%2
+</source>
+ <translation>Задаю з невідомим простором імен/класом %1::%2
+</translation>
+ </message>
+ <message>
+ <source>tr() cannot be called without context
+</source>
+ <translation>tr() не можна викликати без контексту
+</translation>
+ </message>
+ <message>
+ <source>Class &apos;%1&apos; lacks Q_OBJECT macro
+</source>
+ <translation>У класу &apos;%1&apos; не вистачає макросу Q_OBJECT
+</translation>
+ </message>
+ <message>
+ <source>It is not recommended to call tr() from within a constructor &apos;%1::%2&apos;
+</source>
+ <translation>Не рекомендовано викликати tr() з конструктора &apos;%1::%2&apos;
+</translation>
+ </message>
+ <message>
+ <source>//% cannot be used with translate() / QT_TRANSLATE_NOOP(). Ignoring
+</source>
+ <translation>//% не може бути використаний разом з translate() / QT_TRANSLATE_NOOP(). Ігнорую
+</translation>
+ </message>
+ <message>
+ <source>//= cannot be used with qtTrId() / QT_TRID_NOOP(). Ignoring
+</source>
+ <translation>//= не може бути використаний разом з qtTrId() / QT_TRID_NOOP(). Ігнорую
+</translation>
+ </message>
+ <message>
+ <source>Unexpected character in meta string
+</source>
+ <translation>Неочікуваний символ в мета-рядку
+</translation>
+ </message>
+ <message>
+ <source>Unterminated meta string
+</source>
+ <translation>Незавершений мета-рядок
+</translation>
+ </message>
+ <message>
+ <source>Cannot invoke tr() like this
+</source>
+ <translation>Неможливо викликати tr() подібним чином
+</translation>
+ </message>
+ <message>
+ <source>Discarding unconsumed meta data
+</source>
+ <translation>Відкидаю невжиті мета-дані
+</translation>
+ </message>
+ <message>
+ <source>Unbalanced opening brace in C++ code (or abuse of the C++ preprocessor)
+</source>
+ <translation>Незбалансовані відкриваючі фігурні дужки в коді C++ (або неправильне застосування препроцесора C++)
+</translation>
+ </message>
+ <message>
+ <source>Unbalanced opening parenthesis in C++ code (or abuse of the C++ preprocessor)
+</source>
+ <translation>Незбалансовані відкриваючі круглі дужки в коді C++ (або неправильне застосування препроцесора C++)
+</translation>
+ </message>
+ <message>
+ <source>Unbalanced opening bracket in C++ code (or abuse of the C++ preprocessor)
+</source>
+ <translation>Незбалансовані відкриваючі квадратні дужки в коді C++ (або неправильне застосування препроцесора C++)
+</translation>
+ </message>
+ <message>
+ <source>Unterminated Java comment.
+</source>
+ <translation>Незавершений коментар Java.
+</translation>
+ </message>
+ <message>
+ <source>Invalid Unicode value.
+</source>
+ <translation>Неправильне значення Unicode.
+</translation>
+ </message>
+ <message>
+ <source>Unterminated string.
+</source>
+ <translation>Незавершений рядок.
+</translation>
+ </message>
+ <message>
+ <source>String used in translation can contain only literals concatenated with other literals, not expressions or numbers.
+</source>
+ <translation>Рядки, що використовуються в перекладі, можуть містити лише літерали об&apos;єднані з іншими літералами, а не вирази або числа.
+</translation>
+ </message>
+ <message>
+ <source>&apos;class&apos; must be followed by a class name.
+</source>
+ <translation>Після &apos;class&apos; повинна слідувати назва класу.
+</translation>
+ </message>
+ <message>
+ <source>Excess closing brace.
+</source>
+ <translation>Забагато закриваючих фігурних дужок.</translation>
+ </message>
+ <message>
+ <source>&apos;package&apos; must be followed by package name.
+</source>
+ <translation>Після &apos;package&apos; повинна слідувати назва пакунку.
+</translation>
+ </message>
+ <message>
+ <source>Unbalanced opening brace.
+</source>
+ <translation>Незбалансовані відкриваючі фігурні дужки.
+</translation>
+ </message>
+ <message>
+ <source>Unbalanced opening parenthesis.
+</source>
+ <translation>Незбалансовані відкриваючі круглі дужки.
+</translation>
+ </message>
+ <message numerus="yes">
+ <source> Found %n source text(s) (%1 new and %2 already existing)
+</source>
+ <translation>
+ <numerusform> Знайдено %n оригінальний текст (%1 новий та %2 вже існує)
+</numerusform>
+ <numerusform> Знайдено %n оригінальних тексти (%1 нових та %2 вже існує)
+</numerusform>
+ <numerusform> Знайдено %n оригінальних текстів (%1 нових та %2 вже існує)
+</numerusform>
+ </translation>
+ </message>
+ <message numerus="yes">
+ <source> Removed %n obsolete entries
+</source>
+ <translation>
+ <numerusform> Видалено %n застарілий елемент
+</numerusform>
+ <numerusform> Видалено %n застарілих елементи
+</numerusform>
+ <numerusform> Видалено %n застарілих елементів
+</numerusform>
+ </translation>
+ </message>
+ <message numerus="yes">
+ <source> Kept %n obsolete entries
+</source>
+ <translation>
+ <numerusform> Залишено %n застарілий елемент
+</numerusform>
+ <numerusform> Залишено %n застарілих елементи
+</numerusform>
+ <numerusform> Залишено %n застарілих елементів
+</numerusform>
+ </translation>
+ </message>
+ <message numerus="yes">
+ <source> Number heuristic provided %n translation(s)
+</source>
+ <translation>
+ <numerusform>Числова евристика надала %n переклад
+</numerusform>
+ <numerusform>Числова евристика надала %n переклади
+</numerusform>
+ <numerusform>Числова евристика надала %n перекладів
+</numerusform>
+ </translation>
+ </message>
+ <message numerus="yes">
+ <source> Same-text heuristic provided %n translation(s)
+</source>
+ <translation>
+ <numerusform>Евристика &quot;однаковий текст&quot; надала %n переклад
+</numerusform>
+ <numerusform>Евристика &quot;однаковий текст&quot; надала %n переклади
+</numerusform>
+ <numerusform>Евристика &quot;однаковий текст&quot; надала %n перекладів
+</numerusform>
+ </translation>
+ </message>
+ <message numerus="yes">
+ <source> Similar-text heuristic provided %n translation(s)
+</source>
+ <translation>
+ <numerusform>Евристика &quot;схожий текст&quot; надала %n переклад
+</numerusform>
+ <numerusform>Евристика &quot;схожий текст&quot; надала %n переклади
+</numerusform>
+ <numerusform>Евристика &quot;схожий текст&quot; надала %n перекладів
+</numerusform>
+ </translation>
+ </message>
+ <message>
+ <source>Illegal character</source>
+ <translation>Неприпустимий символ</translation>
+ </message>
+ <message>
+ <source>Unclosed string at end of line</source>
+ <translation>Незакритий рядок в кінці файлу</translation>
+ </message>
+ <message>
+ <source>Illegal escape squence</source>
+ <translation>Неприпустима керуюча послідовність</translation>
+ </message>
+ <message>
+ <source>Illegal unicode escape sequence</source>
+ <translation>Неприпустима керуюча послідовність Unicode</translation>
+ </message>
+ <message>
+ <source>Unclosed comment at end of file</source>
+ <translation>Незакритий коментар в кінці файлу</translation>
+ </message>
+ <message>
+ <source>Illegal syntax for exponential number</source>
+ <translation>Неприпустимий синтаксис для експоненційного числа</translation>
+ </message>
+ <message>
+ <source>Identifier cannot start with numeric literal</source>
+ <translation>Ідентифікатор не може починатись з числового літералу</translation>
+ </message>
+ <message>
+ <source>Unterminated regular expression literal</source>
+ <translation>Незавершений літерал регулярного виразу</translation>
+ </message>
+ <message>
+ <source>//% cannot be used with %1(). Ignoring
+</source>
+ <translation>//% не може бути використаний разом з %1(). Ігнорую
+</translation>
+ </message>
+ <message>
+ <source>%1() requires at least two arguments.
+</source>
+ <translation>%1() вимагає щонайменше двох аргументів.
+</translation>
+ </message>
+ <message>
+ <source>%1(): both arguments must be literal strings.
+</source>
+ <translation>%1(): обидва аргументи повинні бути рядковими літералами.
+</translation>
+ </message>
+ <message>
+ <source>%1() requires at least one argument.
+</source>
+ <translation>%1() вимагає щонайменше одного аргументу.
+</translation>
+ </message>
+ <message>
+ <source>%1(): text to translate must be a literal string.
+</source>
+ <translation>%1(): текст для перекладу повинен бути рядковим літералом.
+</translation>
+ </message>
+ <message>
+ <source>//= cannot be used with %1(). Ignoring
+</source>
+ <translation>//= не може бути використаний разом з %1(). Ігнорую
+</translation>
+ </message>
+ <message>
+ <source>%1(): identifier must be a literal string.
+</source>
+ <translation>%1(): ідентифікатор повинен бути рядковим літералом.
+</translation>
+ </message>
+ <message>
+ <source>Expected </source>
+ <extracomment>Beginning of the string that contains comma-separated list of expected tokens</extracomment>
+ <translation>Очікувалось </translation>
+ </message>
+ <message>
+ <source>XML error: Parse error at line %1, column %2 (%3).</source>
+ <translation>Помилка XML: Помилка розбору в рядку %1, позиція %2 (%3).</translation>
+ </message>
+ <message>
+ <source>Parse error in UI file</source>
+ <translation>Помилка розбору файлу UI</translation>
+ </message>
</context>
<context>
<name>MainWindow</name>
@@ -1431,6 +2222,13 @@ Line: %2</source>
</message>
</context>
<context>
+ <name>PhraseBook</name>
+ <message>
+ <source>Parse error at line %1, column %2 (%3).</source>
+ <translation>Помилка розбору в рядку %1, позиція %2 (%3).</translation>
+ </message>
+</context>
+<context>
<name>PhraseBookBox</name>
<message>
<source>Edit Phrase Book</source>
@@ -1558,83 +2356,6 @@ Line: %2</source>
</message>
</context>
<context>
- <name>QCoreApplication</name>
- <message>
- <source>Usage:
- lrelease [options] project-file
- lrelease [options] ts-files [-qm qm-file]
-
-lrelease is part of Qt&apos;s Linguist tool chain. It can be used as a
-stand-alone tool to convert XML-based translations files in the TS
-format into the &apos;compiled&apos; QM format used by QTranslator objects.
-
-Options:
- -help Display this information and exit
- -idbased
- Use IDs instead of source strings for message keying
- -compress
- Compress the QM files
- -nounfinished
- Do not include unfinished translations
- -removeidentical
- If the translated text is the same as
- the source text, do not include the message
- -markuntranslated &lt;prefix&gt;
- If a message has no real translation, use the source text
- prefixed with the given string instead
- -silent
- Do not explain what is being done
- -version
- Display the version of lrelease and exit
-</source>
- <translation>Використання:
- lrelease [опції] файл-проект
- lrelease [опції] файли-ts [-qm файл-qm]
-
-lrelease - це частина набору програм Qt Linguist. Вона може використовуватися
-як окремий засіб для перетворення файлів перекладу на базі XML в форматі TS
-до &apos;скомпільованого&apos; формату QM, що використовується об&apos;єктами QTranslator.
-
-Опції:
- -help Показати цю інформацію та вийти
- -idbased
- Використовувати ID замість рядків оригіналу як ключі повідомлень
- -compress
- Стискати файли QM
- -nounfinished
- Не включати незавершені переклади
- -removeidentical
- Якщо перекладений текст однаковий з оригіналом, то
- не включати повідомлення
- -markuntranslated &lt;prefix&gt;
- If a message has no real translation, use the source text
- prefixed with the given string instead
- -silent
- Не пояснювати, що відбувається
- -version
- Показати версію lrelease та вийти
-</translation>
- </message>
- <message>
- <source>Updating &apos;%1&apos;...
-</source>
- <translation>Оновлюю &apos;%1&apos;...
-</translation>
- </message>
- <message>
- <source>Removing translations equal to source text in &apos;%1&apos;...
-</source>
- <translation>Видалення перекладів однакових з оригінальним текстом в &apos;%1&apos;...
-</translation>
- </message>
- <message>
- <source>lrelease version %1
-</source>
- <translation>lrelease версії %1
-</translation>
- </message>
-</context>
-<context>
<name>QObject</name>
<message>
<source>Translation files (%1);;</source>
@@ -1681,215 +2402,11 @@ lrelease - це частина набору програм Qt Linguist. Вона
<translation>Файли локалізації XLIFF</translation>
</message>
<message>
- <source>Usage:
- lupdate [options] [project-file]...
- lupdate [options] [source-file|path|@lst-file]... -ts ts-files|@lst-file
-
-lupdate is part of Qt&apos;s Linguist tool chain. It extracts translatable
-messages from Qt UI files, C++, Java and JavaScript/QtScript source code.
-Extracted messages are stored in textual translation source files (typically
-Qt TS XML). New and modified messages can be merged into existing TS files.
-
-Options:
- -help Display this information and exit.
- -no-obsolete
- Drop all obsolete strings.
- -extensions &lt;ext&gt;[,&lt;ext&gt;]...
- Process files with the given extensions only.
- The extension list must be separated with commas, not with whitespace.
- Default: &apos;%1&apos;.
- -pluralonly
- Only include plural form messages.
- -silent
- Do not explain what is being done.
- -no-sort
- Do not sort contexts in TS files.
- -no-recursive
- Do not recursively scan the following directories.
- -recursive
- Recursively scan the following directories (default).
- -I &lt;includepath&gt; or -I&lt;includepath&gt;
- Additional location to look for include files.
- May be specified multiple times.
- -locations {absolute|relative|none}
- Specify/override how source code references are saved in TS files.
- Default is absolute.
- -no-ui-lines
- Do not record line numbers in references to UI files.
- -disable-heuristic {sametext|similartext|number}
- Disable the named merge heuristic. Can be specified multiple times.
- -pro &lt;filename&gt;
- Name of a .pro file. Useful for files with .pro file syntax but
- different file suffix. Projects are recursed into and merged.
- -source-language &lt;language&gt;[_&lt;region&gt;]
- Specify the language of the source strings for new files.
- Defaults to POSIX if not specified.
- -target-language &lt;language&gt;[_&lt;region&gt;]
- Specify the language of the translations for new files.
- Guessed from the file name if not specified.
- -ts &lt;ts-file&gt;...
- Specify the output file(s). This will override the TRANSLATIONS
- and nullify the CODECFORTR from possibly specified project files.
- -codecfortr &lt;codec&gt;
- Specify the codec assumed for tr() calls. Effective only with -ts.
- -version
- Display the version of lupdate and exit.
- @lst-file
- Read additional file names (one per line) from lst-file.
-</source>
- <translation>Використання:
- lupdate [опції] [файл-проект]...
- lupdate [опції] [вхідний-файл|шлях|@файл-список]... -ts ts-файли|@файл-список
-
-lupdate - це частина набору програм Qt Linguist. Вона It витягає придатні для перекладу
-повідомлення з файлів Qt UI, коду C++, Java та JavaScript/QtScript. Витягнуті повідомлення
-зберігаються в текстовому файлі перекладу (типово Qt TS XML). Нові та модифіковані
-повідомлення можуть бути об&apos;єднанні з існуючими файлами TS.
-
-Опції:
- -help Показати цю інформацію та вийти.
- -no-obsolete
- Видалити всі застарілі рядки.
- -extensions &lt;розширення&gt;[,&lt;розширення&gt;]...
- Обробляти файли лише з вказаними розширеннями.
- Список розширень має розділюватись комами, а не пропусками.
- Типово: &apos;%1&apos;.
- -pluralonly
- Включати лише повідомлення з формою множини.
- -silent
- Не пояснювати, що відбувається.
- -no-sort
- Не сортувати контексти в файлах TS.
- -no-recursive
- Не сканувати рекурсивно наступні теки.
- -recursive
- Рекурсивно сканувати наступні теки (типово).
- -I &lt;шлях-включення&gt; або -I&lt;шлях-включення&gt;
- Додаткові місця для пошуку файлів включення.
- Може бути вказано декілька разів.
- -locations {absolute|relative|none}
- Вказати/замістити як посилання на код зберігаються в файлі TS.
- Типово - абсолютно.
- -no-ui-lines
- Не записувати номери рядків в посиланнях на файли UI.
- -disable-heuristic {sametext|similartext|number}
- Вимкнути вказану евристику об&apos;єдання. Може бути вказано декілька разів.
- -pro &lt;ім&apos;я-файлу&gt;
- Ім&apos;я .pro файлу. Корисно для файлів із синтаксисом фалів .pro, але з
- іншим розширенням. Projects are recursed into and merged.
- -source-language &lt;мова&gt;[_&lt;регіон&gt;]
- Вказати мову оригінальних рядків для нових файлів.
- Типово, якщо не вказано - POSIX.
- -target-language &lt;мова&gt;[_&lt;регіон&gt;]
- Вказати мову перекладу для нових файлів.
- Вгадується з імені файла, якщо не вказано.
- -ts &lt;файл-ts&gt;...
- Вказати вихідний файл(и). Це замістить TRANSLATIONS
- та скине CODECFORTR з, можливо, вказаних файлів проекту.
- -codecfortr &lt;кодек&gt;
- Вказати кодек, що Specify the codec вживається для викликів tr(). Ефективно лише з -ts.
- -version
- Показати версію lupdate та вийти.
- @файл-список
- Читати додаткові імена файлів (одне на рядок) з файла-списку.
-</translation>
- </message>
- <message>
- <source>Updating &apos;%1&apos;...
-</source>
- <translation>Оновлюю &apos;%1&apos;...
-</translation>
- </message>
- <message>
- <source>Stripping non plural forms in &apos;%1&apos;...
-</source>
- <translation>Видалення не множинних форм в &apos;%1&apos;...
-</translation>
- </message>
- <message>
<source>lupdate version %1
</source>
<translation>lupdate версії %1
</translation>
</message>
- <message>
- <source>Scanning directory &apos;%1&apos;...
-</source>
- <translation>Сканування теки &apos;%1&apos;...
-</translation>
- </message>
- <message numerus="yes">
- <source> Found %n source text(s) (%1 new and %2 already existing)
-</source>
- <translation>
- <numerusform> Знайдено %n оригінальний текст (%1 новий та %2 вже існує)
-</numerusform>
- <numerusform> Знайдено %n оригінальних тексти (%1 нових та %2 вже існує)
-</numerusform>
- <numerusform> Знайдено %n оригінальних текстів (%1 нових та %2 вже існує)
-</numerusform>
- </translation>
- </message>
- <message numerus="yes">
- <source> Removed %n obsolete entries
-</source>
- <translation>
- <numerusform> Видалено %n застарілий елемент
-</numerusform>
- <numerusform> Видалено %n застарілих елементи
-</numerusform>
- <numerusform> Видалено %n застарілих елементів
-</numerusform>
- </translation>
- </message>
- <message numerus="yes">
- <source> Kept %n obsolete entries
-</source>
- <translation>
- <numerusform> Залишено %n застарілий елемент
-</numerusform>
- <numerusform> Залишено %n застарілих елементи
-</numerusform>
- <numerusform> Залишено %n застарілих елементів
-</numerusform>
- </translation>
- </message>
- <message numerus="yes">
- <source> Number heuristic provided %n translation(s)
-</source>
- <translation>
- <numerusform>Числова евристика надала %n переклад
-</numerusform>
- <numerusform>Числова евристика надала %n переклади
-</numerusform>
- <numerusform>Числова евристика надала %n перекладів
-</numerusform>
- </translation>
- </message>
- <message numerus="yes">
- <source> Same-text heuristic provided %n translation(s)
-</source>
- <translation>
- <numerusform>Евристика &quot;однаковий текст&quot; надала %n переклад
-</numerusform>
- <numerusform>Евристика &quot;однаковий текст&quot; надала %n переклади
-</numerusform>
- <numerusform>Евристика &quot;однаковий текст&quot; надала %n перекладів
-</numerusform>
- </translation>
- </message>
- <message numerus="yes">
- <source> Similar-text heuristic provided %n translation(s)
-</source>
- <translation>
- <numerusform>Евристика &quot;схожий текст&quot; надала %n переклад
-</numerusform>
- <numerusform>Евристика &quot;схожий текст&quot; надала %n переклади
-</numerusform>
- <numerusform>Евристика &quot;схожий текст&quot; надала %n перекладів
-</numerusform>
- </translation>
- </message>
</context>
<context>
<name>SourceCodeView</name>
diff --git a/translations/qt_help_uk.ts b/translations/qt_help_uk.ts
index b8bc984..32e47b4 100644
--- a/translations/qt_help_uk.ts
+++ b/translations/qt_help_uk.ts
@@ -106,7 +106,7 @@
<name>QHelpEngineCore</name>
<message>
<source>Cannot open documentation file %1: %2!</source>
- <translation>Не можу відкрити файл документації %1: %2!</translation>
+ <translation>Неможливо відкрити файл документації %1: %2!</translation>
</message>
<message>
<source>The specified namespace does not exist!</source>
@@ -256,7 +256,7 @@
</message>
<message>
<source>The input file %1 could not be opened!</source>
- <translation>Неможливо відкрити вхідний файл %1!</translation>
+ <translation>Не вдалось відкрити вхідний файл %1!</translation>
</message>
</context>
<context>
diff --git a/translations/qt_uk.ts b/translations/qt_uk.ts
index 7a223f4..e1716fb 100644
--- a/translations/qt_uk.ts
+++ b/translations/qt_uk.ts
@@ -1697,25 +1697,6 @@ to
</message>
</context>
<context>
- <name>QDeclarativeCompositeTypeManager</name>
- <message>
- <source>Resource %1 unavailable</source>
- <translation>Ресурс %1 недоступний</translation>
- </message>
- <message>
- <source>Namespace %1 cannot be used as a type</source>
- <translation>Простір імен %1 не може бути використаний як тип</translation>
- </message>
- <message>
- <source>%1 %2</source>
- <translation>%1 %2</translation>
- </message>
- <message>
- <source>Type %1 unavailable</source>
- <translation>Тип %1 недоступний</translation>
- </message>
-</context>
-<context>
<name>QDeclarativeConnections</name>
<message>
<source>Cannot assign to non-existent property &quot;%1&quot;</source>
@@ -2096,6 +2077,25 @@ to
</message>
</context>
<context>
+ <name>QDeclarativeTypeData</name>
+ <message>
+ <source>Script %1 unavailable</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Type %1 unavailable</source>
+ <translation type="unfinished">Тип %1 недоступний</translation>
+ </message>
+ <message>
+ <source>Namespace %1 cannot be used as a type</source>
+ <translation type="unfinished">Простір імен %1 не може бути використаний як тип</translation>
+ </message>
+ <message>
+ <source>%1 %2</source>
+ <translation type="unfinished">%1 %2</translation>
+ </message>
+</context>
+<context>
<name>QDeclarativeVME</name>
<message>
<source>Unable to create object of type %1</source>
@@ -3313,18 +3313,10 @@ Do you want to delete it anyway?</source>
<context>
<name>QLibrary</name>
<message>
- <source>Could not mmap &apos;%1&apos;: %2</source>
- <translation>Не вдалося виконати mmap &apos;%1&apos;: %2</translation>
- </message>
- <message>
<source>Plugin verification data mismatch in &apos;%1&apos;</source>
<translation>Дані верифікації додатку не збігаються для ’%1’</translation>
</message>
<message>
- <source>Could not unmap &apos;%1&apos;: %2</source>
- <translation>Не вдалося виконати unmap &apos;%1&apos;: %2</translation>
- </message>
- <message>
<source>The shared library was not found.</source>
<translation>Динамічна бібліотека не знайдена.</translation>
</message>
@@ -7917,7 +7909,7 @@ Do you want to overwrite it?</source>
<name>QtXmlPatterns</name>
<message>
<source>%1 is an unsupported encoding.</source>
- <translation type="unfinished"></translation>
+ <translation>Кодування %1 не підтримується.</translation>
</message>
<message>
<source>%1 contains octets which are disallowed in the requested encoding %2.</source>
@@ -7941,23 +7933,23 @@ Do you want to overwrite it?</source>
</message>
<message>
<source>Year %1 is invalid because it begins with %2.</source>
- <translation type="unfinished"></translation>
+ <translation>Рік %1 неправильний, бо він починається з %2.</translation>
</message>
<message>
<source>Day %1 is outside the range %2..%3.</source>
- <translation type="unfinished"></translation>
+ <translation>День %1 поза межами діапазону %2..%3.</translation>
</message>
<message>
<source>Month %1 is outside the range %2..%3.</source>
- <translation type="unfinished"></translation>
+ <translation>Місяць %1 поза межами діапазону %2..%3.</translation>
</message>
<message>
<source>Overflow: Can&apos;t represent date %1.</source>
- <translation type="unfinished"></translation>
+ <translation>Переповнення: Не можу представити дату %1.</translation>
</message>
<message>
<source>Day %1 is invalid for month %2.</source>
- <translation type="unfinished"></translation>
+ <translation>Неправильний день %1 для місяця %2.</translation>
</message>
<message>
<source>Time 24:%1:%2.%3 is invalid. Hour is 24, but minutes, seconds, and milliseconds are not all 0; </source>
@@ -7965,15 +7957,15 @@ Do you want to overwrite it?</source>
</message>
<message>
<source>Time %1:%2:%3.%4 is invalid.</source>
- <translation type="unfinished"></translation>
+ <translation>Неправильний час %1:%2:%3.%4.</translation>
</message>
<message>
<source>Overflow: Date can&apos;t be represented.</source>
- <translation type="unfinished"></translation>
+ <translation>Переповнення: Не можу представити дату.</translation>
</message>
<message>
<source>At least one component must be present.</source>
- <translation type="unfinished"></translation>
+ <translation>Щонайменше один компонент має бути присутнім.</translation>
</message>
<message>
<source>At least one time component must appear after the %1-delimiter.</source>
@@ -7981,7 +7973,7 @@ Do you want to overwrite it?</source>
</message>
<message>
<source>%1 is not a valid value of type %2.</source>
- <translation type="unfinished"></translation>
+ <translation>%1 не є правильним значенням для типу %2.</translation>
</message>
<message>
<source>When casting to %1 from %2, the source value cannot be %3.</source>
@@ -7989,11 +7981,11 @@ Do you want to overwrite it?</source>
</message>
<message>
<source>Integer division (%1) by zero (%2) is undefined.</source>
- <translation type="unfinished"></translation>
+ <translation>Цілочисельне ділення (%1) на нуль (%2) не визначене.</translation>
</message>
<message>
<source>Division (%1) by zero (%2) is undefined.</source>
- <translation type="unfinished"></translation>
+ <translation>Ділення (%1) на нуль (%2) не визначене.</translation>
</message>
<message>
<source>Modulus division (%1) by zero (%2) is undefined.</source>
@@ -8021,11 +8013,11 @@ Do you want to overwrite it?</source>
</message>
<message>
<source>Value %1 of type %2 exceeds maximum (%3).</source>
- <translation type="unfinished"></translation>
+ <translation>Значення %1 типу %2 перевищує максимум (%3).</translation>
</message>
<message>
<source>Value %1 of type %2 is below minimum (%3).</source>
- <translation type="unfinished"></translation>
+ <translation>Значення %1 типу %2 менше за мінімум (%3).</translation>
</message>
<message>
<source>A value of type %1 must contain an even number of digits. The value %2 does not.</source>
@@ -8033,7 +8025,7 @@ Do you want to overwrite it?</source>
</message>
<message>
<source>%1 is not valid as a value of type %2.</source>
- <translation type="unfinished"></translation>
+ <translation>%1 не є правильним значенням для типу %2.</translation>
</message>
<message>
<source>Ambiguous rule match.</source>
@@ -8041,11 +8033,11 @@ Do you want to overwrite it?</source>
</message>
<message>
<source>Operator %1 cannot be used on type %2.</source>
- <translation type="unfinished"></translation>
+ <translation>Оператор %1 не може використовуватись для типу %2.</translation>
</message>
<message>
<source>Operator %1 cannot be used on atomic values of type %2 and %3.</source>
- <translation type="unfinished"></translation>
+ <translation>Оператор %1 не може використовуватись для атомарних значень типу %2 та %3.</translation>
</message>
<message>
<source>The namespace URI in the name for a computed attribute cannot be %1.</source>
@@ -8065,11 +8057,11 @@ Do you want to overwrite it?</source>
</message>
<message>
<source>A comment cannot contain %1</source>
- <translation type="unfinished"></translation>
+ <translation>Коментар не може містити %1</translation>
</message>
<message>
<source>A comment cannot end with a %1.</source>
- <translation type="unfinished"></translation>
+ <translation>Коментар не може закінчувати на %1.</translation>
</message>
<message>
<source>In a namespace constructor, the value for a namespace cannot be an empty string.</source>
@@ -8081,7 +8073,7 @@ Do you want to overwrite it?</source>
</message>
<message>
<source>The prefix %1 cannot be bound.</source>
- <translation type="unfinished"></translation>
+ <translation>Неможливо прив&apos;язати префікс %1.</translation>
</message>
<message>
<source>Only the prefix %1 can be bound to %2 and vice versa.</source>
@@ -8147,12 +8139,16 @@ Do you want to overwrite it?</source>
<source>%1 takes at most %n argument(s). %2 is therefore invalid.</source>
<translation type="unfinished">
<numerusform></numerusform>
+ <numerusform></numerusform>
+ <numerusform></numerusform>
</translation>
</message>
<message numerus="yes">
<source>%1 requires at least %n argument(s). %2 is therefore invalid.</source>
<translation type="unfinished">
<numerusform></numerusform>
+ <numerusform></numerusform>
+ <numerusform></numerusform>
</translation>
</message>
<message>
@@ -8169,7 +8165,7 @@ Do you want to overwrite it?</source>
</message>
<message>
<source>%1 is not a valid XML 1.0 character.</source>
- <translation type="unfinished"></translation>
+ <translation>%1 не є правильним символом XML 1.0.</translation>
</message>
<message>
<source>The root node of the second argument to function %1 must be a document node. %2 is not a document node.</source>
@@ -8257,11 +8253,11 @@ Do you want to overwrite it?</source>
</message>
<message>
<source>The item %1 did not match the required type %2.</source>
- <translation type="unfinished"></translation>
+ <translation>Елемент %1 не відповідає необхідному типу %2.</translation>
</message>
<message>
<source>The variable %1 is unused</source>
- <translation type="unfinished"></translation>
+ <translation>Змінна %1 не використовується</translation>
</message>
<message>
<source>W3C XML Schema identity constraint selector</source>
@@ -8301,7 +8297,7 @@ Do you want to overwrite it?</source>
</message>
<message>
<source>Version %1 is not supported. The supported XQuery version is 1.0.</source>
- <translation type="unfinished"></translation>
+ <translation>Версія %1 не підтримується. Підтримується XQuery версії 1.0.</translation>
</message>
<message>
<source>The encoding %1 is invalid. It must contain Latin characters only, must not contain whitespace, and must match the regular expression %2.</source>
@@ -8357,7 +8353,7 @@ Do you want to overwrite it?</source>
</message>
<message>
<source>The module import feature is not supported</source>
- <translation type="unfinished"></translation>
+ <translation>Можливість імпорту модулів не підтримується</translation>
</message>
<message>
<source>A variable with name %1 has already been declared.</source>
@@ -8517,7 +8513,7 @@ Do you want to overwrite it?</source>
</message>
<message>
<source>Parse error: %1</source>
- <translation type="unfinished"></translation>
+ <translation>Помилка розбору: %1</translation>
</message>
<message>
<source>The value of the XSL-T version attribute must be a value of type %1, which %2 isn&apos;t.</source>
@@ -8529,7 +8525,7 @@ Do you want to overwrite it?</source>
</message>
<message>
<source>Unknown XSL-T attribute %1.</source>
- <translation type="unfinished"></translation>
+ <translation>Невідомий атрибут XSL-T %1.</translation>
</message>
<message>
<source>Attribute %1 and %2 are mutually exclusive.</source>
@@ -9041,11 +9037,11 @@ Do you want to overwrite it?</source>
</message>
<message>
<source>%1 attribute of %2 element contains invalid content: {%3} is not a value of type %4.</source>
- <translation type="unfinished"></translation>
+ <translation>Атрибут %1 елемента %2 містить неправильний вміст: {%3} не є значенням типу %4.</translation>
</message>
<message>
<source>%1 attribute of %2 element contains invalid content: {%3}.</source>
- <translation type="unfinished"></translation>
+ <translation>Атрибут %1 елемента %2 містить неправильний вміст: {%3}.</translation>
</message>
<message>
<source>Target namespace %1 of included schema is different from the target namespace %2 as defined by the including schema.</source>
@@ -9077,7 +9073,7 @@ Do you want to overwrite it?</source>
</message>
<message>
<source>%1 attribute of %2 element must be %3 or %4.</source>
- <translation type="unfinished"></translation>
+ <translation>Атрибут %1 елемента %2 має бути %3 або %4.</translation>
</message>
<message>
<source>%1 attribute of %2 element must have a value of %3.</source>
@@ -9157,7 +9153,7 @@ Do you want to overwrite it?</source>
</message>
<message>
<source>Type %1 already defined.</source>
- <translation type="unfinished"></translation>
+ <translation>Тип %1 вже визначено.</translation>
</message>
<message>
<source>Attribute group %1 already defined.</source>
@@ -9297,7 +9293,7 @@ Do you want to overwrite it?</source>
</message>
<message>
<source>%1 is not valid according to %2.</source>
- <translation type="unfinished"></translation>
+ <translation>%1 не є правильним відповідно до %2.</translation>
</message>
<message>
<source>String content does not match the length facet.</source>
@@ -9697,7 +9693,7 @@ Do you want to overwrite it?</source>
</message>
<message>
<source>zero or one</source>
- <translation type="unfinished"></translation>
+ <translation>нуль чи один</translation>
</message>
<message>
<source>exactly one</source>
@@ -9705,15 +9701,15 @@ Do you want to overwrite it?</source>
</message>
<message>
<source>one or more</source>
- <translation type="unfinished"></translation>
+ <translation>один чи більше</translation>
</message>
<message>
<source>zero or more</source>
- <translation type="unfinished"></translation>
+ <translation>нуль чи більше</translation>
</message>
<message>
<source>Required type is %1, but %2 was found.</source>
- <translation type="unfinished"></translation>
+ <translation>Вимагається тип %1, але знайдено %2.</translation>
</message>
<message>
<source>Promoting %1 to %2 may cause loss of precision.</source>
@@ -9721,7 +9717,7 @@ Do you want to overwrite it?</source>
</message>
<message>
<source>The focus is undefined.</source>
- <translation type="unfinished"></translation>
+ <translation>Фокус не визначено.</translation>
</message>
<message>
<source>It&apos;s not possible to add attributes after any other kind of node.</source>
diff --git a/translations/qvfb_uk.ts b/translations/qvfb_uk.ts
index 0e0c5da6..e857e9d 100644
--- a/translations/qvfb_uk.ts
+++ b/translations/qvfb_uk.ts
@@ -215,7 +215,7 @@
<name>DeviceSkin</name>
<message>
<source>The image file &apos;%1&apos; could not be loaded.</source>
- <translation>Неможливо завантажити файл зображення &apos;%1&apos;.</translation>
+ <translation>Не вдалось завантажити файл зображення &apos;%1&apos;.</translation>
</message>
<message>
<source>The skin directory &apos;%1&apos; does not contain a configuration file.</source>
@@ -223,11 +223,11 @@
</message>
<message>
<source>The skin configuration file &apos;%1&apos; could not be opened.</source>
- <translation>Неможливо відкрити файл налаштувань &apos;%1&apos;.</translation>
+ <translation>Не вдалось відкрити файл налаштувань обкладинки &apos;%1&apos;.</translation>
</message>
<message>
<source>The skin configuration file &apos;%1&apos; could not be read: %2</source>
- <translation>Неможливо прочитати файл налаштувань &apos;%1&apos;: %2</translation>
+ <translation>Не вдалось прочитати файл налаштувань обкладинки &apos;%1&apos;: %2</translation>
</message>
<message>
<source>Syntax error: %1</source>
@@ -261,6 +261,126 @@
<context>
<name>QVFb</name>
<message>
+ <source>&amp;File</source>
+ <translation>&amp;Файл</translation>
+ </message>
+ <message>
+ <source>&amp;Configure...</source>
+ <translation>&amp;Налаштувати...</translation>
+ </message>
+ <message>
+ <source>&amp;Save image...</source>
+ <translation>&amp;Зберегти зображення...</translation>
+ </message>
+ <message>
+ <source>&amp;Animation...</source>
+ <translation>&amp;Анімація...</translation>
+ </message>
+ <message>
+ <source>&amp;Quit</source>
+ <translation>Ви&amp;йти</translation>
+ </message>
+ <message>
+ <source>&amp;View</source>
+ <translation>&amp;Вид</translation>
+ </message>
+ <message>
+ <source>Show &amp;Cursor</source>
+ <translation>Показувати &amp;курсор</translation>
+ </message>
+ <message>
+ <source>&amp;Refresh Rate...</source>
+ <translation>Швидкість &amp;оновлення...</translation>
+ </message>
+ <message>
+ <source>&amp;No rotation</source>
+ <translation>&amp;Без обертання</translation>
+ </message>
+ <message>
+ <source>&amp;90° rotation</source>
+ <translation>Обернути на &amp;90°</translation>
+ </message>
+ <message>
+ <source>1&amp;80° rotation</source>
+ <translation>Обернути на 1&amp;80°</translation>
+ </message>
+ <message>
+ <source>2&amp;70° rotation</source>
+ <translation>Обернути на 2&amp;70°</translation>
+ </message>
+ <message>
+ <source>Zoom scale &amp;0.5</source>
+ <translation>Коефіцієнт масштабування &amp;0.5</translation>
+ </message>
+ <message>
+ <source>Zoom scale 0.7&amp;5</source>
+ <translation>Коефіцієнт масштабування 0.7&amp;5</translation>
+ </message>
+ <message>
+ <source>Zoom scale &amp;1</source>
+ <translation>Коефіцієнт масштабування &amp;1</translation>
+ </message>
+ <message>
+ <source>Zoom scale &amp;2</source>
+ <translation>Коефіцієнт масштабування &amp;2</translation>
+ </message>
+ <message>
+ <source>Zoom scale &amp;3</source>
+ <translation>Коефіцієнт масштабування &amp;3</translation>
+ </message>
+ <message>
+ <source>Zoom scale &amp;4</source>
+ <translation>Коефіцієнт масштабування &amp;4</translation>
+ </message>
+ <message>
+ <source>Zoom &amp;scale...</source>
+ <translation>Коефіцієнт &amp;масштабування...</translation>
+ </message>
+ <message>
+ <source>&amp;Help</source>
+ <translation>&amp;Довідка</translation>
+ </message>
+ <message>
+ <source>&amp;About...</source>
+ <translation>&amp;Про...</translation>
+ </message>
+ <message>
+ <source>Save Main Screen image</source>
+ <translation>Зберегти зображення головного екрану</translation>
+ </message>
+ <message>
+ <source>snapshot.png</source>
+ <translation></translation>
+ </message>
+ <message>
+ <source>Portable Network Graphics (*.png)</source>
+ <translation>Переносима мережева графіка (*.png)</translation>
+ </message>
+ <message>
+ <source>Save Main Screen Image</source>
+ <translation>Зберегти зображення головного екрану</translation>
+ </message>
+ <message>
+ <source>Save failed. Check that you have permission to write to the target directory.</source>
+ <translation>Збій збереження. Перевірте чи маєте ви право на запис в теку збереження.</translation>
+ </message>
+ <message>
+ <source>Save Second Screen image</source>
+ <translation>Зберегти зображення другого екрану</translation>
+ </message>
+ <message>
+ <source>Save Second Screen Image</source>
+ <translation>Зберегти зображення другого екрану</translation>
+ </message>
+ <message>
+ <source>About QVFB</source>
+ <translation>Про QVFB</translation>
+ </message>
+ <message>
+ <source>&lt;h2&gt;The Qt for Embedded Linux Virtual X11 Framebuffer&lt;/h2&gt;&lt;p&gt;This application runs under Qt for X11, emulating a simple framebuffer, which the Qt for Embedded Linux server and clients can attach to just as if it was a hardware Linux framebuffer. &lt;p&gt;With the aid of this development tool, you can develop Qt for Embedded Linux applications under X11 without having to switch to a virtual console. This means you can comfortably use your other development tools such as GUI profilers and debuggers.</source>
+ <translation>&lt;h2&gt;Віртуальний фреймбуфер X11 Qt для Embedded Linux&lt;/h2&gt;&lt;p&gt;Ця програма виконується під Qt для X11, емулюючи простий фреймбуфер, до якого сервер та клієнти Qt для Embedded Linux можуть приєднуватись так само, як би це був апаратний фреймбуфер Linux. &lt;p&gt;За допомогою цього інструменту ви можете розробляти програми Qt для Embedded Linux під X11, без потреби перемикатись на віртуальну консоль. Це означає, що ви можете зручно використовувати інші ваші інструменти розробки, такі як профайлери та зневаджувачі з графічним інтерфейсом користувача.</translation>
+ </message>
+ <message>
<source>Browse...</source>
<translation>Оглянути...</translation>
</message>
@@ -273,4 +393,23 @@
<translation>Усі обкладинки QVFB (*.skin)</translation>
</message>
</context>
+<context>
+ <name>QVFbRateDialog</name>
+ <message>
+ <source>Target frame rate:</source>
+ <translation>Швидкість оновлення:</translation>
+ </message>
+ <message>
+ <source>%1fps</source>
+ <translation>%1 кадрів в секунду</translation>
+ </message>
+ <message>
+ <source>OK</source>
+ <translation></translation>
+ </message>
+ <message>
+ <source>Cancel</source>
+ <translation>Скасувати</translation>
+ </message>
+</context>
</TS>
diff --git a/translations/translations.pri b/translations/translations.pri
index fbc1596..1576bd5 100644
--- a/translations/translations.pri
+++ b/translations/translations.pri
@@ -47,8 +47,8 @@ addTsTargets(qt, -I../include -I../include/Qt \
xmlpatterns \
)
addTsTargets(designer, ../tools/designer/designer.pro)
-addTsTargets(linguist, ../tools/linguist/linguist/linguist.pro)
-addTsTargets(assistant, ../tools/assistant/tools/assistant/assistant.pro)
+addTsTargets(linguist, ../tools/linguist/linguist.pro)
+addTsTargets(assistant, ../tools/assistant/tools/tools.pro)
addTsTargets(qt_help, ../tools/assistant/lib/lib.pro)
addTsTargets(qtconfig, ../tools/qtconfig/qtconfig.pro)
addTsTargets(qvfb, ../tools/qvfb/qvfb.pro)