For some reason the load() calls in the nested HelpViewer::setSource
calls lead to even more nesting because webkit decides to cancel loading
inbetween...... so we make the side bar viewer synchronization async on
the event loop.
Task-number: QTCREATORBUG-12742
Change-Id: I276272af7c477d627638e9611a34e80cca945b21
Reviewed-by: Robert Loehning <robert.loehning@digia.com>
Reviewed-by: Christian Stenger <christian.stenger@digia.com>
In the case of clean settings.
Change-Id: Ie230cc6a20a932c5917c4a9af26f94c0292e5ada
Task-number: QTCREATORBUG-13197
Reviewed-by: Robert Loehning <robert.loehning@digia.com>
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
By making the global Help menu items (index & contents) independent from
the help view shortcuts again.
Change-Id: I1008efd0bfa95a5b3134edae9e324b106273a708
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Adds a 'Theme' tab to the environment settings and a '-theme' command
line option.
A theme is a combination of colors, gradients, flags and style
information.
There are two themes:
- 'default': preserves the current default look
- 'dark': uses a more flat for many widgets, dark color theme
for everything
This does not use a stylesheet (too limited), but rather sets
the palette via C++ and modifies drawing behavior.
Overall, the look is more flat (removed some gradients and bevels).
Tested on Ubuntu 14.04 using Qt 5.4 and running on a KDE
Desktop (Oxygen base style).
For a screenshot, see
https://gist.github.com/thorbenk/5ab06bea726de0aa7473
Changes:
- Introduce class Theme, defining the interface how to access theme
specific settings. The class reads a .creatortheme file (INI file, via
QSettings)
- Define named colors in the [Palette] section
(see dark.creatortheme for example usage)
- Use either named colors of AARRGGBB (hex) in the [Colors]
section
- A file ending with .creatortheme may be supplied
to the '-theme' command line option
- A global Theme instance can be accessed via creatorTheme()
- Query colors, gradients, icons and flags from the theme
were possible (TODO: use this in more places...)
- There are very many color roles. It seems better to me
to describe the role clearly, and then to consolidate later
in the actual theme by assigning the same color.
For example, one can set the text color of the output pane button
individualy.
- Many elements are also drawn differently.
For the dark theme, I wanted to have a flatter look.
- Introduce Theme::WidgetStyle enum, for now {Original, Flat}.
- The theme specifies which kind of widget style it wants.
- The drawing code queries the theme's style flag and
switches between the original, gradient based look and
the new, flat look.
- Create some custom icons which look better on dark background
(wip, currently folder/file icons)
- Let ManhattanStyle draw some elements for non-panelwidgets, too
(open/close arrows in QTreeView, custom folder/file icons)
- For the welcomescreen, pass the WelcomeTheme class.
WelcomeTheme exposes theme colors as Q_PROPERTY accessible from
.qml
- Themes can be modified via the 'Themes' tab in the environment
settings.
TODO:
* Unify image handling
* Avoid style name references
* Fix gradients
Change-Id: I92c2050ab0fb327649ea1eff4adec973d2073944
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
Reviewed-by: hjk <hjk121@nokiamail.com>
By adding the open pages widget to the shared help widget for the mode
widget.
Change-Id: Ib2d63134d1e17356a285ad048529c50e151a2354
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
Remove unused buttons, and unify style with other views (e.g. no focus
rect on OS X) by using the common navigation tree view class.
Change-Id: I51ce1806507e45077bcbf6b8589585bb15eae712
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
1. Get rid of the need to remember the side bar items, instead use the
IDs for activation.
2. Fix issue with empty side bar that cannot be shown, if settings exist
but contain invalid item IDs.
3. Use actual IDs instead of translated window titles for item IDs. This
requires using a different settings group to avoid issues with 2. when
going back to earlier versions of Qt Creator.
Change-Id: I1a760aa5a019db3231803af1bb72f83db49ba6b0
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@digia.com>
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
This unfortunately means doing the filtering by hand,
because filtering on the QHelpIndexModel would be shared
between multiple views.
Change-Id: Iae38952a92dbb1b4a9685aea6f057d96f0d0784f
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
This removes a lot of duplication of actions and interaction.
It's also a preparation step into making the external help
window behave more like the full-fledged help mode.
Change-Id: I318d831f229b0a75bb8702a5f163c96cce6a668c
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
Setting QTC_HELPVIEWER_BACKEND to "native" when the native backend is
not compiled in, would result in a nullptr deref.
Change-Id: I5618650e0c4ae1c986a54a46232e8f782e43f350
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
Remove usage of the Q_EXPORT_PLUGIN macros, which do not exist in Qt 5.
Change-Id: I678c3cf10b9c5d5c1b9f252b0ecd1c97dc810a47
Reviewed-by: hjk <hjk121@nokiamail.com>
Reviewed-by: Christian Stenger <christian.stenger@digia.com>
When opening examples. Testable by pressing F1 or trying to scroll in
the viewer with keyboard directly after it opened.
Change-Id: I6a2d4535daf38936140e1d1488cb78fb2e9019e3
Reviewed-by: Karsten Heimrich <karsten.heimrich@digia.com>
It was enabled when the side bar was hidden.
Change-Id: I580071ab792396d727d6f712f603e1b7a12b4c24
Reviewed-by: Karsten Heimrich <karsten.heimrich@digia.com>
Also remove the hack that HelpManager::handleHelpRequest looks
for ?view=split in the URL and use an enum instead.
Change-Id: I4ad74775381cf0b321181358266d8e89c6e277b5
Reviewed-by: Karsten Heimrich <karsten.heimrich@digia.com>
The code for opening examples nowadays explicitly changes to edit mode
before opening the example documentation, so we do not need to do that
hack here anymore.
Change-Id: I536784fdc0def8916c14f6df1bb7e50d11aff164
Reviewed-by: Karsten Heimrich <karsten.heimrich@digia.com>
With this patch it is just used with the context help "always show in
external window" option.
Change-Id: I4bc6ba8e0e241500f6970d4cb72f66ba02075ef5
Reviewed-by: Karsten Heimrich <karsten.heimrich@digia.com>
That contains the tool bar together with a help viewer,
which can also be used for an external help window, and later be
extended to also replace the extra "central widget".
Change-Id: I73fac4c135b985cbe47062b90783f156b5062005
Reviewed-by: Karsten Heimrich <karsten.heimrich@digia.com>
There is no reason to not just add the support to the individual pages
when they are created.
Change-Id: I0e45577d054a420f406c44cdcbb4968ff05fcc7c
Reviewed-by: Karsten Heimrich <karsten.heimrich@digia.com>
It sometimes just breaks, so having a simple way for re-indexing seems
appropriate.
Task-number: QTCREATORBUG-11484
Change-Id: I4010d31cbe04f9ef57ebe772610118d8aa7a2ea2
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@digia.com>
Reviewed-by: Alessandro Portale <alessandro.portale@digia.com>
The identifiers changed to use org.qt-project.
Also simplify the logic the does the id highlighting.
Task-number: QTCREATORBUG-10331
Change-Id: I3b6eb80138d8fafeb84772b95435acd68818ada1
Reviewed-by: Karsten Heimrich <karsten.heimrich@digia.com>
Technically it is a valid URL with scheme "Foo" and path ":bar". With
this patch we only try to open URLs with very specific schemes like
"qthelp", "file", "http(s)", "about".
Task-number: QTCREATORBUG-7547
Change-Id: I6908ff554c12ca0f4cfc5bd0fb30dd659d780a23
Reviewed-by: Karsten Heimrich <karsten.heimrich@digia.com>
Fixes a little issue that after opening context help, clicking into the
context help viewer, and pressing F1, the help viewer would show "No
documentation available" instead of opening help mode.
Change-Id: I071c92946214680e82b1f2982b62cc909a272ad5
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
Run Qt Creator with environment variable QTC_HELPVIEWER_BACKEND to
* 'native' to get the WebView based one on Mac
* 'textbrowser' to get the QTextBrowser based one
Defaults to use QWebView if QtWebKit is available, or QTextBrowser if
not, like before.
Change-Id: If0660782b18ff3d89301fa7bcaf4e2e2fb69627d
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
Removes the conditional compilation of the text browser vs web kit,
cleans up the code, and enables us to provide and test other backends
(WebEngine? Native?)
Adds runtime switch for testing the text browser variant by setting
environment variable QTC_FORCE_TEXTBROWSER (for now)
Change-Id: I8cc9bb373438d37c8194e433224314caa0b617bd
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
Useful for looking up compiler warnings on the web.
Change-Id: I1e77c3b97f7907880e2caa6d7e6070b03d846420
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
It's not sufficient to try to create a QUrl on a string to find out if
it is an url, because that automatically treats strings without any
special characters as "local file urls".
Task-number: QTCREATORBUG-11570
Change-Id: I18071aed5b3fbdd717b045c2f6e3e90385be8584
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
Registering QShortcuts doesn't solve any problem that is not already
solved by registering QActions, and shortcuts are in fact much more
limited (not being able to register multiple shortcuts for different
contexts).
Change-Id: I9478e601b2cbc3c5e12fb5baee43cacc20d0fb9c
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
Documentation is now on qt-project.org instead of doc.qt.digia.com.
Change-Id: I5e90a41cc908b0daf7fd7beca594c10d87f3c694
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@digia.com>
The tool bar should not be a direct child of the widget that is searched
(i.e. that has the FindSupport attached).
Change-Id: Ib6b17c4d2df39798086ae41d1b3a0e394e7afa75
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Eike Ziller <eike.ziller@digia.com>