Commit Graph

20542 Commits

Author SHA1 Message Date
David Faure
cd824ee791 QAIV: speed up isRowHidden for the case where no rows are hidden.
isPersistent(index) is a linear search, which we can avoid altogether
(as well as the creation of a persistent model index, is idx is indeed persistent)
when the row-hiding feature isn't used at all.

Change-Id: I07488dddf56e299806cc29749e633da00115fc30
Reviewed-by: Jan Arve Sæther <jan-arve.saether@theqtcompany.com>
2014-10-12 10:37:58 +02:00
Louai Al-Khanji
97f119af14 EGLFS: Add support for multiple displays
Change-Id: Id039e0ed2d99562eb2a5cfe1e7b34013c75ff3ac
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
2014-10-10 13:25:53 +02:00
Laszlo Agocs
7069ebd1f6 Use requestUpdate in QOpenGL and RasterWindow
Change-Id: Ibed4b8d2e2185f1bcf3430932701f81577b59408
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
2014-10-10 08:37:04 +02:00
Laszlo Agocs
1f040d401d eglfs: Add support for systems without pbuffer support
Use a small native window and window surface in case the hooks indicate
that pbuffer support is not available.

Change-Id: I6515309041f0e1e2f5321d59941f35d6ee16dca7
Reviewed-by: Louai Al-Khanji <louai.al-khanji@digia.com>
Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
2014-10-10 08:36:47 +02:00
Frederik Gladhorn
881ceeff42 Merge remote-tracking branch 'origin/5.4' into dev
Change-Id: I05fcd8dc66d9ad0dc76bb7f5bae05c9876bfba14
2014-10-09 17:56:52 +02:00
Gunnar Sletta
b3d2c867ed Introducing QWindow::requestUpdate().
Change-Id: I0e2a09b53459a56d90dcd9043e694b19e2d77a9e
Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
2014-10-09 10:59:40 +02:00
Alessandro Portale
106487387d Removing a few unneeded "? true : false"
Change-Id: Ib13f0ddd65fe78f5559f343f2fc30756b1d3ef76
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2014-10-09 09:43:26 +02:00
Marc Mutz
e5f528fb0e Don't stream QStringLiterals into QDebug
Normal (C) string literals do just as well and use more than twice
less space in the DATA section.

Change-Id: Iafb0682a362c41dfd5b4d8b9137d88014d7992a2
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2014-10-09 09:42:27 +02:00
Marc Mutz
a5b647804b QFactoryLoader: de-duplicate two QStringLiterals
When seemingly identical QStringLiterals are used in different
functions, due to the use of lambdas and scoping, they produce
different lambda types and thus duplicated QStringLiteral data.

Fix by moving the QStringLiterals into inline functions and
calling those instead.

Change-Id: Ifaa124ec74e201ccc63fd9afce042f8b2ff22b9e
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2014-10-09 09:42:17 +02:00
Marc Mutz
1cc06b2e94 Don't use QStringLiteral in startsWith/endsWidth
For QLatin1String, startsWith/endsWith is overloaded, so comparing to
a latin-1 (C) string literal is efficient, since strlen() is
comparatively fast.

OTOH, QStringLiteral, when not using RVO, litters the code with
QString dtor calls, which are not inline. Worse, absent lambdas,
it even allocates memory.

So, just use QLatin1String instead.

Change-Id: I7eaf464c67b55116f970fe7f58a85f19ce4d254e
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2014-10-09 09:42:11 +02:00
Marc Mutz
1a5c0b26d0 Don't use QStringLiteral in comparisons
For QLatin1String, operator== is overloaded, so comparing to a latin-1
(C) string literal is efficient, since strlen() is comparatively fast.

OTOH, QStringLiteral, when not using RVO, litters the code with
QString dtor calls, which are not inline. Worse, absent lambdas,
it even allocates memory.

So, just compare using QLatin1String instead.

Change-Id: I7af3bf3a67c55dae33ffaf9922d004fa168a3f9c
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2014-10-09 09:42:00 +02:00
Marc Mutz
bf1df55846 Don't use QByteArrayLiteral in comparisons
For const char*s, operator== is overloaded, so comparing to a (C) string
literal is efficient, since qstrcmp doesn't require the length of the
strings to compare.

OTOH, QByteArrayLiteral, when not using RVO, litters the code with
QByteArray dtor calls, which are not inline. Worse, absent lambdas,
it even allocates memory.

So, just compare with a (C) string literal instead.

Change-Id: Id3bfdc89558ba51911f6317a7a73c287f96e6f24
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2014-10-09 09:41:51 +02:00
Marc Mutz
05663e29d0 moc: don't use QByteArrayLiteral
The byte array literals are only used to append them to another
QByteArray, so they offer only the static size calculation as a
benefit.

However, there are several drawbacks:
- QByteArrayLiteral data cannot be shared the way string literals
  can be, not even within a single TU, and they add a few ints
  for the QByteArrayData header which cannot reside in BSS, but
  need to be stored in DATA.
- QByteArrayLiteral *does* allocate when the compiler doesn't
  support C++11 lambdas.
- QByteArrayLiteral, when not using RVO, litters the code with
  QByteArray dtor calls, which are not inline, and thus can't
  be optimized away.

In particular, when used like this, they do not prevent any
memory allocation (in fact, they might add some, absent lambdas).

So, just append (C) string literals.

Change-Id: Iee5dba8dd970c5cc6df116afc1f8709a62356b06
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2014-10-09 09:41:40 +02:00
Friedemann Kleint
4a2cf9ca41 Fix license text and URLs in QMessageBox::aboutQt().
Point to new qt.io site, adapt licensing text.

Task-number: QTBUG-41798
Change-Id: I492df6a842c2b31e44653fb4388408c209f24f1e
Reviewed-by: Sami Makkonen <sami.makkonen@digia.com>
Reviewed-by: Jani Heikkinen <jani.heikkinen@digia.com>
2014-10-09 09:32:18 +02:00
Friedemann Kleint
858935fa66 Fix executable name of mousebuttons example.
Change-Id: Icf41ade3a4d2d14535e6fd42212b27ac01c5177f
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2014-10-09 08:35:32 +02:00
Joerg Bornemann
6e6c6f9868 fix VS 2008 project file generation
Commit 4f21eb03 utterly broke the project file generation for
VS 2008. The introduced filterByName convenience methods looks for
filter names like "Generated Files", but the code path for
VS <= 2008 used filter names like "GeneratedFiles".
The generated projects were valid but empty.
This commit ensures that both VS generators use the same filter
names.

Task-number: QTBUG-41821
Change-Id: I828fa911bae8d835b073a4c2260316127cc72cda
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2014-10-09 06:55:52 +02:00
Joerg Bornemann
e5a8134765 fix vcxproj generation for CONFIG-=flat
Commit 4f21eb03 broke the generation of non-flat vcxprojs.
XTreeNode passes filter names to outputFileConfigs that have
the source subdirectory suffixed (e.g. "Generated Files\subdir").
That's why the original code tested the filter names with
QString::startsWith.
I've changed the signature of outputFileConfigs to take a filterId
parameter which contains the unaltered filter name (e.g.
"Generated Files") that will determine the correct filter.

Task-number: QTBUG-41746
Change-Id: If33428526a098f433cd6ceb8ab6608bd9f94ef17
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2014-10-09 06:55:22 +02:00
Marc Mutz
9b80ed9d56 QCss: mark many classes as movable
Most of these are held in QVectors, so let QVector use the
optimized reallocation strategy.

Change-Id: I6c2182465c283705bd5ec761e3d2d3d072bc6207
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2014-10-08 13:58:40 +02:00
Marc Mutz
9a5e4ada9c QCss: Move declaration of ValueExtractor
Move it to the end of the header, since it was sitting right
in the middle of AST struct definitions without being one
itself.

Change-Id: I017d6187324e91f2745629dbed4271064d4e59a8
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2014-10-08 13:58:33 +02:00
Marc Mutz
3be9d6d116 QCss: unexport some classes
and export only the non-inline functions inside them.

Inline functions don't need exporting, and some compilers
are known to have problems inlining inline functions of
exported classes.

Change-Id: I843adc0ab493817e71f48ab87bfefb03d4ca918d
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2014-10-08 13:58:27 +02:00
Richard Moe Gustavsen
707eb8d28d iOS: add system palette
Return a system palette that sets the correct
highligh (text selection) colors.

Change-Id: Ic0a18f931913f28bdc73d9ec4ae347fe38839f17
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
2014-10-08 13:43:57 +02:00
Eskil Abrahamsen Blomfeldt
183d04de90 Add text ranges to QGlyphRunPrivate
This is an enabler for using the QGlyphRun in the selection
code of the scene graph node. In this case, we need to
know exactly which of the characters in the text are represented
by the glyph run, as a single range of text may result in
several glyph runs.

Change-Id: Ie8ec942693dceea45ab548f6cefc4f78e4c6d524
Task-number: QTBUG-41808
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
2014-10-08 13:07:58 +02:00
Joerg Bornemann
b883cee471 WinCE: fix DLL build errors with CONFIG+=console
Since commit cd1dff75, we use QMAKE_LFLAGS_CONSOLE when linking DLLs that
are built with CONFIG+=console. Thus, we must not pass options that are
specific to linking executables.

[ChangeLog][qmake] WinCE makespecs must not add /ENTRY: to
QMAKE_LFLAGS_CONSOLE and more. The flag is hard-coded in console.prf now.
This is a side effect of making it possible to specify a subsystem for
DLLs.

Change-Id: Ib481fd45b12140f9f05bf123db7152a3ddf0fa04
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2014-10-08 13:05:05 +02:00
Topi Reinio
a366b2bb54 qdoc: Fix generation of qhp sections for unsorted pages
If you had the following lines in .qdocconf:

    qhp.QtFoo.subprojects.examples.title      = Examples
    qhp.QtFoo.subprojects.examples.indexTitle = Qt Foo Examples
    qhp.QtFoo.subprojects.examples.selectors  = fake:example

The expected outcome is to see an unsorted list of examples. This
didn't work however, because QDoc assumed to find a chain of
\nextpage links for the indexTitle, and these are rarely used
in Qt documentation nowadays.

This commit ensures that all pages matching the defined selectors
will be listed under the section title, even when the sortPages flag
is not set.

Task-number: QTBUG-41737
Change-Id: I1e7e2a2953de949c9b52763165c406a64d1d46f7
Reviewed-by: Martin Smith <martin.smith@digia.com>
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
2014-10-08 12:47:19 +02:00
Friedemann Kleint
fa096c1123 Change documentation links to point to qt.io.
Task-number: QTBUG-41798
Change-Id: I3a9edc5798d67da60ed1ea55540e2fcdd2e87371
Reviewed-by: Jani Heikkinen <jani.heikkinen@digia.com>
2014-10-08 11:12:11 +02:00
Jake Petroules
3b1de67fde Utilize Q_FORWARD_DECLARE_OBJC_CLASS in QCocoaFileDialogHelper.
Change-Id: I94ae91ac8fb625de4a328c6628ce0ab45919708f
Reviewed-by: Jake Petroules <jake.petroules@petroules.com>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
2014-10-08 02:29:54 +02:00
Marian Beermann
264fcd4eef Fix QDomDocument::importNode() crashing on null nodes
Task-number: QTBUG-12927
Change-Id: I597a149bb273fa132fdb34e3678ebc3069d6f516
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2014-10-07 23:08:18 +02:00
Thiago Macieira
50430a8392 Fix compilation of MIPS with Clang
Clang always sets __mips to 1, unlike GCC. To detect a higher MIPS arch,
we need to rely on the _MIPS_ARCH_MIPSxxx macros being defined -- or, in
this case, _MIPS_ARCH_MIPS1 not being defined.

Change-Id: Ib6846a6892a4c1e17e595a69305b7e46a5303ee7
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Adrian Perez de Castro <aperez@igalia.com>
2014-10-07 22:30:21 +02:00
Jake Petroules
1cc079c29b Add Objective-C specific type converters to QDateTime
This patch adds the Objective-C NSDate/CDateRef converters to
QDateTime

[ChangeLog][QtCore][Objective-C] Added NSDate/CDateRef converters for
QDateTime

Task-number: QTBUG-37116
Change-Id: I937ea927083a2767b5b17f10a48bf453c9ff8b01
Reviewed-by: Jake Petroules <jake.petroules@petroules.com>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
2014-10-07 18:54:21 +02:00
Dmitry Shachnev
3a25799413 Add Cinnamon to the list of Gtk+-based DEs
Change-Id: I6c2a374026fde30858f1a51f34fa195ef8f8fe37
Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
2014-10-07 15:35:23 +02:00
Friedemann Kleint
a4aea7b578 MSVC: Restore 'public' accessibility of QVariant member functions.
The were made 'protected' as a side effect of a change enabling
support of template friends for MSVC. However, accessibility
is part of the MSVC's name mangling and thus BC was broken.

Task-number: QTBUG-41810
Change-Id: I5ce4c7010673c06d5b75219c89c7ebd337bac6c0
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2014-10-07 14:33:40 +02:00
Andy Shaw
9884ec73dd Clean up the CFTypes used in popuplateFamily
Change-Id: Iabe127486c77ebb2afe7fe13ecccd70252a79031
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
2014-10-07 14:23:57 +02:00
Morten Johan Sørvig
a7f1eb4ab3 Correct devicePixelRatio for software OpenGL
[NSView setWantsBestResulutionOpenGLSurface] is a
hint and the driver may ignore it, for example when
using software OpenGL on a virtual machine.

In these cases devicePixelRatio() must return a value
corresponding to the actual OpenGL surface size. Use
[NSView convertSizeToBacking] which is one of the
recommended methods.

Task-number: QTBUG-41767
Change-Id: Ia79242219908a2454a83b44b6eb7463372764162
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
2014-10-07 13:31:59 +02:00
Oswald Buddenhagen
a1d66c9aee Merge "Merge remote-tracking branch 'origin/5.3' into 5.4" into refs/staging/5.4 2014-10-07 13:31:20 +02:00
Nico Vertriest
ded6514de8 Doc: deletion plugin-howtos.qdoc
Document is moved to qtdoc/doc/src/howtos
Including snippet files.

Task-number: QTBUG-38412
Change-Id: Iba15689ad63e17c370c21c9ee5a1fff40c79fcec
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
Reviewed-by: Martin Smith <martin.smith@digia.com>
2014-10-07 13:26:28 +02:00
J-P Nurmi
6cd1257757 Fix native GTK2 dialogs to receive focus
Task-number: QTBUG-41406
Change-Id: I00f317e5ef62f63c37e9610e1f8ea00af2740b99
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
2014-10-06 23:17:11 +02:00
Marc Mutz
10e3ce9e16 QWidget: simplify reading of an env-var in create()
Instead of initializing paintOnScreenEnv to -1 (thus forcing the
variable into the data segment), and then overwriting the -1 with
a read from the env-var, dynamically initialize the variable from
the env-var directly, thus allowing the variable back into the bss
segment (which doesn't occupy storage in the executable).

There may have been a reason to do it this way when the old code
could fail due to the memory allocation involved, but now with
qEnvironmentVariableIntValue(), that is no longer a reason.

Change-Id: I6547a81f69b0b57dc49bb4dd3ba1865ce8ac5b86
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2014-10-06 20:39:16 +02:00
Marc Mutz
d8838ee126 Simplify QWidgetPrivate::map{To,From}WS()
Change-Id: I065a173601d45ddb8ec52e721dfc596a487637fe
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2014-10-06 20:38:37 +02:00
Marc Mutz
41a1b4daae QDesktopWidget: use qDeleteAll()
Change-Id: Icfbf47309e425deabcef81c8f11b8e42fcc9cdcc
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2014-10-06 20:38:29 +02:00
Alex Trotsenko
06632928af QIODevice: Improve read buffer use
Change buffer fill strategy to have more cached data for next read call.
This avoids unnecessarily many small reads from device implementation layer.

Change-Id: If1a039524afc03c02d2299babbfccef09f3f1cf0
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2014-10-06 17:22:39 +02:00
Joerg Bornemann
cd1dff7556 pass windows/console linker flags to DLLs and executables
Pass QMAKE_LFLAGS_WINDOWS and QMAKE_LFLAGS_CONSOLE to QMAKE_FLAGS
regardless of the project template.

The /SUBSYSTEM linker switch is not exclusively meant for executables
but can also be applied when linking dynamic libraries.
This is needed when building DLLs for Windows XP with VS >= 2012.

Task-number: QTBUG-41504
Change-Id: I5966cba1b6756e15275fa5d7fdbc42b99c95c07b
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2014-10-06 17:17:29 +02:00
Tor Arne Vestbø
523f5c6722 Allow using pkg-config on OS X/iOS using explicit -pkg-config to configure
Fixup after d44781730c, which would override whatever the user passed
on the command line.

Change-Id: If4d260801866ff53de3e6dfd6d37016fd8453d8d
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
2014-10-06 17:17:25 +02:00
Shawn Rutledge
bf28e2fc13 Do not re-create windows during application shutdown
Change 9c3a58a913 causes any window to
be re-created when the screen it is shown on is destroyed.  This
is for the use case of detaching one monitor while another remains.
In QWindow::setScreen(), if the screen is null, it will be set to
the primary screen.  However during application shutdown, it may be
that the primary screen has been destroyed before all the windows
are destroyed; so trying to set it anyway will cause a crash.
qtdeclarative/tests/auto/quick/qquickwindow was segfaulting,
especially when running testWindowVisibilityOrder by itself.

Change-Id: Ice6b30320ac563f0c70264aa5c57de21d2e4d56e
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2014-10-06 16:01:11 +02:00
Eskil Abrahamsen Blomfeldt
d5db8dbfec Windows DirectWrite: Fix off-by-one in font descent
In cb8445f032 we removed the historical
+1 in font heights and the corresponding -1 in the descent measurement
for all font engines. But the change to the direct write font engine
was lost at some point during the transition to QPA, where we seem
to have integrated an older version of the source file.

[ChangeLog][Windows][Fonts] Fix off-by-one in font descent when using
the DirectWrite font engine.

Task-number: QTBUG-41783
Change-Id: Iffa24b5f2b4f6cc3a1f0034fdff63a1ee62ea9f7
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2014-10-06 14:27:51 +02:00
Oswald Buddenhagen
f49d5b578c Merge remote-tracking branch 'origin/5.3' into 5.4
Change-Id: I132bb6cce68e9f8413200f7ee75586bd1cada38c
2014-10-06 11:59:47 +02:00
Laszlo Agocs
848e950252 Rename internal enum value to avoid clashing with Xlib
Change-Id: I4926d1f75ece220d28abf9f2e7081e41f0aaf339
Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
Reviewed-by: Martin Jansa <Martin.Jansa@gmail.com>
2014-10-05 22:51:43 +02:00
Alex Blasche
014ed987ac Fix QTextInlineObject class documentation
Change-Id: I10ac533c1ba7a8003b59b1617af98afbdd4ed17f
Task-number: QTBUG-39784
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
2014-10-05 11:22:25 +02:00
Peter Hartmann
0473d2bd34 QNetworkRequest: Add new enum to emit all uploadProgress signals
... so that a user can have more fine-grained uploadProgress signal
emissions if desired.

Change-Id: I9f77fd80c100dbe249beaf3057e6e8974680ec59
Reviewed-by: Markus Goetz <markus@woboq.com>
Reviewed-by: Richard J. Moore <rich@kde.org>
2014-10-04 14:41:55 +02:00
Marc Mutz
100455d4c1 QSizePolicy: remove an outdated comment
The change asked for by the comment is apparently done.

Change-Id: I7ef2b58eb8c38192904e83b1c2386d3c762e0bed
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2014-10-04 14:10:54 +02:00
Marc Mutz
03e794b7a6 Add benchmark for QString::section()
Change-Id: I7ca4ceb8cfa7a3df384400a1b3ebc9be2502e396
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2014-10-04 13:57:55 +02:00