Commit Graph

22318 Commits

Author SHA1 Message Date
Konstantin Ritt
df8e879760 [QWindowsFontDatabase] Drop some dead code
Change-Id: I56b867508a9d597462c2e71c71c3aea0b8ea9aca
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2015-02-02 21:36:25 +00:00
Marc Mutz
46d3c25980 Partially revert "QFixed: fix undefined behavior"
This partially reverts commit 1755038134,
which did not only fix undefined (signed left-shift), but also
implementation-defined (signed right-shift) behavior. It turned out
that code depends on a particular implementation behavior (logical
instead of arithmetic right-shift), and needs to be fixed first.

Change-Id: I9ba32d06f127d17d05e0c6f6eac3d26268587bca
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
2015-02-02 16:43:16 +00:00
Marc Mutz
a776e4cf78 uic: don't use QStringLiteral in comparisons
(this is committing the new output of generate_ui from qttools)

For QLatin1String, operator== is overloaded, even for QStringRef,
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: I5035d259085c21689ab0f62fd49819ab5223ffe8
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-02-02 16:43:07 +00:00
Marc Mutz
ee973083cf uic: update sources from current generate_ui
Change-Id: I3b64fa94bd5904feeed753d34e80f4fc0611725e
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
2015-02-02 16:43:01 +00:00
Tor Arne Vestbø
d6327d5dc8 iOS: Track QIOSViewController -> QIOSScreen using QPointer
We may receive viewWillLayoutSubviews calls for the view controller even
if QIOSScreen has released the UIWindow that retains the view controller.

Change-Id: I0cc7c50dbb5ee00224aec46d070b04efe069e85a
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@theqtcompany.com>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
2015-02-02 16:19:08 +00:00
Tor Arne Vestbø
3d4a2241b9 iOS: Guard QIOSScreen against notifying Qt about changes to deleted QScreens
Now that we can rely on screen() returning 0 when the QScreen is not
available we can return early from updateProperties(). We still compute
the member variables as they may be accessed directly for the still
alive QPlatformScreen.

Change-Id: Ia7d0d29a6b50a9c932b565dc53b23d66331c275e
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@theqtcompany.com>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
2015-02-02 16:19:06 +00:00
Tor Arne Vestbø
087c61f7b7 iOS: Disconnect focusWindowChanged connection on QIOSViewController dealloc
Change-Id: I6acac4c926fcf5459364133b6cc58baff0519074
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@theqtcompany.com>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
2015-02-02 16:19:03 +00:00
Tor Arne Vestbø
f568e511b7 iOS: Keep size and device pixel ratio of QIOSBackingStore in sync with window
We were only doing this for the size, which caused problems when moving
a window from one screen to another where the two screens had different
device pixel ratios.

Change-Id: If56df34677417369639ee8e4df05820fddd9198d
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@theqtcompany.com>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
2015-02-02 16:19:01 +00:00
Maks Naumov
5abba00bef QFileDialog::setDirectory(): remove unused local variable
Change-Id: I461679f7e47d6e98b3adda0114a5a3bd07a6a4d9
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2015-02-02 16:16:09 +00:00
Maks Naumov
b81a52dc38 Reduce number of QRegion::rects() calls in QBlitterPaintEngine::fillRect()
And remove unused variable.

Change-Id: Ife98bbe5b02e1d18639c100ed3e58985a2ea9218
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2015-02-02 16:16:06 +00:00
Maks Naumov
5be5e8ff3a Call QDir::homePath() only when necessary in QSettings::initDefaultPaths()
Change-Id: I990520917ec65127ae554b5e872791cff78f0b56
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2015-02-02 16:15:55 +00:00
Mitch Curtis
8cb611be7b Add some punctuation to QTextCursor's detailed description.
Change-Id: I3b3eab74888f283a9890321fadcae67c09c24b61
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
2015-02-02 15:34:10 +00:00
Stephan Binner
f8c8c79029 Fix build of egl integration
Add missing includes and reorder includes to avoid X defines breakage

Change-Id: Iaf95ae2488df3d3301436262ed79f7091b4be0a9
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
2015-02-02 15:01:09 +00:00
Laszlo Agocs
d2be83bc27 Update for libinput 0.8
We don't yet have API compatibility, apparently, so we need to keep up
with those changes.

Dropping support for older versions is not yet acceptable since some distros
(in particular current version of some embedded ones) may ship these versions.

Change-Id: Ibea780abd76c4b89661012dfea46868b432ded42
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
2015-02-02 14:03:43 +00:00
Laszlo Agocs
aa475a30af Expose the ThreadedOpenGL cap to apps
Applications have no public API to check for the ThreadedOpenGL flag
reported by the platform plugins. Add a static function to QOpenGLContext
to give interested applications a way to decide if they should do
rendering on separate threads.

Task-number: QTBUG-44208
Change-Id: I629332512ab31fe49f842065a911270cd6cea7aa
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
2015-02-02 14:03:29 +00:00
Laszlo Agocs
d800180f82 Utilize EGL_KHR_surfaceless_context in QOffscreenSurface when available
Use it also in the context initialization code which also relied on pbuffers
until now.

This is safe to do since QOffscreenSurface is deliberately kept minimal: we only
support it for rendering to FBOs or uploading textures, it is quite useless for
any rendering type of operation. Therefore simply not creating a surface when
the extension is available is viable and should not break anything.

While we should have done this a long time ago, the real inspiration now is
to avoid crashes with some bad EGL implementations.

Mesa in particular tends to crash in its interal configuration handling when
trying to create a pbuffer surface with more exotic attributes, for example with
multisampling enabled. Just getting rid of those properties is not an option
since the resulting pbuffer would not be compatible with the existing context.
Therefore our only option is to avoid the pbuffer altogether.

There's a so-far-ignored patch for Mesa http://patchwork.freedesktop.org/patch/38100/
which tries to solve some of this but it turns out it is not sufficient to avoid problems
with the multisampled case. So to avoid more headache, we just stop using pbuffers
there.

[ChangeLog][QtGui] QOffscreenSurface is now relying on EGL_KHR_surfaceless_context when
available, and avoids creating a pbuffer surface when the extension is present.

Change-Id: Id18742768b8e66c8d92ce65a9bf64b0296e14db7
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
2015-02-02 14:03:24 +00:00
Jeremy Lainé
5382312e5c Add SecureTransport based SSL backend for iOS and OS X
Add support for SSL on iOS/OS X by adding a SecureTransport based
backend.

[ChangeLog][QtNetwork][QSslSocket] A new SSL backend for iOS and OS X,
implemented with Apple's Secure Transport (Security Framework).

Change-Id: I7466db471be2a8a2170f9af9d6ad4c7b6425738b
Reviewed-by: Richard J. Moore <rich@kde.org>
2015-02-02 14:02:56 +00:00
Oswald Buddenhagen
a7fe3309d6 inline initOld()
the separation serves no purpose except confusing.

Change-Id: I6a0d04b2162a4eee7a200345e94baa272120ea5b
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2015-02-02 11:15:06 +00:00
Oswald Buddenhagen
39882d88d0 inline outputVariables()
it's debugging code which is used only once (if even uncommented).

Change-Id: Ie57347017dd24f4acecff2a7132f82898dea3122
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2015-02-02 11:15:04 +00:00
Oswald Buddenhagen
5932fc4ab8 prune dead fixFilename() function
Change-Id: I84bafecccec286094701874b2780b45d08797524
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2015-02-02 11:15:02 +00:00
Oswald Buddenhagen
77980b78ab prune dead fixifySpecdir() function
Change-Id: I3bc7f8de86213b1e1d99bdb2749589dbe3851eee
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2015-02-02 11:15:01 +00:00
Oswald Buddenhagen
aa30f49d6a prune pointless assignments of QString::replace() and remove() results
they operate in-place.

Change-Id: Iab6f2f6a9f6f67b9d70feb77ec719e424909022d
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2015-02-02 11:14:59 +00:00
Oswald Buddenhagen
2b31356ac9 optimize filePrefixRoot()
more efficient use of string functions.

Change-Id: I3d95d6379eaab025b18449b706f93631a2132aad
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2015-02-02 11:14:57 +00:00
Oswald Buddenhagen
eb9db750e9 remove dead variables
Change-Id: I6c48a2e64027c432a87767782669c30a8876b0d6
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2015-02-02 11:14:55 +00:00
Oswald Buddenhagen
a5c197bee7 remove pointless fixForOutput() call
the path is processed, and afterwards fixForOutput()ed again. the first
call makes no sense (even if it registered some variables that are gone
in the second call, that would be pointless exactly because they are gone).

Change-Id: I251f1e4858bec36f3a7a9427c2ba78031b35a2d3
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2015-02-02 11:14:53 +00:00
Oswald Buddenhagen
835566685c remove bogus path fixing
commands come already fully expanded and quoted from the project.

Change-Id: I239d5c305f5f65d32c832bc09bfd1c322051e149
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2015-02-02 11:14:51 +00:00
Oswald Buddenhagen
23ab0d3e6a prune vestiges of IMAGES and QMAKE_IMAGE_COLLECTION
this stuff apparently pre-dates rcc.

Change-Id: Iaa58419476c3d20e2801e91dc1881880c741fdc6
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2015-02-02 11:14:49 +00:00
Oswald Buddenhagen
f9b882b584 remove QMAKE_FAILED_REQUIREMENTS optimization from unix generator
no other generator does it. if it actually buys anything, it should be
re-instantiated differently.

Change-Id: I8431702ac7d558d65fd28a7f9e36bb49db2eb253
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2015-02-02 11:14:48 +00:00
Oswald Buddenhagen
3b9f103155 make fallback handling for QMAKE_BUNDLE_EXTENSION sane
the logic was such that if the bundle name already had the specified
extension which was not the default extension, the default extension
would be appended, too. i don't think that was the intention ...

now we simply put the default into QMAKE_BUNDLE_EXTENSION if its empty -
the variable is not used anywhere else where it would be expected to
preserve its emptiness, so this is safe.

Change-Id: Ied34d10f9fe60756bddc0037dcb2f1d3bbfd3e12
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2015-02-02 11:14:45 +00:00
Oswald Buddenhagen
4b486cb88c values(foo).first() => first(foo)
Change-Id: Ic5bb8ae3166c76299881970f83d20206bec704bc
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2015-02-02 11:14:43 +00:00
Oswald Buddenhagen
365eb89713 remove weird qt_dll hack
there is no reference to it anywhere.

Change-Id: I72403be6c8294d9b2e64075ebd428eba24d97097
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2015-02-02 11:14:41 +00:00
Oswald Buddenhagen
9999ada1bf don't verify compilers twice
Change-Id: Iad214f8a14c29b633752935e31125a6f4b512f4b
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2015-02-02 11:14:40 +00:00
Oswald Buddenhagen
84c80538af remove pointless double initialization guards
this isn't some fuzzy logic, the call sequence is well determined.

Change-Id: I1696b49ed687da83d2969efcfe23ac6565630020
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2015-02-02 11:14:37 +00:00
Oswald Buddenhagen
12b7b2c643 nuke gbuild generator
it never left the rudimentary stage. should it ever be re-added, it
needs to be done basically from scratch anyway.

Change-Id: I76858c8a2c90235f228f7a6e5a178a10a2669d37
Reviewed-by: Rolland Dudemaine <rolland@ghs.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2015-02-02 11:14:34 +00:00
Oswald Buddenhagen
6e6b50f541 fix relative path resolution inconsistency in qmake properties
suppose we queried QT_INSTALL_DOCS/get. if no [EffectivePaths] existed,
we'd try [Paths]. if that didn't exist, either, we'd use the built-in,
which is relative. so we'd query QT_INSTALL_PREFIX ... without the /get,
which is technically wrong.

this doesn't currently matter, as all groups have the same built-in
defaults anyway, but it may (hint hint) matter later on.

Change-Id: I5a3746e80ca1bfbf2f37db3604cc351bddeacd94
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2015-02-02 11:14:32 +00:00
Oswald Buddenhagen
f1836ecaf7 less preprocessor magic relating to qmake build
it's not worth making things more complicated to remove the duplication of
one real LOC.

Change-Id: Iddbd0db7d0f81b80192b3980dbe2316b246a3b57
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2015-02-02 11:14:29 +00:00
Oswald Buddenhagen
afd40dd123 avoid direct use of QLibraryInfo as much as possible
Change-Id: Ic1f5f5167181b15bc67bf4c6a1001532d0058b45
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2015-02-02 11:14:27 +00:00
Oswald Buddenhagen
44fca87241 complete reversal of adding QLibraryInfo to the bootstrap library
amends 684028a64.

Change-Id: I8dcc4b74c4c0328c07711cd7253ff19a74ea2fbf
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2015-02-02 11:14:25 +00:00
Oswald Buddenhagen
8e98a07b30 silence msvc warning 4996 while bootstrapping qmake as well
amends 0a76b6bc7f.

Change-Id: I5fc65a5ed71727d3e291ceda5877aa3586611846
Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2015-02-02 11:14:22 +00:00
Allan Sandfeld Jensen
9be87085d8 Only use 32bit version of qPremultiply
With auto-vectorization enabled in QtGui, the 32bit version of
qPremultiply is faster than the 64bit version since it can be vectorized
wider (4x on 128bit as opposed to 2x). Since all our important 64bit
targets have SIMD, that makes the 64bit version pointless.

Change-Id: I4e9070a3a3c8e2b54f17a95ba0aee0405cbb8ec9
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2015-02-02 11:14:00 +00:00
Allan Sandfeld Jensen
2e2df81537 Only use Xft font settings as defaults, and let fontconfig override
On a GNOME or UNITY desktop, Qt will currently read font-settings from
Xft and use those ignoring any fontconfig instructions. This patch
changes the behavior so the Xft settings are only used as default, but
any explicit overrides by fontconfig will take precedence.

Task-number: QTBUG-43660
Change-Id: Ie10d5828cbfdd95fe5364c63a625d455d9213936
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
2015-02-02 09:09:30 +00:00
Marc Mutz
1749c1dd42 Centralize use of __attribute__((noinline))
There are currently only two users, but I have patches in
the pipeline which mark some other function noinline, so
proavtively centralize the ifdef'ery involved.

Change-Id: I1f02351fdc903d4e026089e12b8a976ed6a8d603
Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-01-29 13:42:07 +00:00
Marc Mutz
7b5ba56b0a QString: optimize multiArg()
The function used a QMap<int,int> to map the %n's to the index
in the args array.

By way of construction, the key was sorted in ascending order
while the values, initially all -1, were later reassigned to be
0...map.size()-1, ie. std::iota().

The only information this data structure stores is therefore
the sorted %n's. For that, a sorted vector is a vastly superior
data structure.

Go one step further and use QVarLengthArray to avoid
allocating any memory for the common case of just a few
placeholders.

As an artifact of the underlying refactoring, the management
of that data structure has been moved to a separate class,
ArgMapper.

Runtime for the following test from tst_qstring:

    QString str("%1 %2 %3 %4 %5 %6 %7 %8 %9 foo %10 %11 bar"); // not timed
    str = str.arg("one", "2", "3", "4", "5", "6", "7", "8", "9");
    str = str.arg("ahoy", "there");

went down from 2.2us to 1.5us.

Change-Id: Ic552615fbac646b78ba05eb4e3215e63d202fd94
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2015-01-29 13:41:56 +00:00
Marc Mutz
72c456909c QString: reduce template bloat
Reduce the number of (non-regex) splitString instantiations from
six to two by:

- Passing separators by (const QChar*, int) and using qFindString()
  instead of indexOf()
- Passing QString as QStringRef when the output is QVector<QStringRef>.
  Doing so also allows to drop the MidMethod template parameter since
  QString::midRef() is no longer being used.

(Somewhat disappointing) effects on Linux GCC 4.9 stripped release builds:
 text   -500B
 data    +-0B
 relocs  +-0

Change-Id: Id89e2814d5f7da5170181d863167517943c2e0cd
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-01-29 13:41:47 +00:00
Frederik Gladhorn
55162dae7e Merge remote-tracking branch 'origin/5.4.1' into 5.4
Change-Id: Idadb5639da6e55e7ac8cc30eedf76d147d8d5d23
2015-01-29 10:05:01 +01:00
Konstantin Ritt
131b3cffc8 [QSSL] Pass params of shareable type by const-ref rather than by value
Change-Id: I9c09a3e2dfb90eb22d4509ac6c450a0bb5da48f6
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Reviewed-by: Richard J. Moore <rich@kde.org>
2015-01-28 17:05:44 +00:00
Raphael Kubo da Costa
f99b3719f0 qlogging: Fix build on FreeBSD after 63cd16d.
pthread_getthreadid_np(3) is defined in pthread_np.h, not pthread.h.
Additionally, it was added during the FreeBSD 9 time frame, so add a
version check to use it only when we know it is present.

Change-Id: I4d716d9bfb189d10128b6d458a47045e130b51e8
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2015-01-28 16:12:14 +00:00
Raphael Kubo da Costa
b1220f7f73 corelib: Fix a faulty 5.4->dev merge.
Commit b6191b16 ("Merge remote-tracking branch 'origin/5.4' into dev")
merged commit 350c60b ("Link against QMAKE_LIBS_EXECINFO when using
backtrace(3)") into the dev branch, but the conflict resolution left out
the actual line that changed LIBS_PRIVATE.

Change-Id: I6e716ed375abdc534a1f20e412ce7c56ee85d6c0
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
2015-01-28 15:51:44 +00:00
Frederik Gladhorn
a275e1c1d9 OS X: Fix QWindowSystemInterface::handleExtendedKeyEvent
In d7ca800a87 another parameter was
introduced to unify ShortcutOverride. The call to it in qnsview.mm
accidentally passed false as last parameter which would go to count
instead of tryShortcutOverride. The patch wasn't released yet, so this
regression doesn't need a change log entry.

Thanks to Felipe Seoane for spotting this!

Change-Id: Ide2211806caf742d649e0d5dadcc47fd032d2cdf
Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
2015-01-28 15:48:43 +00:00
Lars Knoll
bcf6a3eb34 Remove unused class QPaintBuffer
The class hasn't been used for a while anymore. Since it's
private, simply remove it from QtGui.

Change-Id: Ia0911d1c8b8836d963a51c8e354c96bc1ee4093f
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
2015-01-28 15:44:18 +00:00