aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/coreplugin/mainwindow.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Core: Merge mainwindow and icore file pairshjk2023-09-261-1664/+0
| | | | | | | | | | | So far the main window acted a bit like ICore's pimpl. Aim at making that a bit more similar to other places. The files are kept for now to not have to adjust #includes all over the place and there's some hope to move code back there. Change-Id: I150e2dd0971bfab44cba89e0c51bb3f37062b8d3 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* Core: Pimpl MainWindowhjk2023-09-251-129/+245
| | | | | | | | | I'd like to disentangle things a bit, and there's quite a bit non-window-ish stuff here. Change-Id: Iad1e1d17ccd10b3ffff14251039ae2a5d6bfb675 Reviewed-by: Eike Ziller <eike.ziller@qt.io> Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
* Core: Disentangle SettingsDatabase accesshjk2023-09-211-8/+0
| | | | | | | There's nothing inherently tied to the main window here. Change-Id: I48ae09777a4408fc4c955d23fdee3483d8a97dd0 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* Core: Revert unintended changeMarcus Tillmanns2023-09-191-2/+2
| | | | | | | Amends: e34762c84436c9b8b3d35f119a893dcd6cb4f4db Change-Id: I024b6ae5b65dffe45bacc1f44bba5e8ce41fe49d Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
* Core: Cosmetics and unused #includeshjk2023-09-151-24/+14
| | | | | | Change-Id: I5838b7340b9f5fca6d43a49026c8fc82f0d0a494 Reviewed-by: Eike Ziller <eike.ziller@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* Core: Remove SettingsDatabase QObject basehjk2023-09-151-2/+4
| | | | | | | | | Was not really needed except for the ownership. Change-Id: I88e32123cbb85a8217ade9450b5b578845736311 Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Eike Ziller <eike.ziller@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* Remove unused variableEike Ziller2023-09-141-2/+0
| | | | | | | | Amends 7f908d737b0e017e65e917c65b19499f3093fa4c Change-Id: I5e28f850c6a4d836ba7c48bd117a91aab64f478c Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: hjk <hjk@qt.io>
* Use Nanotrace to generate startup performance reportEike Ziller2023-09-121-0/+3
| | | | | | | | | | | | | | | | | | | | | | | Add various trace points to the code, including the plugin initialization methods (centrally in plugin manager), code that is scheduled on the event loop with QTimer::singleShot or QMetaObject::invokeMethod during initialization, and code that is triggered from ICore::coreOpened Can be turned on by configuring with `BUILD_LIBRARY_NANOTRACE=ON` Run with `-trace <file>` to write trace file. If Nanotrace is not built, the added code expands to nothing. Changes in Nanotrace: - turned generated data to microseconds instead of nanoseconds, because that is what Chrome tracing expects - fixed serialization of duration (needs to be an item of the event, not in a "arg" subitem) - fixed shutdown() to reset the initEvent Change-Id: I994de82023b820d771e1be0a859ebd8da0b73d4d Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
* Core: Never call QMainWindow::menuBar()Eike Ziller2023-09-081-7/+12
| | | | | | | | | | | It replaces the global menu bar on macOS (that is a QMenuBar(nullptr)) with a window specific menu bar, resulting in an empty menu bar for Qt Creator. Amends a6e779606db6c8536c715470ddb73f10c7431e8b Change-Id: Id6e2c0b9b2dfe4ade88af0f9a6d3b008fed790be Reviewed-by: Cristian Adam <cristian.adam@qt.io>
* Core: Add action to hide the menu barCristian Adam2023-09-081-0/+34
| | | | | | | | | | This will only affect the platforms that do not have a native menu bar e.g. Windows and Linux excepting Unity. Fixes: QTCREATORBUG-29498 Change-Id: I17a654cfa50342f3e506bf0a2b14225c4d3a6bee Reviewed-by: Eike Ziller <eike.ziller@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* Core: Add clearAboutInformation functionArtem Sokolovskii2023-09-071-0/+5
| | | | | Change-Id: Ib6dcc3b963917c096756cbff09541f4e13c8184b Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* Utils: Use QtcSettingsMarcus Tillmanns2023-09-051-2/+2
| | | | | | | Fixes compile errors with Qt 6.2.4. Change-Id: Ia97d5fcbeb80ee1242fd4c2425bc7f325dad8953 Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
* Utils: Cache theme icon accesshjk2023-09-011-20/+17
| | | | | | | | These trigger over 120k file exist check on my machine on startup, just for a handful icons. Change-Id: Ic73f0783142ed329c2f8c8b852f622e69fc306da Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
* Add CompilerExplorer pluginMarcus Tillmanns2023-08-171-2/+2
| | | | | | Change-Id: I534dea195a0b74f177fc227483752777485be177 Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: hjk <hjk@qt.io>
* Core: Move SystemSettings page closer to current setuphjk2023-07-281-21/+1
| | | | | | | | Also align items a bit and use BaseAspect::setEnabler() where appropriate. Change-Id: I7497e3ce82f3685582a84b1bf383e65892d76f96 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* Core: Move GeneralSettings setup structure closer to new normalhjk2023-07-271-6/+0
| | | | | Change-Id: I3ffbe1b28971912510582a174bf37a0e3f9d4ff4 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* Merge remote-tracking branch 'origin/11.0'Eike Ziller2023-07-131-0/+1
|\ | | | | | | Change-Id: I2e0e8dd5f9b42533c665255f8539e837938846de
| * Fix order of session vs recent files/projects menuEike Ziller2023-07-121-0/+1
| | | | | | | | | | | | | | Got mixed up when moving the session manager to Core Change-Id: I729dd505c0b58bbbe46ddee423c76ab21c6f1b25 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* | Reduce usage of app_version headerEike Ziller2023-06-261-14/+17
|/ | | | | | | | | | | | Most information is available via Q(Core|Gui)Application. Add an AppInfo structure for the things that are not. This avoids that the information ends up duplicated and hardcoded in the plugins, which is not needed or desired. Change-Id: I4d565e75c42a7b8facafa90c27096ea49359215d Reviewed-by: Alessandro Portale <alessandro.portale@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* Change log: Add links to the bugreportsEike Ziller2023-06-121-2/+4
| | | | | | | | | And prevent that the internal log viewer replaces the bug items with links if they are already within a link. Change-Id: I115fd9be59d0394a91b3bcd3157083e30d44c6b5 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
* Terminal: Clean up settingsEike Ziller2023-06-081-0/+9
| | | | | | | | | | | | | | | Qt Creator <= 10 accidentally wrote the default terminal into the settings on macOS instead of leaving the values empty. So the change from "openTerminal.py" to just "Terminal.app" might not be correctly reflected in the settings. Make sure that the terminal setting is removed in all cases, if it is set to the default. Amends f003234510b924bf1c901843263fbbb69992f5e9 Change-Id: I9d099999f55b4003ac6e7f4a4b679b893eaffc90 Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
* Markdown: Reuse Markdown highlighter from change log viewerEike Ziller2023-04-191-63/+1
| | | | | | Change-Id: Ief1b0c135a34bfd5e9b5220e9fbf93f281d8e95a Reviewed-by: David Schulz <david.schulz@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* Merge remote-tracking branch 'origin/10.0' into qds/devTim Jenßen2023-03-261-103/+97
|\ | | | | | | | | | | | | | | bigger conflicts resolved at: src/plugins/qmldesigner/CMakeLists.txt src/plugins/qmlprojectmanager/qmlprojectrunconfiguration.cpp Change-Id: I08e2a109d8e37cbd77225129854e9e633725bfc7
| * Core: Tr::trhjk2023-01-171-87/+88
| | | | | | | | | | Change-Id: I0064814b0689f0f65072d2b0f60e26162587fd54 Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
| * Utils: Consolidate Link::from{FilePath,String}hjk2023-01-171-1/+1
| | | | | | | | | | | | | | | | The input is more unparsed-string-ish in nature, so FilePath is not appropriate. Change-Id: I85efb5813b8f5fbbc4127be1c936d5487637b75c Reviewed-by: Christian Stenger <christian.stenger@qt.io>
| * Remove GPL-3.0+ from license identifiersKai Köhne2023-01-061-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since we also license under GPL-3.0 WITH Qt-GPL-exception-1.0, this applies only to a hypothetical newer version of GPL, that doesn't exist yet. If such a version emerges, we can still decide to relicense... While at it, replace (deprecated) GPL-3.0 with more explicit GPL-3.0-only Change was done by running find . -type f -exec perl -pi -e "s/LicenseRef-Qt-Commercial OR GPL-3.0\+ OR GPL-3.0 WITH Qt-GPL-exception-1.0/LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0/g" {} \; Change-Id: I5097e6ce8d10233993ee30d7e25120e2659eb10b Reviewed-by: Eike Ziller <eike.ziller@qt.io>
| * Core: Remove unused KeyMarcus Tillmanns2022-12-091-1/+0
| | | | | | | | | | Change-Id: Ic3e9e7b994e010fe1b65b8273e74124dc957bdef Reviewed-by: hjk <hjk@qt.io>
| * CorePlugin: Pass context object to lambda connectionsJarek Kobus2022-12-081-3/+3
| | | | | | | | | | | | | | | | Remove some unneeded lambda () brackets. Change-Id: Id664cfc3b46685f63fb205beaf16a7c271ad95d9 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Eike Ziller <eike.ziller@qt.io>
| * Merge remote-tracking branch 'origin/9.0'Orgad Shaneh2022-11-281-2/+12
| |\ | | | | | | | | | Change-Id: I231d35f492713f317773b79478b5f7fb97a4fe50
| * | Core: Combine two code paths creating absolute pathshjk2022-11-211-7/+1
| | | | | | | | | | | | | | | | | | | | | Remote and local can use the same nowadays. Change-Id: I218aafb0293dadbbf75f248f4076cabfa4a0f3da Reviewed-by: Eike Ziller <eike.ziller@qt.io>
| * | Core: Use FilePath for working dir in MainWindow::openFiles()hjk2022-11-211-4/+4
| | | | | | | | | | | | | | | Change-Id: Ifc8e167a1734115fa7a23f7aefa45fc52e4a70cc Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* | | Add option to hide toolsThomas Hartmann2023-01-271-1/+8
| |/ |/| | | | | | | | | | | | | | | | | This allows hiding the tools menu by default. Power users can enable it again. Change-Id: I5465f0c525bb5b4954e13cb42a941ac8b6b7cf37 Reviewed-by: Eike Ziller <eike.ziller@qt.io> Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
* | Transform doc.qt.io/qt-creator links to internal qthelp links, for linksEike Ziller2022-11-241-2/+12
|/ | | | | | | | that are found locally in the documentation. That opens such links in Qt Creator, instead of in the web, if possible. Change-Id: I2270c6947db22f4aeb4968bf5b7245de57521c92 Reviewed-by: Cristian Adam <cristian.adam@qt.io>
* Utils: Allow mimetype deep-scan for remote filesMarcus Tillmanns2022-11-041-1/+2
| | | | | | | | | | Text editors need to know the actual mimetype of a file to be able to open the correct editor view. Just checking the extension is not enough. Especially on linux there are many text files without an extension. Change-Id: I7e5c935b0619f5d86e97f10bfd7ff9b65da62f4b Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* macOS: Fix missing "Search" item in help menuEike Ziller2022-11-011-0/+1
| | | | | | | | | | Define the menu as the help menu directly in the the NSApplication, since the OS built-in heuristics based on the menu name easily fails. Fixes: QTCREATORBUG-24751 Change-Id: I9aa50a46099e295ec0c38ee8a9e88d75d41c74ad Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* Re-add "Toogle Bookmark" icon into touch barEike Ziller2022-10-171-1/+1
| | | | | | | | | | | | | Instead of "Edit Bookmark" which was not intended to be there. Also move it behind the "navigation" items, since these are probably used more often. Amends ac47d51bfb379b8c3b51d832d54a90dba18a518f Fixes: QTCREATORBUG-28108 Change-Id: I47c443772488b7f9e29c8fadf01011d4ddfd5686 Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: David Schulz <david.schulz@qt.io>
* MainWindow: Use FileUtils::get... functionsMarcus Tillmanns2022-10-131-31/+1
| | | | | | | | Changes the MainWindow to use FileUtils::getFilePaths function to access files on devices instead of QFileDialog. Change-Id: I0981c960b643edd69510cfed1cce16346962d75a Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* Port from qAsConst() to std::as_const()Marc Mutz2022-10-071-2/+2
| | | | | | | | | | | | | | We've been requiring C++17 since Qt 6.0, and our qAsConst use finally starts to bother us (QTBUG-99313), so time to port away from it now. Since qAsConst has exactly the same semantics as std::as_const (down to rvalue treatment, constexpr'ness and noexcept'ness), there's really nothing more to it than a global search-and-replace. Task-number: QTBUG-99313 Change-Id: I88edd91395849574436299b8badda21bb93bea39 Reviewed-by: hjk <hjk@qt.io>
* CorePlugin: Limit the usage of qMakePair and std::make_pairJarek Kobus2022-09-301-1/+1
| | | | | | Change-Id: Ibf96ca29d2570841955366371f1bab11198b3e67 Reviewed-by: Eike Ziller <eike.ziller@qt.io> Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
* MainWindow: Disable TrimTimer on non Linux HostMarcus Tillmanns2022-09-271-5/+7
| | | | | | | | | Timers showed up a lot during cpu profiling on macOS. This is one of them. Since its only used on Linux, this patch makes sure that its only started there as well. Change-Id: I0da35473b622c92e39a7e45677441f1cd8aa3344 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* FilePath: Return optional bytearray for file contentsEike Ziller2022-09-121-1/+1
| | | | | | | For differentiating between "error" and "empty file". Change-Id: I2c019ceac625e7be3180afa4d47ae3a24df91c1d Reviewed-by: hjk <hjk@qt.io>
* Use SPDX license identifiersLucie Gérard2022-08-261-24/+2
| | | | | | | | | Replace the current license disclaimer in files by a SPDX-License-Identifier. Task-number: QTBUG-67283 Change-Id: I708fd1f9f2b73d60f57cc3568646929117825813 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* App: Use more local methods to trigger memory trim timerhjk2022-08-021-0/+29
| | | | | | | | | | | | | The global event filter function is executed often, for events originating deep in the widget hierarchy even multiple times. Triggering the timer only by mouse and key presses on the main application and on texteditor is less intrusive and still happens often enough (TM). Change-Id: I848d55a347bd62d12e8523965d1750c59da33116 Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Drop Qt5: CorePlugin: Remove code below Qt 6.0.0Jarek Kobus2022-07-251-4/+0
| | | | | | Change-Id: Ib00643f43ae1dfa42ae7ce6b4275fd50dd572765 Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* Utils: Use FilePaths alias instead of QList<FilePath>Alessandro Portale2022-07-211-2/+2
| | | | | | Change-Id: I2eb0956377e46a34e73208b301eb662704a25e8b Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* filesystem: Add QFSEngine for filepathsMarcus Tillmanns2022-07-211-9/+59
| | | | | Change-Id: Ibd0c88c69863c0877138d8cc45541530c359bd9c Reviewed-by: hjk <hjk@qt.io>
* Drop Qt5: Core: Get rid of QOverloadJarek Kobus2022-07-201-1/+1
| | | | | | Change-Id: Ibaebd83304680156e13a9ebc473075ad2a4bfed4 Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
* Core: Fix build with Qt5Christian Stenger2022-07-071-0/+4
| | | | | | | Amends 5b683c53c37. Change-Id: I80b8b6d1b508e42f81e022fee19117285a4c9687 Reviewed-by: Cristian Adam <cristian.adam@qt.io>
* Change log browser: Use the markdown renderer for the .md filesCristian Adam2022-07-071-7/+69
| | | | | | Change-Id: I8a419b746b4b88a89ea77de8bd160acebd595655 Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* CorePlugin: Use Tr::tr instead of QCoreApplication::translate("Core"...Eike Ziller2022-07-061-17/+17
| | | | | | Change-Id: Idf0b8e9effedbacda7a4eedb5bf0f78918fce631 Reviewed-by: hjk <hjk@qt.io> Reviewed-by: <github-actions-qt-creator@cristianadam.eu>