Because the editor manager was asked first if it wants to
abort closing (because closing an editor failed), editors
were closed before any other close listener was asked.
Ask the editor manager last to avoid ending up with an
empty editor list when canceling for some other reason.
Change-Id: Ie56866cb668a717b7072d8092b4d86b7b3196d01
Task-number: QTCREATORBUG-14401
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
ICoreListener::coreAboutToClose() remains in the core,
ICoreListener::editorAboutToClose() is handled by a new
EditorManager::addCloseEditorListener() function.
This removes the need for some boiler plate code resulting
from the need to implement the interface in custom classes
(DesignModeCoreListener, EditorClosingCoreListener,
PojectEplorer::CoreListener and VcsBase::CoreListener).
EditorManager::addCloseEditorListener
Change-Id: Ie554c987b5455b555be6d77b77e4013639201d22
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
Purpose is to get rid of hard coded license information string in the Qt
Creator binary.
Change-Id: I867e2aed010f8a622adfbb89ac96dccbc8229161
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
The tool tip never has focus, so it cannot become the IContext that is
checked for context help. So, integrate the help id into Utils::ToolTip
and check the tool tip first when checking for context help.
As a side effect the [F1] button and help id for the tool tip is now also
available for use outside of the text editors.
Task-number: QTCREATORBUG-5345
Change-Id: Id975703caf161d1183c247e8ad8bb693b90fd306
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
This way the order of the context doesn't get lost between context from
the focus widget and additional contexts
Change-Id: I371c411a5d9c9f31ae1f8631a6ede4eda100b0c5
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
It was too crowded to add anything to it. Split it into "interface" and
"system" related pages.
Change-Id: I2aa7984de4d672ca000e991b0cfb32a3f706c988
Reviewed-by: Daniel Teske <daniel.teske@theqtcompany.com>
Extend drop support with variant values. A drop may be a file drop or a
value drop or both.
Rename Utils::FileDropSupport to Utils::DropSupport and add methods to
add not only files but any QVariant value to the mime data. Project
explorer adds dragged nodes (which will be needed for future ModelEditor
plugin).
Change-Id: I799542c60fdecb3e64af0d3ba47b6caa9adbcfd7
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
It was just activating the existing editor, instead of reopening with
the new editor type.
Change-Id: I1fee08d1df1d78a32298d222a09cf05cf9433f19
Task-number: QTCREATORBUG-14336
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
mainwindow.cpp:491:77: error: 'this' was not captured for this lambda function
Broken by c0952e22f7.
Change-Id: I6fd9b6fb021c21ccec2b15695e07d1af8284fe2b
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
ICore only used to pass this on to MainWindow.
Change-Id: I3c4a214330713928a50a291e3c5c6624310db03a
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
Since the action for this ID might be unregistered temporarily, and re-
registered under different circumstances.
Change-Id: I6c4ef3ddf814487cc9b63ff979ebb1539cdf7c81
Task-number: QTCREATORBUG-8108
Reviewed-by: David Schulz <david.schulz@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>
This basically makes the Context parameter optional and default
to C_GLOBAL. Less noise on the user side.
Change-Id: Idaf1b83eabaf912450ab20bd5a8b613844bf69a2
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
... and default to C_GLOBAL. A rather common case.
Similar for ActionContainer::addSeparator().
Change-Id: I7f9ba573af201c0a472132d5a494ad17cc4175b7
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
PageIds are supposed to be unique, so the CategoryId can be determined
from the PageId. Look for PageIds in the already expanded categories
first before searching through expensive categories.
Change-Id: I006beb0df6183453163ac1810fe59a306a0f52b1
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
That makes no sense now that we potentially have multiple windows.
It is also not available outside of the Core plugin and unused in
Core.
Change-Id: I32b491e4ec078892e9ad3a8fb62616e4567549a6
Reviewed-by: Orgad Shaneh <orgads@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>
The leaf does not have a white border, anymore. The .ico and
.icns files now have a shadow.
Task-number: QTCREATORBUG-13359
Change-Id: Iebdc6aefb36592333f1d76cd28a407a121318bb6
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
Never use TextHeuristicRole because it doesn't work as expected with
translations.
Also remove some unneeded OS X scopes.
Task-number: QTCREATORBUG-13101
Change-Id: If53ac36d9bee1782343e65d01a875b7e5434ff39
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
It isn't ready for production yet, will hopefully be reworked for 3.4.
Change-Id: If738f40df5cd2b4ab7edbcdc0086c7aa5d5f47f6
Reviewed-by: Alessandro Portale <alessandro.portale@digia.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>
Allow multiple expanders to be registered for lineedits, e.g. a
local and the global ones, and actually show them.
Use a tree view in the chooser for somewhat more structured display.
Change-Id: I769f92144e5249f45e54381de52aa6973eb20118
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
This allows a MacroExpander also to describe an expansion it can
do which was restricted to the global VariableManager only.
The global is now just a thin (unneeded) wrapper about new "standard"
functionality.
Change-Id: Ida7ca70cf3d319eae4220ea8d12f3dd1c0d4042c
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
Add JsExpander that can be used to register additional functionality
in its qscriptengine and to evaluate expressions.
Register that with the VariableManager, using the "JS" prefix.
Change-Id: I7d8f1ddc3484104f3943685dbac09e786d60212e
Reviewed-by: Eike Ziller <eike.ziller@digia.com>