Adds signals for changes to the window title, window icon and window
icon text.
Change-Id: Ia0ddcb94dda2c9ea790edc061d487765024191cd
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
If two items are equal according to the current sorting criterion,
the sorting predicate uses the address of the items to break the tie.
The problem is that the items themselves are being moved during
the sort; therefore, this will break the Strict Weak Ordering
that std::sort requires.
For instance, suppose to be sorting case-insensitively the following array:
("b", "a", "A")
Simulating a swapped-based sorting can lead to:
Array before Evaluated predicate Array after
("b", "a", "A") "a" < "A" (1) ("b", "a", "A")
^ ^
("b", "a", "A") "b" < "A" (2) ("A", "a", "b")
^ ^
("A", "a", "b") "A" < "a" (3) (XXXXXXXXXXXXX)
^ ^
(1) True, because of the array ordering (they're equal otherwise)
(2) False: swap them
(3) True, because of the array ordering (they're equal otherwise)
(1) and (3) say that "a" < "A" and "A" < "a", SWO gets violated,
leading to undefined behavior.
This problem was causing QFileSystemModel autotests failures (cf. [1])
after switching to STL algorithms instead of using qSort.
The array to be ordered in that case is ("a", "c", "C"),
cf. tst_QFileSystemModel::caseSensitivity.
(STL algorithms are much smarter than good ol' quicksort in qSort;
if we're ordering on an array which fits in a cache line, they
turn to the much faster (~1 robe) insertion sort. Violating SWO with
a quick sort usually just gets to a non-sorted container; insertion
sort is implementable in ways that rely on SWO, otherwise they
will overflow the iterator; cf. Cormen/Leiserson/Rivest and the other
literature on the topic.)
This commit reverts commit fa5f3a44 (in Qt 4).
[1] http://testresults.qt-project.org/ci/QtBase_dev_Integration/build_01749/linux-g++_shadow-build_Ubuntu_11.10_x86/log.txt.gz
Change-Id: I5d8ac0d0907675c501717969abee2816b41eca18
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
This required special care because of @option-file where additional args can be read from.
Found again one undocumented option, --ignore-option-clashes.
Usage: moc [options] [header-file] [@option-file]
Qt Meta Object Compiler version 67 (Qt 5.2.0)
Options:
-h, --help Displays this help.
-v, --version Displays version information.
-o <file> Write output to file rather than stdout.
-I <dir> Add dir to the include path for header files.
-F <framework> Add Mac framework to the include path for header fil
es.
-E Preprocess only; do not generate meta object code.
-D <macro[=def]> Define macro, with optional definition.
-U <macro> Undefine macro.
-i Do not generate an #include statement.
-p <path> Path prefix for included file.
-f <file> Force #include [optional <file>] (overwrite default)
.
-b <file> Prepend #include <file> (preserve default include).
-n <which> Do not display notes (-nn) or warnings (-nw). Compat
ibility option.
--no-notes Do not display notes.
--no-warnings Do not display warnings (implies --no-notes).
--ignore-option-clashes Ignore all options that conflict with compilers, lik
e -pthread conflicting with moc's -p option.
Arguments:
[header-file] Header file to read from, otherwise stdin.
[@option-file] Read additional options from option-file.
Change-Id: I0dfa8e029f95ad8084832530d701e30f315df98e
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
-DKEY="VALUE" was correctly turned into -DKEY=VALUE,
but -DKEY=\"VALUE\" was turned into -DKEY=\VALUE"
due to the erroneous check ('quote' is still 0 when
encountering the first '\' character).
This fixes QCoreApplication::arguments() as used by
moc.exe after porting to QCommandLineParser.
Further investigation shows that double-quotes and single-quotes
are handled differently. The tests now ensure that this parser
respects what Windows sends in argv, and in particular that
QTBUG-15379 doesn't regress, as well as fixing QTBUG-30628.
Task-number: QTBUG-15379, QTBUG-30628
Change-Id: I95062c9a6022632b321b2f6fae3089f07be7b5c6
Reviewed-by: Richard J. Moore <rich@kde.org>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
You are not supposed to call NSOpenGLContext -setView: for a view that
has not yet called drawRect. Doing this would result in a invalid
drawable error.
Similar to 4.8 commit cd2a51a66f
Change-Id: Ibb2300a8c6fe52f786f813987e93d4a3dc145366
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
This adds new tab 'Job Options' into Properties dialog in print dialog.
In this tab it's possible to set some advanced printing job options such
as print schedule, job priority or job billing.
Patch also adds new utility methods into QCUPSSupport, which are used to
set particular CUPS job options.
[ChangeLog][QtPrintSupport][QPrintDialog] Added support for setting CUPS
job options in the print dialog.
Change-Id: If2640eedb3d83f50cbb20491f7ec50b325f54f22
Reviewed-by: John Layt <jlayt@kde.org>
Similarly to qmlscene, multisampling will only be requested when
passing --multisample on the command line. This is useful because (1)
multisampling is not really needed by this app and (2) it helps with
broken drivers that advertise MSAA configs but break when using them.
Change-Id: I50ff0db80843f488899901ab796eee588b62078b
Reviewed-by: Andy Nichols <andy.nichols@digia.com>
Now qdoc doesn't use the QML module version number
when it isn't necessary. Page names are cleaner
without appending the version number to the QML
module name.
Also reduces the number of duplicate page warnings,
but this will be updated further next time.
Task-number: QTBUG-33257
Change-Id: Iba587164532bdc819523e0666f7561ac2dbd5e52
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
Change-Id: Ic78160d27b2c768054feefe6ec3fd4aaf8280c83
Reviewed-by: Andrew Knight <andrew.knight@digia.com>
Reviewed-by: Andy Nichols <andy.nichols@digia.com>
Note that there are also some missing interpolators for char, short,
long long etc, but those are most likely less common than unsigned int.
Task-number: QTBUG-33268
Change-Id: I469cc4f38eaa48171307b737b15efea2cd98fe5e
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
On wince with freetype engine can't render text for non-latin text.
because wince doesn't have truetype font FONTSIGNATURE api. so match
function in qwindowsfontdatabase_ft.cpp was always failed and render
incorrect text.
this patch has 3 changes.
1. extract font unicode signature using GetFontData function
2. append font fallback data from registry
(see. http://msdn.microsoft.com/en-us/library/ms901076.aspx)
3. wince's default font path is windows. correct fontdir
Task-number: QTBUG-31974
Change-Id: If969df353492141669eeab33119f3506602871b3
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
qdoc-manual.qdoc is now an overview document
Each section is a separate qdoc file
Title modification in minimal qdocconf qdoc file
Task-number: QTBUG-31801
Change-Id: I9e50eb8c4f1f501e9c0bc768372d4393b73053ed
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
Reviewed-by: Martin Smith <martin.smith@digia.com>
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
Optimize isViewItemCached() a bit by reordering conditions so that
conditions that going to change more often in a common case evaluated first.
Change-Id: Ibb406f964345e8f2bff7b433bf33e09a99dcbdc4
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
These macros were previously defined for QDoc manual.
This change adds them to global macros.qdocconf so
they can be used everywhere.
Change-Id: I4fdf5a103ecfb356719951a7d0c6fbd35c887744
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
As of 5.0, this always return true.
Change-Id: If225c7219e283da97e870f0d66a87b21c3cacfc0
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
This fixes rendering in the OpenGL paint engine,
simplifies our internal code paths and also produces
nicer text for non-90 rotated glyphs
Change-Id: Ib206065cd486ac29067f9ebf4a0d74189a673f1e
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Whilst having the objectName set for each engine is
somewhat handy when debugging, deriving from QObject just for that
is a wasting of memory in all other cases.
This also broke the font engine abstraction by allowing qobject_cast()
to access some private data; the only sane way to distinguish
engines is querying their Type value.
Change-Id: Ib1d195692859eb39089f6d8d9016cb8f9dcc0400
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
This removes the trailing slashes from the path and then removes dirs
set twice in XDG_DATA_DIRS (always removes those from the right side).
There's no use for duplicit dirs in XDG_DATA_DIRS because if whatever is
being looked up is not found in the duplicated dir the first time, it
won't be there the second time.
Currently it causes troubles for example in mime types, where it returns
duplicated mime types as the same dir is searched multiple times.
For obtaining the original value of XDG_DATA_DIRS, one can use
qgetenv("XDG_DATA_DIRS").
Change-Id: Ic4f8ef6c6fe096555948e318899207e9d4ca8289
Reviewed-by: David Faure KDE (deprecated, use kdab instead) <faure@kde.org>
Clang is perfectly able to deal with the libstdc++ headers. The
problem on Mac is that those headers are mightily old (from GCC 4.2),
so they are insufficient for C++11 support.
So make a more accurate test. This allows Clang to enable C++11 in the
presence of newer libstdc++ header (e.g., Clang on Linux or Clang on
FreeBSD).
Change-Id: I4f457ca82bf13feca0af78c9363cb6365bb3f68e
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Replace that need with a macro so that registration of the
container helper conversions is done at the time of registration
of the container (usually when it is put into a QVariant).
Change-Id: I823fb3fdbce306ebc9f146675ac43724cec678d5
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
The old code used to check for usingWinMain, which is not set when
Qt is used within a DLL. Try to check for presence of stderr
by checking for a console window or a redirected stderr-handle.
Task-number: QTBUG-32044
Change-Id: I87893c3438f5e92d73488e9c25b95cbfeaacc1f6
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Not strictly needed yet, but helps to reduce the size of QDateTime and
make it easier to read a major re-write. Imposes separation of parser
which will be needed if we make QLocale always use the system backends,
after which only QDateTimeEdit widget will need the parser and it can
be moved there.
Change-Id: I6a5e9a3edf6fe8ff2340af6afecd8ba4bfde9dd4
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
To be consistent with signals which are public since Qt5.
Change-Id: I633077e37d0851b118c22da0681e8b8b1892ddbb
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
When creating a fontengine in QFontconfigDatabase::fontEngine we
solely base the antialias setting on the QFont StyleStrategy and forget
to ask fontconfig it has an overriding definition for this font match.
This patch will now let fontconfig decide the antialias setting unless the
NoAntialias stylestrategy has been set.
Change-Id: I67981582a37cfd3c59aa1db929095585af554088
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Pierre Rossi <pierre.rossi@gmail.com>
They are not needed anymore since 5971e091 and 184e27c0 have been
integrated.
Change-Id: Id611f1432a010f3c2af86951e1c79cb8fc73f9e4
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
The dialog thread can outlive the platform dialog helper if
the helper is destroyed. In that case, IFileDialog::Show()
returns since the parent window is destroyed and then tried
to emit signals on the destroyed helper class instance.
Pass a shared pointer to the native dialog instead of a pointer
to the helper class to the dialog.
Task-number: QTBUG-32494
Task-number: QTBUG-30513
Change-Id: I7c2e769460270a26d886fdefee93ea59c2a17196
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Change-Id: I7149ec2fdabdfcfa7d6f28b1105da154a333096f
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
In "very basic platform plugins", the platform window ID can be null,
which conflicts with QWidget's special treatment of 0 as a parented widget.
Such is the case with EGLFS, which can return a null native window handle
for winId on some EGL implementations.
Move the assertion winId!=0 into the widget framework, as this assert is
not relevant for non-widget applications. A large proportion of basic
platform plugin users will see relief from this unnecessary assertion.
Change-Id: I25c9d96550cd747c77c9516d773e9cdebf7440ab
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
The QT_POINTER_SIZE is not detected on Windows. We can safely set
this to 32 bit for Android since we only support 32 bit builds
on Windows.
Task-number: QTBUG-33397
Change-Id: I891cf01444d1ba9216ed2c3ba33ef40c61d50dd9
Reviewed-by: BogDan Vatra <bogdan@kde.org>
The third parameter is `extraCondition`, which is false by default,
and it is used in condition
`if (!extraCondition && QThread::currentThread() != qApp->thread()) {`.
Passing extraCondition=true makes this condition always evaluate to false
and thus hides a respective warning at all.
Change-Id: Ia8ef48f341bd22f58375034d1992da716f78121d
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
These are wrapper classes that do not document their functions.
This change adds links to docs on opengl.org / khronos.org where
suitable, and changes the \brief commands to mention the correct
OpenGL version/profile.
Change-Id: I48154d5bce26f6753ca4400962939847c78a527d
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
QT_MUTEX_LOCK_NOEXCEPT is defined as Q_DECL_NOTHROW
on Linux, the latter being already ignored by qdoc.
This change ignores also the former, clearing
related documentation warnings.
Change-Id: Iaeee7a851b4b6d3c2e3308c1b376406c11271807
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>