%{#: is now treated as a comment and expands to an empty string }
This is useful to add comments about copyright, etc. into the
wizard templates.
Change-Id: I6e25c724edfa4b865d2d4f74b0f4900982d9ea47
Reviewed-by: Alessandro Portale <alessandro.portale@theqtcompany.com>
Trigger scan for wizards in delayedInitialize since we need to
create commands for the wizards. Also make sure wizards are
scanned for when opening the options page, so that the keyboard
shortcut page can be fully populated.
Change-Id: Iefe28dbcb17f43a7ed114f056012fe8f6e4ae352
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
Do not use the object pool to hold potential wizards. Register
FactoryCreator functions with IWizardFactory instead and use
those to create the wizards when necessary.
This saves us a couple of cycles during startup since we can now
delay construction of all wizards and it makes us more flexible
wrt. managing the lifecycle of the wizard factories.
Change-Id: I95d6a6dfcdf0fd995e1934a9fefcd96c6a676753
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
When the dialog is displayed, the welcome mode becomes disabled.
This happens because before the main loop begins, there is no active window, so
the dialog has no parent to return focus to when it is closed.
Change-Id: I2f8830c3c7bc6816d8483e05e81f5abfe5ee335f
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
Instead of transforming to absolute paths in the client, pass the
working directory and leave it to the target.
Change-Id: I4f8724c8857e89a7ee77116c78cf8b25c56795fa
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
When specifying a filename as an argument, you can append a colon (or a
plus) followed by a number to indicate which line the cursor should be
positioned at in that file. This patch adds the same functionality but
for the column position as well. Ex: main.cpp:5:4 would open main.cpp
and put the cursor at line 5 column 4. The column number is optional,
just like the line number before it. It should be noted that specified
column numbers larger than the amount of characters available on that
line are wrapped onto subsequent lines.
Change-Id: I50208500fa43e43a9514d2be21630b3c607119a6
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
Reviewed-by: hjk <hjk@theqtcompany.com>
Error caused by any file named as current theme and placed to directory
which is used for starting Qt Creator (formely user home directory).
For example, create empty file with name 'default', place it to your
home directory (for example: /home/user) and run Qt Creator. As result
you will see black corrupted screen.
To fix this bug I add checks of theme name. Now Qt Creator will only
load theme from current directory if name is explicitly provided by
the user or it is an absolute path.
Change-Id: I0255c8d220d84bd5b51de7ef9d64c66f7f57959c
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com>
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
Mostly done using the following ruby script:
Dir.glob('**/*.cpp').each { |file|
next if file =~ %r{src/shared/qbs|/qmljs/}
s = File.read(file)
s.scan(/^using namespace (.*);$/) {
ns = $1
t = s.gsub(/^(.*)\b#{ns}::((?!Const)[A-Z])/) { |m|
before = $1
char = $2
if before =~ /"|\/\/|\\|using|SIGNAL|SLOT|Q_/
m
else
before + char
end
}
if t != s
puts file
File.open(file, 'w').write(t)
end
}
}
Change-Id: I5c6690f51488bf8ca3610ba9fb11e6e5fd814aaa
Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
Reviewed-by: hjk <hjk@theqtcompany.com>
Also make a bit less dependent on main window:
- Menus do not need to start with main window as parent.
- Centering the presentation label on the main window is wrong in the
presence of extra windows anyhow. It should be centered on the active
window.
Unfortunately, actions still must be added to the main window, because
actions that are not children of visible widgets do not trigger.
Change-Id: Ibb99644a3723de476db465ebe6a9cdc0820ea692
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
We use double quotes instead of single ones.
Change-Id: Ieb0024aec2053bea2a03e5ae09fb576089663ff1
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
+ always set the global palette and base style on apply
This is required for correctly using the selected theme
with multiple installations of Qt Creator.
Task-number: QTCREATORBUG-13203
Task-number: QTCREATORBUG-13396
Change-Id: I036b96721b6d184dae43d08c5e8bc9e6d1328a7b
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
Setting the global palette is not a very good idea, because
it interferes with native styling.
On Windows 7 the dark theme was unuasable, because the text on
all natives controls was to bright.
All native controls and the global palette should be left alone.
Wherever we want styling/theming we have to use Manhatten style.
Change-Id: Ia1d0bfb190e4bde7be72f751afc0846570c1189d
Reviewed-by: hjk <hjk121@nokiamail.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>
The expander is used in the wizards, and being able to specify
timestamps is something many people requested at devdays.
Change-Id: If227f9c48d0b5f409d22233af8c43ae376f343f9
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.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>
and avoid putting those objects into the object pool.
Change-Id: I46c5ed93a9e80532b3cbd7dba2e52b28b1595aa3
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
Locator's and Find's extensionsInitialized functions were called before
the mainwindow's extensionsInitialized function before the plugins were
merged in one.
Task-number: QTCREATORBUG-11399
Change-Id: I49baac4f9127f75d9650ce11e53327b07775eba0
Reviewed-by: hjk <hjk121@nokiamail.com>
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
A lot of our build system files specify unneeded include
paths. These roughly fall into the following categories:
a) Paths that are already set in more general files
such as qtcreator.pri.
b) Paths that serve no purpose at all, possibly
left over from earlier versions of the project.
c) Paths that act as workarounds for wrong include
statements of the form '#include "xyz.h"', where
xyz.h is not in the same directory as the including
file.
This patch removes such path specifications and fixes the offending
include statements from case c).
Tested on Linux, Windows and OSX with qmake and qbs.
Change-Id: I039a8449f8a65df0d616b4c08081145c18ae4b15
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
A few details are still to be done:
- extra windows are not restored yet
- window title of extra windows should show information about current
editor
- the "raise main window" hack for Linux doesn't work with Qt 5
But it should already now be quite usable.
Change-Id: I638583ee4b2abe32e95c261bdf31b4a10b472748
Reviewed-by: David Schulz <david.schulz@digia.com>
qrand() is used in several places, but it is only seeded in ToolSettings
Change-Id: I72ed3b96315081384c63572566d31dea1a8f8b69
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
Reviewed-by: Eike Ziller <eike.ziller@digia.com>