When the mouse moves while the sloppy menu timer is still running then it
would end up just creating a new one and the old one would continue to
run. If the action that it is relevant for is different then it should
restart the timer, otherwise it should just ignore the mouse move and let
the other timer continue.
Change-Id: Id03014fa05596bd6ede887fa917e21ca5a7690d8
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
When building a project in VS then it would cause a rebuild
under certain situations even though a rebuild is not
actually required.
The root problem exists in VS in the following configuration:
1. A file has a custom build tool specified
2. The custom build tool has additional dependencies
3. The input file is specified in the additional dependencies
4. There are files in the additional dependency list
This is the situation with form files in Qt that have include hints
specified in Qt Designer. The include hints get specified in the
additional dependencies for the custom build tool.
What happens is that VS will process files in the additional
dependency list differently based on where they appear in the list
relative to the input file.
If a dependency appears before the input file, VS will require the
file as a build input. If you just specify a file name, VS looks in
the project directory (and only the project directory) for that file.
You have to specify the path (relative or absolute) to get VS to look
elsewhere. If VS does not find the dependency, VS thinks the project
is out of date (since the missing dependency is a required build
input) and will rebuild the input file.
If the dependency appears after the input file and the file doesn't
exist, VS does not include the dependency as a build input. Since the
file is not a build input, no rebuild is required.
Change-Id: I5af460d21ad049ed7819746fd60c98677b810692
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Use the same argument name than in the header and docs -> no longer
need for the \fn command in the docs either.
Change-Id: Id84cb9298e0cb1b61df704603590d86f25323f2d
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
the redundancy is entirely unnecessary at this point.
the cmake problem that prompted the revert has been fixed long since by
commit 4f5f9331d9.
This reverts commit 215f137e29,
thus restoring 6d61dfdbb74a2055438b999c6962f89cc3388eea..
Change-Id: I94749dc18d924163e9c9add500078d88ccd00ffc
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Since there are two different Folio specifications (Adobe and Microsoft)
then we need to ensure we consistently use the same one across all
platforms. Therefore we change the one on Windows to match the
corresponding standard paper and add a note explaining how to get the
DMPAPER_FOLIO size.
Change-Id: I0f20ba5598ef8f680125fcd33dbc6924bd521d75
Reviewed-by: John Layt <jlayt@kde.org>
We only had the QApplicationStateChangeEvent to know about the
application state. Added a function and a signal to offer a more
convenient way to query the current state.
Change-Id: I926aac0b3b53bd285df5825aff5b4c37ae863d03
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
Change-Id: If725ac4e523d56a8dc274f8d6b53c0c34064ca06
Reviewed-by: Martin Smith <martin.smith@digia.com>
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
When we auto resize it is handy to be able to limit the maximum
size (just like the minimum size).
[ChangeLog][QtWidgets][QHeaderView]A maximumSize for sections
has been introduced. The maximum section size is by default
the largest possible section size which in Qt 5.2 has been
limited to 1048575 pixels.
Task-number: QTBUG-4346
Change-Id: Ida9cbcc11bd5c4498e319df2e6379c69a7033c04
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
QCheckBox cycles through the 3 states, but item delegates didn't
do that.
Change-Id: Iad1e464341033ca357925fe8064f53bb584459f4
Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
The '!' binds to a, so the comparison is not what is expected.
Change-Id: I9192d16e901a9ba6dd13625be544cce6b2fd78c6
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
This is (!a) == b which is not what is intended here.
This exact bug was fixed in a couple of other instances of the QmlJSParser
(in QtCreator and Qt itself) by now.
Change-Id: I46a50153d7c349f21e0a888e2e3b4c4fa65c27c0
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Fix compilation with e.g. mingw-builds 4.8.1-rev4 package. The Mingw-W64
headers define SHSTOCKICONINFO only for vista and newer.
Task-number: QTBUG-33225
Change-Id: I30a62c642ae017c7eafb99b1efb06578fd61a12e
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
QTEST_NOOP_MAIN was removed in Qt 5, but was still in the source of the
QProcessEnvironment auto test.
Change-Id: I0048c330c9d4e99c46192cc05ffd3b77d404fb6d
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Jason McDonald <macadder1@gmail.com>
The windowcontainer example utilzes the openglwindow example, so it
must also check that OpenGL is available.
Change-Id: I7ecb372cfd533bb56effe7c61ebee9bd53de4c54
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
The information is explaining implementation details rather than
on how to use it effectively. The size limit of QByteArray may
vary depending on available memory.
Task-number: QTBUG-33037
Change-Id: I361316422ade3624a0c2864d93f87caeb654f4d7
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
"Make QGuiApplication::exec() run within NSApplicationMain()"
"Make Qt process native and timer events on Cocoa applications"
"Cocoa: Fix QFontDialog, QColorDialog auto-tests"
This reverts commits
1e14762b8de4b2a0b4badf7944e7d7
Change-Id: I80b65b5ee0297b090f807bd420664233dfc44f7b
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
order is either Ascending or Descending (0 or 1), so this comparison is
unnecessary.
Change-Id: Ieceacf18f1bf3c7a7555205a140b738daa92bd04
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Ask for an uninitialized byte array, since we're about to memset(3) it
anyway. And don't overwrite the initial byte either.
Change-Id: I2caa2ef395ad5684416e6cd336c0444de7787b5d
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
It took me several minutes reading the code to figure out why it was
there. It wasn't immediately obvious.
Change-Id: Ic36b3fd24ce84a1b08c73986d3b7ab8a5bfff133
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
This actually looks very wrong. First, it would try to read bits for
len == 0, which means it was actually reading the implicit NUL from
QByteArray (so valgrind would never catch the error).
Second, there was a corner case for testing the 8th bit (bit 7) in the
last byte. For len == 8 or 16 at the beginning of the last loop, it
would read bits[len / 8], which is again the implicit NUL from
QByteArray.
Compare to testBit (simplified):
return d.constData()[1+(i>>3)] & (1 << (i & 7)) != 0;
Task-number: QTBUG-11625
Change-Id: Idb361163de596b629cab42f2367ddd09456c2a98
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
The check is bogus anyway. It was bogus when it was added. The bug is
not because of "GCC on IRIX", it's simply a GCC bug and was probably
tied to some GCC versions. It should have been reported and followed up.
I don't even remember what GCC versions we had on the IRIX machines
(plastkrakk, I can't remember the other two machine names). But I could
bet they were GCC 3.4 or 4.0.
Change-Id: I84ce4e1ad68bb0520b63c210f841e0c604dbd03a
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
The ! binds to a only, which is most likely wrong here.
Change-Id: I4aa09407a8acc68f97bef474781193774e4a7597
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
Before we went through non hidden indexes, but we never considered
the visual order. This patch fixes that issue.
Though it was wrong before, it probably never was a big problem
since it was unlikely that the tree (on logical index 0) was
swapped or hidden, but
658e42e77a
makes it more likely that problems with wrong focus could occur.
Change-Id: Ic7b6cd2df1f8638be1a7c9e6df27f428685869fc
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Make the documented QScopedPointer functions that take rvalue
references visible in the documentation.
Task-number: QTBUG-32675
Change-Id: If65af91d9379a6c0486e43c33434cca8505fc5c3
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
qdoc interprets the double-ampersand in function parameters
using rvalue references (e.g. 'Type &&other') incorrectly
as a logical AND operator, resulting in a syntax error.
This change works around the issue by treating '&' the same
as '*', and defining Q_COMPILER_RVALUE_REFS for qdoc.
Task-number: QTBUG-32675
Change-Id: I499611f16f22c33ff5b878da0cd59d67ddf53d72
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
Reviewed-by: Martin Smith <martin.smith@digia.com>
Since Qt5, the QMetaObject do not contains the string name of the
builtin types, but only the QMetaType id. QMetaMethod::typeName
convert back from the id to the string. But if the type is aliased,
the string of the main type is returned.
This was the case for example for qint64 which is transformed to
"qlonglong".
This causes a regression in QMetaType::invoke when trying to invoke a
method which return an aliased type, since the string comparison would
fail.
Fix the problem by also comparing the metatype id.
Changelog: QMetaMethod::invoke: Fix return of aliased meta type
Task-number: QTBUG-33222
Change-Id: Iec7b99dcbf7b23eb818de74f413e4451ce510ac4
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
eeb31ad10a changed the behavior
and allowed the placeholder text to stay visible even if the lineedit
has focus.
Task-number: QTBUG-33237
Change-Id: I733331be1d3225eb28390b21eb9a7e4971bfdc31
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
The new Cocoa event dispatcher made apparent some deficiencies in the
way the dialog helpers were being hidden. In particular, we would not stop
a dialog helper's modal loop when closing the dialog, resulting in the
auto-tests hanging. Also, since the QApplication event loop is runnig with
[NSApp run] in the stack, the previous workarounds are no longer needed.
Task-number: QTBUG-24321
Change-Id: Ifba713c286638d78a699c319a15683d09714f06f
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
Since we don't spin any QEventLoop, we need to make sure events posted
by the window system interface are processed.
Change-Id: I0e7b541d86a7a14f2ecd3702e7cbdbdee9920859
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
We follow the same pattern as for iOS and Windows ports, making
sure the user's main() runs in a platform friendly environment. In
this particular case, it means calling the user's main() during the
call of NSApplicationMain(), and calling the user's main() function
(renamed to qMain() as in Windows) after receiving
NSApplicationDidFinishLaunchingNotification. In practice, this means
that NSApp is running when qMain() is called, and therefore when
QCoreApplication::exec() is called.
For those command-line utilities running on QGuiApplication, or any
deriving class, and that do not provide a bundle, we override the main
bundle's dictionary and get NSApplicationMain() to run as usual.
Added cocoa/cocoamain "subdir" to build libqtcocoamain.a (together with
cocoa/cocoaplugin -- plugins/platforms/cocoa is made a subdirs project).
This library is linked against all GUI Qt apps and provides the actual
main() function. It also catches the launching NSApplication notifications,
and calls the user's qMain() function. Note that this will happen in the
same cases when the user's application will run with the Cocoa QPA plugin.
Launch related code in QCocoaApplicationDelegate is moved to libqtcocoamain,
QNSApplication is removed (but sendEvent: redirection still there), and
code in QCocoaEventDispatcher dealing with calling [NSApp run] and related
has been removed since it's become unreachable.
ChangeLog: [Qt for Mac] Make QGuiApplication::exec() run within NSApplicationMain()
Change-Id: I790e5138c29aac2e0215a9147d0148fece40ca22
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
Currently just a convenience method for setNameFilters(), it uses
QMimeType to create a name filter from the glob patterns and
description defined in each MIME type.
In the longer term, this API could be used to do proper mimetype-based
filtering using QMimeDatabase::mimeTypeForFile() in the builtin
QFileDialog (aka "not native"), instead of only looking at globs via the
name filters.
Change-Id: I0edccf5f30c514481b47cd100d743d1ed7a24024
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
Before:
=======
Qt User Interface Compiler version 5.2.0
Usage: uic [options] <uifile>
-h, -help display this help and exit
-v, -version display version
-d, -dependencies display the dependencies
-o <file> place the output into <file>
-tr <func> use func() for i18n
-p, -no-protection disable header protection
-n, -no-implicit-includes disable generation of #include-directives
for forms generated by uic3
-g <name> change generator
After:
======
Usage: uic [options] [uifile]
Qt User Interface Compiler version 5.2.0
Options:
-h, --help Displays this help.
-v, --version Displays version information.
-d, --dependencies Display the dependencies.
-o, --output <file> Place the output into <file>
-p, --no-protection Disable header protection.
-n, --no-implicit-includes Disable generation of #include-directives.
--postfix <postfix> Postfix to add to all generated classnames.
--tr, --translate <function> Use <function> for i18n.
-g, --generator <java|cpp> Select generator.
Arguments:
[uifile] Input file (*.ui), otherwise stdin.
Notes:
* "-dependencies" etc. still work.
* -n option still has effect, but technically not only for ui3 files
* the fact that the <uifile> parameter is optional wasn't documented
* -postfix option was undocumented
* -translate alternative for -tr was undocumented
The last two points show the benefit of using QCommandLineParser.
Change-Id: Ie05cfb9bbe50f4ac2788aa7b6011b2daa1acde6a
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Laszlo Papp <lpapp@kde.org>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
(dacf9961da)
In order to see 2 active threads, we must check activeThreadCount() before
the runnable finishes.
Change-Id: I1a48b41e0c1fd81a65d915b9bd1e741ff267ed2b
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Before:
=======
Qt resource compiler
Usage: rcc [options] <inputs>
Options:
-o file write output to file rather than stdout
-name name create an external initialization function with name
-threshold level threshold to consider compressing files
-compress level compress input files by level
-root path prefix resource access path with root path
-no-compress disable all compression
-binary output a binary file for use as a dynamic resource
-namespace turn off namespace macros
-project Output a resource file containing all
files from the current directory
-version display version
-help display this information
Undocumented: -verbose and -list !
After:
======
Usage: rcc [options] inputs
Qt Resource Compiler version 5.2.0
Options:
-h, --help Displays this help.
-v, --version Displays version information.
-o, --output <file> Write output to <file> rather than stdout.
--name <name> Create an external initialization function with <name>.
--root <path> Prefix resource access path with root path.
--compress <level> Compress input files by <level>.
--no-compress Disable all compression.
--threshold <level> Threshold to consider compressing files.
--binary Output a binary file for use as a dynamic resource.
--namespace Turn off namespace macros.
--verbose Enable verbose mode.
--list Only list the files, do not generate code.
--project Output a resource file containing all files from the current directory.
Arguments:
inputs Input files (*.qrc).
Change-Id: If20958afd6c01df5d0d755e13e8581bc1cb9af51
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This extends the QLinkedList auto test. This is copy paste
with small edits from the QList auto test.
Change-Id: I5bce7ee304998d1c7258f11b2f31a7fb87706936
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>