Commit Graph

11782 Commits

Author SHA1 Message Date
Frederik Gladhorn
681085c198 Accessibility: Ignore TableModelChanges on Linux for now.
This part will be improved in Qt 5.1. Currently it just spits
out debug messages for unhandled events.

Change-Id: I22475317ab54a8223d42536e1cee3f93a969e497
Reviewed-by: hjk <hjk121@nokiamail.com>
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
2013-02-07 16:10:47 +01:00
Bjoern Breitmeyer
e74bf9497c Fixed QT_NO_CURSOR build for windows/CE plugin.
Change-Id: I02f13b2af2d8c285fbca46917ff77826720857be
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2013-02-07 16:10:47 +01:00
Bjoern Breitmeyer
d45b40007f Removed User32.dll usage on WINCE
Change-Id: Id65dc0a9a829d66d0a2cc7bd40c5ba3190d9ecba
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Janne Anttila <janne.anttila@digia.com>
2013-02-07 16:10:47 +01:00
Laszlo Papp
d00224881b Fix a typo in the qdoc manual
Change-Id: I7eb6348562a18ce87e065950315dec3253a22aeb
Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
2013-02-07 12:36:25 +01:00
Friedemann Kleint
41dfd254c3 qdoc: Fix translation contexts.
Put all translations into the namespace QDoc and fix warnings
about invalid tr()-usage by removing the free tr()-function
from tr.h. Provide QCoreApplication::translate() for bootstrap
builds.

Change-Id: I2b6931188346f290e80e14b84adff8892d8a860f
Reviewed-by: Martin Smith <martin.smith@digia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-02-07 12:36:00 +01:00
Christian Strømme
5221ae5f42 Update documentation for QIODevice::readData().
readData() might be called with a maxSize of 0, regardless of the device
being buffered or not.

Task-number: QTBUG-28968
Change-Id: I666ed4d601341107722c86fe217f617ef748363d
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-02-07 11:47:48 +01:00
Thiago Macieira
8200e49bbe Allow x86intrin.h with ICC 13.1
The Intel C++ Composer XE 2013 Update 2 (a.k.a. ICC 13.1) has fixed the
bug of the undefined intrinsics.

Change-Id: If837a0800725d55fed7eff39b9d52c359dabb073
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2013-02-06 22:32:48 +01:00
Olivier Goffart
a620c67e64 Fix copy-paste errors in QtPrivate::ConnectionTypes
That resulted in error such as:
  qobject_impl.h(82) : error C2078: too many initializers

This should have been tested by tst_QObject::connectManyArguments, but
the test did not work because the detection of defined QMetaType was broken
for const references. That will be fixed in a latter commit.

Task-number: QTBUG-29130
Change-Id: I78514c251358c0e8adf33af724d87ab114230cd3
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-02-06 20:38:24 +01:00
David Faure
ca19cba2ac Factorize code for formatting window titles into QPlatformWindow.
Change-Id: I0dcccd08916fc2ea1b795681e9b98a9550ef51b6
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2013-02-06 18:39:32 +01:00
Oswald Buddenhagen
132ba92ec2 ensure consistent pkg-config file naming for macx qt frameworks
the pkg-config file names follow the TARGET by default. as we create
frameworks without the major version infix, all references to Qt5* would
be invalid.

Task-number: QTBUG-29453
Change-Id: I82e7de017a8f17f7d2d7b4a2a61a180125ca29a0
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-02-06 14:21:44 +01:00
Oswald Buddenhagen
5a0ec1b0f3 add ability to override the generated pkg-config file name
introduce the QMAKE_PKGCONFIG_FILE variable for that purpose.

this is another feature that is needed for a bugfix ...

Change-Id: I08f470e1b2b7dd318af9195330c15d813fcd55ef
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-02-06 14:21:44 +01:00
Oswald Buddenhagen
dcada2a05d beautify the pkg-config Name: field
it's not used for anything other than display, so we can put a space
there.

Change-Id: I77e156856efeaaa964ff3bf2369bcd5586bac7c6
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-02-06 14:21:44 +01:00
Oswald Buddenhagen
bf915eeea2 export QT_CONFIG only in Qt5Core.pc
there is no point in duplicating the information in every module.
host_bins is exported only here as well.

Change-Id: I2f816e1cade9761a2c0d97c7ca1c90293095bfb1
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-02-06 14:21:44 +01:00
Oswald Buddenhagen
6944c01200 export QT_CONFIG instead of CONFIG to .pc files
users need access to the Qt configuration, not some internals of
module's build system.

Change-Id: Ife3f668282969d444282d57152c11ed0f741076f
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-02-06 14:21:44 +01:00
hjk
ab6d29a6cd QMakeParser: save one ByteArray construction
Change-Id: I2845fdefb8b32de227f08017e0e3ad98923d1c87
Reviewed-by: hjk <hjk121@nokiamail.com>
(cherry picked from qtcreator/52be02d1cbbf69d4f82c517c7b633ed3d13b1007)
2013-02-06 14:21:44 +01:00
Mitch Curtis
9b52415fc9 Fix broken IANA link in QTextCodec documentation.
Change-Id: I81708691ada600c444a60a8f9b007b0ce64f8b68
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
2013-02-06 14:21:44 +01:00
Orgad Shaneh
601ab660af Remove braces for single lines of conditions
#!/usr/bin/env ruby

Dir.glob('**/*.cpp') { |file|
  # skip ast (excluding paste, astpath, and canv'ast'imer)
  next if file =~ /ast[^eip]|keywords\.|qualifiers|preprocessor|names.cpp/i
  s = File.read(file)
  next if s.include?('qlalr')
  orig = s.dup
  s.gsub!(/\n *if [^\n]*{\n[^\n]*\n\s+}(\s+else if [^\n]* {\n[^\n]*\n\s+})*(\s+else {\n[^\n]*\n\s+})?\n/m) { |m|
    res = $&
    if res =~ /^\s*(\/\/|[A-Z_]{3,})/ # C++ comment or macro (Q_UNUSED, SDEBUG), do not touch braces
      res
    else
      res.gsub!('} else', 'else')
      res.gsub!(/\n +} *\n/m, "\n")
      res.gsub(/ *{$/, '')
    end
  }
  s.gsub!(/ *$/, '')
  File.open(file, 'wb').write(s) if s != orig
}

Change-Id: I3b30ee60df0986f66c02132c65fc38a3fbb6bbdc
Reviewed-by: hjk <qthjk@ovi.com>
(cherry picked from qtcreator/29a93998df8405e8799ad23934a56cd99fb36403)
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
2013-02-06 14:21:44 +01:00
Mitch Curtis
2f555cf6b7 Fix typo in QString documentation.
Change-Id: Ic7ee426e17bb851d948ff5a772559d80ec7fa059
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
2013-02-06 14:21:44 +01:00
Friedemann Kleint
b3820b12fb Windows: Fix setting of layered windows.
The setting/clearing of WS_EX_LAYERED in the backing store
interfered with the setting/clearing in setWindowOpacity
when combining translucent and non-opaque windows.
Introduce QWindowsWindow::setWindowLayered to handle
it consistently.

Task-number: QTBUG-29010
Task-number: QTBUG-28531
Change-Id: Ib6e2740aae417bdf7b3db9ef7deb646be98df1d6
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-02-06 14:21:44 +01:00
Jan Arve Saether
ba2a0d652c Clean up whitespace
Change-Id: I3413e0f55df07a35ad2e93da9bae2ca7f9b8d4c1
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-02-06 14:21:44 +01:00
Paul Olav Tvete
05ce12849b Spell "Qt" correctly
Change-Id: Idf2b5c888f159ee8ffdb81ed74e685c40951c6b4
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
2013-02-06 12:00:07 +01:00
Friedemann Kleint
5bf3fb34be Fix lupdate-warning in qnetworkreplyhttpimpl.cpp.
qnetworkreplyhttpimpl.cpp:666: Cannot invoke tr() like this.

Change-Id: I3baf448f2118b108c32dcddc7e408b2b75542eab
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-02-06 12:00:07 +01:00
Jan Arve Saether
7502a78388 Check if the interface pointer is valid to avoid a potential crash.
Change-Id: I7e6634b799e551786d6cbc85e2d526b7874ada3d
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
2013-02-06 12:00:07 +01:00
Jan Arve Saether
20204fe58b Do not crash if the child index is out of range.
Task-number: QTBUG-29077

Change-Id: I934101cdc121e9ef99de2e9eeaef154dd4cae0d8
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
2013-02-06 12:00:07 +01:00
Samuel Rødal
af84313c62 Fixed crash in image reader when reading certain BMP files.
If the high bit in a mask is set, for instance if the mask is
0xff000000, and we shift it to the right by 24 positions, since the mask
was not declared as unsigned we ended up with a mask value of
0xffffffff. We then add 1 to this value and divide by the result,
causing a division by zero crash.

The masks need to be declared unsigned to prevent sign bit extension
when shifting right.

Task-number: QTBUG-29194
Change-Id: I79260344cebfbdd3ea86416a9c734dca76517999
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
2013-02-06 09:59:56 +01:00
Mark Brand
c3ae1c76f3 QSqlTableModel: support refreshing inserted rows with auto columns
Previously, selectRow() did not work after INSERTing a new row into a
table with an automatically populated column. It did not work because
the model did not know the primary values for the new row. Newly
inserted rows were therefore not refreshed in OnFieldChange and
OnRowChange edit strategies.

This change provides support for the typical simple case where a single
column is populated by the database and can be retrieved with
QSqlQuery::lastInsertId().

Task-Number: QTBUG-29102
Change-Id: Ibf0f0ac8661185bde57034ddf40c2178bece4778
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
Reviewed-by: Lukas Geyer <lgeyer@gmx.at>
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
2013-02-06 07:57:47 +01:00
Mark Brand
33c212b7d2 QSqlTableModel::setData(): fix non-change detection
Commit 10ff9de91b introduced the
optimization of ignoring non-changes, but it overshot the mark.
It neglected to consider that QVariant's equality operator does not
compare the null flag. It also failed to consider that setData() has
a useful side effect of setting the generated flag in a column of a
pending INSERT. This is important when the application actually wants
a NULL to be inserted into the column.

Task-number: QTBUG-29217
Change-Id: I1368f7acc21eebfeb5a8d23746fc38f6f30fd395
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
2013-02-06 07:57:28 +01:00
Mark Brand
a694b9f8d2 fix QSqlTableModel::headerData() for empty query with inserted row
QSqlQueryModel::headerData() relied on virtual indexInQuery() to
detect whether the requested column at row 0 mapped to an index in
the query. This failed when row 0 was a pending insert managed by
QSqlTableModel, and therefore not in the query.

The only thing that matters here is the column.

Task-number: QTBUG-29108
Change-Id: I3e0ae85ba223e444781ec8033386d394bb44f0e8
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
2013-02-06 07:57:13 +01:00
Oswald Buddenhagen
04478614c1 fix transitive linking for x-builds
-rpath does *not* imply -rpath-link when x-building:
ld(1): "Searching -rpath in this way is only supported by native linkers
and cross linkers which have been configured with the --with-sysroot
option."

it doesn't hurt to have the "excess" -rpath-link for native builds, so
just remove the cleanup.

Change-Id: Ic39c1f4d6c2e3770d43a5ed3e56cf89a146edf85
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-02-05 22:50:28 +01:00
Frederik Gladhorn
a1f4a821fc Nokia -> Qt Project
Change-Id: Iadd29ee918dc181d2a468f5198e66351c7cb3548
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
2013-02-05 20:53:57 +01:00
Frederik Gladhorn
d7cad756ef Replace nokia in example by Qt Project
Change-Id: I23adfd6a1cf02c8c99996b698fb780988434b9a7
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
2013-02-05 20:53:57 +01:00
Topi Reinio
1d9863658d Doc: Fix filenames for nested classes generated by qdoc
Generator::fullDocumentLocation() adds a parent class name twice into
the generated filename for nested classes, which not correct.

This change fixes the issue and makes documentation for nested classes
work in Qt Creator (qch files).

Task-number: QTBUG-29440
Change-Id: I489800ba09f49dda2befef73634cb2b344be0060
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
Reviewed-by: Martin Smith <martin.smith@digia.com>
2013-02-05 18:54:41 +01:00
Laszlo Papp
334101df92 Do not use the non-existent state() method reference
Task-number: QTBUG-29094
Change-Id: I715018a82b7f8405dee023cbe5f2481883cad3e2
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
2013-02-05 16:55:22 +01:00
Laszlo Papp
1de63171ee QScroller was introduced in Qt 5.0, not 4.8
Task-number: QTBUG-29365
Change-Id: I11804bf51f1537dcd7f40d7ec02022d8fb76c1e8
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
2013-02-05 14:24:50 +01:00
Gabriel de Dietrich
655ba57556 Cocoa QPA: Fix compilation error
The error appeared with latest clang as of Feb. 5, 2013.

Apple LLVM version 4.2 (clang-425.0.24) (based on LLVM 3.2svn)
Target: x86_64-apple-darwin12.2.0

Change-Id: I8df8cccc941ac03a7a997bdd5afe095b7b6f65d3
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
2013-02-05 14:24:50 +01:00
Friedemann Kleint
d81edc440b Fix lupdate-warnings in simplewidgets.cpp.
simplewidgets.cpp:429: Discarding unconsumed meta data
simplewidgets.cpp:535: Discarding unconsumed meta data

Change-Id: Icd9686392781eb1faa7868dc4c92d26fa44c4f94
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
2013-02-05 14:24:50 +01:00
Friedemann Kleint
0972067264 Fix lupdate-warnings in QSpiAccessibleBridge.
linuxaccessibility/bridge.cpp:169: tr() cannot be called without
context

Change-Id: Ib6bd4db7c4759818ccba8adff73617af7331f318
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
2013-02-05 14:24:50 +01:00
Sergio Martins
7829c477a9 QNX: Fix one more code path that led to having no QScreens.
Qt dereferences QGuiApplication::primaryScreen() inside,
for example, QColormapPrivate::initialize().

libscreen always returns at least one display, even it it's
not connected, so lets not ignore it if it's primary.

Change-Id: I2f14a187c979ca0c7ad39149ceb0b2b7e61e9ba6
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
2013-02-05 12:26:32 +01:00
Julien Brianceau
85b2ba2a92 doc: Fix QPixmapCache size default value in doc
QPixmapCache size default value is always 10 Mb
since change I2ac33765

Change-Id: I28c99433948b07e9c84d0afda7aa5a8f49d2cd18
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
2013-02-05 12:18:27 +01:00
Sergio Martins
9d7e63e370 QNX: Fix one more code path that led to having no QScreens.
Qt dereferences QGuiApplication::primaryScreen() inside,
for example, QColormapPrivate::initialize().

libscreen always returns at least one display, even it it's
not connected, so lets not ignore it if it's primary.

Change-Id: I2f14a187c979ca0c7ad39149ceb0b2b7e61e9ba6
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
2013-02-05 11:55:47 +01:00
Jens Bache-Wiig
7cc3a3adf2 Added missing null pointer check in QMacStyle
QMacStyle::subElementRect could crash if SE_LineEditContents was used
without providing a widget pointer.

Task-number: QTBUG-27033
Change-Id: I15ef07ae1310be4257a8480d392f98dbf02168d3
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
2013-02-05 11:40:14 +01:00
Mark Brand
0b8065b581 remove misleading statement from ~QSqlDatabase()
The presence of the sentence "If this is the last QSqlDatabase object
that uses a certain database connection, the database connection is
automatically closed" is misleading, whether or not the statement is
true. It is about an internal detail of QSqlDatabase's implementation.
As such it is not appropriate for user documentation. The user should be
focused on how to use addDatabase(), cloneDatabase() and removeDatabase()
correctly.

Task-number: QTBUG-29481
Change-Id: I0c39584be260e13340834c34098368fcce4a7419
Reviewed-by: Florian Paul Schmidt <mista.tapas@gmx.net>
Reviewed-by: Sune Vuorela <sune@vuorela.dk>
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
2013-02-05 10:38:12 +01:00
Samuel Rødal
ef7c9b5b52 Fixed missing support for single buffered OpenGL on OS X.
Task-number: QTBUG-28804
Change-Id: I426a9bbc08953d777f67a23b050570e9f7d442d7
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
2013-02-05 09:00:56 +01:00
Jian Liang
328c7ee6b8 Show default shortcut menu when user right click window's caption
In windows platform, Qt5 will not show the system default shortcut menu
when the user right click in the window's caption. This is a regression
from Qt4.
This patch will let DefWindowProc() to handle the message WM_CONTEXTMENU
if the mouse pointer is in the non-client area of the window. Thus the
default Windows shortcut menu will show up.

Change-Id: I88638ad1d4f0e73b088204b83c3f7ec0fe2033f0
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2013-02-05 08:59:51 +01:00
Joerg Bornemann
be8c47b140 qmake/MSVC: fix parsing of the /openmp option
Task-number: QTBUG-29143

Change-Id: I6b1ce0babf51701fa404b821b22060a87c4f46b2
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-02-04 16:33:17 +01:00
Joerg Bornemann
9c1628aae3 do not parse MSVC option /Gs as /GS
/Gs[size] will be added as additional option as there is no XML element
for this option.

Task-number: QTBUG-29329

Change-Id: I1f09bfdac90f9c5f2333dc03e6e4e6a206b4f6d0
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-02-04 16:23:53 +01:00
Joerg Bornemann
4fe029963d qmake/MSVC: do not disable buffer security check per default
The default must be "unset" to let the user's MSVC settings decide
what the default value is.

Task-number: QTBUG-29329

Change-Id: I6015202c123dbb7304941b0d24557a26a1e3236c
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-02-04 16:23:32 +01:00
Oswald Buddenhagen
4c34b418b8 fix lack of rpath-link when using modules from final location
if the libraries are in a non-standard location, but no rpath is used,
rpath-link is needed. this is often the case for non-prefix builds
(which have no forwarding pris any more).

as we cannot store absolute paths in the final pris, we need to store the
module names, and resolve them only at use time.

Change-Id: I1538b5d531611c76a2d7058a3b2ff683bdcbe427
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-02-04 15:10:22 +01:00
Oswald Buddenhagen
8705480587 support alternative and multiple suffixes in $$resolve_depends()
this is undeniably a new feature, but it's needed for a bugfix.

Change-Id: I951a3128eb580404ee0c7e3cdcb4d6170e899f70
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-02-04 15:10:19 +01:00
Marcel Krems
513971eecd QSqlError test: Fix isValid()-check for constructed QSqlError.
Change-Id: I4dc1f537226139ceca017cc36abadd2fba4ce35b
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
2013-02-04 14:44:19 +01:00