Use the list of filtered Qt versions instead of the global complete list
at several places.
Broke with f1bc4ade50
Task-number: QTCREATORBUG-18216
Change-Id: I274197c833d5786b279a030c3f804286382a9c2c
Reviewed-by: hjk <hjk@qt.io>
The default empty QVariant converts well enough to empty strings etc
to not have to check for its presence explicitly.
Change-Id: I8d3b20b3e463d8b504e27e86dc44c1b5de6de63a
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Needing to compile Qt tools is a bit of a chore (and at some point a
diskspace issue) when building/starting Creator as sanity check for
comparing different compiler optimization settings.
This is not an officially supported configuration.
Change-Id: I628e33eb7137f09ecfebbd27453de548bac2fde5
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Use the ExampleSetModel directly in the combobox, rely on normal
model reset behavior behavior for gui updates.
Change-Id: Icdb34ff0f572caaf92259530823e90bfd783b933
Task-number: QTCREATORBUG-17678
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Can get invalidated, and lead to a crash.
Task-number: QTCREATORBUG-17644
Change-Id: Idc704ae8833ff12abd046a667f242b672d98f9b2
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
This mainly removes no more needed glue code and fixes a recent
regression where the example set picker combobox on the Examples welcome
page always displayed the name of the first item, no matter which set
was displayed on the main canvas
Task-number: QTCREATORBUG-15727
Change-Id: I15b4c97f2e079a7470f6f63cde587dd4be58c40e
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Remove validVersions(...). Use versions(...) instead in conjunction with
BaseQtVersion::isValidMatcher.
Change-Id: I036bdafccc8b9ee5708baca81f853ea48ca7e737
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
This call used to return a sorted list of BaseQtVersion *, which is
expensive as sorting might imply running qmake for all Qt versions.
This also makes BaseQtVersion::validVersions(...) return an unsorted list,
so go over all usages of validVersions(...) and use
QtVersionManager::sortVersions(...) where that is necessary.
Change-Id: I8f5dda20fc0819134c64f6a1ca32512500f71710
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Make methods used to retrieve Qt versions from the Qt versions manager
take a predicate to select the interesting version.
Change-Id: I9218c57bae6d5033d49d618dfc0da41fe578444d
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This is essentially a widgets based re-implementation
of the current design. It is still using the QAIM based
interface layer between to the real data and display even
though this is not needed with this approach.
Removal of this layer would further reduce code size
and cycle counts.
For now:
old new
Load time 215ms 182ms
delete 22ms 2ms
Change-Id: I90d779a60a47a78399eaad0f1bc032d39f3ae3c0
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
In examples and tutorials pages.
Since the pages are unloaded and loaded again when the tab changes, they
loose their internal state and require the search text to be kept as
state in the model (which makes sense anyhow).
Task-number: QTCREATORBUG-15901
Change-Id: I4fb05ca47f8337008c51e17cc95962a5e9e67fef
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@theqtcompany.com>
Replace all* remaining deprecated Qt 4 functions with
their Qt 5 counterparts. This means we no longer need to
define the QT_DISABLE_DEPRECATED_BEFORE macro.
This patch is relatively small because most source-compatible
changes of this kind have been done before.
* The one exception is the QmlDesigner, which uses QWeakPointer
in a deprecated way all over the place.
Change-Id: Id4b839c6685f3b5bdf2b89137f95231758ec53c7
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
Reviewed-by: hjk <hjk121@nokiamail.com>
Less typing and less cycles than join(QString) where appropriate
Change-Id: I6ebc0e17e4d7fd9845864dd95b7de4ba4dad6906
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
Qt 5.4 is adding ref-qualified overloads to toUpper, toLower, trimmed
and some others, so the cast becomes ambiguous or just plain wrong.
Change-Id: Idff0b3e100f075b9b995aeb84d88575afecb2d6f
Reviewed-by: hjk <hjk121@nokiamail.com>
Takes a member (function) pointer and a value and returns a functor,
that takes a instance of the mfp's class and returns whether it's equal
to value. Sounds complicated, but is a common pattern that is easy to
understand.
Change-Id: Iaaeb90488d34ddfd6940dadd4c66705381198fee
Reviewed-by: Nikita Baryshnikov <nib952051@gmail.com>
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
Add Utils::transform and anyOf that take a member function pointer.
Remove bestElementOr it's unused.
Use declval<T> in transform's return type, because msvc does evaluate
T() and for types that don't have simple constructor this fails.
Add std::remove_reference since decltype returns a reference for
lvalues.
Change-Id: I22248b226748eeb27af0d300182d574438d7f756
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
Qt 5.3 adds a mainFile="yes" attribute to the fileToOpen tag for the
file that should be visible after opening the files.
Change-Id: I3ff67e514a16811cc730633e0fbcc470c4e54e5e
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
This reverts commit 894ade6f1e2767a8866642a4ea278659730c26d8
Storing the search text was not thought well through. It causes bad user experience.
Also, the real solution for showing filtered Example sets in the chooser is coming here: https://codereview.qt-project.org/#change,82906
Change-Id: Ibb51bf5c0fa08fdeb8530a19d823ba97a3c167d1
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
in QtCreator.ini under "WelcomePage/ExamplesSearchString".
The installer pre-set that setting, and in that way pre-
select a set of examples.
Change-Id: I8ac5a38ad0bd3f33875ef1997ccbf0352410dcc3
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
Added with setting "Help/InstalledExamples" which is a string list, each
string is a triple of (display name, manifest parse path, examples
path), joined with '|'.
If a documentationPath for a Qt version is already added through the
InstalledExamples setting, we do not show an extra combo box item for
it. That makes it possible for an installer to register a single example
set for the same Qt version in different variants (e.g. iOS, Android
x86, Android arm)
Change-Id: I42dd8f9ca9cb6cee247e3dc8ce9d014e56852e79
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
Not sure what this code path did originally, but since at least
Qt 4.8.0 examples, demos manifest files are only in doc.
Change-Id: I6edf1f712fc06d290edf0fe978a6635966084e60
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
Remove fallback file, and rather use the examples-manifest.xml,
demos-manifest.xml files that are part of Qt 4.8.0 or newer.
Change-Id: I6291bd01b75b891a5ddab7fb01cdfc29ed8bec34
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
When having multiple Qt versions with examples registered in Creator,
the welcome mode showed all of them initially.
The reason was that m_uniqueQtId was initialized with noQtVersionsId
instead of uniqueQtVersionIdSetting().
The function uniqueQtVersionIdSetting() gets the correct Qt version from
the settings as shown in the combobox.
Task-number: QTCREATORBUG-10790
Change-Id: I9f435f6372f8b0c0495daf6c6efcf4bcc5e70455
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
We have to wait for all of the QtVersionManager and HelpManager to
be initialized, and some data actually being requested from the
examples model, before showing any examples.
Task-number: QTBUG-33924
Change-Id: I189710374f4af8d7d9cbe4731fa3faafd0623ffb
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
We have to wait for the QtVersionManager until all Qt versions
are loaded.
Change-Id: Ia6f823660d0252fb8e8ee1b8cfaec32e26ebc0bd
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
"All Versions" did not work correctly and just contributed to
confusion. So it is removed. Since we need a sensible default
setting we now search for the Qt with the highest version that has
examples and demos.
Task-number: QTCREATORBUG-9531
Change-Id: I495252a99753ebe511b598c61a79bbb0cd293e40
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
Show the display name of the kit, instead of computing a generic
one out of the Qt version.
Change-Id: I9d3700bdd64a686f1761c073a47b57153c2ca10b
Reviewed-by: Eike Ziller <eike.ziller@digia.com>