When the QWidgetWindow receives a resize or move event, it should check
with the widget if its crect already has this geometry. if not then send
the resize or move event
Ideally events should be sent whenever the QWidgetWindow receives them.
QTBUG-42383 is created for this problem
Task-number: QTBUG-29937
Task-number: QTBUG-38768
Task-number: QTBUG-30744
Change-Id: I1e9a5d25de29a98885edece927ba14d7a763eb01
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
For some reason lost in time QFrame was missing that method. Of course
that led to duplicated code and to subtle sizing miscalculations.
Task-number: QTBUG-29330
Change-Id: I81163f5def6661e01cb2ecc49c1169449a3e3758
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
This test shows a behavior change of setFrameStyle(QFrame::WinPanel)
between 4.4 and 4.5.
Turns out that 4.4 defaulted to "Raised" only via a side effect of the
code, while 4.5 defaults to "Plain" which makes more sense since Plain
is the default anyway. So there is no actual bug to fix (the app code
really meant QFrame::WinPanel|QFrame::Raised anyway), but the unittest
is still good to have for the future.
Done-with: David Faure
Change-Id: Icf16382504b18357256bc601b1e865abac9f2b2a
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
This avoids the creation of demos-manifest.xml if there
are no demos in the repo.
Change-Id: I4d3bbe4540f4b1532c0d51f62b8d1494864a7b1c
Reviewed-by: Martin Smith <martin.smith@digia.com>
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
This makes is possible to generate a valid D-Bus XML from a class that has
e.g. internal slots with pointer parameters by explicitly marking all D-Bus
exports with Q_SCRIPTABLE and running qdbuscpp2xml with the '-a' switch.
Change-Id: Iab32a0a7f46f2516f6385808bbf35b26c7708b1a
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
The latter name was used by Apple in their internal AArch64 LLVM backend,
but has since been merged into LLVM upstream and renamed to AArch64.
https://github.com/llvm-mirror/llvm/commit/29f94c72014eaa5d0d3b920686e68
Change-Id: I319f42f07c95dfbcd121134fbe6e554e2d36453d
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
The recent NDKs have included the 4.9 version of the gcc toolchain,
so we default to that instead of 4.8. This is also required for building
for 64-bit targets, since the other toolchains do not support that.
Change-Id: Id6908eb41c8e7cf003a9b134607ab2e55cb489e9
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: BogDan Vatra <bogdan@kde.org>
Do not clear the QLibrarySettings configuration information already
in ~QCoreApplication (via qAddPostRoutine). This fixes issues where
multiple QCoreApplication objects are created over time (in plugins).
Task-number: QTBUG-34290
Change-Id: Ib5c58f825619ede484492e057e08d73b2b4c6101
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Fixes case if custom icon size is given and height is more than width.
Check of minimum valid height was compared wrongly to width and caused invalid
vertical alignment. After fix vertical alignment is correct aligned to vertical
center with the tab text.
Change-Id: I6c4a710b15e91225edeabb629bfea7049ab2f42a
Task-number: QTBUG-42143
Reviewed-by: Timur Pocheptsov <Timur.Pocheptsov@digia.com>
Reviewed-by: Jens Bache-Wiig <jensbw@gmail.com>
The private was not deleted. Adding the dtor in turn
causes a warning about not having a virtual dtor
in the base class, so add that as well.
Change-Id: I24a90caf2cf6192a6f17cf5af96b8f77010d9127
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
This key combination should open the context menu.
Task-number: QTBUG-40085
Change-Id: I7cfc89f766b3734b9fb9d3c9135b4896ffbadb5b
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
Two fromstrerror_helper overloads are defined, to manage the fact that
strerror_r returns an int or a char* depending on the system. The problem
is that then only one overload used (again, depending on the actual
stderror_r return type), leading to one of the two overload to be unused
and thus triggering the unused function warning.
kernel/qsystemerror.cpp:64:27: error: unused function 'fromstrerror_helper' [-Werror,-Wunused-function]
static inline QString fromstrerror_helper(int, const QByteArray &buf)
Change-Id: I6a1c8e1a4b7d14068b682db26002ff68ad36167c
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
The result of pressing the key is still a Qt::Key_Return press/release
sequence, which needs to be handled manually.
Change-Id: I72c7b0067bd3ec1bc315ab2c84361800b7be0943
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
Reviewed-by: Marius Bugge Monsen <marius@cutehacks.com>
The technique of sending an action does not always end up at the actual
first responder, but it will end up in a responder in the responder
chain of the first responder, so we continue searching the subviews
recursively until we find the real first-responder.
Change-Id: I6abc9bc18eb127fa4b317cd308783c0ecfcd670a
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
Instead of faking it, by returning YES for isFirstResponder, which caused
issues when iOS would try to dismiss the keyboard by resigning the true
first-responder.
Change-Id: I816c4cf9c699d72995ce7968e1f1a4aa9c9c167e
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
In the non-native QFileDialog, a QSplitter separates the two central
views (the list view of "places" and the tree view for navigating
the file system).
Unfortunately, that splitter allows sections to be collapsed,
resulting in a weird status where the user doesn't
understand what has just happened and thinks that (s)he may have
broken something. Worse, that gets actually saved into the
application settings, so the splitter may stay collapsed forever.
Instead, let's simply prevent sections from being collapsible.
Task-number: QTBUG-19467
Change-Id: I11ff7c55a5535680a3edce5f4e70c9338291b94f
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
The old designer generator inserted stray spaces etc.;
save it again with the new designer to fix those.
Change-Id: I3890dd942970d9da71582ccb70b75d59888304bf
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
1. Add comment about the magic TYPE_NUMBER_VARIATION_PASSWORD value.
2. ImhHiddenText, ImhNoPredictiveText and ImhSensitiveData should all
disable suggestions.
3. Only ImhSensitiveData sets TYPE_TEXT_VARIATION_VISIBLE_PASSWORD
4. Don't OR date and time to get DateTime...
Task-number: QTBUG-38080
Change-Id: If456563983130e9af409ffa8cb717ddf259f1d6b
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
The JNI environment should be managed by QJNIEnvironmentPrivate
directly or through QJNIObjectPrivate. There is also a clear
difference between calls coming from or going into Java code.
Calls coming from Java already comes with the 'right' environment and
in most cases no extra considerations or set-up is needed.
Change-Id: I92d935ddfb70332041869185d5a92438930ff9b9
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
This is one of several fixes where the goal is to simplify the jni code
by letting QJNI manage the environment.
Change-Id: Ia714e25fbb3fcd170150392e822b0a3fc3812818
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
Let the QJNI classes manager the jni environment and caching of jni
handles.
Change-Id: I8c238375026adf449d6e6e2b521caa6cd63a0fb4
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
Enables QRunnables to be run on the UI thread. For now this function
is only intended for internal consumption.
Change-Id: I5e2abb06104219a9dd55b3308113056e4da5fa07
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
Follow the same convention as other functions using the QMetaTypeSwitcher
It was not a problem since none of the built-ins type in QtWidgets
or QtGui were pointer and could not have a QMetaObject. But since
we want to register the metaobject for Q_GADGET, it would fail compilation
as types like QFont are not defined in QtCore.
Change-Id: I6307bf6f25439ed48355ef7ecfa60575de318a25
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
When sending a second request with implied credentials the connection
used may be cached as a connection without credentials, and thereby
incorrectly reused later for other connections with different implied
credentials.
This patch updates the credentials a cached http-connection is using
before sending a request on it.
Task-number: QTBUG-39456
Change-Id: I1609234136a89c32e00432a67720cd62a73a488a
Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
This makes the GLSL compiler issue correct line numbers on errors
even in the presence of the other preprocessor lines inserted by
QOpenGLShaderProgram/QGLShaderProgram.
Change-Id: Ief4fc1dd1e94bb2b3a1ad13fbaf62186910a4994
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Gtk library usually takes care of this when the main
Gtk loop ends, but since Gtk's main even loop is not
used in QGtk2Dialog we have to store clipboard's content
with help of gtk_clipboard_store(). This function
sends a SAVE_TARGETS request to X11 clipboard manager
to save clipboards contents as required by ICCCM.
Task-number: QTBUG-34475
Change-Id: If784c425ea4a36ec1c3a8ddc0cdec080f57681a5
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
qglxintegration.h:78:17: error: private field 'm_screen' is not used [-Werror,-Wunused-private-field]
Change-Id: I7ffeda1dd4be962a4bfb43ebd3aa1dbd969a9837
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
Of the const overloads that return a QString or a QByteArray, this is
one that gains the most benefit. It happens often in constructs like:
QByteArray s = x.readLine().trimmed();
After this change, 41 out of 103 calls to trimmed become rvalue in Qt
and 272 out of 441 in Qt Creator. For simplified, the numbers are 27 out
of 69 in Qt and 10 out of 19 in Qt Creator.
Other candidates are left, right, and mid, but there are exactly zero
uses of left, right and mid on an xvalue QString or QByteArray in Qt.
I'm being lazy and using qstring_compat.cpp to store the QByteArray
compat methods.
Change-Id: I4e410fc1adc4c761bb07cc3d43b348a65befa9f6
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Note that at one point we need to use Cocoa to render the combo box, but
only if we're dealing with Qt Quick controls.
Also worth noticing, there's currently a bug in Cocoa when rendering
inactive combob boxes. We faithfully reproduce it in Qt for now. We'll
fix it when Apple does.
Finally, we need to start constraininig the combo boxes height. Cocoa
has not supported variable height combo boxes for years, and will even
spit the following warning if we try to do something smart.
This application is trying to draw a very large combo box, 28 points
tall. Vertically resizable combo boxes are not supported, but it
happens that 10.4 and previous drew something that looked kind of sort
of okay. The art in 10.5 does not break up in a way that supports that
drawing. This application should be revised to stop using large combo
boxes. This warning will appear once per app launch.
Task-number: QTBUG-40833
Task-number: QTBUG-42067
Change-Id: I6512a6a581d446a28585db22fe4dbeac09499321
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
Defaulting to absolute_library_soname on configure -rpath is no longer
necessary as now we support @rpath install name ids on OS X and iOS.
This also sets QMAKE_SONAME_PREFIX to @rpath for Qt modules when built with
rpath configuration.
This makes Qt libraries relocatable on OS X. Qt SDK is not yet relocatable
though, because plugin location (including cocoa plugin) is still resolved
using absolute path (see QTBUG-14150), also there are several absolute paths
hardcoded in qmake mkspecs pri files.
Task-number: QTBUG-31814
Change-Id: Ie9dffefcd2a946c1580293d433621c1adb7e06c4
Reviewed-by: Jake Petroules <jake.petroules@petroules.com>
This is triggered only when app is using Qt and Qt was built with "rpath"
configuration and project does not specify QMAKE_RPATHDIR explicitly.
Added rpath is made relative to app binary location if target path lies inside
Qt SDK, so all SDK bundled tools and examples will work automatically without
any changes. Tests are an exception here, since they are being run from their
build location by CI, we may not use relative rpath that work only in install
location.
Task-number: QTBUG-31814
Change-Id: I3690f29d2b5396a19c1dbc92ad05e6c028f8515b
Reviewed-by: Jake Petroules <jake.petroules@petroules.com>
With the side-effect that variables and functions in the argument are
now "used". This means we don't need to #ifndef functions only used in
assertions: the compiler will eliminate them by dead code elimination.
Due to the mandatory short-circuiting of the condition, no functions
will ever be called and this expands to no more code than before.
On the negative side, because we won't get warnings for unused variables
initialized outside the Q_ASSERT, non-inlineable calls will not be
elminated by dead code elimination, so they will remain in release code
without warnings.
Because of the expanded code now in Q_ASSERT, the Intel compiler's
optimizer gets thrown: it complains that the non-void function is
failing to return anything, so I had to add two return statements.
Change-Id: I1bb79c9637a2771ef1ec093f901b8d2443788bd6
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
This was observed in the weather app, where sometimes we could not find
an items window. This could only be observed in the search results of
the cities. (while VKB was visible).
The old code traversed up to the QQuickListView and then it could not
traversed further up in the parent hierarchy. Because of this it
could also not find the associated window handle.
The reason for this is unknown, but maybe it could be related to the
fact that QQuickListView is a Component.
Regardless of this, invalidate the cache should invalidate everything.
We also traverse through all top level windows, but on iOS there should
not be too many top level windows...
Change-Id: I56a496435bb529a53d5ece8446cd2eeff502af84
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
I don't know why it was an #if 0. The __has_feature has been there for a
while. But, just to be sure, we check the presence of the header too.
Change-Id: I36e34c9e8fd4ce55c98966d2fad246b77eb16597
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
The libc++ header does this:
#if !__has_feature(cxx_atomic)
#error <atomic> is not implemented
So we can't enable the feature until the compiler reports true for that
test.
Change-Id: I96f1c7eea8b93d93bd721fe5a85fa987339d091f
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
QTestEventLoop::exitLoop() is used by QSignalSpy to stop event
processing when the connected signal has been received. The design
of QSignalSpy requires QTestEventLoop::exitLoop() to be
thread-safe, which it wasn't. When QSignalSpy is connected
to a signal in a different thread, exitLoop() was called from
the thread which emitted the signal and not the one in which
QTestEventLoop is running. This caused troubles when killing
the internal timer.
This patch adds a check in the beginning of exitLoop(). If
it is called from a different thread, it will post an event
into the message queue in which QTestEventLoop is running
and execute it there.
Change-Id: Icb8c8ff2f5344800ee6c6125b98c677c7a196c32
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Loading a dock window state saved by a Qt 4.2 app is not
something we need to support anymore.
Change-Id: I9ee6e2c742b31114081852e7236cfc8696b9b270
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
Tested with GCC 4.9, Clang from XCode 5.1 and ICC 15 beta.
Clang 3.5 (pre-release) cannot compile qtdeclarative yet with -Werror
due to invalid C++ code there that calls member functions on null
pointers.
Change-Id: Ic2845371a1899716985bc0813dfb820fa418e207
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Change-Id: If4d9c9c769b598a3194a7cd5bbe5c74e7650694b
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>