Commit Graph

19350 Commits

Author SHA1 Message Date
Michael Palimaka
9de7b4d750 Canonicalize inputs when filtering default system paths
Contrary to expectations, various <foo>-config tools sometimes spit out
denormalized paths, which breaks the text-based filtering, as it relies
on exact matches with normalized paths.

Change-Id: I0613ed24953a3bde19939d28d09572c88b43a361
Task-number: QTBUG-39216
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2014-07-15 20:18:59 +02:00
Jerome Pasion
0e4807455a QDoc: Allow QDoc to collect all QML basic types in a map.
-needed if a list of just QML basic types is needed.
-adding QML basic types to map of QML types.
-generating the list of "qmlbasictypes" also now supported.
-part of the fix for QTBUG-32871

Change-Id: Id291982a5684645b2b5e75256be673c1701e60b1
Task-number: QTBUG-32871
Reviewed-by: Martin Smith <martin.smith@digia.com>
2014-07-15 14:13:07 +02:00
Andrew Knight
4aec47b1eb windows: Fix ANGLE function resolution in static builds
The EGL/GLES functions are now resolved statically when needed.

Task-number: QTBUG-40199
Change-Id: I58c675b1c410708237475e1e5d6609ca7d6713f1
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2014-07-15 13:23:58 +02:00
Kai Koehne
87aceebf42 QDebug: Add resetFormat()
Similar to QTextStream::reset(), this resets the stream format to the
defaults. Its primary use is inside custom operator<< implementations,
where you'd want to have a fixed format regardless of the current
stream state.

Change-Id: I421d76c61f164579bb90cf4195cc5376e2dcf0f3
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2014-07-15 13:06:38 +02:00
Friedemann Kleint
45854c75aa QGroupBox: Exclude top level widgets from child event handling.
Prevent the QGroupBox from changing the enabled state of
dialogs parented on it.

Task-number: QTBUG-40132
Change-Id: I91cc6ccf5ade0b3a491020ed947d4aceca62d7b6
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
2014-07-15 11:24:47 +02:00
Frederik Gladhorn
08fd2a724d Remove outdated comment
Change-Id: I4d662318acf072ce9cbfd9c024f5316a0617f2e6
Reviewed-by: David Faure <david.faure@kdab.com>
2014-07-15 11:04:24 +02:00
Friedemann Kleint
b62e22c1d9 Fix current directory setting in manual dialog test.
It was always constructing a QUrl from the string causing the warning
"Non-native QFileDialog supports only local files" with the
new QUrl-based implementations of getOpenFileUrl(), etc.

Change-Id: Idd9bb432a48865df137f8f39f53014dda150ffe9
Reviewed-by: David Faure <david.faure@kdab.com>
2014-07-15 10:40:40 +02:00
Kai Koehne
0fe2713e26 Improve QLoggingCategory example code in documentation
Don't use a qt.* category in the user documentation: These should be
reserved to Qt internal use, and also have special semantics (QtDebugMsg
by default off) that might lead to confusion.

Also, adapt the camel case naming convention for logging categories
defined by the macros. This was the (although somewhat controversial)
result of a recent discussion on the development mailing list.

Change-Id: Ic7162b47bb2d76550c766bc40dd65ce039e7e3eb
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
2014-07-15 10:01:29 +02:00
Olivier Goffart
3b0c2b7c1b Examples: Add Q_DECL_OVERRIDE to overridden functions
Q_DECL_OVERRIDE (which expands to 'override' for supported compiler)
helps to declare the intent (that it is an overridden function) and
force compilation error when there is no such virtual function in the
base class.
The examples should show the best practice of having it, as it may save
the programmer quite some time in case of change of API or typo in the
function name or arguments.

This change was done automatically with
clang-modernize -add-override -override-macros

And fixed MSVC compilation by removing inline for TorrentViewDelegate::paint

Change-Id: Ice66ae93fae571266f908703d5b8892b2c1ebb1a
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
2014-07-15 08:44:44 +02:00
Axel Rasmussen
6d87e3ed40 Rename QPixelFormat enum value to avoid conflict with X.h.
This commit fixes a potential compile error where pixelformat.h would
not compile if X.h from x11proto was included first, since X.h #define's
GrayScale as an integer constant.

Task-number: QTBUG-40087
Change-Id: I7208a204259c6d3a13b5d0cbc98a76bb54b8b494
Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
2014-07-14 23:03:18 +02:00
Thiago Macieira
8e69a03921 Doc: update QCoreApplication to be clear that we don't support text UI
Change-Id: Icc032470629201668c085fd74725a2965f09eb47
Reviewed-by: Martin Smith <martin.smith@digia.com>
2014-07-14 21:41:44 +02:00
Jerome Pasion
d4cd55daa2 QDoc: Prevent QDoc from outputting the brief for example pages.
Example pages' \brief do not form a complete sentence. The example
pages have proper introductions and descriptions, unlike API pages
which do use the brief information to summarize.

Change-Id: I11f1362cd05e3cf90ae8e1c3a07d2584737fd89c
Reviewed-by: Martin Smith <martin.smith@digia.com>
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
2014-07-14 17:18:19 +02:00
Shawn Rutledge
3f47becec0 Merge "Merge remote-tracking branch 'origin/5.3' into dev" into refs/staging/dev 2014-07-14 16:44:12 +02:00
Kai Koehne
f6940a7081 QLoggingCategory documentation improvements
Change-Id: I9cc16d01f62d94fa3e7869bf9bb7734c774f82e3
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2014-07-14 16:44:07 +02:00
David Faure
439ee03fc5 tst_qfiledialog: ease debugging of "directoryEntered not emitted".
It can happen when the sidebar only has only one item, due to
"My Computer" being missing.

Change-Id: I2b38fef45139f1dfa20d88059e56185c3163a833
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2014-07-14 12:02:34 +02:00
David Faure
564eaa6640 tst_qfiledialog: extend reject-test to test getOpenFileNames etc.
So that this method is at least called once in the test :)

Change-Id: I3b5fc6b7c464d9e56264c709cfa313d475004207
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2014-07-14 12:02:20 +02:00
Friedemann Kleint
eb66916082 Fix some compiler warnings in benchmark tests.
main.cpp(332) : warning C4307: '*' : integral constant overflow
tst_qpainter.cpp(1293) : warning C4305: '+=' : truncation from 'double' to 'float'
tst_qpainter.cpp(1474) : warning C4305: '+=' : truncation from 'double' to 'float'
tst_qtbench.cpp(155) : warning C4267: 'initializing' : conversion from 'size_t' to 'int', possible loss of data
main.cpp(68) : warning C4189: 'fontHeight' : local variable is initialized but not referenced

Change-Id: If6aadd50df7c5cf7d0f33791c9247730a47ddd27
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2014-07-14 10:55:55 +02:00
Frederik Gladhorn
7c495cfea9 Merge remote-tracking branch 'origin/5.3' into dev
Conflicts:
	src/gui/text/qfontengine_qpf2.cpp

Change-Id: Ib04f92c41d0edd55d3aef8fb1708d917fba0f2a8
2014-07-14 10:35:51 +02:00
Friedemann Kleint
a55b01e038 Stabilize tst_QMenu::statusTip().
Instantiate the timer on the stack to prevent it from
interfering with other tests.

Change-Id: I91ffe23b502fcddaeb6d6d3f89ea3d27b083cdb0
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2014-07-14 10:30:48 +02:00
Christian Strømme
b61ee210e6 Android: Simplify the jni code in QtAndroidClipboard
Let the QJNI classes manage the jni environment and cache the jni
handles. This lets us lazily cache the jni handle until we actually
need them.

Change-Id: Iced91e7cab19bdcab8581e94c6f2dd766fed47ed
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
2014-07-14 02:25:29 +02:00
Christian Strømme
1220a87f8a Android: Simplify the jni code in QAndroidPlatformServices
Remove the use of QtAndroid::AttachedJNIEnv and lazily cache
the openURL() methodID on first use.

Change-Id: I601d13bc7d644d7cb2f78655ad40c7d9566cf3cb
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
2014-07-14 02:24:57 +02:00
Christian Strømme
c4b1fffb22 Android: Update QSslSocketPrivate::fetchSslCertificateData()
Replaces the raw jni calls with our own jni wrappers. This allows us
to make use of the centralized cache, avoid global data storage and
use a more optimized way to attach to the jni environment.
This change also removes the JNI_OnLoad() function since it's not
used. If we need to add a JNI_OnLoad() function later, we should find a
more suited place for it.

Change-Id: Id84ead10c27d03d19c160304b1f9853b381a103c
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
2014-07-14 02:24:36 +02:00
Jędrzej Nowacki
607462019a Speedup qDebug() << QDate(...)
We really do not need to do string parsing there.

Change-Id: Ie2277d9ff0d0445285b7108023941af111d9baca
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2014-07-14 00:11:35 +02:00
Olivier Goffart
b6bce68a64 Logging: fix support for %{time format} in QT_MESSAGE_PATTERN
This revert commit de1d5815c1 which
wrongly fixed a typo. There is no typo because we use startsWith
with that constant.

Also added a test because the %{time} support was added in commit
93563952d0 but the test was missing

Change-Id: Ic96e6f21f989ca3a2905ec6c89b93d2627b77b40
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
2014-07-13 18:20:42 +02:00
Olivier Goffart
9bb493e724 tst_qlogging: put the test for QT_MESSAGE_PATTERN in a data function
Change-Id: I9130b91dfe6bf1ee22431a423ec2d2f9ad62144a
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
2014-07-13 18:20:38 +02:00
Giuseppe D'Angelo
e7665fd8e4 Revert "QRegularExpression: lock a mutex only if there's actual work to do"
Blunder -- two threads may step into this method together,
both see not studied, and both study (with one leaking its study data).

This reverts commit 5fbd787cf9a72621d66604a4898f06ea4365226e.

Change-Id: Ia746925abcad1e43adf4f6f1d495b018de022b07
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2014-07-13 17:07:52 +02:00
Olivier Goffart
12a4db710e Revert "Session management for OS X"
Broke tst_QMenu::statusTip by closing the menu while it should not. (and therefore, a QTimer::singleShot that fires while following test are running is making the test fail)

This reverts commit 50c04d6318.

Change-Id: Ib4ef8190f945b915fe268745cc64d471994c5e2d
Reviewed-by: Richard J. Moore <rich@kde.org>
2014-07-13 13:48:19 +02:00
Thiago Macieira
d88e4edcd5 Work around ICC bug in brace initializations containing constexpr
ICC miscompiles this:

struct Inner { int i; constexpr Inner(int i) : i(i) {}};
struct Outer { Inner i; };
const Outer x = { -1 };

(Inner = QBasicAtomicInt; Outer = QtPrivate::RefCount, then again for
QListData::Data)

We expect x to be placed in read-only memory and require no load-time
constructor. ICC unfortunately does not do that. By adding a constexpr
constructor to Outer, it starts behaving like we expect it to, but falls
apart again if you do "const Outer x[]" (the QArrayData statics).

The solution is to probably make the varaibles constexpr too, but that's
a job for the development branch.

Intel issue Id: 6000056211
Intel bug: DPD200534796
Change-Id: Ie9fb5428106486254b7329403890754f300d58c1
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2014-07-12 17:36:46 +02:00
Nico Vertriest
b6d50e2aa6 Doc: edited qtxml.qdocconf
Added dependency for Qt Widgets

Change-Id: I36fbec0738f5671a07b9dd18fc4487573c560cd2
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
2014-07-11 13:45:54 +02:00
Shawn Rutledge
5c92d21cce xcb: QTabletEvents and proximity events correctly identify the tool
The tool is enum TabletDevice reported in QTabletEvent::device().
Each type of tool for each type of tablet has an ID which needs to
be mapped to this enum.

The meaning of the AbsWheel valuator depends on the tool type:
an airbrush sends tangentialPressure in the range -1..+1,
whereas an Art Pen (RotationStylus) sends rotation in degrees.

Because the evdev driver sends valuator changes individually, we
have to store the current value in each TabletData::ValuatorClassInfo
to ensure that each QTabletEvent has complete state information.

[ChangeLog][Platform Specific Changes][X11 / XCB] QTabletEvents
and proximity events correctly identify the tool in use; the
meaning of certain valuators depends on the tool; and the valuators'
current values are not lost between events

Task-number: QTBUG-39666
Task-number: QTBUG-39573
Task-number: QTBUG-39570
Change-Id: I6be242ee57e2ad0848060e04f20c0dd08954a734
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
2014-07-11 11:10:51 +02:00
Christian Strømme
ff7fdf78ef Android: New bearer plugin
Replacement for the the generic bearer plugin.
Compared to the generic bearer engine, this plugin provides a more
detailed overview of the network configurations on Android.

Added features are:
- Correct bearer type, also for mobile connections.
- Connection state (e.g., roaming).
- Data statistics (On devices that supports it).
- Polling is not required.

Change-Id: I728cb91e04a66343648c0add6be2a003caca0f1f
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
2014-07-10 23:09:31 +02:00
Samuel Gaist
50c04d6318 Session management for OS X
This patch aims to implement the session management available on OS X.
Currently applicationShouldTerminate is just a go through that closes
everything and ends the application. The new implementation calls
first appCommitData and cancels the termination properly if required.
This means that if a user wishes to logout, Qt applications can now
cancel that like e.g. answering to Safari asking whether it is ok to
close because of a number of opened tab/window.

Task-number: QTBUG-33034
Change-Id: Icedc8590a1c0934d9bc87d3a43d6702a9903bfb8
Reviewed-by: Jake Petroules <jake.petroules@petroules.com>
2014-07-10 21:54:19 +02:00
Andrew Knight
53ed4de022 winrt: Clean up platform message dialog helper
- Remove "Platform" from class name for consistency
- Use ComPtr and HRESULT checking where missing
- Use UICommand ID class to reduce callback complexity
- Use dialog completed callback to fix failed repeated dialog opening

These changes have been tested with the QtQuick.Dialogs message dialog
example, and all features appear to be working. Note that the WinRT
dialog supports a maximum of three buttons, though, and a warning is
printed if this number is exceeded.

Similarly to Android, the native hooks can be now be disabled by
using qputenv("QT_USE_WINRT_NATIVE_DIALOGS", "0").

Task-number: QTBUG-38115
Task-number: QTBUG-39868
Change-Id: I9943c7c11bd640790db68219cefdca1a680e96ec
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@digia.com>
2014-07-10 21:37:25 +02:00
Andrew Knight
fff0844735 winrt: Introduce theme palette
Use the colors returned by WinRT's UISettings class to construct the
system palette.

Change-Id: Id0d99c7b2e3df209de0755ee72a0d2bda67fda8c
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@digia.com>
Reviewed-by: Jochen Seemann <seemann.jochen@gmail.com>
2014-07-10 21:37:18 +02:00
Andrew Knight
bb5b25e40d winrt: Clean up platform theme
- Drop "Platform" from class name for consistency
- Move styleHint() into theme class for better code reuse
- Use ComPtr and result checking
- Remove obsolete WinRT ifdefs

Change-Id: Id26bd75739a9665f61ee2e70eb3fb36747b75410
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@digia.com>
2014-07-10 21:37:05 +02:00
Philippe Lelong
4a1120a2f1 Fix various issues with qandroidstyle
-Add style for checkable QGroupBox
 -Add style for checkable QItemView
 -Fix QSpinboxes contents size and position
 -Fix QTreeView and QTableView headers size and position
 -Fix Slider thumb position incorrect if minimum is not zero
Task-number: QTBUG-38717
Task-number: QTBUG-38325
Task-number: QTBUG-37965
Change-Id: I737f8d6f2d1c25d16aca0ce5de6b81884839409d
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
2014-07-10 16:53:11 +02:00
Eskil Abrahamsen Blomfeldt
0cbebb21cc Android: Prefer "Droid Serif" as default serif font
I've also updated the qfont test so it passes on Android now. Note that
there are no suitable cursive/fantasy fonts on Android, so the regular
default "Roboto" (or "Droid Sans" on older devices) will be picked here
instead.

[ChangeLog][Android] Fixed font selection to prefer "Droid Serif" when
Serif style hint is set on QFont.

Change-Id: I294eebcc4d79410e435bdddce552acc6044753b2
Reviewed-by: Christian Stromme <christian.stromme@digia.com>
2014-07-10 16:23:50 +02:00
Aleix Pol
52eccc6cfa Introduce a new warning in moc, to notify about duplicated properties
At the moment, it's possible to have 2 properties with the same name,
which doesn't make much sense. Notify the user about that so she can
react on it.

Change-Id: I4865b71730921b79ce9dd8abb0cc760b3f1dbfd8
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
2014-07-10 16:10:59 +02:00
Ivan Komissarov
e899693aa4 Fixed wrong function name in a file snippet
Change-Id: I453c5085685badeb6577009a0c6935dfe384258f
Reviewed-by: Richard J. Moore <rich@kde.org>
2014-07-10 16:04:13 +02:00
Yoann Lopes
dddd5ebb08 Android: enable FBO readback workaround for more devices.
Now enabled for all devices equipped with a GPU from the Mali-4xx
series or Adreno 2xx series.

Task-number: QTBUG-40131
Change-Id: I2923c07033ef768aceec6f5590dbb6f26aa67087
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
2014-07-10 16:00:28 +02:00
Jorgen Lind
0af228700e Make QWindow::close go through the QWindowSystemInterface
This causes a closeEvent to be sent for all calls to close.

As a side effect destroy now handles more of the state in
QGuiApplication.

[ChangeLog][QtGui][QWindow] QWindow::close() sends a QCloseEvent
which must be accepted before destroy() will be called. destroy()
is the function to close the window without confirmation.

Task-number: QTBUG-40093
Change-Id: I1ce09da4940fc29fae8decf40548a42e3bec6eca
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
2014-07-10 15:39:38 +02:00
Jerome Pasion
c05fd55b96 QDoc: Edited title generation for QML and C++ API pages
-added "QML Type" for QML types
-reworded basic type pages by adding "QML Basic Type" at the end
-streamlined variables in QDoc related to the HTML and page titles.

These two changes were implemented in 5.3 branch, but got lost during
the merge into dev:
1243940f83
8e5e9d7987
This commit restores the changes while ammending similar fixes

Change-Id: I996b18f020b392aceeb40da7797838aca4a0626f
Reviewed-by: Martin Smith <martin.smith@digia.com>
2014-07-10 14:05:33 +02:00
Frederik Gladhorn
c10ba1ada0 QAccessible::PushButton is deprecated in favor of just Button
Change-Id: I2878a28f18f3a004705ec50f616846f6cd00eed1
Reviewed-by: Timur Pocheptsov <Timur.Pocheptsov@digia.com>
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
2014-07-10 13:33:23 +02:00
Andras Becsi
8663ccb039 Add support for querying "eglconfig" through the xcb native interface
We already support this for eglfs but for a desktop Qt configured with
-opengl es2 we need to expose it through xcb as well.

Change-Id: I36d0e255d8c86cc1cec56015f33470f61d7df466
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
2014-07-10 13:26:26 +02:00
Jędrzej Nowacki
c587e5a4da Improve QString::arg test
The function gives a warning if an argument doesn't exist.

Change-Id: I6a4bbbaf2fd241ced06dc71edfe4ef69732606d1
Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
2014-07-10 13:14:51 +02:00
Jędrzej Nowacki
3746eedeab Update QVariant tests
Remove old message handler hack as we have a new and better api to
ignore warning messages.

Change-Id: Id967b2672fe3e3638db9977500118a19c2afb730
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2014-07-10 13:14:40 +02:00
Frederik Gladhorn
776ddcab2c Merge "Merge remote-tracking branch 'origin/5.3' into dev" into refs/staging/dev 2014-07-10 13:13:55 +02:00
Eskil Abrahamsen Blomfeldt
5834360741 Fix fallbacks for adapted common script
When the platform plugin gives us specific fallbacks for a
specific script, we need to respect this, and load the correct
font family regardless of which writing systems it supports.

This is especially important since the common script is adapted
to match surrounding, proper scripts, so characters such as
digits next to e.g. Hebrew text will be marked as Hebrew. On
stock Android, there is a single Hebrew font, and this would
previously be put in all fallback slots for Hebrew regardless of
what fallback fonts were dictated by the platform plugin. Since
this font does not support the digits, they would show up as boxes.

[ChangeLog][Android] Fixed common characters like digits and
punctuation showing as boxes when positioned next to non-latin
scripts.

Task-number: QTBUG-39377
Change-Id: I1555e208a8ddc587c0bbdbfff1600cafdd9442e9
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
2014-07-10 12:38:36 +02:00
Frederik Gladhorn
f035786021 Merge remote-tracking branch 'origin/5.3' into dev
Change-Id: Ia12ffdb27ecdf25c2a2bdb0eed1945387502108a
2014-07-10 10:11:11 +02:00
Eskil Abrahamsen Blomfeldt
1dd9a0af4f Fix fallbacks for adapted common script
When the platform plugin gives us specific fallbacks for a
specific script, we need to respect this, and load the correct
font family regardless of which writing systems it supports.

This is especially important since the common script is adapted
to match surrounding, proper scripts, so characters such as
digits next to e.g. Hebrew text will be marked as Hebrew. On
stock Android, there is a single Hebrew font, and this would
previously be put in all fallback slots for Hebrew regardless of
what fallback fonts were dictated by the platform plugin. Since
this font does not support the digits, they would show up as boxes.

[ChangeLog][Android] Fixed common characters like digits and
punctuation showing as boxes when positioned next to non-latin
scripts.

Task-number: QTBUG-39377
Change-Id: I1555e208a8ddc587c0bbdbfff1600cafdd9442e9
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
2014-07-10 10:01:49 +02:00