Commit Graph

140 Commits

Author SHA1 Message Date
Eike Ziller
c67ed4d35b Add global notification area and use for UI Tour info
Adds a global info bar display above the main window's status bar that
can be accessed via ICore::infoBar().

Replace the blocking "Take UI Tour" dialog by a notification there.

Fixes: QTCREATORBUG-22819
Change-Id: I733f1bfd2d1db0295754ed2e28bb202f927d0edb
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: André Hartmann <aha_1980@gmx.de>
2019-08-12 07:15:27 +00:00
hjk
4742216feb Core: Give a hint why saving of settings are requested
Not all requests are the same, handling code might want to act
differently on different request reasons.

Main driver here is the handling of the debugger/analyzer main window
state savings which depends on actual visibility of certain windows.

Change-Id: I87b2a9149e3d09d27bc14b44aace9f2e0686db04
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2019-06-03 08:25:41 +00:00
Christian Kandeler
4eff36b7f6 Unit tests: Print a warning at the end if not all tests passed
It's easy to overlook that Creator returned with a non-zero exit code,
particularly if the last test succeeded.

Change-Id: I6975014aec36c7a267dc88cde41f830d314c90af
Reviewed-by: André Hartmann <aha_1980@gmx.de>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2019-03-14 08:49:02 +00:00
Marco Bubke
0c177cd0d1 Add ICore::cacheResourcePath()
We need some directory where we save the index database and the precompiled
headers. This files should be persistent but the user can delete them
if he wants because we will rebuild them.

Task-number: QTCREATORBUG-22012
Change-Id: I9f25eb48a9992d6385a96427ef9c10bc739a3567
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2019-03-04 16:43:09 +00:00
Eike Ziller
b9db5ea86e Move documentationPath() from Core::ICore to Core::HelpManager
It is documentation related API, so it belongs there.

Change-Id: I5d1676f251e6deb92050ddedac19bf3c332aab54
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2018-09-20 07:19:49 +00:00
Eike Ziller
8fa449126c Fix context of Locator input
- In the main window, the locator input (actually the status bar)
  visually feels like being part of the mode widget, so give
  it its context.
- In extra editor windows, the whole editor window should have
  "editor manager" context, so that is also active for the locator
  input.

Task-number: QTCREATORBUG-20626
Task-number: QTCREATORBUG-20071
Change-Id: Ib68d6a8177446572ea59c3cc057eca0706173e11
Reviewed-by: Xing Xiong
Reviewed-by: David Schulz <david.schulz@qt.io>
2018-08-09 08:55:25 +00:00
Alessandro Portale
f36f04deba Core: Modernize
modernize-use-auto
modernize-use-nullptr
modernize-use-override
modernize-use-using
modernize-use-default-member-init (partially)

Change-Id: Idf10d7ffb1d98a04edc09a25c35e4e9e3abe87b5
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2018-08-08 16:04:21 +00:00
Ivan Donchevskii
344cbb3a1b Clang: Move clang paths helper functions to Core plugin
These functions require core plugin so they can't go
to utils library. At the same time to use them in
ProjectExplorer plugin there are not too many choices
where to put them without introducing new dependencies.

Change-Id: I3cccccffaae8ac4bbce924fd809b5423da5dc503
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2018-08-06 12:38:52 +00:00
hjk
892546bd6a Core: Minimize directly accessible SettingsDialog interface
Only the getSettingsDialog + exec combination was ever used. Make
that accessible by a free function, move everything else to
settingdialog.cpp.

Take the opportunity for some code cosmetics and remove a few
indirections by using direct members instead of pointers where
appropriate.

Change-Id: I14bc47395a85045ab439d418da0bc459add844bb
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2018-02-14 16:37:08 +00:00
hjk
730a8186af Core: Compile fix after 974022c77b
Change-Id: Idd26b1da785deec81772dff3134c4c23e63762bb
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2018-02-01 17:07:04 +00:00
hjk
effa4d830f Core: Remove the now-unused ICore::optionsDialogRequested() signal
Change-Id: I5b712c8f01170d406b2a1e5cb969ff2e4ffe16d4
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2018-02-01 14:17:30 +00:00
hjk
e712c8b7e2 Core: Replace an in-Core connection by a direct call
Change-Id: Ic219a992658e080467a18d38121a41990cc377ce
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2018-02-01 13:31:04 +00:00
hjk
974022c77b Core: Reduce code path ping-pong between ICore and MainWindow
Public entry points for displaying settings dialog were in ICore,
diverting to MainWindow, and back in some cases.

Move implementation to icore.cpp instead.

Change-Id: I02cbf1dcfe6241c665d7d701b4b4af1a8a242af5
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2018-02-01 13:29:58 +00:00
Eike Ziller
f42ea09b74 Do not construct settings/resource paths from QSettings object
These paths are controlled by ICore.

Add ICore::installerResourcePath() to replace constructions with
settings(SystemScope)
Replace constructions with settings()->fileName() by usage of
ICore::userResourcePath().

Change-Id: I5a9fa9d09f2563c39dc5d11a4586da825c62f9ac
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-01-11 10:42:09 +00:00
David Schulz
319990d7c5 Core: return QMainWindow * from Core::mainWindow
... instead of QWidget *

Change-Id: Ibe38814ae26524a9ffa4c14d170d5aa487a40931
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2018-01-11 06:35:27 +00:00
Eike Ziller
0be914853b Use IDE_ID for user resource path
We should not share these settings with a different IDE_ID

Change-Id: If50102606722f40ab64c9c7fe01c74a9f0dda06e
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2018-01-10 15:36:36 +00:00
Eike Ziller
7b6943e578 Add "Remove File" to file system view
Task-number: QTCREATORBUG-19208
Change-Id: Iacf1e1468018fa8dd3426bc1325f36bb39a4b4e2
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2017-12-12 10:50:29 +00:00
hjk
cdaa4aee1a Add some mechanism to help screenshot creation
If QTC_SCREENSHOTS_PATH points to a writable directory, each widget that
has been registered with ICore's setupScreenShooter(const QString &name,
QWidget *w) will dump a screen shot to this directory as soon as the
widget is shown.

Change-Id: I2dec12064f1bb3c510d2fd9d27c1b79f7b7d5f30
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
2017-11-16 10:28:49 +00:00
Tobias Hunger
4ef01c961e app_version.h: Make IDE name configurable
Change-Id: I993f452c8d09cf89e9a2958fc8e36b7d2c17ee6f
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2017-09-05 10:19:48 +00:00
Eike Ziller
1891af4b07 Specify Qt Creator's "display version" in qtcreator.pri/qtc.qbs
Currently it is set by passing defines to qmake, which complicates
package build setups.
Set the display version where the numerical version is defined. This
also makes it available to developer builds. Also switch around the
display version and numerical version in the about dialog, since e.g.
"4.3.0-rc1" is more descriptive than "4.2.83".

Change-Id: I26dda427975acdc6cc169f8d625f57918167cf19
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2017-04-21 13:28:54 +00:00
Orgad Shaneh
530c248051 Core: Fix compiler display name for MSVC2017
Change-Id: I0a0a6e2899373241dac0cdec5154ea7f22efd0c2
Reviewed-by: David Schulz <david.schulz@qt.io>
2017-04-18 08:43:13 +00:00
Eike Ziller
36b443dfba Add defines for relative data paths
Derive the relative paths used in code from the paths used by the build
system.

Change-Id: I208ee55d3c1ee76921734f5c1c6c40d3fcb9724c
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2016-12-01 14:24:53 +00:00
Eike Ziller
94a58b4653 File > New: Bring existing dialog to foreground
Task-number: QTCREATORBUG-16932
Change-Id: I1a90ab01825b5cd2f439395cbdf4400075943dc4
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2016-09-30 08:16:55 +00:00
Eike Ziller
79be19a8a0 ICore: Make sure main window is initialized
Initialize main window even if no ICore instance is created, so in that
case methods like raiseWindow and dialogParent will still work.

Change-Id: I7b435dedac574bcc120e996c198c413fd5ccfe6f
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2016-09-30 08:16:47 +00:00
Eike Ziller
9c9485e15b ICore: Remove unused methods
Some didn't even have implementations anymore

Change-Id: I376cb12006c9b3ec8f6b2a75c38275cd92d2bbf6
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2016-09-30 08:16:41 +00:00
Eike Ziller
b554829fd8 Core: Fix that core settings like shortcuts were only saved at shutdown
Save them also whenever a settings save is requested, which e.g. also
happens when closing the options dialog.

Change-Id: Ic20f1007381a4d0a8157f17fd24c0d8ea24907ee
Task-number: QTCREATORBUG-16576
Reviewed-by: David Schulz <david.schulz@qt.io>
2016-09-12 07:10:12 +00:00
Eike Ziller
0e542a6a29 Fix build
Change-Id: Ie23ae9e462dff66206759bacda13876dce8264a0
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: David Schulz <david.schulz@qt.io>
2016-09-06 08:18:11 +00:00
Eike Ziller
f38531effb Add a menu entry for copying system information
Which outputs the information from qtdiag, installed plugins,
and general Qt Creator build information.

Task-number: QTCREATORBUG-16135
Change-Id: I618b9883369bae45006bb109f8757e89b091b882
Reviewed-by: David Schulz <david.schulz@qt.io>
2016-09-05 13:00:54 +00:00
Orgad Shaneh
5646480f27 Core: Use Qt5-style connects
The heavy lifting was done by clazy.

Change-Id: I2dde14919d917816d02117338205f8f861d8af0a
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
2016-02-03 07:54:02 +00:00
Tobias Hunger
397e7f4843 Update License according to agreement with Free Qt Foundation
* Update files in src/plugins

Change-Id: Ia5d77fad7d19d4bb3498e78661982f68729adb22
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2016-01-19 15:57:01 +00:00
Eike Ziller
98257617e9 Merge remote-tracking branch 'origin/3.6'
Conflicts:
	src/plugins/clangcodemodel/clangassistproposalmodel.cpp
	src/plugins/clangcodemodel/clangassistproposalmodel.h

Change-Id: Iba30d2f4d95fa0f551afe58890d15f5835dfb715
2016-01-19 16:41:17 +01:00
Friedemann Kleint
01f144d514 Fix display of MSVC2015 in compilerString().
Display values of _MSC_VER >= 1900 (currently displayed as MSVC 2014)
as MSVC2015 and larger values as unknown.

Change-Id: Id23b0f9342e6ad6d776bb44743e5e4ce91462c8f
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
2016-01-19 14:29:53 +00:00
hjk
e6a98f368e Core: Replace ICoreListener by std::functions
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>
2015-11-04 17:52:20 +00:00
Eike Ziller
9a69a05f9b Core: Allow adding additional information to about dialog.
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>
2015-10-09 08:35:12 +00:00
Eike Ziller
6ed775f56a Fix wrong context help if tool tip was not shown for focus widget
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>
2015-09-30 08:25:18 +00:00
Tobias Hunger
819438a37b ICore: Consistently use NewItemDialog to refer to File>New dialog
Change-Id: I28fba1e7cca3f9885d14c6e58d693046a4c0ea33
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
2015-09-24 10:18:54 +00:00
Eike Ziller
972731d42e ICore: Don't split context in contextChanged signal
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>
2015-09-23 09:29:25 +00:00
Eike Ziller
37f6b4397d Merge remote-tracking branch 'origin/3.5'
Change-Id: I1ce0fa92e5c469d591d3030d1a4f168dcee232ba
2015-08-06 11:38:13 +02:00
Nikolai Kosjar
adefa318ae Tests: Emit coreAboutToClose() before exiting
Now address sanitizer will not show false positives.

Change-Id: Ieeb4dc31697920ed1ca542f5647f4cb0b23a29ab
Task-number: QTCREATORBUG-14713
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
2015-08-05 07:38:16 +00:00
Christian Kandeler
6d5a5aff94 Use a proper libexec path for Unix builds.
Change-Id: I036c806af47f07e60408a90d3a4e181a6773f866
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
2015-07-09 09:08:01 +00:00
Eike Ziller
4890307b0c Wizards: Do not crash when dialogs are still open on quit
Change-Id: I49622484e316b902699e5b63ea3eea827d2f2680
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2015-06-04 14:40:37 +00:00
Tobias Hunger
e2dab7685c Core: Improve dialogParent() to work better with detached windows
Make new windows center on the window the user is currently looking
at instead of the mainwindow.

Change-Id: Ia6246a4f1935b6d2d66db329c6141f4cb8349916
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
2015-06-03 10:25:08 +00:00
Tobias Hunger
7e41b40c91 Wizards: Treat running wizards in the same way as a running NewDialog
That is block the New file or project action.

Change-Id: Ic7bb6013fce02fdcdd5c86b70ba5428218597a40
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
2015-06-03 08:07:29 +00:00
Tobias Hunger
47660a8f09 NewDialog: Keep information on whether the dialog is open or not
Keep that information in the NewDialog instead of ICore.

Change-Id: I3e351251be6c4927b80a22db175ed79cb1f24621
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
2015-06-01 14:47:30 +00:00
Tobias Hunger
c0952e22f7 ICore: Move handling of New File/Project dialog into ICore
ICore only used to pass this on to MainWindow.

Change-Id: I3c4a214330713928a50a291e3c5c6624310db03a
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
2015-06-01 12:56:32 +00:00
Tobias Hunger
25f2f8e1ee IWizardFactory: Create wizards with factoryCreators
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>
2015-05-26 11:47:53 +00:00
hjk
592ffe7377 SettingsDialog: Remove CategoryId parameter from callers
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>
2015-02-24 13:52:00 +00:00
Eike Ziller
5a3a940ad3 Use new mime database
Change-Id: I4305872b6b11ef3e8a364280ffa5209a5a793600
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
2015-02-17 13:00:07 +00:00
Eike Ziller
9926fc2ab1 Merge commit '3c85058694ee2e41658d17f524fb48f0b187d2fe'
Conflicts:
	src/libs/utils/tooltip/tipcontents.cpp
	src/libs/utils/tooltip/tipcontents.h
	src/plugins/android/androiddeployqtstep.cpp
	src/plugins/baremetal/baremetalconstants.h
	src/plugins/baremetal/baremetaldevice.cpp
	src/plugins/baremetal/baremetaldevice.h
	src/plugins/baremetal/baremetaldeviceconfigurationwidget.cpp
	src/plugins/baremetal/baremetaldeviceconfigurationwidget.h
	src/plugins/baremetal/baremetaldeviceconfigurationwizard.cpp
	src/plugins/baremetal/baremetaldeviceconfigurationwizardpages.cpp
	src/plugins/baremetal/baremetaldeviceconfigurationwizardpages.h
	src/plugins/baremetal/baremetalplugin.cpp
	src/plugins/baremetal/baremetalplugin.h
	src/plugins/baremetal/baremetalruncontrolfactory.cpp
	src/plugins/baremetal/baremetalruncontrolfactory.h
	src/plugins/cppeditor/cppcodemodelinspectordialog.cpp
	src/plugins/cppeditor/cppdoxygen_test.cpp
	src/plugins/cppeditor/cppdoxygen_test.h
	src/plugins/debugger/breakpointmarker.cpp
	src/plugins/debugger/debuggeritemmodel.cpp
	src/plugins/debugger/debuggeritemmodel.h
	src/plugins/debugger/loadcoredialog.cpp
	src/plugins/genericprojectmanager/cppmodelmanagerhelper.cpp
	src/plugins/projectexplorer/addnewmodel.cpp
	src/plugins/projectexplorer/addnewmodel.h
	src/plugins/projectexplorer/jsonwizard/jsonfieldpage.cpp
	src/plugins/qmlprofiler/abstracttimelinemodel.cpp
	src/plugins/qmlprofiler/abstracttimelinemodel.h
	src/plugins/qmlprofiler/notesmodel.cpp
	src/plugins/qmlprofiler/qml/CategoryLabel.qml
	src/plugins/qmlprofiler/qml/MainView.qml
	src/plugins/qmlprofiler/qml/Overview.js
	src/plugins/qmlprofiler/qml/Overview.qml
	src/plugins/qmlprofiler/qml/TimeDisplay.qml
	src/plugins/qmlprofiler/qml/TimeMarks.qml
	src/plugins/qmlprofiler/qmlprofilertimelinemodelproxy.cpp
	src/plugins/qmlprofiler/sortedtimelinemodel.cpp
	src/plugins/qmlprofiler/sortedtimelinemodel.h
	src/plugins/qmlprofiler/timelinemodelaggregator.cpp
	src/plugins/qmlprofiler/timelinemodelaggregator.h
	src/plugins/qmlprofiler/timelinerenderer.cpp
	src/plugins/qmlprofiler/timelinerenderer.h
	src/plugins/qmlprojectmanager/QmlProjectManager.json.in
	src/plugins/texteditor/findinfiles.cpp
	src/plugins/vcsbase/vcsconfigurationpage.cpp
	src/shared/qbs
	src/shared/scriptwrapper/interface_wrap_helpers.h
	src/shared/scriptwrapper/wrap_helpers.h
	tests/auto/qmlprofiler/abstracttimelinemodel/tst_abstracttimelinemodel.cpp
	tests/system/suite_debugger/tst_debug_empty_main/test.py
	tests/system/suite_debugger/tst_qml_js_console/test.py
	tests/system/suite_debugger/tst_qml_locals/test.py

Change-Id: I67540b648f8b162496f4aa606b04d50c7c9125c6
2015-02-12 17:29:21 +01:00
Orgad Shaneh
428565cb02 Core: Remove unneeded qualifications
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>
2015-02-06 09:06:18 +00:00