diff --git a/dist/changelog/changes-9.0.0.md b/dist/changelog/changes-9.0.0.md new file mode 100644 index 00000000000..db596733412 --- /dev/null +++ b/dist/changelog/changes-9.0.0.md @@ -0,0 +1,182 @@ +Qt Creator 9 +============ + +Qt Creator version 9 contains bug fixes and new features. + +The most important changes are listed in this document. For a complete list of +changes, see the Git log for the Qt Creator sources that you can check out from +the public Git repository. For example: + + git clone git://code.qt.io/qt-creator/qt-creator.git + git log --cherry-pick --pretty=oneline origin/8.0..v9.0.0 + +General +------- + +* Added change log browser `Help > Change Log` (`Qt Creator > Change Log` on + macOS) +* Added option for showing locator as a centered popup +* Added non-menu actions to locator `t` filter + +Editing +------- + +* Added option for visualizing indentation (QTCREATORBUG-22756) +* Added option for `Tint whole margin area` +* Added option for line spacing (QTCREATORBUG-13727) +* Added `Create Cursors at Selected Line Ends` +* Improved UI for multiple markers on the same line (QTCREATORBUG-27415) +* Fixed performance issue with large selections +* Fixed `Rewrap Paragraph` for Doxygen comments (QTCREATORBUG-9739) +* Fixed MIME type matching for generic highlighting with MIME type aliases + +### C++ + +* Moved code style editor from dialog directly into the preferences page +* Added `Show Preprocessed Source` +* Added `Follow Symbol` for QRC files in string literals (QTCREATORBUG-28087) +* Added option for returning only non-value types by const reference + (QTCREATORBUG-25790) +* Fixed that selection was not considered for refactoring actions + (QTCREATORBUG-27886) +* Clangd + * Added option for using single Clangd instance for the whole session + (QTCREATORBUG-26526) + * Added option for maximum number of completion results (default 100) + (QTCREATORBUG-27152) + * Added option for document specific preprocessor directives + (QTCREATORBUG-20423) + * Fixed semantic highlighting for `__func__` + * Fixed double items in outline after switching Clangd off and on + (QTCREATORBUG-27594) +* Built-in + * Added support for structured bindings (QTCREATORBUG-27975) +* ClangFormat + * Moved settings back to top level preferences page + +### Language Server Protocol + +* Improved performance for large documents +* Fixed that server was not restarted after 5 times, even if a long time passed + after the last time + +### Binaries + +* Added support for character encoding + +### Image Viewer + +* Made `Fit to Screen` sticky and added option for the default + (QTCREATORBUG-27816) + +Projects +-------- + +* Added option for hiding build system output with `Show Right Sidebar` + (QTCREATORBUG-26069) +* Fixed that opening terminal from build environment settings did not change + directory to build directory + +### CMake + +* Moved settings from `Kits` and `Build & Run` into their own `CMake` category +* Turned `Package manager auto setup` off by default +* Added support for CMake configure presets (QTCREATORBUG-24555) +* Added option for changing environment for configure step +* Added option for hiding subfolders in source groups (QTCREATORBUG-27432) +* Fixed that `PATH` environment variable was not completely set up during first + CMake run + +### Qbs + +* Fixed that `qbs.sysroot` was not considered + +Debugging +--------- + +* Added warning for missing QML debugging functionality for mobile and embedded + devices +* Fixed display of strings with characters more than 2 bytes long + +Version Control Systems +----------------------- + +### Git + +* Added support for user-configured comment character (QTCREATORBUG-28042) + +Test Integration +---------------- + +* Added support for Squish +* Catch 2 + * Fixed handling of exceptions (QTCREATORBUG-28131) + +Platforms +--------- + +### Windows + +* Improved detection of MinGW and LLVM ABI (QTCREATORBUG-26247) +* Fixed wrong debugger when importing build (QTCREATORBUG-27758) +* Fixed issues when drives are mapped (QTCREATORBUG-27869, QTCREATORBUG-28031) +* Fixed that output could be missing for Qt based external tools + (QTCREATORBUG-27828) + +### macOS + +* Added auto-detection of `ccache` compilers from Homebrew (QTCREATORBUG-27792) +* Fixed that theme partially switched between dark and light when system theme + changed during runtime (QTCREATORBUG-28066) + +### iOS + +* Fixed determination of Qt version when debugging + +### Remote Linux + +* Added option for SSH port to wizard +* Added fallback for devices without `base64` + +### Docker + +* Added option for `docker` command +* Added detection of Python +* Improved device wizard + +Credits for these changes go to: +-------------------------------- +Aaron Barany +Alessandro Portale +Alexander Akulich +Alexander Drozdov +André Pönitz +Artem Sokolovskii +Assam Boudjelthia +Björn Schäpers +Christiaan Janssen +Christian Kandeler +Christian Stenger +Cristian Adam +Daniele Bortolotti +David Schulz +Eike Ziller +Fawzi Mohamed +Florian Koch +Henning Gruendl +Jaroslaw Kobus +Lucie Gérard +Marco Bubke +Marcus Tillmanns +Miikka Heikkinen +Orgad Shaneh +Piotr Mućko +Robert Löhning +Sergey Levin +Sivert Krøvel +Tasuku Suzuki +Thiago Macieira +Thomas Hartmann +Tim Jenssen +Ulf Hermann +Yasser Grimes diff --git a/share/qtcreator/templates/wizards/codesnippet/CMakeLists.txt b/share/qtcreator/templates/wizards/codesnippet/CMakeLists.txt new file mode 100644 index 00000000000..603186293d9 --- /dev/null +++ b/share/qtcreator/templates/wizards/codesnippet/CMakeLists.txt @@ -0,0 +1,37 @@ +cmake_minimum_required(VERSION 3.5) + +project(%{ProjectName} VERSION 0.1 LANGUAGES CXX) + +set(CMAKE_AUTOUIC ON) +set(CMAKE_AUTOMOC ON) +set(CMAKE_AUTORCC ON) + +set(CMAKE_CXX_STANDARD 17) +set(CMAKE_CXX_STANDARD_REQUIRED ON) + +find_package(QT NAMES Qt6 Qt5 REQUIRED COMPONENTS %{QtModule}) +find_package(Qt${QT_VERSION_MAJOR} REQUIRED COMPONENTS %{QtModule}) + +if(${QT_VERSION_MAJOR} GREATER_EQUAL 6) + qt_add_executable(%{ProjectName} MANUAL_FINALIZATION %{CppFileName}) +else() + if(ANDROID) + add_library(%{ProjectName} SHARED %{CppFileName}) + else() + add_executable(%{ProjectName} %{CppFileName}) + endif() +endif() + +target_link_libraries(%{ProjectName} PRIVATE Qt${QT_VERSION_MAJOR}::%{QtModule}) + +install(TARGETS %{ProjectName} +@if %{MacOSBundle} + BUNDLE DESTINATION . +@endif + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}) + +set_target_properties(%{ProjectName} PROPERTIES MACOSX_BUNDLE %{MacOSBundleValue}) + +if(QT_VERSION_MAJOR EQUAL 6) + qt_finalize_executable(%{ProjectName}) +endif() diff --git a/share/qtcreator/templates/wizards/codesnippet/main.cpp b/share/qtcreator/templates/wizards/codesnippet/main.cpp index 59d189b301a..cd2231693a1 100644 --- a/share/qtcreator/templates/wizards/codesnippet/main.cpp +++ b/share/qtcreator/templates/wizards/codesnippet/main.cpp @@ -1 +1 @@ -%CODE% +%{CodeSnippet} diff --git a/share/qtcreator/templates/wizards/codesnippet/project.pro b/share/qtcreator/templates/wizards/codesnippet/project.pro deleted file mode 100644 index 6dafac76de3..00000000000 --- a/share/qtcreator/templates/wizards/codesnippet/project.pro +++ /dev/null @@ -1,17 +0,0 @@ -TEMPLATE = app -@if "%TYPE%" == "core" -QT = core -@else -QT = core gui -greaterThan(QT_MAJOR_VERSION, 4): QT += widgets -@endif -@if "%CONSOLE%" == "true" -CONFIG += console -@endif -@if "%APP_BUNDLE%" == "false" -CONFIG -= app_bundle -@endif -CONFIG += c++11 - -SOURCES += \\ - main.%CppSourceSuffix% diff --git a/share/qtcreator/templates/wizards/codesnippet/wizard.json b/share/qtcreator/templates/wizards/codesnippet/wizard.json new file mode 100644 index 00000000000..40757cf5715 --- /dev/null +++ b/share/qtcreator/templates/wizards/codesnippet/wizard.json @@ -0,0 +1,113 @@ +{ + "version": 1, + "supportedProjectTypes": [ "CMakeProjectManager.CMakeProject" ], + "id": "Z.Snippet", + "category": "H.Project", + "trDescription": "Creates a CMake-based test project for which a code snippet can be entered.", + "trDisplayName": "Code Snippet", + "trDisplayCategory": "Other Project", + "featuresRequired": [ "QtSupport.Wizards.FeatureQt" ], + "enabled": "%{JS: value('Plugins').indexOf('CMakeProjectManager') >= 0}", + + "options": + [ + { "key": "ProjectFile", "value": "%{ProjectDirectory}/CMakeLists.txt" }, + { "key": "CppFileName", "value": "%{JS: 'main.' + Util.preferredSuffix('text/x-c++src')}" }, + { "key": "MacOSBundleValue", "value": "%{JS: %{MacOSBundle} ? 'TRUE' : 'FALSE' }" } + ], + "pages": + [ + { + "trDisplayName": "Project Location", + "trShortTitle": "Location", + "typeId": "Project", + "data": + { + "trDescription": "Creates a CMake-based test project for which a code snippet can be entered." + } + }, + { + "trDisplayName": "Define Code snippet", + "trShortTitle": "Code snippet", + "typeId": "Fields", + "data": + [ + { + "name": "CodeSnippet", + "trDisplayName": "Code:", + "type": "TextEdit", + "data": + { + "trText": "int main(int argc, char *argv[])\n{\n return 0;\n}" + } + }, + { + "name": "QtModule", + "trDisplayName": "Use Qt Modules:", + "type": "ComboBox", + "persistenceKey": "QtModule", + "data": + { + "index": 1, + "items": + [ + { + "trKey": "QtCore", + "value": "Core" + }, + { + "trKey": "QtCore, QtWidgets", + "value": "Widgets" + } + ] + } + }, + { + "name": "MacOSBundle", + "trDisplayName": "Application bundle (macOS)", + "type": "CheckBox", + "persistenceKey": "MacOSBundle", + "data": + { + "checked": true + } + } + ] + }, + { + "trDisplayName": "Kit Selection", + "trShortTitle": "Kits", + "typeId": "Kits", + "enabled": "%{JS: !value('IsSubproject')}", + "data": + { + "projectFilePath": "%{ProjectFile}" + } + }, + { + "trDisplayName": "Project Management", + "trShortTitle": "Summary", + "typeId": "Summary" + } + ], + + "generators": + [ + { + "typeId": "File", + "data": + [ + { + "source": "CMakeLists.txt", + "target": "%{ProjectFile}", + "openAsProject": true + }, + { + "source": "main.cpp", + "target": "%{CppFileName}", + "openInEditor": true + } + ] + } + ] +} diff --git a/share/qtcreator/templates/wizards/codesnippet/wizard.xml b/share/qtcreator/templates/wizards/codesnippet/wizard.xml deleted file mode 100644 index 2acffc8c6fd..00000000000 --- a/share/qtcreator/templates/wizards/codesnippet/wizard.xml +++ /dev/null @@ -1,49 +0,0 @@ - - - - Creates a qmake-based test project for which a code snippet can be entered. - Code Snippet; - Other Project - - - - - Snippet Parameters - - - - Code: - - - Type: - - - - Headless (QtCore) - - - Gui application (QtCore, QtGui, QtWidgets) - - - - - - - Console application - - - - Application bundle (Mac) - - - diff --git a/share/qtcreator/translations/qtcreator_cs.ts b/share/qtcreator/translations/qtcreator_cs.ts index e4895f8b423..ee2b5662bc7 100644 --- a/share/qtcreator/translations/qtcreator_cs.ts +++ b/share/qtcreator/translations/qtcreator_cs.ts @@ -278,7 +278,7 @@ - CMakeProjectManager::Internal::CMakeBuildEnvironmentWidget + CMakeProjectManager Clear system environment Vyprázdnit prostředí systému @@ -287,9 +287,6 @@ Build Environment Prostředí pro sestavování - - - CMakeProjectManager::Internal::CMakeBuildSettingsWidget Run cmake Provést cmake @@ -310,16 +307,10 @@ CMake CMake - - - CMakeProjectManager::Internal::CMakeOpenProjectWizard CMake Wizard Průvodce CMake - - - CMakeProjectManager::Internal::CMakeRunConfigurationWidget Arguments: Argumenty: @@ -372,17 +363,10 @@ System Environment Prostředí systému - - Build Environment - Prostředí pro sestavování - Running executable: <b>%1</b> %2 Spouští se spustitelný soubor: <b>%1</b> %2 - - - CMakeProjectManager::Internal::CMakeRunPage Please specify the path to the cmake executable. No cmake executable was found in the path. Zadejte, prosím, cestu ke spustitelnému souboru cmake. V cestě nebyl nalezen žádný spustitelný soubor cmake. @@ -399,10 +383,6 @@ The path %1 is not a valid cmake. Cesta '%1' není platným cmake. - - Arguments: - Argumenty: - Generator: Generátor: @@ -439,14 +419,6 @@ Refreshing cbp file in %1. Soubor cpb ve složce %1 se vytváří znovu. - - MinGW Generator (%1) - Generátor MinGW (%1) - - - Unix Generator (%1) - Generátor Unix (%1) - No generator selected. Nevybrán žádný generátor. @@ -479,14 +451,6 @@ The directory %1 specified in a build-configuration, does not contain a cbp file. Qt Creator needs to recreate this file, by running cmake. Some projects require command line arguments to the initial cmake call. Note that cmake remembers command line arguments from the previous runs. Adresář %1, který byl zadán v nastavení sestavování, neobsahuje soubor cbp. Qt Creator musí soubor vytvořit pomocí vyvolání cmake. U některých projektů jsou k tomu vyžadovány argumenty příkazového řádku. Všimněte si, že cmake ukládá argumenty příkazového řádku z předchozího vyvolání. - - NMake Generator - Tvůrce NMake - - - NMake Generator (%1) - Generátor NMake (%1) - MinGW Generator Tvůrce MinGW @@ -499,13 +463,6 @@ Qt Creator needs to run cmake in the new build directory. Some projects require command line arguments to the initial cmake call. Qt Creator musí vyvolat cmake v novém adresáři pro sestavování. U některých projektů jsou k tomu vyžadovány argumenty příkazového řádku. - - - CMakeProjectManager::Internal::CMakeSettingsPage - - CMake - CMake - Executable: Spustitelný soubor: @@ -518,9 +475,6 @@ CMake executable Spustitelný soubor CMake - - - CMakeProjectManager::Internal::InSourceBuildPage Qt Creator has detected an <b>in-source-build in %1</b> which prevents shadow builds. Qt Creator will not allow you to change the build directory. If you want a shadow build, clean your source directory and re-open the project. Bylo zjištěno <b>sestavování ve zdrojovém adresáři v %1</b>, které zabraňuje stínovým sestavováním. Adresář se sestavováním nelze v Qt Creatoru změnit. Pokud chcete stínové sestavování, vyčistěte, prosím, svůj zdrojový adresář a otevřte projekt znovu ještě jednou. @@ -529,9 +483,6 @@ Build Location Umístění sestavování - - - CMakeProjectManager::Internal::MakeStepConfigWidget Additional arguments: Dodatečné argumenty: @@ -565,9 +516,6 @@ <b>Unknown Toolchain</b> <b>Neznámá sada nástrojů</b> - - - CMakeProjectManager::Internal::ShadowBuildPage Please enter the directory in which you want to build your project. Zadejte, prosím, adresář, ve kterém chcete vytvořit svůj projekt. @@ -580,14 +528,6 @@ Please enter the directory in which you want to build your project. Qt Creator recommends to not use the source directory for building. This ensures that the source directory remains clean and enables multiple builds with different settings. Zadejte, prosím, adresář, ve kterém chcete vytvořit svůj projekt.. Doporučuje se, nepoužívat pro vytvoření projektu zdrojový adresář. Tím se zajistí, že zdrojový adresář zůstane volný, a umožní různá sestavení s rozdílnými nastaveními. - - Build directory: - Adresář pro sestavování: - - - Build Location - Umístění sestavování - CPlusPlus::OverviewModel @@ -12190,43 +12130,11 @@ přidat do správy verzí (%2)? - QMakeStep + QmakeProjectManager QMake Build Configuration: Nastavení sestavování pro QMake: - - debug - debug - - - release - release - - - Additional arguments: - Dodatečné argumenty: - - - Effective qmake call: - Účinné vyvolání qmake: - - - qmake build configuration: - Nastavení sestavování pro qmake: - - - Debug - Ladění - - - Release - Vydání - - - Link QML debugging library: - Odkaz na knihovnu pro ladění QML: - QObject @@ -12412,7 +12320,7 @@ přidat do správy verzí (%2)? - QmakeProjectManager::Internal::ConsoleAppWizard + QmakeProjectManager Qt4 Console Application Konzolová aplikace v Qt4 @@ -12433,9 +12341,6 @@ Preselects a desktop Qt for building the application if available. Vybere pro sestavení programu verzi Qt pro stolní počítač, je-li dostupná. - - - QmakeProjectManager::Internal::ConsoleAppWizardDialog This wizard generates a Qt4 console application project. The application derives from QCoreApplication and does not provide a GUI. Tento průvodce vytvoří projekt konzolové aplikace v Qt4. Aplikace je odvozena z QCoreApplication a nemá žádné uživatelské rozhraní. @@ -12448,9 +12353,6 @@ Vybere pro sestavení programu verzi Qt pro stolní počítač, je-li dostupná. This wizard generates a Qt Console Application project. The application derives from QCoreApplication and does not provide a GUI. Tento průvodce vytvoří projekt konzolové aplikace v Qt4. Aplikace je odvozena z QCoreApplication a nemá žádné uživatelské rozhraní. - - - QmakeProjectManager::Internal::DesignerExternalEditor Qt Designer is not responding (%1). Qt Designer neodpovídá (%1). @@ -12459,16 +12361,10 @@ Vybere pro sestavení programu verzi Qt pro stolní počítač, je-li dostupná. Unable to create server socket: %1 Serverovou zásuvku se nepodařilo vytvořit: %1 - - - QmakeProjectManager::Internal::EmbeddedPropertiesPanel Embedded Linux Vložený Linux - - - QmakeProjectManager::Internal::EmptyProjectWizard Empty Qt4 Project Prázdný projekt Qt4 @@ -12485,9 +12381,6 @@ Vybere pro sestavení programu verzi Qt pro stolní počítač, je-li dostupná. Creates a qmake-based project without any files. This allows you to create an application without any default classes. Vytvoří projekt založený na qmake bez jakýchkoli souborů. To vám umožní vytvoření programu bez jakýchkoli výchozích tříd. - - - QmakeProjectManager::Internal::EmptyProjectWizardDialog This wizard generates an empty Qt4 project. Add files to it later on by using the other wizards. Tento průvodce vytvoří prázdný projekt Qt4. S pomocí ostatních průvodců do něj lze později přidat další soubory. @@ -12496,9 +12389,6 @@ Vybere pro sestavení programu verzi Qt pro stolní počítač, je-li dostupná. This wizard generates an empty Qt project. Add files to it later on by using the other wizards. Tento průvodce vytvoří prázdný projekt Qt4. S pomocí ostatních průvodců do něj lze později přidat další soubory. - - - QmakeProjectManager::Internal::ExternalQtEditor Unable to start "%1" Nelze spustit "%1" @@ -12507,9 +12397,6 @@ Vybere pro sestavení programu verzi Qt pro stolní počítač, je-li dostupná. The application "%1" could not be found. Aplikaci "%1" se nepodařilo najít. - - - QmakeProjectManager::Internal::FilesPage Class Information Informace ohledně třídy @@ -12518,9 +12405,6 @@ Vybere pro sestavení programu verzi Qt pro stolní počítač, je-li dostupná. Specify basic information about the classes for which you want to generate skeleton source code files. Zadejte základní informace ohledně tříd, pro které chcete vytvořit soubory s kostrou zdrojového kódu. - - - QmakeProjectManager::Internal::GuiAppWizard Qt4 Gui Application Program s uživatelským rozhraním Qt4 @@ -12549,9 +12433,6 @@ Vybere pro vývoj programu vhodnou verzi Qt, je-li dostupná. The template file '%1' could not be opened for reading: %2 Soubor s předlohou '%1' se nepodařilo otevřít pro čtení: %2 - - - QmakeProjectManager::Internal::GuiAppWizardDialog This wizard generates a Qt4 GUI application project. The application derives by default from QApplication and includes an empty widget. Tento průvodce vytvoří projekt programu s uživatelským rozhraním Qt4. Aplikace se odvozuje ve výchozím nastavení od třídy QApplication s obsahuje jeden prázdný prvek. @@ -12568,9 +12449,6 @@ Vybere pro vývoj programu vhodnou verzi Qt, je-li dostupná. Details Podrobnosti - - - QmakeProjectManager::Internal::LibraryWizard C++ Library Knihovna C++ @@ -12587,9 +12465,6 @@ Vybere pro vývoj programu vhodnou verzi Qt, je-li dostupná. Creates a C++ Library. Vytvoří knihovnu C++. - - - QmakeProjectManager::Internal::LibraryWizardDialog Shared library Sdílená knihovna (dynamicky svázaná) @@ -12634,13 +12509,6 @@ Vybere pro vývoj programu vhodnou verzi Qt, je-li dostupná. Symbian Specific Zvláštní pro Symbian - - Details - Podrobnosti - - - - QmakeProjectManager::Internal::ModulesPage Select required modules Vybrat požadované moduly @@ -12653,9 +12521,6 @@ Vybere pro vývoj programu vhodnou verzi Qt, je-li dostupná. Select the modules you want to include in your project. The recommended modules for this project are selected by default. Vyberte moduly, které chcete zahrnout ve svém projektu. Moduly doporučené pro tento projekt jsou již vybrány. - - - QmakeProjectManager::Internal::ProEditor New Nový @@ -12708,9 +12573,6 @@ Vybere pro vývoj programu vhodnou verzi Qt, je-li dostupná. Add Block Přidat blok - - - QmakeProjectManager::Internal::ProEditorModel <Global Scope> <Celkový obor> @@ -12747,9 +12609,6 @@ Vybere pro vývoj programu vhodnou verzi Qt, je-li dostupná. Insert Item Vložit prvek - - - QmakeProjectManager::Internal::ProjectLoadWizard Import existing build settings Zavést stávající nastavení sestavování @@ -12774,9 +12633,6 @@ Vybere pro vývoj programu vhodnou verzi Qt, je-li dostupná. Project Setup Nastavení projektu - - - QmakeProjectManager::Internal::QmakeBuildEnvironmentWidget Clear system environment Vyprázdnit prostředí systému @@ -12785,37 +12641,6 @@ Vybere pro vývoj programu vhodnou verzi Qt, je-li dostupná. Build Environment Prostředí pro sestavování - - - QmakeProjectManager::Internal::QmakePriFileNode - - Headers - Hlavičky - - - Sources - Zdroje - - - Forms - Formuláře - - - Resources - Prostředky - - - QML - QML - - - Other files - Jiné soubory - - - Cannot Open File - Soubor nelze otevřít - Cannot open the file for edit with VCS. Soubor se nepodařilo s pomocí správy verzí udělat zapisovatelný (otevřít pro úpravy). @@ -12828,14 +12653,6 @@ Vybere pro vývoj programu vhodnou verzi Qt, je-li dostupná. Cannot set permissions to writable. Soubor se nepodařilo udělat zapisovatelný. - - Failed! - Chyba! - - - File Error - Chyba souboru - Could not open the file for edit with SCC. Soubor se nepodařilo otevřít pro úpravy s pomocí SCC. @@ -12844,40 +12661,10 @@ Vybere pro vývoj programu vhodnou verzi Qt, je-li dostupná. Could not set permissions to writable. Nepodařilo se nastavit oprávnění k souboru tak, aby se stal zapisovatelným. - - There are unsaved changes for project file %1. - Soubor s projektem %1 má neuložené změny. - - - Could not write project file %1. - Soubor s projektem %1 se nepodařilo zapsat. - Error while reading PRO file %1: %2 Chyba při čtení souboru PRO %1: %2 - - Error while parsing file %1. Giving up. - Chyba při vyhodnocování souboru %1. Zrušeno. - - - Error while changing pro file %1. - Chyba při změně projektového souboru %1. - - - - QmakeProjectManager::Internal::QmakeProFileNode - - Error while parsing file %1. Giving up. - Chyba při vyhodnocování souboru %1. Zrušeno. - - - Could not find .pro file for sub dir '%1' in '%2' - Soubor .pro pro podadresář '%1' se v '%2' nepodařilo najít - - - - QmakeProjectManager::Internal::QmakeProjectConfigWidget Configuration Name: Název nastavení: @@ -12972,16 +12759,6 @@ Vybere pro vývoj programu vhodnou verzi Qt, je-li dostupná. Warning: Varování: - - %1 Debug - Name of a debug build configuration to created by a project wizard, %1 being the Qt version name. We recommend not translating it. - %1 ladění - - - %1 Release - Name of a release build configuration to created by a project wizard, %1 being the Qt version name. We recommend not translating it. - %1 vydání - <No tool chain selected> <b>Nevybrána žádna sada nástrojů</b> @@ -13031,13 +12808,6 @@ Vybere pro vývoj programu vhodnou verzi Qt, je-li dostupná. problemLabel problemLabel - - Manage... - Spravovat... - - - - QmakeProjectManager::Internal::QmakeProjectManagerPlugin Run qmake Provést qmake @@ -13110,9 +12880,6 @@ Vybere pro vývoj programu vhodnou verzi Qt, je-li dostupná. Build in %1 Sestavit v %1 - - - QmakeProjectManager::Internal::QmakeRunConfiguration Qt4RunConfiguration Nastavení spuštění Qt4 @@ -13141,10 +12908,6 @@ Vybere pro vývoj programu vhodnou verzi Qt, je-li dostupná. System Environment Prostředí systému - - Build Environment - Prostředí pro sestavování - Qt Run Configuration Nastavení spuštění Qt4 @@ -13157,9 +12920,6 @@ Vybere pro vývoj programu vhodnou verzi Qt, je-li dostupná. Qt4 RunConfiguration Nastavení spuštění Qt4 - - - QmakeProjectManager::Internal::QmakeRunConfigurationWidget Name: Název: @@ -13224,18 +12984,6 @@ Vybere pro vývoj programu vhodnou verzi Qt, je-li dostupná. Base environment for this runconfiguration: Základní prostředí pro toto nastavení spuštění: - - Clean Environment - Smazat prostředí - - - System Environment - Prostředí systému - - - Build Environment - Prostředí pro sestavování - Running executable: <b>%1</b> %2 (in terminal) Spouští se spustitelný soubor: <b>%1</b> %2 (v terminálu) @@ -13248,9 +12996,6 @@ Vybere pro vývoj programu vhodnou verzi Qt, je-li dostupná. Use debug version of frameworks (DYLD_IMAGE_SUFFIX=_debug) Používat ladicí verzi rámce (DYLD_IMAGE_SUFFIX=_debug) - - - QmakeProjectManager::Internal::QtOptionsPageWidget <specify a name> <Zadejte název> @@ -13345,9 +13090,6 @@ Vybere pro vývoj programu vhodnou verzi Qt, je-li dostupná. Found Qt version %1, using mkspec %2 Byla nalezena verze Qt %1 s mkspec %2 - - - QmakeProjectManager::Internal::QtVersionManager Qt versions Verze Qt @@ -13460,16 +13202,10 @@ p, li { white-space: pre-wrap; } Debugging helper: Pomocná knihovna pro výstup dat o ladění: - - - QmakeProjectManager::Internal::QtWizard The project %1 could not be opened. Projekt %1 se nepodařilo otevřít. - - - QmakeProjectManager::Internal::ValueEditor Edit Variable Upravir proměnnou @@ -13522,14 +13258,6 @@ p, li { white-space: pre-wrap; } Edit Items Upravit prvky - - New - Nový - - - Remove - Odstranit - Edit Values Upravit hodnoty @@ -13546,9 +13274,6 @@ p, li { white-space: pre-wrap; } Edit Advanced Expression Upravit rozšířený výraz - - - QmakeProjectManager::MakeStep <font color="#ff0000">Could not find make command: %1 in the build environment</font> <font color="#ff0000">Příkaz make %1 se v prostředí pro sestavování nepodařilo nalézt</font> @@ -13595,9 +13320,6 @@ p, li { white-space: pre-wrap; } Could not find make command: %1 in the build environment Příkaz make: %1 se v prostředí pro sestavování nepodařilo nalézt - - - QmakeProjectManager::MakeStepConfigWidget Override %1: Přepsat %1: @@ -13630,9 +13352,6 @@ p, li { white-space: pre-wrap; } <b>Make:</b> %1 %2 in %3 <b>Příkaz Make:</b> %1 %2 v %3 - - - QmakeProjectManager::QMakeStep <font color="#ff0000"><b>No valid Qt version set. Set one in Preferences </b></font> @@ -13691,17 +13410,6 @@ p, li { white-space: pre-wrap; } Library not available. <a href='compile'>Compile...</a> Knihovna není dostupná. <a href='compile'>Sestavit...</a> - - QML Debugging - Ladění QML - - - The option will only take effect if the project is recompiled. Do you want to recompile now? - Toto nastavení se projeví jen v případě nového sestavení projektu. Chcete projekt sestavit znovu nyní? - - - - QmakeProjectManager::QmakeManager Loading project %1 ... Nahrává se projekt %1 ... @@ -13762,9 +13470,6 @@ p, li { white-space: pre-wrap; } Done opening project Projekt otevřen - - - QmakeProjectManager::QtVersionManager <not found> <nenalezeno> @@ -13773,10 +13478,6 @@ p, li { white-space: pre-wrap; } Qt in PATH Qt v CESTĚ - - Name: - Název: - Source: Zdroj: @@ -13801,10 +13502,6 @@ p, li { white-space: pre-wrap; } Version: Verze: - - Debugging helper: - Pomocná knihovna pro výstup dat o ladění: - QtDumperHelper @@ -17743,7 +17440,7 @@ Toho se dosáhne vložením této zkratky v zadávacím poli vyhledávače, nás - QmakeProjectManager::Internal::ClassDefinition + QmakeProjectManager Form Formulář @@ -17848,13 +17545,6 @@ Toho se dosáhne vložením této zkratky v zadávacím poli vyhledávače, nás Icon files (*.png *.ico *.jpg *.xpm *.tif *.svg) Soubory s ikonami (*.png *.ico *.jpg *.xpm *.tif *.svg) - - - QmakeProjectManager::Internal::CustomWidgetPluginWizardPage - - WizardPage - WizardPage - Plugin and Collection Class Information Přídavný modul a informace o třídě sbírky @@ -17887,9 +17577,6 @@ Toho se dosáhne vložením této zkratky v zadávacím poli vyhledávače, nás icons.qrc icons.qrc - - - QmakeProjectManager::Internal::CustomWidgetWidgetsWizardPage Custom Qt Widget Wizard Průvodce pro vytvoření vlastního prvku Qt @@ -18115,11 +17802,7 @@ Toho se dosáhne vložením této zkratky v zadávacím poli vyhledávače, nás - QmakeProjectManager::Internal::S60DevicesPreferencePane - - Form - Formulář - + QmakeProjectManager Installed S60 SDKs: Nainstalované S60-SDK: @@ -18152,10 +17835,6 @@ Toho se dosáhne vložením této zkratky v zadávacím poli vyhledávače, nás Change Qt version Změnit verzi Qt - - Remove - Odstranit - TextEditor::Internal::ColorSchemeEdit @@ -18691,7 +18370,7 @@ Toho se dosáhne vložením této zkratky v zadávacím poli vyhledávače, nás - CMakeProjectManager::Internal::CMakeBuildConfigurationFactory + CMakeProjectManager Create Vytvořit @@ -20416,7 +20095,7 @@ Důvod: %2 - QmakeProjectManager::Internal::ClassList + QmakeProjectManager <New class> <Nová třída> @@ -20429,9 +20108,6 @@ Důvod: %2 Delete class %1 from list? Má se smazat třída %1 na seznamu? - - - QmakeProjectManager::Internal::CustomWidgetWizard Qt4 Designer Custom Widget Uživatelsky stanovený prvek pro Qt4 Designer @@ -20448,9 +20124,6 @@ Důvod: %2 Creates a Qt Custom Designer Widget or a Custom Widget Collection. Vytvoří jeden nebo více uživatelsky stanovených prvků pro Qt Designer. - - - QmakeProjectManager::Internal::CustomWidgetWizardDialog This wizard generates a Qt4 Designer Custom Widget or a Qt4 Designer Custom Widget Collection project. Tento průvodce vytvoří projekt Qt4 s jedním nebo více uživatelsky stanovenými prvky pro Qt4 Designer. @@ -20467,9 +20140,6 @@ Důvod: %2 Plugin Details Podrobnosti přídavného modulu - - - QmakeProjectManager::Internal::PluginGenerator Cannot open icon file %1. Nelze otevřít soubor s ikonou '%1'. @@ -20491,14 +20161,11 @@ Důvod: %2 - QmakeProjectManager::Internal::MakeStepFactory + QmakeProjectManager Make Make - - - QmakeProjectManager::QMakeStepConfigWidget <b>QMake:</b> No Qt version set. QMake can not be run. <b>QMake:</b> Není nastavena verze Qt. QMake nelze spustit. @@ -20519,10 +20186,6 @@ Důvod: %2 The option will only take effect if the project is recompiled. Do you want to recompile now? Toto nastavení se projeví jen v případě nového sestavení projektu. Chcete projekt sestavit znovu nyní? - - Building helpers - Pomocné knihovny pro výstup dat - <b>qmake:</b> No Qt version set. Cannot run qmake. <b>qmake:</b> Není nastavena verze Qt. qmake nelze spustit. @@ -20543,10 +20206,6 @@ Důvod: %2 Enable QML debugging: Zapnout ladění QML: - - Link QML debugging library: - Odkaz na knihovnu pro ladění QML: - Might make your application vulnerable. Only use in a safe environment. Může váš program udělat zranitelným. Mělo by se používat jen v bezpečném prostředí. @@ -20555,20 +20214,6 @@ Důvod: %2 <No Qt version> <Žádná verze Qt> - - - QmakeProjectManager::Internal::QMakeStepFactory - - QMake - QMake - - - qmake - qmake - - - - QmakeProjectManager::Internal::S60DeviceRunConfiguration %1 on Symbian Device %1 na zařízení Symbian @@ -20581,16 +20226,6 @@ Důvod: %2 Could not parse %1. The QtS60 Device run configuration %2 can not be started. %1 se nepodařilo vyhodnotit. Nastavení spuštění zařízení Qt4 S60 %2 se nepodařilo spustit. - - - QmakeProjectManager::Internal::S60DeviceRunConfigurationFactory - - %1 on Symbian Device - %1 na zařízení Symbian - - - - QmakeProjectManager::Internal::S60DeviceRunControlBase There is no device plugged in. Není připojeno žádné zařízení. @@ -20727,9 +20362,6 @@ Prověřte, prosím, zda je telefon připojen a zda běží program Trk.An error has occurred while running %1. Při spouštění %1 se vyskytla chyba. - - - QmakeProjectManager::Internal::S60DeviceRunControl Finished. Dokončeno. @@ -20746,9 +20378,6 @@ Prověřte, prosím, zda je telefon připojen a zda běží program Trk.Could not start application: %1 Nepodařilo se spustit program: %1 - - - QmakeProjectManager::Internal::S60DeviceDebugRunControl Warning: Cannot locate the symbol file belonging to %1. Varování: Nepodařilo se najít symbolický soubor patřící '%1'. @@ -20772,33 +20401,14 @@ Prověřte, prosím, zda je telefon připojen a zda běží program Trk. Spouští se ladicí program... - - Debugger for Symbian Platform - Ladicí program pro platformu Symbian - Debug on Device Ladit na zařízení - - - QmakeProjectManager::Internal::S60DeviceRunConfigurationWidget Device: Zařízení: - - Name: - Název: - - - Arguments: - Argumenty: - - - Debugger: - Ladič: - Installation file: Instalační soubor: @@ -20819,18 +20429,10 @@ Prověřte, prosím, zda je telefon připojen a zda běží program Trk.Queries the device for information Vyvolává informace ze zařízení - - Self-signed certificate - Osobně podepsané osvědčení - Choose certificate file (.cer) Zadejte soubor s osvědčením (.cer) - - Custom certificate: - Uživatelsky stanovené osvědčení: - Choose key file (.key / .pem) Zadejte soubor s klíčem (.key/.pem) @@ -20860,17 +20462,10 @@ Prověřte, prosím, zda je telefon připojen a zda běží program Trk.Connecting... Spojuje se... - - - QmakeProjectManager::Internal::S60Devices::Device Id: ID: - - Name: - Název: - EPOC: EPOC: @@ -20883,16 +20478,10 @@ Prověřte, prosím, zda je telefon připojen a zda běží program Trk.Qt: Qt: - - - QmakeProjectManager::Internal::S60DevicesWidget No Qt installed Qt není nainstalováno - - - QmakeProjectManager::Internal::S60EmulatorRunConfiguration %1 in Symbian Emulator S60 emulator run configuration default display name, %1 is base pro-File name @@ -20905,14 +20494,6 @@ S60 emulator run configuration default display name, %1 is base pro-File nameS60 emulator run configuration default display name (no pro-file name) Spustit v emulátoru Symbianu - - The .pro file is currently being parsed. - Soubor .pro je právě vyhodnocován. - - - The .pro file could not be parsed. - Soubor .pro se nepodařilo vyhodnotit. - Qt Symbian Emulator RunConfiguration Nastavení běhu Qt napodobovatele jinak též emulátoru pro Symbian @@ -20925,31 +20506,10 @@ S60 emulator run configuration default display name, %1 is base pro-File nameCould not parse %1. The Qt for Symbian emulator run configuration %2 can not be started. %1 se nepodařilo vyhodnotit. Nastavení spuštění napodobovatele Qt pro Symbian %2 se nepodařilo spustit. - - - QmakeProjectManager::Internal::S60EmulatorRunConfigurationWidget - - Name: - Název: - - - Executable: - Spustitelný soubor: - Summary: Run %1 in emulator Souhrn: Spustit '%1' v napodobovateli - - - QmakeProjectManager::Internal::S60EmulatorRunConfigurationFactory - - %1 in Symbian Emulator - %1 v emulátoru Symbianu - - - - QmakeProjectManager::Internal::S60EmulatorRunControl Starting %1... Spouští se %1... @@ -20974,9 +20534,6 @@ S60 emulator run configuration default display name, %1 is base pro-File name%1 exited with code %2 %1 ukončen. Vrácená hodnota %2 - - - QmakeProjectManager::Internal::S60Manager Run in Emulator Spustit v emulátoru @@ -20985,13 +20542,6 @@ S60 emulator run configuration default display name, %1 is base pro-File nameRun on Device Spustit na zařízení - - Debug on Device - Ladit na zařízení - - - - QmakeProjectManager::QmakeBuildConfigurationFactory Using Default Qt Version Používá se výchozí verze Qt @@ -21047,10 +20597,6 @@ S60 emulator run configuration default display name, %1 is base pro-File nameNon-ASCII characters in directory suffix may cause build issues. Ladění - - Build - Sestavování - Release The name of the release build configuration created by default for a qmake project. @@ -22985,11 +22531,7 @@ a předpokladem je, že vzdálený spustitelný soubor bude v adresáři zmiňov - QmakeProjectManager::Internal::S60CreatePackageStepWidget - - Form - Formulář - + QmakeProjectManager Self-signed certificate Osobně podepsaný certifikát @@ -22998,14 +22540,6 @@ a předpokladem je, že vzdálený spustitelný soubor bude v adresáři zmiňov Custom certificate: Uživatelsky stanovený certifikát: - - Choose certificate file (.cer) - Zadejte soubor s osvědčením (.cer) - - - Key file: - Soubor s klíčem: - Not signed Nepodepsáno @@ -23030,9 +22564,6 @@ a předpokladem je, že vzdálený spustitelný soubor bude v adresáři zmiňov Certificate's details Podrobnosti certifikátu - - - QmakeProjectManager::Internal::TargetSetupPage Setup targets for your project Nastavte cíl pro svůj projekt @@ -23085,16 +22616,6 @@ a předpokladem je, že vzdálený spustitelný soubor bude v adresáři zmiňov %1: pro-file, %2: directory that was checked. V adresáři "%2" se nepodařilo nalézt žádná sestavení projektu "%1". - - <b>Error:</b> - Severity is Task::Error - <b>Chyba:</b> - - - <b>Warning:</b> - Severity is Task::Warning - <b>Varování:</b> - <html><head/><body><p><b>No valid Qt versions found.</b></p><p>Please add a Qt version in <i>Tools/Options</i> or via the maintenance tool of the SDK.</p></body></html> <html><head/><body><p><b>Nepodařilo se najít žádné platné verze Qt.</b><br>Přidejte, prosím, platnou verzi verzi Qt v <i>Nástroje/Nastavení</i> nebo prostřednictvím instalačního nástroje SDK.</p></body></html> @@ -23107,9 +22628,6 @@ a předpokladem je, že vzdálený spustitelný soubor bude v adresáři zmiňov <html><head/><body><p><span style=" font-weight:600;">No valid Qt versions found.</span></p><p>Please add a Qt version in <span style=" font-style:italic;">Tools &gt; Options &gt; Build &amp; Run</span> (<span style=" font-style:italic;">Qt Creator &gt; Preferences &gt; Build &amp; Run</span> on Mac OS) or via the maintenance tool of the SDK.</p></body></html> <html><head/><body><p><span style=" font-weight:600;">Nenalezeny žádné platné verze Qt.</span></p><p>Přidejte, prosím, verzi Qt v <span style=" font-style:italic;">Nástroje &gt; Volby &gt; Sestavení &amp; Spuštění</span> (<span style=" font-style:italic;">Qt Creator &gt; Nastavení &gt; Sestavení &amp; Spuštění</span> na Mac OS) nebo přes nástroj na správu SDK.</p></body></html> - - - QmakeProjectManager::Internal::TestWizardPage WizardPage WizardPage @@ -24455,7 +23973,7 @@ Desetinná hodnota se znaménkem (velký endian): %4 - CMakeProjectManager::Internal::CMakeRunConfiguration + CMakeProjectManager Run CMake target CMake-Ziel ausführen @@ -24468,18 +23986,6 @@ Desetinná hodnota se znaménkem (velký endian): %4 (disabled) (vypnuto) - - Clean Environment - Smazat prostředí - - - System Environment - Prostředí systému - - - Build Environment - Prostředí pro sestavování - The executable is not built by the current build configuration Spustitelný soubor není sestaven současným nastavením pro sestavování @@ -24492,17 +23998,11 @@ Desetinná hodnota se znaménkem (velký endian): %4 (disabled) (zakázáno) - - - CMakeProjectManager::Internal::CMakeTarget Desktop CMake Default target display name Stolní počítač - - - CMakeProjectManager::Internal::MakeStep Make CMakeProjectManager::MakeStep display name. @@ -24521,9 +24021,6 @@ Desetinná hodnota se znaménkem (velký endian): %4 Configuration is faulty. Check the Issues view for details. Nastavení je chybné. Prověřte, prosím, pohled na potíže kvůli podrobnostem. - - - CMakeProjectManager::Internal::MakeStepFactory Make Display name for CMakeProjectManager::MakeStep id. @@ -26797,7 +26294,7 @@ Proces Pdb po určité době od úspěšného spuštění spadl. - QmakeProjectManager::Internal::QmakeTarget + QmakeProjectManager Desktop Qt4 Desktop target display name @@ -28238,7 +27735,7 @@ Projekty Qt Quick UI není potřeba je sestavovat a lze je spouštět přímo v - QmakeProjectManager::Internal::QemuRuntimeManager + QmakeProjectManager Start Maemo Emulator Spustit napodobovatele jinak též emulátor Maemo @@ -28267,9 +27764,6 @@ Projekty Qt Quick UI není potřeba je sestavovat a lze je spouštět přímo v Stop Maemo Emulator Zastavit napodobovatele jinak též emulátor Maemo - - - QmakeProjectManager::Internal::S60CreatePackageStep Create SIS Package Create SIS package build step name @@ -28354,20 +27848,6 @@ Projekty Qt Quick UI není potřeba je sestavovat a lze je spouštět přímo v The process "%1" crashed. Proces %1 spadl. - - - QmakeProjectManager::Internal::S60CreatePackageStepFactory - - Create SIS Package - Vytvořit balíček SIS - - - - QmakeProjectManager::Internal::S60CreatePackageStepConfigWidget - - Reset Passphrases - Nastavit hesla znovu - Do you want to reset all passphrases saved for keys used? Chcete nastavit všechna hesla uložená pro použité klíče znovu? @@ -28400,35 +27880,14 @@ Projekty Qt Quick UI není potřeba je sestavovat a lze je spouštět přímo v <b>Create SIS Package:</b> %1 <b>Vytvořit balíček SIS:</b> %1 - - - QmakeProjectManager::Internal::S60DevicesBaseWidget Default Výchozí - - SDK Location - Umístění SDK - - - Qt Location - Umístění Qt - Choose Qt folder Vybrat složku s Qt - - - QmakeProjectManager::Internal::S60DevicesModel - - No Qt installed - Qt není nainstalováno - - - - QmakeProjectManager::Internal::GnuPocS60DevicesWidget Step 1 of 2: Choose GnuPoc folder Krok 1 ze 2: Vybrat složku s GnuPoc @@ -28474,30 +27933,7 @@ Projekty Qt Quick UI není potřeba je sestavovat a lze je spouštět přímo v - QmakeProjectManager::Internal::QmakeBuildConfigurationFactory - - Using Qt Version "%1" - Používá se verze Qt "%1" - - - New configuration - Nové nastavení - - - New Configuration Name: - Název nového nastavení: - - - %1 Debug - %1 ladění - - - %1 Release - %1 vydání - - - - QmakeProjectManager::QmakeProject + QmakeProjectManager Evaluating Vyhodnocení @@ -28518,17 +27954,6 @@ Projekty Qt Quick UI není potřeba je sestavovat a lze je spouštět přímo v The .pro file '%1' could not be parsed. Soubor .pro '%1' se nepodařilo zpracovat. - - Debug - Ladění - - - Release - Vydání - - - - QmakeProjectManager Qt4 Qt4 @@ -28554,17 +27979,6 @@ Projekty Qt Quick UI není potřeba je sestavovat a lze je spouštět přímo v Nenastavený projekt - - QmakeProjectManager::Internal::QmakeTargetFactory - - Debug - Ladění - - - Release - Vydání - - QtSupport @@ -28579,7 +27993,7 @@ Projekty Qt Quick UI není potřeba je sestavovat a lze je spouštět přímo v - QmakeProjectManager::QtVersion + QmakeProjectManager Qmake does not support build directories below the source directory. Qmake nepodporuje žádné sestavování v adresářích, které se nacházejí pod zdrojovým adresářem. @@ -28759,7 +28173,7 @@ Projekty Qt Quick UI není potřeba je sestavovat a lze je spouštět přímo v - QmakeProjectManager::Internal::MobileGuiAppWizard + QmakeProjectManager Mobile Qt Application Program Qt pro přenosná zařízení @@ -28772,9 +28186,6 @@ Preselects Qt for Simulator and mobile targets if available Vybere pro napodobovatele a přenosné cíle vhodné verze Qt, jsou-li dostupné. - - - QmakeProjectManager::Internal::BaseQmakeProjectWizardDialog Modules Moduly @@ -28783,17 +28194,6 @@ Vybere pro napodobovatele a přenosné cíle vhodné verze Qt, jsou-li dostupné Kits Sady - - Targets - Cíle - - - Qt Versions - Verze Qt - - - - QmakeProjectManager::Internal::TestWizard Qt Unit Test Jednotková zkouška Qt @@ -28802,9 +28202,6 @@ Vybere pro napodobovatele a přenosné cíle vhodné verze Qt, jsou-li dostupné Creates a QTestLib-based unit test for a feature or a class. Unit tests allow you to verify that the code is fit for use and that there are no regressions. Vytvoří na QTestLib založenou jednotkovou zkoušku pro funkci nebo třídu. Jednotkové zkoušky slouží k přezkoušení použitelnosti kódu a ke zjištění regresí. - - - QmakeProjectManager::Internal::TestWizardDialog This wizard generates a Qt unit test consisting of a single source file with a test class. Tento průvodce vytvoří jednotkový test Qt sestávající z jednoho zdrojového souboru s jednou zkouškovou třídou. @@ -28813,10 +28210,6 @@ Vybere pro napodobovatele a přenosné cíle vhodné verze Qt, jsou-li dostupné This wizard generates a Qt Unit Test consisting of a single source file with a test class. Tento průvodce vytvoří jednotkový test Qt sestávající z jednoho zdrojového souboru s jednou zkouškovou třídou. - - Details - Podrobnosti - Subversion::Internal::SubversionEditor @@ -30655,7 +30048,7 @@ Při GDB může být zadána posloupnost příkazů oddělená oddělovačem &ap - QmakeProjectManager::Internal::LibraryDetailsWidget + QmakeProjectManager Library: Knihovna: @@ -30732,13 +30125,6 @@ Při GDB může být zadána posloupnost příkazů oddělená oddělovačem &ap Remove "d" suffix for release version Odstranit příponu "d" pro verzi ladění - - - QmakeProjectManager::Internal::RvctToolChainConfigWidget - - Form - Formulář - ARM &version: &Verze ARM: @@ -30847,7 +30233,7 @@ Předchozí verze Qt mají omezení v sestavování vhodných souborů SIS. - QmakeProjectManager::Internal::WinscwToolChainConfigWidget + QmakeProjectManager Dialog Dialog @@ -33824,7 +33210,7 @@ Server: %2. - CMakeProjectManager::Internal::CMakeEditor + CMakeProjectManager Changes to cmake files are shown in the project tree after building. Změny v souborech cmake budou ukázány po vytvoření projektového stromu. @@ -33833,13 +33219,6 @@ Server: %2. Build now Sestavit nyní - - - CMakeProjectManager::Internal::CMakeManager - - Run CMake - Provést CMake - Failed opening project '%1': Project is not a file Projekt '%1' se nepodařil otevřít: Daný projektový soubor není soubor @@ -37612,26 +36991,15 @@ Sestavení pozorovatele QML se děje na stránce pro nastavení Qt pomocí výb - QmakeProjectManager::Internal::AddLibraryWizard + QmakeProjectManager Add Library Přidat knihovnu - - Type - Typ - - - Details - Podrobnosti - Summary Shrnutí - - - QmakeProjectManager::Internal::LibraryTypePage Library Type Typ knihovny @@ -37678,9 +37046,6 @@ Ani cesta ke knihovně ani cesta k hlavičkovým souborům nebudou přidány do Links to a system library using pkg-config. Odkáže na systémovou knihovnu za použití pkg-config. - - - QmakeProjectManager::Internal::DetailsPage Internal Library Vnitřní knihovna @@ -37713,24 +37078,10 @@ Ani cesta ke knihovně ani cesta k hlavičkovým souborům nebudou přidány do Specify the package to link to Vyberte balíček k používání - - - QmakeProjectManager::Internal::SummaryPage - - Summary - Shrnutí - The following snippet will be added to the<br><b>%1</b> file: Následující úryvek bude přidán do souboru <br><b>%1</b>: - - - QmakeProjectManager::Internal::LibraryDetailsController - - Linkage: - Propojení: - %1 Dynamic %1 dynamické @@ -37739,10 +37090,6 @@ Ani cesta ke knihovně ani cesta k hlavičkovým souborům nebudou přidány do %1 Static %1 statické - - Mac: - Mac: - %1 Framework %1 Framework @@ -37751,29 +37098,6 @@ Ani cesta ke knihovně ani cesta k hlavičkovým souborům nebudou přidány do %1 Library %1 Knihovna - - - QmakeProjectManager::QmakeTarget - - Desktop - Qt4 Desktop target display name - Stolní počítač - - - Qt Simulator - Qt4 Simulator target display name - Qt Simulator - - - Symbian Emulator - Qt4 Symbian Emulator target display name - Emulátor Symbianu - - - Symbian Device - Qt4 Symbian Device target display name - Zařízení Symbian - Maemo5 Qt4 Maemo5 target display name @@ -37799,9 +37123,6 @@ Ani cesta ke knihovně ani cesta k hlavičkovým souborům nebudou přidány do Qt4 Android target display name Android - - - QmakeProjectManager::CodaRunControl No device is connected. Please connect a device and try again. @@ -37906,9 +37227,6 @@ Ani cesta ke knihovně ani cesta k hlavičkovým souborům nebudou přidány do Zařízení '%1' bylo odpojeno. - - - QmakeProjectManager::Internal::GcceToolChainFactory GCCE GCCE @@ -37921,9 +37239,6 @@ Ani cesta ke knihovně ani cesta k hlavičkovým souborům nebudou přidány do GCCE (%1) GCCE (%1) - - - QmakeProjectManager::PassphraseForKeyDialog Passphrase: Heslo: @@ -37940,28 +37255,10 @@ Ani cesta ke knihovně ani cesta k hlavičkovým souborům nebudou přidány do Passphrase for %1 Heslo pro %1 - - - QmakeProjectManager::Internal::QmakeSymbianTarget - - <b>Device:</b> Not connected - <b>Zařízení:</b> Nepřipojeno - - - <b>Device:</b> %1 - <b>Zařízení:</b> %1 - - - <b>Device:</b> %1, %2 - <b>Zařízení:</b> %1, %2 - <b>IP address:</b> %1:%2 <b>IP adresa:</b> %1:%2 - - - QmakeProjectManager::Internal::RvctToolChainFactory ARMv5 ARMv5 @@ -37979,9 +37276,6 @@ Ani cesta ke knihovně ani cesta k hlavičkovým souborům nebudou přidány do %1 arm version, %2 major version, %3 minor version, %4 build number RVCT (%1 %2.%3 Sestavení %4) - - - QmakeProjectManager::Internal::S60CertificateInfo The certificate "%1" has already expired and cannot be used. Expiration date: %2. @@ -38038,9 +37332,6 @@ Platí od: %2. Podporuje %n zařízení: - - - QmakeProjectManager::Internal::S60CreatePackageParser The binary package '%1' was patched to be installable after being self-signed. %2 @@ -38054,9 +37345,6 @@ Použitím vývojářského certifikátu nebo jakékoliv jiné podoby podpisu se Cannot create Smart Installer package as the Smart Installer's base file is missing. Please ensure that it is located in the SDK. Nelze vytvořit balíček Smart Installer, neboť základní soubor pro Smart Installer chybí. Ujistěte se, prosím, že je přítomen v SDK. - - - QmakeProjectManager::S60DeployConfiguration Deploy %1 to Symbian device Nasazení %1 na zařízení Symbian @@ -38065,24 +37353,6 @@ Použitím vývojářského certifikátu nebo jakékoliv jiné podoby podpisu se Deploy to Symbian device Nasazení na zařízení Symbian - - - QmakeProjectManager::S60DeployConfigurationFactory - - %1 on Symbian Device - %1 na zařízení Symbian - - - Deploy to Symbian device - Nasazení na zařízení Symbian - - - - QmakeProjectManager::Internal::S60DeployConfigurationWidget - - Device: - Zařízení: - Silent installation Tichá instalace @@ -38095,10 +37365,6 @@ Použitím vývojářského certifikátu nebo jakékoliv jiné podoby podpisu se WLAN: WLAN: - - Installation file: - Instalační soubor: - Silent installation is an installation mode that does not require user's intervention. In case it fails the non silent installation is launched. V režimu 'Tichá instalace' se nevyžaduje žádný zásah uživatele na mobilním zařízení. Pokud toto selže, spustí se běžná, ne-tichá instalace. @@ -38107,10 +37373,6 @@ Použitím vývojářského certifikátu nebo jakékoliv jiné podoby podpisu se Installation drive: Instalační disková jednotka: - - Queries the device for information - Vyvolává informace ze zařízení - Serial port: Sériová přípojka: @@ -38143,10 +37405,6 @@ Použitím vývojářského certifikátu nebo jakékoliv jiné podoby podpisu se Not installed on device Neinstalováno na zařízení - - Qt version: - Verze Qt: - Unrecognised Symbian version 0x%1 Nerozpoznaná verze Symbianu 0x%1 @@ -38203,17 +37461,6 @@ Použitím vývojářského certifikátu nebo jakékoliv jiné podoby podpisu se Screen size: Velikost obrazovky: - - - QmakeProjectManager::Internal::S60DeployStep - - Unable to remove existing file '%1': %2 - Stávající soubor '%1' se nepodařilo odstranit: %2 - - - Unable to rename file '%1' to '%2': %3 - Soubor '%1' se nepodařilo přejmenovat na '%2': %3 - Deploy Qt4 Deploystep display name @@ -38228,14 +37475,6 @@ Použitím vývojářského certifikátu nebo jakékoliv jiné podoby podpisu se No package has been found. Specify at least one installation package. Nepodařilo se najít žádný instalační balíček. Zadejte, prosím, alespoň jeden. - - Renaming new package '%1' to '%2' - Přejmenovává se nový balíček '%1' na '%2' - - - Removing old package '%1' - Odstraňuje se starý balíček '%1' - '%1': Package file not found '%1': Soubor s balíčkem nenalezen @@ -38304,10 +37543,6 @@ Použitím vývojářského certifikátu nebo jakékoliv jiné podoby podpisu se Installation failed: %1; see %2 for descriptions of the error codes Instalace se nezdařila: %1; podívejte se na %2 pro popis chybových kódů - - Could not write to file %1 on device: %2 - Do souboru %1 se nepodařilo zapisovat na zařízení: %2 - Failed to close the remote file: %1 Vzdálený soubor se nepodařilo zavřít: %1 @@ -38320,10 +37555,6 @@ Použitím vývojářského certifikátu nebo jakékoliv jiné podoby podpisu se Deployment has been cancelled. Nasazení bylo zrušeno. - - The device '%1' has been disconnected - Zařízení '%1' bylo odpojeno - Copy progress: %1% Kopíruje se: %1% @@ -38332,63 +37563,11 @@ Použitím vývojářského certifikátu nebo jakékoliv jiné podoby podpisu se A timeout while deploying has occurred. CODA might not be responding. Try reconnecting the device. Při nasazování bylo překročeno časové omezení. CODA možná neodpovídá. Pokuste se znovu vytvořit spojení se zařízením. - - - QmakeProjectManager::Internal::S60DeployStepWidget - - Deploy SIS Package - Nasazení balíčku SIS - - - - QmakeProjectManager::Internal::S60DeployStepFactory - - Deploy SIS Package - Nasazení balíčku SIS - - - - QmakeProjectManager::S60DeviceRunConfiguration - - %1 on Symbian Device - S60 device runconfiguration default display name, %1 is base pro-File name - %1 na zařízení Symbian - Run on Symbian device S60 device runconfiguration default display name (no profile set) Spustit na zařízení Symbian - - The .pro file is currently being parsed. - Soubor .pro je právě vyhodnocován. - - - The .pro file could not be parsed. - Soubor .pro se nepodařilo vyhodnotit. - - - - QmakeProjectManager::S60DeviceRunConfigurationFactory - - %1 on Symbian Device - %1 na zařízení Symbian - - - - QmakeProjectManager::Internal::S60PublisherOvi - - Clean - Pročistit - - - qmake - qmake - - - Build - Sestavení - Freeze Znehybnění @@ -38427,17 +37606,11 @@ Použitím vývojářského certifikátu nebo jakékoliv jiné podoby podpisu se %1 byl vytvořen. - - - QmakeProjectManager::Internal::S60CommandPublishStep Running %1 %1 is a name of the Publish Step i.e. Clean Step Provádí se %1 - - - QmakeProjectManager::Internal::S60PublishingBuildSettingsPageOvi No valid Qt version has been detected.<br>Define a correct Qt version in "Options > Qt4" Nepodařilo se najít žádnou platnou verzi Qt <br> Zadejte, prosím, správnou verzi Qt v "Nastavení > Qt 4" @@ -38446,10 +37619,6 @@ Použitím vývojářského certifikátu nebo jakékoliv jiné podoby podpisu se No valid tool chain has been detected.<br>Define a correct tool chain in "Options > Tool Chains" Nepodařilo se najít žádnou platnou sadu nástrojů.<br> Zadejte, prosím, správnou sadu nástrojů v "Nastavení > Sady nástrojů" - - Form - Formulář - Choose a build configuration: Vybrat nastavení sestavování: @@ -38464,9 +37633,6 @@ Previous Qt versions have limitations in building suitable SIS files. Tento průvodce ukáže jen verze Qt po verzi 4.6.3. Předchozí verze Qt mají omezení v sestavování vhodných souborů SIS. - - - QmakeProjectManager::Internal::S60PublishingResultsPageOvi Open Containing Folder Otevřít obsahující složku @@ -38475,13 +37641,6 @@ Předchozí verze Qt mají omezení v sestavování vhodných souborů SIS.Close Zavřít - - Form - Formulář - - - - QmakeProjectManager::Internal::S60PublishingSisSettingsPageOvi This should be application's display name. <br>It cannot be empty.<br> Zobrazený název programu. <br>Nesmí být prázdný.<br> @@ -38570,10 +37729,6 @@ Předchozí verze Qt mají omezení v sestavování vhodných souborů SIS.Please verify that you have a released version of Qt. <br><a href="http://wiki.forum.nokia.com/index.php/Nokia_Smart_Installer_for_Symbian">Qt Packages Distributed by Smart Installer</a> has a list of released Qt versions. Ujistěte se, prosím, že používáte vydanou verzi Qt. <br><a href="http://wiki.forum.nokia.com/index.php/Nokia_Smart_Installer_for_Symbian">Qt Packages Distributed by Smart Installer</a> má seznam uvolněných verzí. - - Form - Formulář - Localised Vendor Names Lokalizovaný název prodejce @@ -38618,9 +37773,6 @@ Předchozí verze Qt mají omezení v sestavování vhodných souborů SIS.Global vendor name: Jednoznačný název prodejce: - - - QmakeProjectManager::Internal::S60PublishingWizardFactoryOvi Publish Qt Symbian Applications to Ovi Store Zveřejnit jako program Qt Symbianv Ovi Store @@ -38673,9 +37825,6 @@ NetworkControl, MultimediaDD, CommDD, DiskAdmin, AllFiles, DRM a TCB Váš program bude Nokia Store QA také odmítnut v případě, že si vyberete nějakou neuvolněnou verzi Qt na další straně. - - - QmakeProjectManager::Internal::S60PublishingWizardOvi Publishing to Ovi Store Zveřejnit na Ovi Store @@ -38696,9 +37845,6 @@ Váš program bude Nokia Store QA také odmítnut v případě, že si vyberete Creating an Uploadable SIS File Vytváří se nahrávatelný soubor SIS - - - QmakeProjectManager::S60RunControlBase Launching Spouští se @@ -38731,9 +37877,6 @@ Váš program bude Nokia Store QA také odmítnut v případě, že si vyberete Dokončeno. - - - QmakeProjectManager::SbsV2Parser SBSv2 build log Záznam o sestavování SBSv2 @@ -38753,20 +37896,10 @@ Váš program bude Nokia Store QA také odmítnut v případě, že si vyberete %1 is the SBSv2 build recipe name, %2 the return code of the failed command Recipe %1 selhalo. Vrácená hodnota %2. - - - QmakeProjectManager::Internal::SymbianQtConfigWidget - - S60 SDK: - S60 SDK: - SBS v2 directory: Adresář SBS-v2: - - - QmakeProjectManager::Internal::WinscwToolChainFactory WINSCW WINSCW @@ -38775,16 +37908,10 @@ Váš program bude Nokia Store QA také odmítnut v případě, že si vyberete WINSCW from Qt version WINSCW z verze Qt - - - QmakeProjectManager::QmakeBuildConfiguration Parsing the .pro file Vyhodnocuje se soubor .pro - - - QmakeProjectManager::QmakeProFileNode Error while parsing file %1. Giving up. Chyba při vyhodnocování souboru %1. Zrušeno. @@ -38794,19 +37921,6 @@ Váš program bude Nokia Store QA také odmítnut v případě, že si vyberete Soubor .pro pro podadresář '%1' se v '%2' nepodařilo najít - - QmakeProjectManager::QmakeBaseTargetFactory - - %1 Debug - Name of a debug build configuration to created by a project wizard, %1 being the Qt version name. We recommend not translating it. - %1 ladění - - - %1 Release - Name of a release build configuration to be created by a project wizard, %1 being the Qt version name. We recommend not translating it. - %1 vydání - - Qt4DefaultTargetSetupWidget @@ -38821,7 +37935,7 @@ Váš program bude Nokia Store QA také odmítnut v případě, že si vyberete - QmakeProjectManager::QmakeDefaultTargetSetupWidget + QmakeProjectManager Add build from: Přidat sestavování z: @@ -38858,14 +37972,6 @@ Váš program bude Nokia Store QA také odmítnut v případě, že si vyberete Shadow build Stínové sestavování - - Qt version: - Verze Qt: - - - No Build Found - Žádná sestavení nebyla nalezena - Incompatible Build Found Nalezeno neslučitelné sestavování @@ -38890,10 +37996,6 @@ Váš program bude Nokia Store QA také odmítnut v případě, že si vyberete Use Shadow Building Použít stínové sestavování - - Qt Version: - Verze Qt: - debug Debug build @@ -38908,10 +38010,6 @@ Váš program bude Nokia Store QA také odmítnut v případě, že si vyberete No build found Žádná sestavení nebyla nalezena - - No build found in %1 matching project %2. - V %1 nebylo nalezeno žádné sestavení odpovídající projektu %2. - Incompatible build found Nalezeno neslučitelné sestavování @@ -38924,23 +38022,6 @@ Váš program bude Nokia Store QA také odmítnut v případě, že si vyberete Import build from %1 Zavést sestavení z %1 - - <b>Error:</b> - Severity is Task::Error - <b>Chyba:</b> - - - <b>Warning:</b> - Severity is Task::Warning - <b>Varování:</b> - - - - QmakeProjectManager::AbstractMobileAppWizardDialog - - Qt Versions - Verze Qt - Targets Cíle @@ -38949,10 +38030,6 @@ Váš program bude Nokia Store QA také odmítnut v případě, že si vyberete Mobile Options Nastavení pro mobilní zařízení - - Symbian Specific - Zvláštní pro Symbian - Maemo5 And MeeGo Specific Zvláštní pro Maemo5 a Meego @@ -38965,20 +38042,10 @@ Váš program bude Nokia Store QA také odmítnut v případě, že si vyberete Harmattan Specific Zvláštní pro Harmattan - - Kits - Sady - - - - QmakeProjectManager::AbstractMobileApp Could not open template file '%1'. Soubor s předlohou '%1' se nepodařilo otevřít. - - - QmakeProjectManager::Internal::Html5AppWizardDialog New HTML5 Application Nový program HTML5 @@ -38995,9 +38062,6 @@ Váš program bude Nokia Store QA také odmítnut v případě, že si vyberete HTML Options Volby pro HTML - - - QmakeProjectManager::Internal::Html5AppWizard HTML5 Application Program HTML5 @@ -39018,9 +38082,6 @@ You can build the application and deploy it on desktop and mobile target platfor Můžete tuto aplikaci sestavit a nasadit jak na stolním počítači tak na mobilních zařízeních. Tento typ projektu například umožní vytvoření podepsaného balíčku Symbian Installation System (SIS). - - - QmakeProjectManager::Internal::Html5AppWizardOptionsPage Select HTML File Vybrat soubor HTML @@ -39042,7 +38103,7 @@ Vybere verze Qt pro Simulator a mobilní cíle, pokud jsou dostupné. - QmakeProjectManager::Internal::MobileAppWizardGenericOptionsPage + QmakeProjectManager Automatically Rotate Orientation Automaticky změnit orientaci @@ -39055,17 +38116,10 @@ Vybere verze Qt pro Simulator a mobilní cíle, pokud jsou dostupné.Lock to Portrait Orientation Stanovit formát na výšku - - WizardPage - WizardPage - Orientation behavior: Chování orientace: - - - QmakeProjectManager::Internal::PngIconScaler Wrong Icon Size Neplatná velikost ikony @@ -39082,9 +38136,6 @@ Vybere verze Qt pro Simulator a mobilní cíle, pokud jsou dostupné.Could not copy icon file: %1 Soubor ikony se nepodařilo zkopírovat: %1 - - - QmakeProjectManager::Internal::QtQuickApp The QML import path '%1' cannot be found. Cestu pro importování QML '%1 se nepodařilo najít. @@ -39105,9 +38156,6 @@ Vybere verze Qt pro Simulator a mobilní cíle, pokud jsou dostupné.No .pro file for plugin '%1' cannot be found. Pro přídavný modul '%1' se nepodařilo najít žádný soubor .pro. - - - QmakeProjectManager::Internal::QtQuickAppWizardDialog New Qt Quick Application Nový program Qt Quick @@ -39132,9 +38180,6 @@ Vybere verze Qt pro Simulator a mobilní cíle, pokud jsou dostupné.Application Type Typ aplikace - - - QmakeProjectManager::Internal::QtQuickAppWizard Qt Quick Application Nový program Qt Quick @@ -39315,9 +38360,6 @@ Requires <b>Qt 4.7.0</b> or newer. Vyžaduje <b>Qt 4.7.0</b> nebo novější. - - - QmakeProjectManager::Internal::QtQuickComponentSetOptionsPage Select QML File Vybrat soubor QML @@ -39334,9 +38376,6 @@ Vyžaduje <b>Qt 4.7.0</b> nebo novější. All files and directories that reside in the same directory as the main QML file are deployed. You can modify the contents of the directory any time before deploying. Všechny soubory a adresáře nacházející se v tomtéž adresáři jako hlavní soubor QML jsou připraveny k nasazení. Obsah adresáře lze před nasazením kdykoli upravit. - - - QmakeProjectManager::Internal::SubdirsProjectWizard Subdirs Project Projekt s podadresáři @@ -39358,9 +38397,6 @@ Vyžaduje <b>Qt 4.7.0</b> nebo novější. Title of dialog Nový dílčí projekt - - - QmakeProjectManager::Internal::SubdirsProjectWizardDialog This wizard generates a Qt4 subdirs project. Add subprojects to it later on by using the other wizards. Tento průvodce vytvoří projekt Qt4 s podadresáři. Dílčí projekty lze později přidat s pomocí dalších průvodců. @@ -39373,18 +38409,10 @@ Vyžaduje <b>Qt 4.7.0</b> nebo novější. This wizard generates a Qt Subdirs project. Add subprojects to it later on by using the other wizards. Tento průvodce vytvoří projekt Qt s podadresáři. Dílčí projekty lze později přidat s pomocí dalších průvodců. - - - QmakeProjectManager::TargetSetupPage Target Setup Nastavení cíle - - Qt Creator can set up the following targets for project <b>%1</b>: - %1: Project name - Qt Creator může pro projekt <b>%1</b> nastavit následující cíle: - <span style=" font-weight:600;">No valid kits found.</span> <span style=" font-weight:600;">Nenalezeny žádné platné sady.</span> @@ -39494,7 +38522,7 @@ Vyžaduje <b>Qt 4.7.0</b> nebo novější. - QmakeProjectManager::QmlDebuggingLibrary + QmakeProjectManager Only available for Qt 4.7.1 or newer. Vyžaduje Qt 4.7.1 nebo novější. @@ -39503,10 +38531,6 @@ Vyžaduje <b>Qt 4.7.0</b> nebo novější. Not needed. Není potřeba. - - QML Debugging - Ladění QML - The target directory %1 could not be created. Cílový adresář %1 se nepodařilo vytvořit. @@ -39521,21 +38545,10 @@ Reason: %2 Důvod: %2 - - - QmakeProjectManager::QmlDumpTool Only available for Qt for Desktop and Qt for Qt Simulator. Dostupné jen pro "Qt pro Desktop" a "Qt pro Qt Simulator". - - Only available for Qt 4.7.1 or newer. - Vyžaduje Qt 4.7.1 nebo novější. - - - Not needed. - Není potřeba. - Private headers are missing for this Qt version. Soukromé hlavičkové soubory u této verze Qt chybí. @@ -39566,19 +38579,11 @@ Důvod: %2 - QmakeProjectManager::QmlObserverTool + QmakeProjectManager Only available for Qt for Desktop or Qt for Qt Simulator. Dostupné jen pro "Qt pro Desktop" a "Qt pro Qt Simulator". - - Only available for Qt 4.7.1 or newer. - Vyžaduje Qt 4.7.1 nebo novější. - - - Not needed. - Není potřeba. - QMLObserver Pozorovatel QML @@ -43233,7 +42238,7 @@ o pravděpodobném URI. - QmakeProjectManager::QmakePriFileNode + QmakeProjectManager Headers Hlavičky @@ -43266,14 +42271,6 @@ o pravděpodobném URI. Cannot open the file for editing with VCS. Soubor se nepodařilo s pomocí správy verzí udělat zapisovatelný (otevřít pro úpravy). - - Cannot Set Permissions - Chyba při nastavení oprávnění pro přístup k souboru - - - Cannot set permissions to writable. - Soubor se nepodařilo udělat zapisovatelný. - There are unsaved changes for project file %1. Soubor s projektem %1 má neuložené změny. @@ -43286,10 +42283,6 @@ o pravděpodobném URI. Could not write project file %1. Soubor s projektem %1 se nepodařilo zapsat. - - File Error - Chyba souboru - RemoteLinux @@ -45900,30 +44893,15 @@ Tyto předpony se používají dodatečně k nynějšímu názvu souboru na Pře - QmakeProjectManager::Internal::MakeStep + QmakeProjectManager Make arguments: Argumenty příkazového řádku pro 'make': - - Override %1: - Přepsat %1: - - - - QmakeProjectManager::Internal::QMakeStep qmake build configuration: Nastavení sestavování pro qmake: - - Debug - Ladění - - - Release - Vydání - Additional arguments: Dodatečné argumenty: @@ -45936,20 +44914,10 @@ Tyto předpony se používají dodatečně k nynějšímu názvu souboru na Pře Effective qmake call: Výsledné vyvolání qmake: - - - QmakeProjectManager::Internal::S60CertificateDetailsDialog Details of Certificate Podrobnosti k certifikátu - - - QmakeProjectManager::Internal::Html5AppWizardSourcesPage - - WizardPage - WizardPage - Main HTML File Hlavní soubor HTML @@ -45986,13 +44954,6 @@ Tyto předpony se používají dodatečně k nynějšímu názvu souboru na Pře Touch optimized navigation will make the HTML page flickable and enlarge the area of touch sensitive elements. If you use a JavaScript framework which optimizes the touch interaction, leave the checkbox unchecked. Pro dotykové ovládání optimalizované navádění způsobí, že stránku HTML lze obsluhovat pomocí udělání rychlého pohybu (Flick) a zvětší oblast prvků citlivých na dotyk. Nechte nastavení vypnuto, pokud již používáte pro dotykové ovládání vyladěnou soustavu JavaScript. - - - QmakeProjectManager::Internal::MobileAppWizardHarmattanOptionsPage - - WizardPage - WizardPage - Application icon (80x80): Ikona programu (80x80): @@ -46005,24 +44966,10 @@ Tyto předpony se používají dodatečně k nynějšímu názvu souboru na Pře Make application boostable Udělat program schopný vzpruhy - - - QmakeProjectManager::Internal::MobileAppWizardMaemoOptionsPage - - WizardPage - WizardPage - Application icon (64x64): Ikona programu (64x64): - - - QmakeProjectManager::Internal::MobileAppWizardSymbianOptionsPage - - WizardPage - WizardPage - Application icon (.svg): Ikona programu (.svg): @@ -46035,25 +44982,10 @@ Tyto předpony se používají dodatečně k nynějšímu názvu souboru na Pře Enable network access Povolit přístup k síti - - - QmakeProjectManager::Internal::MobileLibraryWizardOptionPage - - WizardPage - WizardPage - - - Target UID3: - Cílové UID3: - Plugin's directory name: Název adresáře přídavného modulu: - - Enable network access - Povolit přístup k síti - QtSupport @@ -47975,7 +46907,7 @@ Nainstalujte, prosím, jedno SDK s API verze alespoň %1. - QmakeProjectManager::Internal::AndroidDeployStepFactory + QmakeProjectManager Deploy to Android device/emulator Nasadit na zařízení/emulátor Android @@ -48001,7 +46933,7 @@ Nainstalujte, prosím, jedno SDK s API verze alespoň %1. - QmakeProjectManager::Internal::AndroidPackageCreationFactory + QmakeProjectManager Create Android (.apk) Package Vytvořit balíček pro Android (*.apk) @@ -48192,7 +47124,7 @@ Vyberte, prosím, platný název balíčku pro váš program (např. "org.e - QmakeProjectManager::Internal::AndroidPackageInstallationFactory + QmakeProjectManager Deploy to device Nasadit na zařízení @@ -48802,7 +47734,7 @@ Nainstalujte, prosím, alespoň jedno SDK. - CMakeProjectManager::Internal::CMakeLocatorFilter + CMakeProjectManager Build CMake target Sestavit cíl CMake @@ -50448,7 +49380,7 @@ reference k prvkům v jiných souborech, smyčkách atd.) - QmakeProjectManager::SymbianIDevice + QmakeProjectManager Device Zařízení @@ -50474,134 +49406,6 @@ reference k prvkům v jiných souborech, smyčkách atd.) Symbian Device Zařízení Symbian - - - QmakeProjectManager::Internal::SymbianIDeviceConfigurationWidget - - Device: - Zařízení: - - - Serial: - Sériová: - - - WLAN: - WLAN: - - - Queries the device for information - Vyvolává informace ze zařízení - - - Serial port: - Sériová přípojka: - - - Communication Channel - Komunikační protokol - - - Connecting - Připojuje se - - - Unable to create CODA connection. Please try again. - Nepodařilo se vytvořit žádné spojení s CODA. Zkuste to, prosím, znovu. - - - Currently there is no information about the device for this connection type. - Pro tento typ spojení nejsou nyní dostupné žádné informace o zařízení. - - - No device information available - Nejsou dostupné žádné informace o zařízení - - - Qt version: - Verze Qt: - - - Not installed on device - Neinstalováno na zařízení - - - Qt version: - Verze Qt: - - - Unrecognised Symbian version 0x%1 - Nerozpoznaná verze Symbianu 0x%1 - - - Unrecognised S60 version 0x%1 - Nerozpoznaná verze S60 0x%1 - - - OS version: - Verze operačního systému: - - - unknown - Neznámý - - - ROM version: - Verze ROM: - - - Release: - Vydání: - - - CODA version: - Verze CODA: - - - Error reading CODA version - Chyba při čtení verze CODA - - - Qt Mobility version: - Verze Qt Mobility: - - - Error reading Qt Mobility version - Chyba při čtení verze Qt Mobility - - - Qt Quick components version: - Verze součásti Qt Quick: - - - Not installed - Neinstalováno - - - QML Viewer version: - Verze prohlížeče QML: - - - Screen size: - Velikost obrazovky: - - - - QmakeProjectManager::Internal::SymbianIDeviceFactory - - Symbian Device - Zařízení Symbian - - - - QmakeProjectManager::Internal::UnconfiguredProjectPanel - - Configure Project - Nastavit projekt - - - - QmakeProjectManager::Internal::TargetSetupPageWrapper Configure Project Nastavit projekt @@ -50638,9 +49442,6 @@ reference k prvkům v jiných souborech, smyčkách atd.) <p>The project <b>%1</b> is not yet configured.</p><p>Qt Creator uses <b>no Qt version</b> and <b>no tool chain</b> to parse the project. You can edit these in the <b><a href="edit">settings</a></b></p> <p>Projekt <b>%1</b> ještě není nastaven.</p><p>Qt Creator nepoužívá <b>žádnou verzi Qt</b> a žádnou sadu nástrojů</b> pro zpracování projektu. Můžete je upravit v dialogu <b><a href="edit">Nastavení</a></b></p> - - - QmakeProjectManager::Internal::UnConfiguredSettingsWidget Qt Creator can open qmake projects without configuring them for building. The C++ and QML code models need a Qt version and tool chain to offer code completion. @@ -50649,14 +49450,6 @@ The C++ and QML code models need a Qt version and tool chain to offer code compl Je zapotřebí mít nějakou verzi Qt a sadu nástrojů, aby modely kódu C++ a QML nabídly doplnění kódu. - - Qt Version: - Verze Qt: - - - Tool Chain: - Sada nástrojů: - QtSupport @@ -50974,7 +49767,7 @@ Je zapotřebí mít nějakou verzi Qt a sadu nástrojů, aby modely kódu C++ a - ClearCase::Internal::CheckOutDialog + ClearCase Check Out Získat (checkout) @@ -51000,9 +49793,6 @@ Je zapotřebí mít nějakou verzi Qt a sadu nástrojů, aby modely kódu C++ a Hijack: Unset read-only flag without check-out. This is used for local changes which the user does not want to commit. Použít pro místní úpravy (&hijack) - - - ClearCase::Internal::SettingsPage Configuration Nastavení @@ -51085,9 +49875,6 @@ Je zapotřebí mít nějakou verzi Qt a sadu nástrojů, aby modely kódu C++ a VOBs list, separated by comma. Indexer will only traverse the specified VOBs. If left blank, all active VOBs will be indexed. Seznam VOB, oddělený čárkou. Indexer překročí pouze zadané VOBs. Bude-li ponecháno prázdné, budou zindexovány všechny činné VOB. - - - ClearCase::Internal::UndoCheckOut Dialog Dialog @@ -51100,9 +49887,6 @@ Je zapotřebí mít nějakou verzi Qt a sadu nástrojů, aby modely kódu C++ a &Save copy of the file with a '.keep' extension &Uložit kopii souboru s příponou '.keep' - - - ClearCase::Internal::VersionSelector Confirm Version to Check Out Potvrdit verzi k načtení @@ -51753,7 +50537,7 @@ Nainstalujte, prosím, alespoň jedno SDK. - ClearCase::Internal::ActivitySelector + ClearCase Select &activity: Vybrat č&innost: @@ -51766,9 +50550,6 @@ Nainstalujte, prosím, alespoň jedno SDK. Keep item activity Zachovat činnost položky - - - ClearCase::Internal::ClearCaseControl &Check Out &Načíst (checkout) @@ -51781,16 +50562,10 @@ Nainstalujte, prosím, alespoň jedno SDK. &Hijack Upravit místně (&hijack) - - - ClearCase::Internal::ClearCaseEditor Annotate version "%1" Opatřit anotacemi verzi "%1" - - - ClearCase::Internal::ClearCasePlugin Editing Derived Object: %1 Úpravy odvozeného objektu: %1 @@ -52085,32 +50860,19 @@ Nainstalujte, prosím, alespoň jedno SDK. XXX: příliš dlouhé? Indexování ClearCase - - - ClearCase::Internal::ClearCaseSubmitEditor ClearCase Check In Zápis-odevzdání do ClearCase - - - ClearCase::Internal::ClearCaseSubmitEditorWidget Chec&k in even if identical to previous version Zapsat-&odevzdat i v případě shody s předchozí verzí - - &Preserve file modification time - &Zachovat čas změny souboru - &Check In XXX: příliš dlouhé? &Zapsat-odevzdat (check in) - - - ClearCase::Internal::SettingsPageWidget ClearCase Command Příkaz pro ClearCase @@ -52129,7 +50891,7 @@ Nainstalujte, prosím, alespoň jedno SDK. - CMakeProjectManager::Internal::ChooseCMakePage + CMakeProjectManager Choose Cmake Executable Vybrat spustitelný soubor Cmake @@ -52138,22 +50900,6 @@ Nainstalujte, prosím, alespoň jedno SDK. The cmake executable is valid. Spustitelný soubor cmake je platný. - - Please specify the path to the cmake executable. No cmake executable was found in the path. - Zadejte, prosím, cestu ke spustitelnému souboru cmake. V cestě nebyl nalezen žádný spustitelný soubor cmake. - - - The cmake executable (%1) does not exist. - Spustitelný soubor cmake (%1) neexistuje. - - - The path %1 is not a executable. - Cesta '%1' není spustitelným souborem. - - - The path %1 is not a valid cmake. - Cesta '%1' není platným cmake. - CMake Executable: Spustitelný soubor CMake: @@ -53814,7 +52560,7 @@ Chcete, aby jej Qt Creator pro váš projekt vytvořil? - QmakeProjectManager::Internal::QmakeKitConfigWidget + QmakeProjectManager The mkspec to use when building the project with qmake.<br>This setting is ignored when using other build systems. mkspec k použití při sestavování projektu s qmake.<br>Toto nastavení se přehlíží, když se používají jiné sestavovací systémy. @@ -53823,9 +52569,6 @@ Chcete, aby jej Qt Creator pro váš projekt vytvořil? Qt mkspec: Qt mkspec: - - - QmakeProjectManager::QmakeKitInformation No Qt version set, so mkspec is ignored. Nenastavena žádná verze Qt, takže se mkspec přehlíží. @@ -53838,9 +52581,6 @@ Chcete, aby jej Qt Creator pro váš projekt vytvořil? mkspec mkspec - - - QmakeProjectManager::QmakeTargetSetupWidget Manage... Spravovat... @@ -53855,9 +52595,6 @@ Chcete, aby jej Qt Creator pro váš projekt vytvořil? Severity is Task::Warning <b>Varování:</b> - - - QmakeProjectManager::Internal::ImportWidget Import Build from... Importovat sestavení z... @@ -55507,7 +54244,7 @@ nelze najít v cestě. - CMakeProjectManager::Internal::GeneratorInfo + CMakeProjectManager Ninja (%1) Ninja (%1) @@ -55524,9 +54261,6 @@ nelze najít v cestě. Unix Generator (%1) Generátor Unix (%1) - - - CMakeProjectManager::Internal::NoKitPage Show Options Ukázat volby @@ -60872,22 +59606,7 @@ Zavřete, prosím, všechny běžící instance své aplikace, předtím než za - QmakeProjectManager::Internal::Qt4Target - - Desktop - Qt4 Desktop target display name - Desktop - - - Maemo Emulator - Qt4 Maemo Emulator target display name - Emulátor pro Maemo - - - Maemo Device - Qt4 Maemo Device target display name - Zařízení Maemo - + QmakeProjectManager ProjectExplorer::TargetSetupPage @@ -60983,76 +59702,7 @@ Zavřete, prosím, všechny běžící instance své aplikace, předtím než za - QmakeProjectManager::Internal::DesktopQmakeRunConfiguration - - The .pro file '%1' is currently being parsed. - Soubor .pro '%1' se právě zpracovává. - - - Qt Run Configuration - Nastavení spuštění Qt4 - - - - QmakeProjectManager::Internal::DesktopQmakeRunConfigurationWidget - - Executable: - Spustitelný soubor: - - - Arguments: - Argumenty: - - - Select Working Directory - Vybrat pracovní adresář - - - Reset to default - Nastavit znovu výchozí - - - Working directory: - Pracovní adresář: - - - Run in terminal - Spustit v terminálu - - - Run on QVFb - Spustit na QVFb - - - Check this option to run the application on a Qt Virtual Framebuffer. - Zaškrtněte tuto volbu pro spuštění programu na Qt Virtual Framebuffer. - - - Use debug version of frameworks (DYLD_IMAGE_SUFFIX=_debug) - Používat ladicí verzi rámce (DYLD_IMAGE_SUFFIX=_debug) - - - - QmakeProjectManager::Internal::QmakeProjectImporter - - Debug - Ladění - - - Release - Vydání - - - No Build Found - Žádná sestavení nebyla nalezena - - - No build found in %1 matching project %2. - V %1 nebylo nalezeno žádné sestavení odpovídající projektu %2. - - - - QmakeProjectManager::Internal::QtQuickComponentSetPage + QmakeProjectManager Select Qt Quick Component Set Vybrat sadu součástek Qt Quick @@ -61635,7 +60285,7 @@ Projekty Qt Quick 2 UI není potřeba sestavovat a lze je spouštět přímo v p - QmakeProjectManager::QtQuickAppWizard + QmakeProjectManager Creates a deployable Qt Quick 1 application using the QtQuick 1.1 import. Requires Qt 4.8 or newer. Vytvoří nasaditelný program Qt Quick 1 pomocí Qt Quick import. Vyžaduje Qt 4.8 nebo novější. diff --git a/share/qtcreator/translations/qtcreator_da.ts b/share/qtcreator/translations/qtcreator_da.ts index 058b49bf240..78f1eabde99 100644 --- a/share/qtcreator/translations/qtcreator_da.ts +++ b/share/qtcreator/translations/qtcreator_da.ts @@ -4302,23 +4302,14 @@ F.eks., vil "Revision: 15" efterlade grenen ved revision 15.Value requested by kit: %1 Værdi anmodet af kit: %1 - - - CMakeProjectManager::CMakeBuildStep The build configuration is currently disabled. Byggekonfigurationen er deaktiveret på nuværende tidspunkt. - - - CMakeProjectManager::CMakeConfigItem Failed to open %1 for reading. Kunne ikke åbne %1 til læsning. - - - CMakeProjectManager::CMakeConfigurationKitInformation CMake configuration has no path to qmake binary set, even though the kit has a valid Qt version. CMake-konfigurationen har ikke sat nogen sti til en qmake-binær, selvom kittet har en gyldig Qt version. @@ -4363,9 +4354,6 @@ F.eks., vil "Revision: 15" efterlade grenen ved revision 15.CMake Configuration CMake-konfiguration - - - CMakeProjectManager::CMakeGeneratorKitInformation CMake Tool is unconfigured, CMake generator will be ignored. CMake-værktøj er ikke konfigureret, CMake-generator ignoreres. @@ -4406,9 +4394,6 @@ F.eks., vil "Revision: 15" efterlade grenen ved revision 15.<Use Default Generator> <brug standard generator> - - - CMakeProjectManager::CMakeKitInformation CMake version %1 is unsupported. Please update to version 3.0 or later. CMake-version %1 understøttes ikke. Opdater venligst til version 3.0 eller senere. @@ -4425,9 +4410,6 @@ F.eks., vil "Revision: 15" efterlade grenen ved revision 15.Path to the cmake executable Sti til cmake-eksekverbaren - - - CMakeProjectManager::CMakeProject No cmake tool set. Intet cmake-værktøj sat. @@ -4440,9 +4422,6 @@ F.eks., vil "Revision: 15" efterlade grenen ved revision 15.Scan "%1" project tree Skan "%1" projekttræ - - - CMakeProjectManager::CMakeSettingsPage (Default) (standard) @@ -4487,9 +4466,6 @@ F.eks., vil "Revision: 15" efterlade grenen ved revision 15.Path: Sti: - - - CMakeProjectManager::CMakeToolManager CMake at %1 CMake ved %1 @@ -4498,9 +4474,6 @@ F.eks., vil "Revision: 15" efterlade grenen ved revision 15.System CMake at %1 Systemets CMake ved %1 - - - CMakeProjectManager::ConfigModel Key Nøgle @@ -4521,9 +4494,6 @@ F.eks., vil "Revision: 15" efterlade grenen ved revision 15.Value Værdi - - - CMakeProjectManager::ConfigModelItemDelegate Select a file for %1 Vælg en fil for %1 @@ -4532,9 +4502,6 @@ F.eks., vil "Revision: 15" efterlade grenen ved revision 15.Select a directory for %1 Vælg en mappe for %1 - - - CMakeProjectManager::Internal::BuildDirManager Failed to create build directory "%1". Kunne ikke oprette bygmappe "%1". @@ -4555,14 +4522,6 @@ F.eks., vil "Revision: 15" efterlade grenen ved revision 15.<removed> <fjernet> - - Key - Nøgle - - - CMake - CMake - Project Projekt @@ -4579,16 +4538,10 @@ F.eks., vil "Revision: 15" efterlade grenen ved revision 15.Apply Changes to Project Anvend ændringer til projekt - - - CMakeProjectManager::Internal::CMakeBuildConfiguration CMake configuration set by the kit was overridden in the project. CMake-konfiguration sat af kittet blev tilsidesat af projektet. - - - CMakeProjectManager::Internal::CMakeBuildConfigurationFactory Default The name of the build configuration created by default for a cmake project. @@ -4614,13 +4567,6 @@ F.eks., vil "Revision: 15" efterlade grenen ved revision 15.Release with Debug Information Udgivelse med fejlretinformation - - - CMakeProjectManager::Internal::CMakeBuildSettingsWidget - - CMake - CMake - Build directory: Bygmappe: @@ -4685,10 +4631,6 @@ F.eks., vil "Revision: 15" efterlade grenen ved revision 15.Apply Configuration Changes Anvend konfigurationsændringer - - <UNSET> - <AFSÆT> - bool display string for cmake type BOOLEAN @@ -4713,9 +4655,6 @@ F.eks., vil "Revision: 15" efterlade grenen ved revision 15.Force to %1 Tving til %1 - - - CMakeProjectManager::Internal::CMakeBuildStep CMake Build Default display name for the cmake make step. @@ -4741,9 +4680,6 @@ F.eks., vil "Revision: 15" efterlade grenen ved revision 15.Project did not parse successfully, cannot build. Projekt blev ikke parset, kan ikke bygge. - - - CMakeProjectManager::Internal::CMakeBuildStepConfigWidget Tool arguments: Værktøjsargumenter: @@ -4761,25 +4697,15 @@ F.eks., vil "Revision: 15" efterlade grenen ved revision 15.<b>No build configuration found on this kit.</b> <b>Ingen byggekonfiguration fundet i dette kit.</b> - - - CMakeProjectManager::Internal::CMakeBuildStepFactory Build Display name for CMakeProjectManager::CMakeBuildStep id. Byg - - - CMakeProjectManager::Internal::CMakeConfigurationKitConfigWidget Change... Skift... - - CMake Configuration - CMake-konfiguration - Default configuration passed to CMake when setting up a project. Standard konfiguration videregivet til CMake når et projekt sættes op. @@ -4792,20 +4718,10 @@ F.eks., vil "Revision: 15" efterlade grenen ved revision 15.Enter one variable per line with the variable name separated from the variable value by "=".<br>You may provide a type hint by adding ":TYPE" before the "=". Indtast én variabel pr. linje med variabelnavnet separeret fra variablens værdi med "=".<br>Du kan give et tip om type ved at tilføje ":TYPE" før "=". - - - CMakeProjectManager::Internal::CMakeEditorFactory CMake Editor CMake-redigering - - - CMakeProjectManager::Internal::CMakeGeneratorKitConfigWidget - - Change... - Skift... - CMake generator: CMake-generator: @@ -4822,10 +4738,6 @@ F.eks., vil "Revision: 15" efterlade grenen ved revision 15.CMake generator defines how a project is built when using CMake.<br>This setting is ignored when using other build systems. CMake-generator definerer hvordan et projekt bygges ved brug af CMake.<br>Denne indstilling ignoreres når andre byggesystemer bruges. - - CMake Generator - CMake-generator - Generator: Generator: @@ -4842,9 +4754,6 @@ F.eks., vil "Revision: 15" efterlade grenen ved revision 15.Toolset: Værktøjssæt: - - - CMakeProjectManager::Internal::CMakeKitConfigWidget CMake Tool: CMake-værktøj: @@ -4857,16 +4766,10 @@ F.eks., vil "Revision: 15" efterlade grenen ved revision 15.<No CMake Tool available> <Intet tilgængeligt CMake-værktøj> - - - CMakeProjectManager::Internal::CMakeLocatorFilter Build CMake target Byg CMake-mål - - - CMakeProjectManager::Internal::CMakeManager Run CMake Kør CMake @@ -4879,47 +4782,24 @@ F.eks., vil "Revision: 15" efterlade grenen ved revision 15.Rescan Project Genskan projekt - - - CMakeProjectManager::Internal::CMakeProjectPlugin CMake SnippetProvider CMake - - Build - Byg - Build "%1" Byg "%1" - - - CMakeProjectManager::Internal::CMakeRunConfiguration The project no longer builds the target associated with this run configuration. Projektet bygger ikke længere målet tilknyttet med denne kør-konfiguration. - - - CMakeProjectManager::Internal::CMakeSettingsPage - - CMake - CMake - - - - CMakeProjectManager::Internal::CMakeTarget Desktop CMake Default target display name Desktop - - - CMakeProjectManager::Internal::CMakeToolConfigWidget Add Tilføj @@ -4948,9 +4828,6 @@ F.eks., vil "Revision: 15" efterlade grenen ved revision 15.New CMake Ny CMake - - - CMakeProjectManager::Internal::ServerMode Running "%1 %2" in %3. Kører "%1 %2" i %3. @@ -5035,9 +4912,6 @@ F.eks., vil "Revision: 15" efterlade grenen ved revision 15.Received a signal in reply to a request. Modtog et signal som svar til en anmodning. - - - CMakeProjectManager::Internal::ServerModeReader Parsing of CMake project failed: Connection to CMake server lost. Parsing af CMake-projekt mislykkedes: Forbindelse til CMake-server tabt. @@ -5094,21 +4968,10 @@ F.eks., vil "Revision: 15" efterlade grenen ved revision 15.<Headers> <headere> - - - CMakeProjectManager::Internal::TeaLeafReader The build directory is not for %1 but for %2 Bygmappen er ikke til %1 men til %2 - - Running "%1 %2" in %3. - Kører "%1 %2" i %3. - - - Configuring "%1" - Konfigurerer "%1" - *** cmake process crashed. *** cmake-proces holdt op med at virke. @@ -5343,7 +5206,7 @@ Men brug af de afslappede og udvidet regler betyder også at der ikke kan levere - ClearCase::Internal::ActivitySelector + ClearCase Select &activity: Vælg &aktivitet: @@ -5356,9 +5219,6 @@ Men brug af de afslappede og udvidet regler betyder også at der ikke kan levere Keep item activity Hold post aktivitet - - - ClearCase::Internal::CheckOutDialog Check Out Check out @@ -5384,9 +5244,6 @@ Men brug af de afslappede og udvidet regler betyder også at der ikke kan levere Hijack: Unset read-only flag without check-out. This is used for local changes which the user does not want to commit. Brug &hijacked fil - - - ClearCase::Internal::ClearCaseControl Check &Out Check &out @@ -5395,16 +5252,10 @@ Men brug af de afslappede og udvidet regler betyder også at der ikke kan levere &Hijack &Hijack - - - ClearCase::Internal::ClearCaseEditorWidget Annotate version "%1" Annotate version "%1" - - - ClearCase::Internal::ClearCasePlugin Editing Derived Object: %1 Redigerer afledt objekt: %1 @@ -5702,31 +5553,18 @@ Men brug af de afslappede og udvidet regler betyder også at der ikke kan levere Updating ClearCase Index Opdaterer ClearCase-indeks - - - ClearCase::Internal::ClearCaseSubmitEditor ClearCase Check In ClearCase check in - - - ClearCase::Internal::ClearCaseSubmitEditorWidget Chec&k in even if identical to previous version Chec&k in selv hvis identisk med forrige version - - &Preserve file modification time - &Bevar filændringstid - &Check In &Check in - - - ClearCase::Internal::SettingsPage Configuration Konfiguration @@ -5808,9 +5646,6 @@ Men brug af de afslappede og udvidet regler betyder også at der ikke kan levere ClearCase ClearCase - - - ClearCase::Internal::SettingsPageWidget ClearCase Command ClearCase-kommando @@ -5823,9 +5658,6 @@ Men brug af de afslappede og udvidet regler betyder også at der ikke kan levere DiffUtils is available for free download at http://gnuwin32.sourceforge.net/packages/diffutils.htm. Extract it to a directory in your PATH. DiffUtils kan frit downloades på http://gnuwin32.sourceforge.net/packages/diffutils.htm. Udpak den til en mappe i din PATH. - - - ClearCase::Internal::UndoCheckOut Dialog Dialog @@ -5838,9 +5670,6 @@ Men brug af de afslappede og udvidet regler betyder også at der ikke kan levere &Save copy of the file with a '.keep' extension &Gem kopi af filen med en '.keep'-endelse - - - ClearCase::Internal::VersionSelector Confirm Version to Check Out Bekræft version som skal check out @@ -29179,7 +29008,7 @@ Filerne i Android-pakke kildemappen kopieres til bygmappens Android-mappe og sta - QmakePriFile + QmakeProjectManager Failed Mislykkedes @@ -29192,9 +29021,6 @@ Filerne i Android-pakke kildemappen kopieres til bygmappens Android-mappe og sta File Error Filfejl - - - QmakeProFile Error while parsing file %1. Giving up. Fejl under parsing af filen %1. Opgiver. @@ -29203,25 +29029,16 @@ Filerne i Android-pakke kildemappen kopieres til bygmappens Android-mappe og sta Could not find .pro file for subdirectory "%1" in "%2". Kunne ikke finde .pro-fil for undermappen "%1" i "%2". - - - QmakeProjectManager "%1" is used by qmake, but "%2" is configured in the kit. Please update your kit or choose a mkspec for qmake that matches your target environment better. "%1" bruges af qmake, men "%2" er konfigureret i kittet. Opdater venligst dit kit eller vælg en mkspec for qmake som matcher dit mål-miljø bedre. - - - QmakeProjectManager::Internal::AddLibraryWizard Add Library Tilføj bibliotek - - - QmakeProjectManager::Internal::ClassDefinition The header file Headerfilen @@ -29322,9 +29139,6 @@ Opdater venligst dit kit eller vælg en mkspec for qmake som matcher dit mål-mi Icon files (*.png *.ico *.jpg *.xpm *.tif *.svg) Ikonfiler (*.png *.ico *.jpg *.xpm *.tif *.svg) - - - QmakeProjectManager::Internal::ClassList <New class> <ny klasse> @@ -29337,9 +29151,6 @@ Opdater venligst dit kit eller vælg en mkspec for qmake som matcher dit mål-mi Delete class %1 from list? Slet klassen %1 fra liste? - - - QmakeProjectManager::Internal::CustomWidgetPluginWizardPage WizardPage Assistent side @@ -29380,9 +29191,6 @@ Opdater venligst dit kit eller vælg en mkspec for qmake som matcher dit mål-mi Plugin Details Plugindetaljer - - - QmakeProjectManager::Internal::CustomWidgetWidgetsWizardPage Custom Qt Widget Wizard Brugerdefineret Qt widget-assistent @@ -29407,9 +29215,6 @@ Opdater venligst dit kit eller vælg en mkspec for qmake som matcher dit mål-mi Custom Widgets Brugerdefineret widgets - - - QmakeProjectManager::Internal::CustomWidgetWizard Qt Custom Designer Widget Qt brugerdefineret Designer-widget @@ -29418,16 +29223,10 @@ Opdater venligst dit kit eller vælg en mkspec for qmake som matcher dit mål-mi Creates a Qt Custom Designer Widget or a Custom Widget Collection. Opretter et Qt brugerdefineret Designer-widget eller en brugerdefineret widget-samling. - - - QmakeProjectManager::Internal::CustomWidgetWizardDialog This wizard generates a Qt Designer Custom Widget or a Qt Designer Custom Widget Collection project. Denne assistent genererer en Qt Designer brugerdefineret widget eller et Qt Designer brugerdefineret widget-samling-projekt. - - - QmakeProjectManager::Internal::DesignerExternalEditor Qt Designer is not responding (%1). Qt Designer svarer ikke (%1). @@ -29436,16 +29235,10 @@ Opdater venligst dit kit eller vælg en mkspec for qmake som matcher dit mål-mi Unable to create server socket: %1 Kunne ikke oprette server-socket: %1 - - - QmakeProjectManager::Internal::DesktopQmakeRunConfiguration Qt Run Configuration Qt kør-konfiguration - - - QmakeProjectManager::Internal::DetailsPage Details Detaljer @@ -29482,9 +29275,6 @@ Opdater venligst dit kit eller vælg en mkspec for qmake som matcher dit mål-mi Specify the package to link to Angiv pakken som der skal linkes til - - - QmakeProjectManager::Internal::ExternalQtEditor Unable to start "%1" Kunne ikke starte "%1" @@ -29493,9 +29283,6 @@ Opdater venligst dit kit eller vælg en mkspec for qmake som matcher dit mål-mi The application "%1" could not be found. Programmet "%1" kunne ikke findes. - - - QmakeProjectManager::Internal::FilesPage Class Information Klasseinformation @@ -29504,20 +29291,10 @@ Opdater venligst dit kit eller vælg en mkspec for qmake som matcher dit mål-mi Specify basic information about the classes for which you want to generate skeleton source code files. Angiv grundlæggende information om klasserne for hvilke du vil generere skelet kildekode-fil. - - Details - Detaljer - - - - QmakeProjectManager::Internal::FilesSelectionWizardPage Files Filer - - - QmakeProjectManager::Internal::GuiAppWizard Qt Widgets Application Qt widgets-program @@ -29530,16 +29307,10 @@ Preselects a desktop Qt for building the application if available. Prævælger en desktop Qt til bygning af programmet, hvis tilgængeligt. - - - QmakeProjectManager::Internal::GuiAppWizardDialog This wizard generates a Qt Widgets Application project. The application derives by default from QApplication and includes an empty widget. Denne assistent genererer et Qt Widgets-programprojekt. Programmet stammer som standard fra QApplication og inkluderer en tom widget. - - - QmakeProjectManager::Internal::LibraryDetailsController Linkage: Linkning: @@ -29564,9 +29335,6 @@ Prævælger en desktop Qt til bygning af programmet, hvis tilgængeligt.%1 Library %1 bibliotek - - - QmakeProjectManager::Internal::LibraryDetailsWidget Library: Bibliotek: @@ -29599,10 +29367,6 @@ Prævælger en desktop Qt til bygning af programmet, hvis tilgængeligt.Windows Windows - - Linkage: - Linkning: - Dynamic Dynamisk @@ -29611,10 +29375,6 @@ Prævælger en desktop Qt til bygning af programmet, hvis tilgængeligt.Static Statisk - - Mac: - Mac: - Library Bibliotek @@ -29639,9 +29399,6 @@ Prævælger en desktop Qt til bygning af programmet, hvis tilgængeligt.Remove "d" suffix for release version Fjern "d"-suffiks for udgiv-version - - - QmakeProjectManager::Internal::LibraryTypePage Library Type Bibliotekstype @@ -29692,9 +29449,6 @@ Hverken stien til biblioteket eller stien til dets includere tilføjes til .pro- Type Type - - - QmakeProjectManager::Internal::LibraryWizard C++ Library C++-bibliotek @@ -29703,9 +29457,6 @@ Hverken stien til biblioteket eller stien til dets includere tilføjes til .pro- Creates a C++ library based on qmake. This can be used to create:<ul><li>a shared C++ library for use with <tt>QPluginLoader</tt> and runtime (Plugins)</li><li>a shared or static C++ library for use with another project at linktime</li></ul> Opretter et C++-bibliotek baseret på qmake. Dette kan bruges til at oprette:<ul><li>et delt C++-bibliotek til brug sammen med <tt>QPluginLoader</tt> og runtime (plugins)</li><li>et delt eller statisk C++-bibliotek til brug sammen med et andet projekt ved linktime</li></ul> - - - QmakeProjectManager::Internal::LibraryWizardDialog Shared Library Delt bibliotek @@ -29718,21 +29469,10 @@ Hverken stien til biblioteket eller stien til dets includere tilføjes til .pro- Qt Plugin Qt-plugin - - Type - Type - This wizard generates a C++ Library project. Denne assistent genererer et C++-bibliotek-projekt. - - Details - Detaljer - - - - QmakeProjectManager::Internal::MakeStep Override %1: Tilsidesæt %1: @@ -29741,16 +29481,10 @@ Hverken stien til biblioteket eller stien til dets includere tilføjes til .pro- Make arguments: Make-argumenter: - - - QmakeProjectManager::Internal::MakeStepFactory Make Make - - - QmakeProjectManager::Internal::ModulesPage Select Required Modules Vælg krævet moduler @@ -29763,28 +29497,14 @@ Hverken stien til biblioteket eller stien til dets includere tilføjes til .pro- Modules Moduler - - - QmakeProjectManager::Internal::PluginGenerator Creating multiple widget libraries (%1, %2) in one project (%3) is not supported. Oprettelse af flere widget-biblioteker (%1, %2) i et projekt (%3) understøttes ikke. - - - QmakeProjectManager::Internal::QMakeStep qmake build configuration: qmake-byggekonfiguration: - - Debug - Fejlretning - - - Release - Udgivelse - Additional arguments: Yderligere argumenter: @@ -29805,16 +29525,6 @@ Hverken stien til biblioteket eller stien til dets includere tilføjes til .pro- Effective qmake call: Virkende qmake kald: - - - QmakeProjectManager::Internal::QMakeStepFactory - - qmake - qmake - - - - QmakeProjectManager::Internal::QmakeKitConfigWidget Qt mkspec: Qt mkspec: @@ -29823,9 +29533,6 @@ Hverken stien til biblioteket eller stien til dets includere tilføjes til .pro- The mkspec to use when building the project with qmake.<br>This setting is ignored when using other build systems. Mkspec som skal bruges når projektet bygges med qmake.<br>Denne indstilling ignoreres når der bruges andre byggesystemer. - - - QmakeProjectManager::Internal::QmakeProjectConfigWidget Shadow build: Skygge-byg: @@ -29872,20 +29579,6 @@ Hverken stien til biblioteket eller stien til dets includere tilføjes til .pro- %1 error message, %2 build directory %1 Byggen i %2 overskrives. - - - QmakeProjectManager::Internal::QmakeProjectImporter - - Debug - Fejlret - - - Release - Udgiv - - - - QmakeProjectManager::Internal::QmakeProjectManagerPlugin Build Byg @@ -29946,9 +29639,6 @@ Hverken stien til biblioteket eller stien til dets includere tilføjes til .pro- Add Library... Tilføj bibliotek... - - - QmakeProjectManager::Internal::Qt4Target Desktop Qt4 Desktop target display name @@ -29964,9 +29654,6 @@ Hverken stien til biblioteket eller stien til dets includere tilføjes til .pro- Qt4 Maemo Device target display name Maemo-enhed - - - QmakeProjectManager::Internal::SimpleProjectWizard Import as qmake Project (Limited Functionality) Importér som qmake-projekt (begrænset funktionalitet) @@ -29975,9 +29662,6 @@ Hverken stien til biblioteket eller stien til dets includere tilføjes til .pro- Imports existing projects that do not use qmake, CMake or Autotools.<p>This creates a qmake .pro file that allows you to use %1 as a code editor and as a launcher for debugging and analyzing tools. If you want to build the project, you might need to edit the generated .pro file. Importerer eksisterende projekter som ikke bruger qmake, CMake eller Autotools.<p>Dette opretter en qmake .pro-fil der giver dig mulighed for at bruge %1 som en koderedigering og som en starter til fejlretnings- of analyseringsværktøjer. Hvis du vil bygge projektet, så kan det være du skal redigere den genererede .pro-fil. - - - QmakeProjectManager::Internal::SimpleProjectWizardDialog Import Existing Project Importér eksisterende projekt @@ -29998,9 +29682,6 @@ Hverken stien til biblioteket eller stien til dets includere tilføjes til .pro- File Selection Valg af fil - - - QmakeProjectManager::Internal::SubdirsProjectWizard Subdirs Project Undermapper-projekt @@ -30022,16 +29703,10 @@ Hverken stien til biblioteket eller stien til dets includere tilføjes til .pro- Title of dialog Nyt underprojekt - - - QmakeProjectManager::Internal::SubdirsProjectWizardDialog This wizard generates a Qt Subdirs project. Add subprojects to it later on by using the other wizards. Denne assistent genererer et Qt undermapper-projekt. Tilføj underprojekter til det senere ved at bruge de andre assistenter. - - - QmakeProjectManager::Internal::SummaryPage Summary Opsummering @@ -30040,9 +29715,6 @@ Hverken stien til biblioteket eller stien til dets includere tilføjes til .pro- The following snippet will be added to the<br><b>%1</b> file: Følgende snippet skal tilføjes til <br><b>%1</b>-filen: - - - QmakeProjectManager::MakeStep Make Qt MakeStep display name. @@ -30052,13 +29724,6 @@ Hverken stien til biblioteket eller stien til dets includere tilføjes til .pro- Cannot find Makefile. Check your build settings. Kan ikke finde Makefile. Tjek dine bygindstillinger. - - - QmakeProjectManager::MakeStepConfigWidget - - Override %1: - Tilsidesæt %1: - Make: Make: @@ -30075,9 +29740,6 @@ Hverken stien til biblioteket eller stien til dets includere tilføjes til .pro- <b>Make:</b> %1 not found in the environment. <b>Make:</b> %1 ikke fundet i miljøet. - - - QmakeProjectManager::QMakeStep qmake QMakeStep default display name @@ -30103,9 +29765,6 @@ Hverken stien til biblioteket eller stien til dets includere tilføjes til .pro- <no Make step found> <intet Make-trin fundet> - - - QmakeProjectManager::QMakeStepConfigWidget QML Debugging QML-fejlretning @@ -30142,9 +29801,6 @@ Hverken stien til biblioteket eller stien til dets includere tilføjes til .pro- Disables QML debugging. QML profiling will still work. Deaktiverer QML-fejlretning. QML-profilering vil stadig virke. - - - QmakeProjectManager::QmakeBuildConfiguration Could not parse Makefile. Kunne ikke parse Makefile. @@ -30169,9 +29825,6 @@ Hverken stien til biblioteket eller stien til dets includere tilføjes til .pro- Parsing the .pro file Parser .pro-fil - - - QmakeProjectManager::QmakeBuildConfigurationFactory Release The name of the release build configuration created by default for a qmake project. @@ -30205,9 +29858,6 @@ Hverken stien til biblioteket eller stien til dets includere tilføjes til .pro- Non-ASCII characters in directory suffix may cause build issues. Profile - - - QmakeProjectManager::QmakeKitInformation No Qt version set, so mkspec is ignored. Ingen Qt version sat, så mkspec ignoreres. @@ -30224,16 +29874,10 @@ Hverken stien til biblioteket eller stien til dets includere tilføjes til .pro- Mkspec configured for qmake by the Kit. Mkspec konfigureret for qmake af kittet. - - - QmakeProjectManager::QmakeManager QMake QMake - - - QmakeProjectManager::QmakePriFile Headers Headere @@ -30262,9 +29906,6 @@ Hverken stien til biblioteket eller stien til dets includere tilføjes til .pro- Other files Andre filer - - - QmakeProjectManager::QmakeProject Reading Project "%1" Læser projektet "%1" @@ -30292,7 +29933,7 @@ Hverken stien til biblioteket eller stien til dets includere tilføjes til .pro- - QmakeProjectManager::QtVersion + QmakeProjectManager The build directory needs to be at the same level as the source directory. Bygmappen skal være på samme niveau som kildemappen. @@ -43065,7 +42706,7 @@ skal være et repository krævet SSH-autentifikation (se dokumentation på SSH o - CMakeProjectManager::Internal::CMakeSpecificSettingForm + CMakeProjectManager Determines whether file paths are copied to the clipboard for pasting to the CMakeLists.txt file when you add new files to CMake projects. Beslutter om filstier kopieres til udklipsholderen til indsættelse i CMakeLists.txt-filen, når du tilføjer nye filer til CMake-projekter. @@ -43701,11 +43342,7 @@ Kopiér stien til kildefilerne til udklipsholderen? - CMakeProjectManager::Internal::CMakeSpecificSettingsPage - - CMake - CMake - + CMakeProjectManager Core::HelpManager diff --git a/share/qtcreator/translations/qtcreator_de.ts b/share/qtcreator/translations/qtcreator_de.ts index c61767f0c76..1a9217ee998 100644 --- a/share/qtcreator/translations/qtcreator_de.ts +++ b/share/qtcreator/translations/qtcreator_de.ts @@ -197,7 +197,7 @@ - CMakeProjectManager::Internal::CMakeBuildSettingsWidget + CMakeProjectManager Filter Filter @@ -13548,7 +13548,7 @@ Lokale Pull-Operationen werden nicht auf den Master-Branch angewandt. - CMakeProjectManager::Internal::CMakeManager + CMakeProjectManager Run CMake CMake ausführen @@ -17448,7 +17448,7 @@ Diese Präfixe werden zusätzlich zum Dateinamen beim Wechseln zwischen Header- - QmakeProjectManager::QMakeStep + QmakeProjectManager qmake QMakeStep default display name @@ -20170,7 +20170,7 @@ hinzufügen, um dem QML-Editor den wahrscheinlichen URI mitzuteilen. - ClearCase::Internal::CheckOutDialog + ClearCase Check Out Check Out @@ -20196,9 +20196,6 @@ hinzufügen, um dem QML-Editor den wahrscheinlichen URI mitzuteilen.&Checkout comment: &Checkout-Kommentar: - - - ClearCase::Internal::SettingsPage Configuration Konfiguration @@ -20276,9 +20273,6 @@ hinzufügen, um dem QML-Editor den wahrscheinlichen URI mitzuteilen.Do &not prompt for comment during checkout or check-in Beim Check-in oder Check-out &nicht nach Kommentaren fragen - - - ClearCase::Internal::UndoCheckOut Dialog Dialog @@ -20291,9 +20285,6 @@ hinzufügen, um dem QML-Editor den wahrscheinlichen URI mitzuteilen.The file was changed. Die Datei wurde geändert. - - - ClearCase::Internal::VersionSelector Confirm Version to Check Out Bestätigung der Check-Out-Version @@ -20353,7 +20344,7 @@ hinzufügen, um dem QML-Editor den wahrscheinlichen URI mitzuteilen. - ClearCase::Internal::ActivitySelector + ClearCase Select &activity: Aktivität &auswählen: @@ -20366,31 +20357,18 @@ hinzufügen, um dem QML-Editor den wahrscheinlichen URI mitzuteilen.Keep item activity Aktivität des Elements beibehalten - - - ClearCase::Internal::ClearCaseSubmitEditor ClearCase Check In ClearCase Einchecken - - - ClearCase::Internal::ClearCaseSubmitEditorWidget Chec&k in even if identical to previous version Einchec&ken auch wenn zur Vorgängerversion identisch - - &Preserve file modification time - Änderungsdatum von D&ateien beibehalten - &Check In &Einchecken - - - ClearCase::Internal::SettingsPageWidget ClearCase Command ClearCase-Befehl @@ -24892,7 +24870,7 @@ das beim Drücken unter dem Zeiger oder Berührungspunkt war, unter diesem Punkt - QmakeProjectManager::Internal::ClassDefinition + QmakeProjectManager The header file Header-Datei @@ -24993,9 +24971,6 @@ das beim Drücken unter dem Zeiger oder Berührungspunkt war, unter diesem Punkt Icon files (*.png *.ico *.jpg *.xpm *.tif *.svg) Symboldateien (*.png *.ico *.jpg *.xpm *.tif *.svg) - - - QmakeProjectManager::Internal::CustomWidgetPluginWizardPage WizardPage WizardPage @@ -25036,9 +25011,6 @@ das beim Drücken unter dem Zeiger oder Berührungspunkt war, unter diesem Punkt Plugin Details Plugin-Details - - - QmakeProjectManager::Internal::CustomWidgetWidgetsWizardPage Custom Qt Widget Wizard Assistent zur Erstellung benutzerdefinierter Qt-Widgets @@ -25063,9 +25035,6 @@ das beim Drücken unter dem Zeiger oder Berührungspunkt war, unter diesem Punkt Custom Widgets Benutzerdefinierte Widgets - - - QmakeProjectManager::Internal::LibraryDetailsWidget Library: Bibliothek: @@ -25205,14 +25174,11 @@ das beim Drücken unter dem Zeiger oder Berührungspunkt war, unter diesem Punkt - QmakeProjectManager::Internal::AddLibraryWizard + QmakeProjectManager Add Library Bibliothek hinzufügen - - - QmakeProjectManager::Internal::LibraryTypePage Library Type Typ der Bibliothek @@ -25263,9 +25229,6 @@ Weder der Pfad zur Bibliothek noch der Pfad zu den Headerdateien wird zur .pro-D Type Typ - - - QmakeProjectManager::Internal::DetailsPage Details Details @@ -25302,9 +25265,6 @@ Weder der Pfad zur Bibliothek noch der Pfad zu den Headerdateien wird zur .pro-D Specify the package to link to Geben Sie das zu bindende Paket an - - - QmakeProjectManager::Internal::SummaryPage Summary Zusammenfassung @@ -25313,9 +25273,6 @@ Weder der Pfad zur Bibliothek noch der Pfad zu den Headerdateien wird zur .pro-D The following snippet will be added to the<br><b>%1</b> file: Die folgende Angabe wird in die Datei <br><b>%1</b> eingefügt: - - - QmakeProjectManager::Internal::ClassList <New class> <Neue Klasse> @@ -25328,9 +25285,6 @@ Weder der Pfad zur Bibliothek noch der Pfad zu den Headerdateien wird zur .pro-D Delete class %1 from list? Soll die Klasse %1 aus der Liste gelöscht werden? - - - QmakeProjectManager::Internal::CustomWidgetWizard Qt Custom Designer Widget Benutzerdefiniertes Widget für Qt Designer @@ -25339,23 +25293,14 @@ Weder der Pfad zur Bibliothek noch der Pfad zu den Headerdateien wird zur .pro-D Creates a Qt Custom Designer Widget or a Custom Widget Collection. Erstellt ein oder mehrere benutzerdefinierte Widgets für Qt Designer. - - - QmakeProjectManager::Internal::CustomWidgetWizardDialog This wizard generates a Qt Designer Custom Widget or a Qt Designer Custom Widget Collection project. Dieser Assistent erstellt ein Projekt mit einem oder mehreren benutzerdefinierten Widgets für Qt Designer. - - - QmakeProjectManager::Internal::PluginGenerator Creating multiple widget libraries (%1, %2) in one project (%3) is not supported. Die Erzeugung von mehreren Bibliotheken (%1, %2) in einem Projekt (%3) wird nicht unterstützt. - - - QmakeProjectManager::Internal::ExternalQtEditor Unable to start "%1" "%1" kann nicht gestartet werden @@ -25364,9 +25309,6 @@ Weder der Pfad zur Bibliothek noch der Pfad zu den Headerdateien wird zur .pro-D The application "%1" could not be found. Die Anwendung "%1" konnte nicht gefunden werden. - - - QmakeProjectManager::Internal::DesignerExternalEditor Qt Designer is not responding (%1). Qt Designer antwortet nicht (%1). @@ -25375,13 +25317,6 @@ Weder der Pfad zur Bibliothek noch der Pfad zu den Headerdateien wird zur .pro-D Unable to create server socket: %1 Der Server-Socket konnte nicht erzeugt werden: %1 - - - QmakeProjectManager::Internal::LibraryDetailsController - - Linkage: - Linken: - %1 Dynamic %1 dynamisch @@ -25390,10 +25325,6 @@ Weder der Pfad zur Bibliothek noch der Pfad zu den Headerdateien wird zur .pro-D %1 Static %1 statisch - - Mac: - Mac: - %1 Framework %1 Framework @@ -25402,9 +25333,6 @@ Weder der Pfad zur Bibliothek noch der Pfad zu den Headerdateien wird zur .pro-D %1 Library %1 Bibliothek - - - QmakeProjectManager::Internal::QmakeProjectImporter Debug Debug @@ -25413,9 +25341,6 @@ Weder der Pfad zur Bibliothek noch der Pfad zu den Headerdateien wird zur .pro-D Release Release - - - QmakeProjectManager::QMakeStepConfigWidget QML Debugging QML-Debuggen @@ -25424,14 +25349,6 @@ Weder der Pfad zur Bibliothek noch der Pfad zu den Headerdateien wird zur .pro-D qmake build configuration: qmake Build-Konfiguration: - - Debug - Debug - - - Release - Release - Additional arguments: Zusätzliche Argumente: @@ -25464,9 +25381,6 @@ Weder der Pfad zur Bibliothek noch der Pfad zu den Headerdateien wird zur .pro-D <b>qmake:</b> %1 %2 <b>qmake:</b> %1 %2 - - - QmakeProjectManager::Internal::SubdirsProjectWizard Subdirs Project Subdirs-Projekt @@ -25488,9 +25402,6 @@ Weder der Pfad zur Bibliothek noch der Pfad zu den Headerdateien wird zur .pro-D Title of dialog Neues Teilprojekt - - - QmakeProjectManager::Internal::SubdirsProjectWizardDialog This wizard generates a Qt Subdirs project. Add subprojects to it later on by using the other wizards. Dieser Assistent erstellt ein Qt-Projekt vom Typ subdirs. Unterprojekte können später mit anderen Assistenten hinzugefügt werden. @@ -25626,7 +25537,7 @@ Weder der Pfad zur Bibliothek noch der Pfad zu den Headerdateien wird zur .pro-D - QmakeProjectManager::QmakeBuildConfiguration + QmakeProjectManager General Allgemein @@ -25694,9 +25605,6 @@ Weder der Pfad zur Bibliothek noch der Pfad zu den Headerdateien wird zur .pro-D Non-ASCII characters in directory suffix may cause build issues. Profile - - - QmakeProjectManager::QmakeProject No Qt version set in kit. Im Kit ist keine Qt-Version gesetzt. @@ -25713,9 +25621,6 @@ Weder der Pfad zur Bibliothek noch der Pfad zu den Headerdateien wird zur .pro-D Project is part of Qt sources that do not match the Qt defined in the kit. Das Projekt ist Teil von Qt-Quellen, die nicht zum im Kit definierten Qt passen. - - - QmakeProjectManager::Internal::QmakeProjectManagerPlugin Build Erstellen @@ -28312,7 +28217,7 @@ Der vom Kit mindestens benötigte API-Level ist %1. - ClearCase::Internal::ClearCaseEditorWidget + ClearCase Annotate version "%1" Annotation für Version "%1" @@ -31994,7 +31899,7 @@ Senden selbst auch Zeit benötigt. - CMakeProjectManager::CMakeProject + CMakeProjectManager No cmake tool set. Keine CMake Anwendung konfiguriert. @@ -32003,9 +31908,6 @@ Senden selbst auch Zeit benötigt. No compilers set in kit. Im Kit sind keine Compiler eingerichtet. - - - CMakeProjectManager::CMakeSettingsPage Version: %1<br>Supports fileApi: %2 Version: %1<br>Unterstützt fileApi: %2 @@ -32070,9 +31972,6 @@ Senden selbst auch Zeit benötigt. Help file: Hilfedatei: - - - CMakeProjectManager::Internal::CMakeToolConfigWidget Add Hinzufügen @@ -32101,21 +32000,10 @@ Senden selbst auch Zeit benötigt. New CMake Neues CMake - - CMake - CMake - - - - CMakeProjectManager::CMakeToolManager System CMake at %1 System-CMake in %1 - - CMake - CMake - Core::BaseFileWizard @@ -35018,7 +34906,7 @@ Dies könnte Probleme während der Ausführung verursachen. - CMakeProjectManager::Internal::CMakeBuildStep + CMakeProjectManager CMake Build Default display name for the cmake make step. @@ -35053,9 +34941,6 @@ Dies könnte Probleme während der Ausführung verursachen. Display name for CMakeProjectManager::CMakeBuildStep id. Erstellen - - - CMakeProjectManager::Internal::CMakeBuildStepConfigWidget CMake arguments: Kommandozeilenargumente für CMake: @@ -35073,9 +34958,6 @@ Dies könnte Probleme während der Ausführung verursachen. CMakeProjectManager::CMakeBuildStepConfigWidget display name. Build - - - CMakeProjectManager::ConfigModel Key Schlüssel @@ -35088,10 +34970,6 @@ Dies könnte Probleme während der Ausführung verursachen. Current kit: %1 Aktuelles Kit: %1 - - <UNSET> - <UNGESETZT> - Value Wert @@ -36176,7 +36054,7 @@ Siehe auch die Einstellungen für Google Test. - CMakeProjectManager::Internal::CMakeBuildConfiguration + CMakeProjectManager Changing Build Directory Build-Verzeichnis ändern @@ -37772,7 +37650,7 @@ Fehler: %5 - CMakeProjectManager::CMakeConfigItem + CMakeProjectManager Failed to open %1 for reading. Die Datei %1 konnte nicht zum Lesen geöffnet werden. @@ -37801,23 +37679,16 @@ Fehler: %5 - CMakeProjectManager::Internal::CMakeProjectPlugin + CMakeProjectManager CMake SnippetProvider CMake - - Build - Erstellen - Build "%1" "%1" erstellen - - - CMakeProjectManager Current CMake: %1 Aktuelles CMake: %1 @@ -38504,7 +38375,7 @@ Ablaufdatum: %3 - QmakeProjectManager::QmakePriFile + QmakeProjectManager Headers Header-Dateien @@ -38537,9 +38408,6 @@ Ablaufdatum: %3 Generated Files Erzeugte Dateien - - - QmakePriFile Failed Fehlgeschlagen @@ -38552,9 +38420,6 @@ Ablaufdatum: %3 File Error Dateifehler - - - QmakeProFile Error while parsing file %1. Giving up. Fehler beim Auswerten der Datei %1. Abbruch. @@ -38563,9 +38428,6 @@ Ablaufdatum: %3 Could not find .pro file for subdirectory "%1" in "%2". Die .pro-Datei des Unterverzeichnisses "%1" konnte in "%2" nicht gefunden werden. - - - QmakeProjectManager "%1" is used by qmake, but "%2" is configured in the kit. Please update your kit (%3) or choose a mkspec for qmake that matches your target environment better. @@ -40456,7 +40318,7 @@ Breche ausstehende Operationen ab... - CMakeProjectManager::ConfigModelItemDelegate + CMakeProjectManager Select a file for %1 Wählen Sie eine Datei für %1 @@ -40974,7 +40836,7 @@ Breche ausstehende Operationen ab... - CMakeProjectManager::Internal::CMakeSpecificSettingForm + CMakeProjectManager Determines whether file paths are copied to the clipboard for pasting to the CMakeLists.txt file when you add new files to CMake projects. Legt fest, ob beim Hinzufügen von neuen Dateien zu CMake-Projekten deren Dateipfade in die Zwischenablage kopiert werden, um sie in die CMakeLists.txt-Datei einzufügen. @@ -42575,7 +42437,7 @@ Die Dateien aus dem Quellverzeichnis des Android-Pakets werden in das Verzeichni - QmakeProjectManager::QmakeMakeStep + QmakeProjectManager Cannot find Makefile. Check your build settings. Die Makefile-Datei konnte nicht gefunden werden. Bitte überprüfen Sie die Einstellungen zur Erstellung. @@ -45611,7 +45473,7 @@ Wenn Sie noch keinen privaten Schlüssel besitzen, können Sie hier auch einen e - ClearCase::Internal::ClearCasePluginPrivate + ClearCase Editing Derived Object: %1 Bearbeite abgeleitetes Objekt: %1 @@ -45890,7 +45752,7 @@ Wenn Sie noch keinen privaten Schlüssel besitzen, können Sie hier auch einen e - CMakeProjectManager::Internal::CMakeBuildSystem + CMakeProjectManager Scan "%1" project tree Durchsuche "%1"-Projektbaum @@ -45915,16 +45777,10 @@ Wenn Sie noch keinen privaten Schlüssel besitzen, können Sie hier auch einen e CMakeCache.txt file not found. Datei CMakeCache.txt nicht gefunden. - - - CMakeProjectManager::Internal::CMakeKitAspect <No CMake Tool available> <Kein CMake-Werkzeug verfügbar> - - - CMakeProjectManager::CMakeKitAspect CMake Tool CMake-Werkzeug @@ -45933,10 +45789,6 @@ Wenn Sie noch keinen privaten Schlüssel besitzen, können Sie hier auch einen e The CMake Tool to use when building a project with CMake.<br>This setting is ignored when using other build systems. Das zum Erstellen eines Projektes mit CMake zu verwendende CMake-Werkzeug.<br>Diese Einstellung wird bei der Verwendung anderer Build-Systeme ignoriert. - - CMake - CMake - Unconfigured Nicht konfiguriert @@ -45945,9 +45797,6 @@ Wenn Sie noch keinen privaten Schlüssel besitzen, können Sie hier auch einen e Path to the cmake executable Pfad zur ausführbaren Datei von cmake - - - CMakeProjectManager::Internal::CMakeGeneratorKitAspect Change... Ändern... @@ -45980,9 +45829,6 @@ Wenn Sie noch keinen privaten Schlüssel besitzen, können Sie hier auch einen e Toolset: Toolset: - - - CMakeProjectManager::CMakeGeneratorKitAspect CMake generator CMake-Generator @@ -46023,17 +45869,6 @@ Wenn Sie noch keinen privaten Schlüssel besitzen, können Sie hier auch einen e Toolset: %1 Toolset: %1 - - CMake Generator - CMake-Generator - - - - CMakeProjectManager::Internal::CMakeConfigurationKitAspect - - Change... - Ändern... - Edit CMake Configuration CMake-Konfiguration bearbeiten @@ -46042,9 +45877,6 @@ Wenn Sie noch keinen privaten Schlüssel besitzen, können Sie hier auch einen e Enter one variable per line with the variable name separated from the variable value by "=".<br>You may provide a type hint by adding ":TYPE" before the "=". Eine Variable pro Zeile eingeben, Name und Wert durch "=" trennen.<br>Ein Typhinweis kann mit ":TYPE" vor dem "=" angegeben werden. - - - CMakeProjectManager::CMakeConfigurationKitAspect CMake Configuration CMake-Konfiguration @@ -46093,23 +45925,14 @@ Wenn Sie noch keinen privaten Schlüssel besitzen, können Sie hier auch einen e CMake configuration has a path to a C++ compiler set that does not match the compiler path configured in the tool chain of the kit. Die CMake-Konfiguration hat einen C++-Compiler gesetzt, der nicht mit dem Compiler der Toolchain übereinstimmt, die vom Kit verwendet wird. - - - CMakeProjectManager::Internal::BuildCMakeTargetLocatorFilter Build CMake target CMake-Ziel erstellen - - - CMakeProjectManager::Internal::OpenCMakeTargetLocatorFilter Open CMake target CMake-Ziel öffnen - - - CMakeProjectManager::Internal::CMakeProcess Running %1 in %2. Führe %1 in %2 aus. @@ -46118,16 +45941,6 @@ Wenn Sie noch keinen privaten Schlüssel besitzen, können Sie hier auch einen e Configuring "%1" Konfiguriere "%1" - - - CMakeProjectManager::Internal::CMakeSpecificSettingWidget - - CMake - CMake - - - - CMakeProjectManager::Internal::FileApi <Build Directory> <Build-Verzeichnis> @@ -47800,7 +47613,7 @@ Wenn Sie noch keinen privaten Schlüssel besitzen, können Sie hier auch einen e - QmakeProjectManager::Internal::QmakeKitAspect + QmakeProjectManager Qt mkspec Qt-mkspec @@ -47821,9 +47634,6 @@ Wenn Sie noch keinen privaten Schlüssel besitzen, können Sie hier auch einen e mkspec mkspec - - - QmakeProjectManager::QmakeBuildSystem Reading Project "%1" Lese Projekt "%1" @@ -48970,22 +48780,11 @@ Wenn Sie noch keinen privaten Schlüssel besitzen, können Sie hier auch einen e - CMakeProjectManager::Internal::FileApiReader + CMakeProjectManager Parsing has been canceled. Auswertung wurde abgebrochen. - - - CMakeProjectManager::Internal::ProjectTreeHelper - - <Build Directory> - <Build-Verzeichnis> - - - <Other Locations> - <Andere Orte> - <Headers> <Header-Dateien> diff --git a/share/qtcreator/translations/qtcreator_es.ts b/share/qtcreator/translations/qtcreator_es.ts index cbae647b21b..fd0f5a18bfc 100644 --- a/share/qtcreator/translations/qtcreator_es.ts +++ b/share/qtcreator/translations/qtcreator_es.ts @@ -271,7 +271,7 @@ - CMakeProjectManager::Internal::CMakeBuildEnvironmentWidget + CMakeProjectManager Clear system environment @@ -280,9 +280,6 @@ Build Environment Entorno de construcción - - - CMakeProjectManager::Internal::CMakeBuildConfigurationFactory Create @@ -295,23 +292,14 @@ New Configuration Name: Nombre para nueva configuración: - - - CMakeProjectManager::Internal::CMakeBuildSettingsWidget &Change &Cambiar - - - CMakeProjectManager::Internal::CMakeOpenProjectWizard CMake Wizard Asistente CMake - - - CMakeProjectManager::Internal::CMakeRunConfigurationWidget Arguments: Argumentos: @@ -356,9 +344,6 @@ Base environment for this runconfiguration: Entorno base para éste ajuste de ejecución: - - - CMakeProjectManager::Internal::InSourceBuildPage Qt Creator has detected an <b>in-source-build in %1</b> which prevents shadow builds. Qt Creator will not allow you to change the build directory. If you want a shadow build, clean your source directory and re-open the project. @@ -368,9 +353,6 @@ shadow build ¿? en la sombra? Qt Creator ha detectado un entorno de construcción entremezclado con las fuentes, lo que impide la construcción en un directorio separado. Qt Creator no le permitirá alterar el directorio de construcción. Si quiere construir en un directorio separado, limpie el directorio de los fuentes y abra nuevamente el proyecto. - - - CMakeProjectManager::Internal::CMakeRunPage Please specify the path to the cmake executable. No cmake executable was found in the path. @@ -431,9 +413,6 @@ No valid cmake executable specified. - - - CMakeProjectManager::Internal::CMakeSettingsPage CMake @@ -442,9 +421,6 @@ CMake executable Ejecutable CMake - - - CMakeProjectManager::Internal::MakeStepConfigWidget Additional arguments: Argumentos adicionales: @@ -457,9 +433,6 @@ <b>Make:</b> %1 %2 - - - CMakeProjectManager::Internal::ShadowBuildPage Please enter the directory in which you want to build your project. Por favor, ingrese el directorio en el que quiere construir el proyecto. @@ -472,9 +445,6 @@ Build directory: Directorio de construcción: - - - CMakeProjectManager::Internal::XmlFileUpToDatePage Qt Creator has found a recent cbp file, which Qt Creator will parse to gather information about the project. You can change the command line arguments used to create this file in the project mode. Click finish to load the project. Qt Creator ha encontrado un archivo cbp reciente, el mismo será interpretado para recopilar información acerca del proyecto. Puede cambiar los argumentos de línea de comandos usados para crear este archivo en el proyecto. Responda Finalizar para cargar el proyecto. @@ -8150,7 +8120,7 @@ al control de versiones (%2)? - QMakeStep + QmakeProjectManager QMake Build Configuration: Ajustes de construcción QMake: @@ -8377,7 +8347,7 @@ al control de versiones (%2)? - QmakeProjectManager::Internal::ConsoleAppWizard + QmakeProjectManager Qt4 Console Application Aplicación Qt4 de consola @@ -8386,16 +8356,10 @@ al control de versiones (%2)? Creates a Qt4 console application. Crea una aplicación Qt4 de consola. - - - QmakeProjectManager::Internal::ConsoleAppWizardDialog This wizard generates a Qt4 console application project. The application derives from QCoreApplication and does not provide a GUI. Este asistente genera un proyecto de aplicación Qt4 para consola. La aplicación es derivada de QCoreApplication y no provee interfaz gráfica de usuario. - - - QmakeProjectManager::Internal::DesignerExternalEditor Qt Designer is not responding (%1). Qt Designer no está respondiendo (%1). @@ -8404,16 +8368,10 @@ al control de versiones (%2)? Unable to create server socket: %1 No se pudo crear socket de servidor: %1 - - - QmakeProjectManager::Internal::EmbeddedPropertiesPanel Embedded Linux Linux embebido - - - QmakeProjectManager::Internal::EmptyProjectWizard Empty Qt4 Project Proyecto Qt4 vacío @@ -8422,16 +8380,10 @@ al control de versiones (%2)? Creates an empty Qt project. Crea un proyecto Qt vacío. - - - QmakeProjectManager::Internal::EmptyProjectWizardDialog This wizard generates an empty Qt4 project. Add files to it later on by using the other wizards. Este asistente genera un proyecto Qt4 vacío. Puede agregarle archivos mas tarde mediante otros asistentes. - - - QmakeProjectManager::Internal::ExternalQtEditor Unable to start "%1" Imposible iniciar "%1" @@ -8440,9 +8392,6 @@ al control de versiones (%2)? The application "%1" could not be found. La aplicación "%1" no pudo ser encontrada. - - - QmakeProjectManager::Internal::FilesPage Class Information Información de la clase @@ -8451,9 +8400,6 @@ al control de versiones (%2)? Specify basic information about the classes for which you want to generate skeleton source code files. Especifique la información básica acerca de las clases para las que quiera generar plantillas de código fuente. - - - QmakeProjectManager::Internal::GuiAppWizard Qt4 Gui Application Aplicación Qt4 con GUI @@ -8466,16 +8412,10 @@ al control de versiones (%2)? The template file '%1' could not be opened for reading: %2 El archivo de plantilla '%1' no pudo ser abierto para lectura: %2 - - - QmakeProjectManager::Internal::GuiAppWizardDialog This wizard generates a Qt4 GUI application project. The application derives by default from QApplication and includes an empty widget. Este asistente genera un proyecto de aplicación Qt4. La aplicación es derivada de QApplication e incluye un Widget vacío. - - - QmakeProjectManager::Internal::LibraryWizard C++ Library Librería C++ @@ -8484,9 +8424,6 @@ al control de versiones (%2)? Creates a C++ Library. Crea una librería C++. - - - QmakeProjectManager::Internal::LibraryWizardDialog Shared library Librería compartida @@ -8507,9 +8444,6 @@ al control de versiones (%2)? This wizard generates a C++ library project. Este asistente genera un proyecto de Librería C++. - - - QmakeProjectManager::Internal::ModulesPage Select required modules Seleccione los módulos requeridos @@ -8518,9 +8452,6 @@ al control de versiones (%2)? Select the modules you want to include in your project. The recommended modules for this project are selected by default. Seleccione los módulos que quiere incluir en su proyecto. Los módulos recomendados para el proyecto aparecen marcados por defecto. - - - QmakeProjectManager::Internal::ProEditor New Nuevo @@ -8576,9 +8507,6 @@ al control de versiones (%2)? Add Block Agregar bloque - - - QmakeProjectManager::Internal::ProEditorModel <Global Scope> <Alcance global> @@ -8615,9 +8543,6 @@ al control de versiones (%2)? Insert Item Insertar item - - - QmakeProjectManager::Internal::ProjectLoadWizard Import existing settings Importar ajustes guardados @@ -8642,9 +8567,6 @@ al control de versiones (%2)? <b>Note:</b> Importing the settings will automatically add the Qt Version from:<br><b>%1</b> to the list of Qt versions. <b>Nota:</b> La importación del ajuste agregará automáticamente la versión de Qt desde:<br><b>%1</b> a la lista de versiones de Qt. - - - QmakeProjectManager::Internal::QmakeBuildEnvironmentWidget Clear system environment @@ -8653,9 +8575,6 @@ al control de versiones (%2)? Build Environment Entorno de construcción - - - QmakeProjectManager::Internal::QmakePriFileNode Headers @@ -8700,20 +8619,10 @@ al control de versiones (%2)? Error while changing pro file %1. Error modificando el archivo de proyecto %1. - - - QmakeProjectManager::Internal::QmakeProFileNode - - Error while parsing file %1. Giving up. - Error interpretando el archivo %1. No se continuará intentando. - Could not find .pro file for sub dir '%1' in '%2' No se encontró el archivo .pro para el subdirectorio '%1' en '%2' - - - QmakeProjectManager::Internal::QmakeProjectConfigWidget Configuration Name: Nombre de configuración: @@ -8780,16 +8689,10 @@ al control de versiones (%2)? Tool Chain: - - - QmakeProjectManager::Internal::QmakeProjectManagerPlugin Run qmake Ejecutar qmake - - - QmakeProjectManager::Internal::QmakeRunConfiguration Qt4RunConfiguration @@ -8798,9 +8701,6 @@ al control de versiones (%2)? Could not parse %1. The Qt4 run configuration %2 can not be started. No se pudo interpretar %1. El ajuste de ejecución %2 no puede iniciarse. - - - QmakeProjectManager::Internal::QmakeRunConfigurationWidget Arguments: Argumentos: @@ -8821,10 +8721,6 @@ al control de versiones (%2)? System Environment - - Build Environment - Entorno de construcción - Running executable: <b>%1</b> %2 %3 @@ -8873,9 +8769,6 @@ al control de versiones (%2)? Use debug version of frameworks (DYLD_IMAGE_SUFFIX=_debug) Usar versión debug de frameworks (DYLD_IMAGE_SUFFIX=_debug) - - - QmakeProjectManager::Internal::QtOptionsPageWidget <specify a name> <especifique un nombre> @@ -8945,9 +8838,6 @@ al control de versiones (%2)? Found Qt version %1, using mkspec %2 Se encontró la version %1 de Qt, usando mkspec %2 - - - QmakeProjectManager::Internal::QtVersionManager Path: Ruta: @@ -9043,16 +8933,10 @@ p, li { white-space: pre-wrap; } MWC Directory: - - - QmakeProjectManager::Internal::QtWizard The project %1 could not be opened. El proyecto %1 no pudo ser abierto. - - - QmakeProjectManager::Internal::ValueEditor Edit Variable Editar variable @@ -9122,11 +9006,6 @@ p, li { white-space: pre-wrap; } New Nuevo - - - Remove - Suprimir - Edit Values Editar valores @@ -9143,9 +9022,6 @@ p, li { white-space: pre-wrap; } Edit Advanced Expression Editar expresión avanzada - - - QmakeProjectManager::MakeStep <font color="#ff0000">Could not find make command: %1 in the build environment</font> <font color="#ff0000">No se encontró el comando make: %1 en el entorno de de construcción</font> @@ -9154,9 +9030,6 @@ p, li { white-space: pre-wrap; } <font color="#0000ff"><b>No Makefile found, assuming project is clean.</b></font> <font color="#0000ff"><b>No se encontró el archivo Makefile, se asume que el proyecto está limpio.</b></font> - - - QmakeProjectManager::MakeStepConfigWidget Override %1: Redefinir %1: @@ -9169,16 +9042,10 @@ p, li { white-space: pre-wrap; } <b>Make:</b> %1 %2 in %3 - - - QmakeProjectManager::Internal::MakeStepFactory Make - - - QmakeProjectManager::QMakeStep <font color="#ff0000"><b>No valid Qt version set. Set one in Preferences </b></font> @@ -9199,9 +9066,6 @@ p, li { white-space: pre-wrap; } <font color="#0000ff">Configuration unchanged, skipping QMake step.</font> <font color="#0000ff">Configuration intacta, saltando paso QMake.</font> - - - QmakeProjectManager::QMakeStepConfigWidget <b>QMake:</b> No Qt version set. QMake can not be run. @@ -9214,16 +9078,10 @@ p, li { white-space: pre-wrap; } No valid Qt version set. - - - QmakeProjectManager::Internal::QMakeStepFactory QMake - - - QmakeProjectManager::QmakeManager Loading project %1 ... Cargando el proyecto %1 ... @@ -9248,9 +9106,6 @@ p, li { white-space: pre-wrap; } Done opening project Abriendo proyecto: Listo - - - QmakeProjectManager::QtVersionManager <not found> <no encontrado> @@ -11801,7 +11656,7 @@ p, li { white-space: pre-wrap; } - QmakeProjectManager::Internal::ClassDefinition + QmakeProjectManager Form Formulario @@ -11929,9 +11784,6 @@ p, li { white-space: pre-wrap; } Icon files (*.png *.ico *.jpg *.xpm *.tif *.svg) - - - QmakeProjectManager::Internal::CustomWidgetPluginWizardPage WizardPage @@ -11976,9 +11828,6 @@ p, li { white-space: pre-wrap; } icons.qrc - - - QmakeProjectManager::Internal::CustomWidgetWidgetsWizardPage Custom Qt Widget Wizard @@ -12130,11 +11979,7 @@ p, li { white-space: pre-wrap; } - QmakeProjectManager::Internal::S60DevicesPreferencePane - - Form - Formulario - + QmakeProjectManager Installed S60 SDKs: @@ -13193,7 +13038,7 @@ Reason: %2 - QmakeProjectManager::Internal::ClassList + QmakeProjectManager <New class> @@ -13206,9 +13051,6 @@ Reason: %2 Delete class %1 from list? - - - QmakeProjectManager::Internal::CustomWidgetWizard Qt4 Designer Custom Widget @@ -13217,16 +13059,10 @@ Reason: %2 Creates a Qt4 Designer Custom Widget or a Custom Widget Collection. - - - QmakeProjectManager::Internal::CustomWidgetWizardDialog This wizard generates a Qt4 Designer Custom Widget or a Qt4 Designer Custom Widget Collection project. - - - QmakeProjectManager::Internal::PluginGenerator Cannot open icon file %1. @@ -13248,7 +13084,7 @@ Reason: %2 - QmakeProjectManager::Internal::S60DeviceRunConfiguration + QmakeProjectManager %1 on Device @@ -13261,13 +13097,6 @@ Reason: %2 Could not parse %1. The QtS60 Device run configuration %2 can not be started. - - - QmakeProjectManager::Internal::S60DeviceRunConfigurationWidget - - Name: - Nombre: - Install File: @@ -13296,16 +13125,6 @@ Reason: %2 Key file: - - - QmakeProjectManager::Internal::S60DeviceRunConfigurationFactory - - %1 on Device - - - - - QmakeProjectManager::Internal::S60DeviceRunControlBase Creating %1.sisx ... @@ -13380,9 +13199,6 @@ Check if the phone is connected and the TRK application is running. An error has occurred while running %1. - - - QmakeProjectManager::Internal::S60DeviceRunControl Finished. @@ -13399,9 +13215,6 @@ Check if the phone is connected and the TRK application is running. Could not start application: %1 - - - QmakeProjectManager::Internal::S60DeviceDebugRunControl Warning: Cannot locate the symbol file belonging to %1. @@ -13414,16 +13227,10 @@ Check if the phone is connected and the TRK application is running. Debugging finished. - - - QmakeProjectManager::Internal::S60DevicesWidget No Qt installed - - - QmakeProjectManager::Internal::S60EmulatorRunConfiguration %1 in Emulator @@ -13436,27 +13243,6 @@ Check if the phone is connected and the TRK application is running. Could not parse %1. The QtS60 emulator run configuration %2 can not be started. - - - QmakeProjectManager::Internal::S60EmulatorRunConfigurationWidget - - Name: - Nombre: - - - Executable: - Ejecutable: - - - - QmakeProjectManager::Internal::S60EmulatorRunConfigurationFactory - - %1 in Emulator - - - - - QmakeProjectManager::Internal::S60EmulatorRunControl Starting %1... Iniciando %1... @@ -13469,9 +13255,6 @@ Check if the phone is connected and the TRK application is running. %1 exited with code %2 %1 finalizó retornando %2 - - - QmakeProjectManager::Internal::S60Manager Run in Emulator @@ -13484,9 +13267,6 @@ Check if the phone is connected and the TRK application is running. Debug on Device - - - QmakeProjectManager::QmakeBuildConfigurationFactory Using Default Qt Version diff --git a/share/qtcreator/translations/qtcreator_fr.ts b/share/qtcreator/translations/qtcreator_fr.ts index 1a3c2e64ae4..5bfe46aed94 100644 --- a/share/qtcreator/translations/qtcreator_fr.ts +++ b/share/qtcreator/translations/qtcreator_fr.ts @@ -275,7 +275,7 @@ - CMakeProjectManager::Internal::CMakeBuildEnvironmentWidget + CMakeProjectManager Clear system environment Nettoyer l'environnement système @@ -284,9 +284,6 @@ Build Environment Environnement de compilation - - - CMakeProjectManager::Internal::CMakeBuildConfigurationFactory Create Créer @@ -316,9 +313,6 @@ New Configuration Name: Nom de la nouvelle configuration : - - - CMakeProjectManager::Internal::CMakeBuildSettingsWidget Run cmake Exécuter CMake @@ -339,16 +333,10 @@ CMake CMake - - - CMakeProjectManager::Internal::CMakeOpenProjectWizard CMake Wizard Assistant CMake - - - CMakeProjectManager::Internal::CMakeRunConfigurationWidget Arguments: Arguments : @@ -393,10 +381,6 @@ System Environment Environnement système - - Build Environment - Environnement de compilation - Running executable: <b>%1</b> %2 Exécution en cours : <b>%1</b> %2 @@ -409,9 +393,6 @@ Base environment for this runconfiguration: Environnement de base pour cette configuration d'éxecution : - - - CMakeProjectManager::Internal::InSourceBuildPage Qt Creator has detected an <b>in-source-build in %1</b> which prevents shadow builds. Qt Creator will not allow you to change the build directory. If you want a shadow build, clean your source directory and re-open the project. Qt Creator a détecté une <b>compilation dans les sources de %1</b> qui empêche les shadow builds. Qt Creator ne permettra pas de changer le répertoire de compilation. Si vous voulez effectuer un "shadow build", nettoyez le répertoire source et rouvrez le projet. @@ -424,29 +405,6 @@ Qt Creator has detected an in-source-build which prevents shadow builds. Qt Creator will not allow you to change the build directory. If you want a shadow build, clean your source directory and re-open the project. Qt Creator a détecté une compilation dans les sources qui empêche les shadow builds. Qt Creator ne permettra pas de changer le répertoire de compilation. Si vous voulez effectuer un "shadow build", nettoyez le répertoire source et rouvrez le projet. - - - CMakeProjectManager::Internal::CMakeRunPage - - Please specify the path to the cmake executable. No cmake executable was found in the path. - Veuillez spécifier l'emplacement de l'exécutable cmake. Aucun exécutable cmake n'a été trouvé dans le path. - - - The cmake executable (%1) does not exist. - L'exécutable cmake (%1) n'existe pas. - - - The path %1 is not a executable. - %1 n'est pas le chemin d'un exécutable. - - - The path %1 is not a valid cmake. - %1 n'est pas une installation valide de cmake. - - - Arguments: - Arguments : - Generator: Générateur : @@ -485,14 +443,6 @@ capitalisation de CMake, contenu inchangé (cmake -> CMake) Veuillez spécifier l'emplacement de l'exécutable CMake. Aucun exécutable CMake n'a été trouvé dans la liste de répertoires standards. - - The CMake executable (%1) does not exist. - L'exécutable CMake (%1) n'existe pas. - - - The path %1 is not a valid CMake. - %1 n'est pas un CMake valide. - The directory %1 already contains a cbp file, which is recent enough. You can pass special arguments or change the used toolchain here and rerun CMake. Or simply finish the wizard directly. Le répertoire %1 contient déjà un fichier cbp qui est assez récent. Vous pouvez passer des arguments spéciaux ou changer la chaîne de compilation utilisée ici et réexécuter CMake. Vous pouvez aussi terminer l'assistant directement. @@ -525,14 +475,6 @@ Refreshing cbp file in %1. Rafraîchissement du fichier cbp dans %1 en cours. - - MinGW Generator (%1) - Générateur MinGW (%1) - - - Unix Generator (%1) - Générateur UNIX (%1) - No generator selected. Pas de générateur sélectionné. @@ -549,14 +491,6 @@ NMake Generator Générateur NMake - - NMake Generator (%1) - Générateur NMake (%1) - - - MinGW Generator - Générateur MinGW - No valid CMake executable specified. L'exécutable CMake spécifié est invalide. @@ -565,13 +499,6 @@ No valid cmake executable specified. L'exécutable CMake spécifié est invalide. - - - CMakeProjectManager::Internal::CMakeSettingsPage - - CMake - CMake - Executable: Exécutable : @@ -584,9 +511,6 @@ CMake executable Exécutable CMake - - - CMakeProjectManager::Internal::MakeStepConfigWidget Additional arguments: Arguments supplémentaires : @@ -620,9 +544,6 @@ <b>Unknown Toolchain</b> <b>Chaîne de compilation inconnue</b> - - - CMakeProjectManager::Internal::ShadowBuildPage Please enter the directory in which you want to build your project. Veuillez spécifier le répertoire où vous voulez compiler votre projet. @@ -635,17 +556,6 @@ Please enter the directory in which you want to build your project. Qt Creator recommends to not use the source directory for building. This ensures that the source directory remains clean and enables multiple builds with different settings. Veuillez spécifier le répertoire où vous voulez compiler votre projet. Qt Creator recommande de ne pas utiliser le répertoire source pour la compilation. Cela garantit que le répertoire source reste propre et permet des compilations multiples avec différents paramètres. - - Build directory: - Répertoire de compilation : - - - Build Location - Emplacement de compilation - - - - CMakeProjectManager::Internal::XmlFileUpToDatePage Qt Creator has found a recent cbp file, which Qt Creator will parse to gather information about the project. You can change the command line arguments used to create this file in the project mode. Click finish to load the project. Qt Creator a trouvé un fichier cbp récent, Qt Creator va maintenant l'analyser pour rassembler des informations sur le projet. Vous pouvez changer les arguments de ligne de commande utilisés pour la création de ce fichier depuis le mode "projet". Cliquer sur Terminer pour charger le projet. @@ -13012,47 +12922,11 @@ au système de gestion de version (%2) ? - QMakeStep + QmakeProjectManager QMake Build Configuration: Configuration de QMake pour la compilation : - - debug - debug - - - release - release - - - Additional arguments: - Arguments supplémentaires : - - - Effective qmake call: - Appels qmake : - - - qmake build configuration: - Configuration de QMake pour la compilation : - - - Debug - debug - - - Release - release - - - Debug and release - Debug et release - - - Link QML debugging library: - Lier les bibliothèques de débogage QML : - QObject @@ -13242,7 +13116,7 @@ au système de gestion de version (%2) ? - QmakeProjectManager::Internal::ConsoleAppWizard + QmakeProjectManager Qt4 Console Application Application Qt4 en console @@ -13263,9 +13137,6 @@ Preselects a desktop Qt for building the application if available. Présélectionne un bureau Qt pour compiler l'application si disponible. - - - QmakeProjectManager::Internal::ConsoleAppWizardDialog This wizard generates a Qt4 console application project. The application derives from QCoreApplication and does not provide a GUI. Cet assistant génère un projet d'application Qt4 console. L'application dérive de QCoreApplication et ne fournit pas d'interface graphique. @@ -13274,9 +13145,6 @@ Présélectionne un bureau Qt pour compiler l'application si disponible.This wizard generates a Qt console application project. The application derives from QCoreApplication and does not provide a GUI. Cet assistant génère un projet d'application Qt console. L'application dérive de QCoreApplication et ne fournit pas d'interface graphique. - - - QmakeProjectManager::Internal::DesignerExternalEditor Qt Designer is not responding (%1). Qt Designer ne répond pas (%1). @@ -13285,16 +13153,10 @@ Présélectionne un bureau Qt pour compiler l'application si disponible.Unable to create server socket: %1 Impossible de créer le socket serveur : %1 - - - QmakeProjectManager::Internal::EmbeddedPropertiesPanel Embedded Linux Linux embarqué - - - QmakeProjectManager::Internal::EmptyProjectWizard Empty Qt4 Project Projet Qt4 vide @@ -13311,9 +13173,6 @@ Présélectionne un bureau Qt pour compiler l'application si disponible.Creates a qmake-based project without any files. This allows you to create an application without any default classes. Créer un proje basé sur qmake sans aucun fichier. Cela vous permet de créer une application sans aucune classe par défaut. - - - QmakeProjectManager::Internal::EmptyProjectWizardDialog This wizard generates an empty Qt4 project. Add files to it later on by using the other wizards. Cet assistant génère un projet Qt4 vide. Vous pouvez ajouter des fichiers plus tard en utilisant les autres assistants. @@ -13322,9 +13181,6 @@ Présélectionne un bureau Qt pour compiler l'application si disponible.This wizard generates an empty Qt project. Add files to it later on by using the other wizards. Cet assistant génère un projet Qt vide. Vous pouvez ajouter des fichiers plus tard en utilisant les autres assistants. - - - QmakeProjectManager::Internal::ExternalQtEditor Unable to start "%1" Impossible de démarrer "%1" @@ -13333,9 +13189,6 @@ Présélectionne un bureau Qt pour compiler l'application si disponible.The application "%1" could not be found. L'application "%1" est introuvable. - - - QmakeProjectManager::Internal::FilesPage Class Information Information sur la classe @@ -13344,9 +13197,6 @@ Présélectionne un bureau Qt pour compiler l'application si disponible.Specify basic information about the classes for which you want to generate skeleton source code files. Définit les informations de base des classes pour lesquelles vous souhaitez générer des fichiers squelettes de code source. - - - QmakeProjectManager::Internal::GuiAppWizard Qt4 Gui Application Application graphique Qt4 @@ -13376,9 +13226,6 @@ Présélectionne une version desktop Qt pour compiler l'application si disp The template file '%1' could not be opened for reading: %2 Le fichier modèle "%1' n"a pas pu être ouvert en lecture : %2 - - - QmakeProjectManager::Internal::GuiAppWizardDialog This wizard generates a Qt4 GUI application project. The application derives by default from QApplication and includes an empty widget. Cet assistant génère un projet d'application graphique Qt4. L'application dérive par défaut de QApplication et inclut un widget vide. @@ -13395,9 +13242,6 @@ Présélectionne une version desktop Qt pour compiler l'application si disp Details Détails - - - QmakeProjectManager::Internal::LibraryWizard C++ Library Bibliothèque C++ @@ -13414,9 +13258,6 @@ Présélectionne une version desktop Qt pour compiler l'application si disp Creates a C++ Library. Crée une bibliothèque C++. - - - QmakeProjectManager::Internal::LibraryWizardDialog Shared library Bibliothèque partagée @@ -13453,17 +13294,10 @@ Présélectionne une version desktop Qt pour compiler l'application si disp This wizard generates a C++ library project. Cet assistant génère un projet de bibliothèque C++. - - Details - Détails - Symbian Specific Spécifique à Symbian - - - QmakeProjectManager::Internal::ModulesPage Select required modules Sélectionner les modules requis @@ -13476,13 +13310,6 @@ Présélectionne une version desktop Qt pour compiler l'application si disp Select the modules you want to include in your project. The recommended modules for this project are selected by default. Sélectionnez les modules que vous souhaitez inclure au projet. Les modules recommandés pour ce projet sont sélectionnés par défaut. - - - QmakeProjectManager::Internal::ProEditor - - New - Nouveau - Remove Supprimer @@ -13531,9 +13358,6 @@ Présélectionne une version desktop Qt pour compiler l'application si disp Add Block Ajouter un bloc - - - QmakeProjectManager::Internal::ProEditorModel <Global Scope> <Portée Globale> @@ -13570,9 +13394,6 @@ Présélectionne une version desktop Qt pour compiler l'application si disp Insert Item Insérer un élément - - - QmakeProjectManager::Internal::ProjectLoadWizard Import existing build settings Importer des paramètres de compilation existants @@ -13597,9 +13418,6 @@ Présélectionne une version desktop Qt pour compiler l'application si disp Project Setup Configuration du projet - - - QmakeProjectManager::Internal::QmakeBuildEnvironmentWidget Clear system environment Nettoyer l'environnement système @@ -13608,33 +13426,6 @@ Présélectionne une version desktop Qt pour compiler l'application si disp Build Environment Environnement de compilation - - - QmakeProjectManager::Internal::QmakePriFileNode - - Headers - En-têtes - - - Sources - Sources - - - Forms - Formulaires - - - Resources - Ressources - - - QML - QML - - - Other files - Autres fichiers - Cannot Open File Impossible d'ouvrir le fichier @@ -13651,14 +13442,6 @@ Présélectionne une version desktop Qt pour compiler l'application si disp Cannot set permissions to writable. Impossible d'attribuer les droits en écriture. - - Failed! - Échec ! - - - File Error - Erreur de fichier - Could not open the file for edit with VCS. Impossible d'ouvrir le fichier pour édition avec VCS. @@ -13675,40 +13458,14 @@ Présélectionne une version desktop Qt pour compiler l'application si disp Could not set permissions to writable. Impossible d'attribuer les droits en écriture. - - There are unsaved changes for project file %1. - Des modifications n'ont pas été enregistrées pour le fichier de projet %1. - - - Could not write project file %1. - Impossible d'écrire dans le fichier de projet %1. - Error while reading PRO file %1: %2 Erreur pendant la lecture du fichier PRO %1 : %2 - - Error while parsing file %1. Giving up. - Erreur pendant le parcours du fichier %1. Abandon. - Error while changing pro file %1. Erreur pendant la modification du fichier pro %1. - - - QmakeProjectManager::Internal::QmakeProFileNode - - Error while parsing file %1. Giving up. - Erreur pendant le parcours du fichier %1. Abandon. - - - Could not find .pro file for sub dir '%1' in '%2' - Impossible de trouver le fichier .pro pour le sous répertoire '%1' dans "%2" - - - - QmakeProjectManager::Internal::QmakeProjectConfigWidget Configuration Name: Nom de la configuration : @@ -13799,16 +13556,6 @@ Présélectionne une version desktop Qt pour compiler l'application si disp Warning: Avertissement : - - %1 Debug - Name of a debug build configuration to created by a project wizard, %1 being the Qt version name. We recommend not translating it. - %1 Debug - - - %1 Release - Name of a release build configuration to created by a project wizard, %1 being the Qt version name. We recommend not translating it. - %1 Release - <No tool chain selected> <Pas de chaîne de compilation sélectionnée> @@ -13826,10 +13573,6 @@ Présélectionne une version desktop Qt pour compiler l'application si disp Manage Gérer - - Tool Chain: - Chaîne d'outil : - Configuration name: Nom de la configuration : @@ -13859,13 +13602,6 @@ Présélectionne une version desktop Qt pour compiler l'application si disp placeholder je pense problemLabel - - Manage... - Gérer... - - - - QmakeProjectManager::Internal::QmakeProjectManagerPlugin Run qmake Exécuter qmake @@ -13938,9 +13674,6 @@ Présélectionne une version desktop Qt pour compiler l'application si disp Build in %1 Compiler dans %1 - - - QmakeProjectManager::Internal::QmakeRunConfiguration Qt4RunConfiguration Qt4RunConfiguration @@ -13957,10 +13690,6 @@ Présélectionne une version desktop Qt pour compiler l'application si disp The .pro file could not be parsed. Le fichier .pro n'a pas pu être analysé. - - The .pro file '%1' is currently being parsed. - Le fichier de projet "%1" est en cours d'analyse. - Clean Environment Environnement vierge @@ -13969,10 +13698,6 @@ Présélectionne une version desktop Qt pour compiler l'application si disp System Environment Environnement système - - Build Environment - Environnement de compilation - Qt Run Configuration Configuration d'exécution Qt @@ -13985,9 +13710,6 @@ Présélectionne une version desktop Qt pour compiler l'application si disp Qt4 RunConfiguration Configuration d'exécution Qt4 - - - QmakeProjectManager::Internal::QmakeRunConfigurationWidget Running executable: <b>%1</b> %2 (in terminal) Lancement de l'exécutable <b>%1</b> %2 (dans un terminal) @@ -14028,18 +13750,6 @@ Présélectionne une version desktop Qt pour compiler l'application si disp Base environment for this run configuration: Environnement de base pour cette configuration d'exécution : - - Clean Environment - Environnement de nettoyage - - - System Environment - Environnement du système - - - Build Environment - Environnement de compilation - Name: Nom : @@ -14068,9 +13778,6 @@ Présélectionne une version desktop Qt pour compiler l'application si disp Base environment for this runconfiguration: Environnement de base pour cette configuration d'éxecution : - - - QmakeProjectManager::Internal::QtOptionsPageWidget <specify a name> <spécifier un nom> @@ -14203,9 +13910,6 @@ Présélectionne une version desktop Qt pour compiler l'application si disp Found Qt version %1, using mkspec %2 Version %1 de Qt trouvée, utilise le mkspec %2 - - - QmakeProjectManager::Internal::QtVersionManager Qt versions Versions de Qt @@ -14334,20 +14038,10 @@ p, li { white-space: pre-wrap; } Add Ajouter - - Remove - Supprimer - - - - QmakeProjectManager::Internal::QtWizard The project %1 could not be opened. Le projet %1 ne peut pas être ouvert. - - - QmakeProjectManager::Internal::ValueEditor Edit Variable Éditer une variable @@ -14400,14 +14094,6 @@ p, li { white-space: pre-wrap; } Edit Items Éditer les éléments - - New - Nouveau - - - Remove - Supprimer - Edit Values Éditer les valeurs @@ -14424,14 +14110,6 @@ p, li { white-space: pre-wrap; } Edit Advanced Expression Éditer les expressions avancées - - - QmakeProjectManager::MakeStep - - Make - Qt4 MakeStep display name. - Make - Qt Creator needs a build configuration set up to build. Configure a tool chain in Project mode. Qt Creator nécessite une configuration de compilation pour compiler. Configurez une chaîne de compilation dans le mode Projet. @@ -14485,13 +14163,6 @@ p, li { white-space: pre-wrap; } <font color="#0000ff"><b>No Makefile found, assuming project is clean.</b></font> <font color="#0000ff"><b>Aucun Makefile trouvé, assume que le projet est nettoyé.</b></font> - - - QmakeProjectManager::MakeStepConfigWidget - - Override %1: - Supplanter %1 : - Make: Make : @@ -14520,16 +14191,6 @@ p, li { white-space: pre-wrap; } <b>Make:</b> %1 %2 in %3 <b>Make:</b> %1 %2 dans %3 - - - QmakeProjectManager::Internal::MakeStepFactory - - Make - Make - - - - QmakeProjectManager::QMakeStep <font color="#ff0000"><b>No valid Qt version set. Set one in Preferences </b></font> @@ -14550,20 +14211,11 @@ p, li { white-space: pre-wrap; } <font color="#0000ff">Configuration unchanged, skipping QMake step.</font> <font color="#0000ff">Configuration non modifiée, passe l'étape QMake.</font> - - qmake - QMakeStep display name. - qmake - qmake QMakeStep default display name qmake - - Configuration is faulty, please check the Build Issues view for details. - La configuration est défectueuse, veuillez vérifier la vue des problèmes de compilation pour obtenir des détails. - Configuration is faulty, please check the Issues view for details. La configuration est défectueuse, veuillez vérifier la vue des problèmes pour obtenir des détails. @@ -14588,17 +14240,6 @@ p, li { white-space: pre-wrap; } Library not available. <a href='compile'>Compile...</a> Bibliothèque non disponible. <a href='compile'>Compiler...</a> - - QML Debugging - Débogage QML - - - The option will only take effect if the project is recompiled. Do you want to recompile now? - Cette option ne prendra effet que si le projet est recompilé. Voulez-vous le recompiler maintenant ? - - - - QmakeProjectManager::QMakeStepConfigWidget <b>QMake:</b> No Qt version set. QMake can not be run. <b>QMake:</b> Aucune version de Qt définie. QMake ne peut être lancé. @@ -14619,10 +14260,6 @@ p, li { white-space: pre-wrap; } The option will only take effect if the project is recompiled. Do you want to recompile now? Cette option ne prendra effet que si le projet est recompilé. Voulez-vous le recompiler maintenant ? - - Building helpers - Aide à la compilation - <b>qmake:</b> No Qt version set. Cannot run qmake. <b>qmake :</b> Aucune version de Qt définie. qmake ne peut être lancé. @@ -14643,10 +14280,6 @@ p, li { white-space: pre-wrap; } Enable QML debugging: Activer le débogage QML : - - Link QML debugging library: - Lier les bibliothèques de débogage QML : - Might make your application vulnerable. Only use in a safe environment. Peut rendre l'application vulnérable. À n'utiliser qu'en environnement protégé. @@ -14659,20 +14292,6 @@ p, li { white-space: pre-wrap; } Might make the application vulnerable. Use only in a safe environment. Peut rendre l'application vulnérable. À utiliser dans un environnement sécurisé. - - - QmakeProjectManager::Internal::QMakeStepFactory - - QMake - QMake - - - qmake - qmake - - - - QmakeProjectManager::QmakeManager Loading project %1 ... Chargement du projet %1... @@ -14735,9 +14354,6 @@ p, li { white-space: pre-wrap; } Done opening project Ouverture du projet terminée - - - QmakeProjectManager::QtVersionManager MinGW from %1 MinGW depuis %1 @@ -14750,14 +14366,6 @@ p, li { white-space: pre-wrap; } Qt in PATH Qt dans le PATH - - Name: - Nom : - - - Invalid Qt version - Version de Qt invalide - ABI: ABI : @@ -14786,10 +14394,6 @@ p, li { white-space: pre-wrap; } Version: Version : - - Debugging helper: - Assistance au débogage : - QApplication @@ -18899,7 +18503,7 @@ p, li { white-space: pre-wrap; } - QmakeProjectManager::Internal::ClassDefinition + QmakeProjectManager Form Formulaire @@ -19004,9 +18608,6 @@ p, li { white-space: pre-wrap; } Icon files (*.png *.ico *.jpg *.xpm *.tif *.svg) Fichier d'icône (*.png *.ico *.jpg *.xpm *.tif *.svg) - - - QmakeProjectManager::Internal::CustomWidgetPluginWizardPage WizardPage WizardPage @@ -19043,9 +18644,6 @@ p, li { white-space: pre-wrap; } icons.qrc icons.qrc - - - QmakeProjectManager::Internal::CustomWidgetWidgetsWizardPage Custom Qt Widget Wizard Assistant de Widget Qt personnalisé @@ -20646,7 +20244,7 @@ Raison : %2 - QmakeProjectManager::Internal::ClassList + QmakeProjectManager <New class> <Nouvelle classe> @@ -20659,9 +20257,6 @@ Raison : %2 Delete class %1 from list? Supprimer la classe %1 de la liste ? - - - QmakeProjectManager::Internal::CustomWidgetWizard Qt4 Designer Custom Widget Widget personnalisé pour Qt4 Designer @@ -20678,9 +20273,6 @@ Raison : %2 Creates a Qt Custom Designer Widget or a Custom Widget Collection. Crée un widget personnalisé ou une collection de widgets personnalisés pour Qt4 Designer. - - - QmakeProjectManager::Internal::CustomWidgetWizardDialog This wizard generates a Qt4 Designer Custom Widget or a Qt4 Designer Custom Widget Collection project. Cet assistant génère un projet pour créer un widget personnalisé ou une collection de widgets personnalisés pour Qt4 Designer. @@ -20698,9 +20290,6 @@ Raison : %2 Plugin Details Détails du plug-in - - - QmakeProjectManager::Internal::PluginGenerator Cannot open icon file %1. Impossible d'ouvrir le fichier d'icône %1. @@ -20718,7 +20307,7 @@ Raison : %2 Welcome - QmakeProjectManager::Internal::S60DeviceRunConfiguration + QmakeProjectManager QtS60DeviceRunConfiguration QtS60DeviceRunConfiguration @@ -20737,25 +20326,10 @@ Raison : %2 S60 device runconfiguration default display name (no profile set) Exécuter sur un périphérique Symbian - - - QmakeProjectManager::Internal::S60DeviceRunConfigurationWidget Device: Appareil mobile : - - Name: - Nom : - - - Arguments: - Arguments : - - - Debugger: - Débogueur : - Installation file: Fichier d'installation : @@ -20822,16 +20396,6 @@ Raison : %2 right translation of timeout in this context? L'appareil mobile ne répond pas. Veuillez vérifier sir TRK est lancé - - - QmakeProjectManager::Internal::S60DeviceRunConfigurationFactory - - %1 on Symbian Device - %1 sur appareil Symbian - - - - QmakeProjectManager::Internal::S60DeviceRunControlBase Creating %1.sisx ... Création de %1.sisx... @@ -20975,9 +20539,6 @@ Veuillez vérifier que le téléphone est connecté et que App TRK est lancé.An error has occurred while running %1. Une erreur s'est produite lors de l'exécution de %1. - - - QmakeProjectManager::Internal::S60DeviceDebugRunControl Warning: Cannot locate the symbol file belonging to %1. Attention : Impossible de trouver le fichier de symboles appartenant à %1. @@ -20992,10 +20553,6 @@ Veuillez vérifier que le téléphone est connecté et que App TRK est lancé. Lancement du débogueur... - - Debugger for Symbian Platform - Débogueur pour plateforme Symbian - Debug on Device Déboguer sur l'appareil mobile @@ -21012,31 +20569,14 @@ Veuillez vérifier que le téléphone est connecté et que App TRK est lancé.Debugging finished. Débogage terminé. - - - QmakeProjectManager::Internal::S60DevicesWidget No Qt installed Qt non installé - - - QmakeProjectManager::Internal::S60EmulatorRunConfigurationWidget - - Name: - Nom : - - - Executable: - Exécutable : - Summary: Run %1 in emulator Sommaire : démarrer %1 sur l'émulateur - - - QmakeProjectManager::Internal::S60EmulatorRunConfiguration %1 in Symbian Emulator S60 emulator run configuration default display name, %1 is base pro-File name @@ -21049,14 +20589,6 @@ S60 emulator run configuration default display name, %1 is base pro-File nameS60 emulator run configuration default display name (no pro-file name) Exécuter sur l'émulateur Symbian - - The .pro file is currently being parsed. - Le fichier .pro est en cours d'analyse. - - - The .pro file could not be parsed. - Le fichier .pro n'a pas pu être analysé. - Qt Symbian Emulator RunConfiguration Configuration d'exécution de l'émulateur Qt Symbian @@ -21069,16 +20601,6 @@ S60 emulator run configuration default display name, %1 is base pro-File nameCould not parse %1. The Qt for Symbian emulator run configuration %2 can not be started. Impossible d'analyser %1. Qt pour la configuration d'éxecution de l'émulateur Symbian %2 ne peut pas être démarré. - - - QmakeProjectManager::Internal::S60EmulatorRunConfigurationFactory - - %1 in Symbian Emulator - %1 sur l'émulateur Symbian - - - - QmakeProjectManager::Internal::S60EmulatorRunControl Starting %1... Démarrage %1... @@ -21101,9 +20623,6 @@ S60 emulator run configuration default display name, %1 is base pro-File name%1 exited with code %2 %1 a retourné le code %2 - - - QmakeProjectManager::Internal::S60Manager Run in Emulator Démarrer sur l'émulateur @@ -21112,13 +20631,6 @@ S60 emulator run configuration default display name, %1 is base pro-File nameRun on Device Démarrer sur l'appareil - - Debug on Device - Déboguer sur l'appareil mobile - - - - QmakeProjectManager::QmakeBuildConfigurationFactory Using Default Qt Version Utiliser la version de Qt par défaut @@ -21162,10 +20674,6 @@ S60 emulator run configuration default display name, %1 is base pro-File nameThe name of the debug build configuration created by default for a qmake project. Debug - - Build - Compiler - Release Release @@ -21668,15 +21176,11 @@ S60 emulator run configuration default display name, %1 is base pro-File name - QmakeProjectManager::Internal::S60Devices::Device + QmakeProjectManager Id: Id : - - Name: - Nom : - EPOC: EPOC : @@ -23101,27 +22605,7 @@ Vous pouvez choisir entre mettre les changements dans une remise ou de les aband - QmakeProjectManager::Internal::S60CreatePackageStepWidget - - Form - Formulaire - - - Self-signed certificate - Certificat autosigné - - - Custom certificate: - Certificat personnalisé : - - - Choose certificate file (.cer) - Choisir un fichier de certificat (.cer) - - - Key file: - Fichier contenant la clé : - + QmakeProjectManager Not signed Non signé @@ -23146,9 +22630,6 @@ Vous pouvez choisir entre mettre les changements dans une remise ou de les aband Certificate's details Détails du certificat - - - QmakeProjectManager::Internal::TargetSetupPage Setup targets for your project Installer les cibles pour votre projet @@ -23227,16 +22708,6 @@ Vous pouvez choisir entre mettre les changements dans une remise ou de les aband Uncheck all versions Décocher toutes les versions - - <b>Error:</b> - Severity is Task::Error - <b>Erreur :</b> - - - <b>Warning:</b> - Severity is Task::Warning - <b>Alerte :</b> - debug and release We are going to build debug and release @@ -23291,13 +22762,6 @@ Vous pouvez choisir entre mettre les changements dans une remise ou de les aband <html><head/><body><p><span style=" font-weight:600;">No valid Qt versions found.</span></p><p>Please add a Qt version in <span style=" font-style:italic;">Tools &gt; Options &gt; Build &amp; Run</span> (<span style=" font-style:italic;">Qt Creator &gt; Preferences &gt; Build &amp; Run</span> on Mac OS) or via the maintenance tool of the SDK.</p></body></html> <html><head/><body><p><span style=" font-weight:600;">Aucune versions de Qt valide trouvées.</span></p><p>Veuillez ajouter une version de Qt dans <span style=" font-style:italic;">Outils&gt; Options &gt; Compiler &amp; Exécuter</span> (<span style=" font-style:italic;">Qt Creator &gt; Préferences &gt; Compiler &amp; Exécuter</span> sur Mac OS) ou via l'outil de maintenance du SDK.</p></body></html> - - - QmakeProjectManager::Internal::TestWizardPage - - WizardPage - WizardPage - Specify basic information about the test class for which you want to generate skeleton source code file. Définit les informations de base des classes de test pour lesquelles vous souhaitez générer des fichiers squelettes de code source. @@ -24692,7 +24156,7 @@ Valeur précédente au format décimal signé (gros-boutiste) : %4 - CMakeProjectManager::Internal::CMakeRunConfiguration + CMakeProjectManager Run CMake target Exécuter la cible CMake @@ -24705,18 +24169,6 @@ Valeur précédente au format décimal signé (gros-boutiste) : %4 (disabled) (désactivé) - - Clean Environment - Environnement de nettoyage - - - System Environment - Environnement système - - - Build Environment - Environnement de compilation - The executable is not built by the current build configuration L'exécutable n'est pas compilé pour la configuration de compilation courante @@ -24729,17 +24181,11 @@ Valeur précédente au format décimal signé (gros-boutiste) : %4 (disabled) (Désactivé) - - - CMakeProjectManager::Internal::CMakeTarget Desktop CMake Default target display name Desktop - - - CMakeProjectManager::Internal::MakeStep Make CMakeProjectManager::MakeStep display name. @@ -24758,9 +24204,6 @@ Valeur précédente au format décimal signé (gros-boutiste) : %4 Configuration is faulty. Check the Issues view for details. La configuration est défectueuse, veuillez vérifier la vue des problèmes pour les détails. - - - CMakeProjectManager::Internal::MakeStepFactory Make Display name for CMakeProjectManager::MakeStep id. @@ -26948,7 +26391,7 @@ avec un mot de passe, que vous pouvez renseigner ci-dessus. - QmakeProjectManager::Internal::QmakeTarget + QmakeProjectManager Desktop Qt4 Desktop target display name @@ -26979,11 +26422,6 @@ avec un mot de passe, que vous pouvez renseigner ci-dessus. Qt4 Maemo target display name Maemo - - Qt Simulator - Qt4 Simulator target display name - Qt Simulator - <b>Device:</b> Not connected <b>Périphérique :</b>Non connecté @@ -28474,7 +27912,7 @@ Nécessite <b>Qt 4.8</b> ou plus récent. - QmakeProjectManager::Internal::GnuPocS60DevicesWidget + QmakeProjectManager Step 1 of 2: Choose GnuPoc folder Étape 1 sur 2 : Choisir le répertoire GnuPoc @@ -28520,40 +27958,7 @@ Nécessite <b>Qt 4.8</b> ou plus récent. - QmakeProjectManager::Internal::QmakeBuildConfigurationFactory - - Using Qt Version "%1" - Utiliser la version Qt "%1" - - - New configuration - Nouvelle configuration - - - New Configuration Name: - Nom de la nouvelle configuration : - - - New Configuration - Nouvelle configuration - - - New configuration name: - Nom de la nouvelle configuration : - - - %1 Debug - Debug build configuration. We recommend not translating it. - %1 Debug - - - %1 Release - Release build configuration. We recommend not translating it. - %1 Release - - - - QmakeProjectManager::QmakeProject + QmakeProjectManager Evaluating Évaluation @@ -28574,17 +27979,6 @@ Nécessite <b>Qt 4.8</b> ou plus récent. The .pro file '%1' could not be parsed. Le fichier .pro "%1" ne peut pas être analysé. - - Debug - Debug - - - Release - Release - - - - QmakeProjectManager Qt4 Qt4 @@ -28614,17 +28008,6 @@ Nécessite <b>Qt 4.8</b> ou plus récent. Project non configuré - - QmakeProjectManager::Internal::QmakeTargetFactory - - Debug - Debug - - - Release - Release - - QtSupport @@ -28639,7 +28022,7 @@ Nécessite <b>Qt 4.8</b> ou plus récent. - QmakeProjectManager::QtVersion + QmakeProjectManager Qmake does not support build directories below the source directory. Qmake ne permet pas d'avoir des répertoires de compilation à un niveau en-dessous des répertoires sources. @@ -28836,7 +28219,7 @@ Nécessite <b>Qt 4.8</b> ou plus récent. - QmakeProjectManager::Internal::MobileGuiAppWizard + QmakeProjectManager Mobile Qt Application Application Qt pour mobiles @@ -28847,9 +28230,6 @@ Nécessite <b>Qt 4.8</b> ou plus récent. Preselects Qt for Simulator and mobile targets if available Créer une application Qt optimisée pour les mobiles avec une fenêtre principale conçue dans Qt Designer.\n\nPrésélectionne la version de Qt pour le simulateur et les mobiles si disponible - - - QmakeProjectManager::Internal::BaseQmakeProjectWizardDialog Modules Modules @@ -28858,17 +28238,6 @@ Preselects Qt for Simulator and mobile targets if available Kits Kits - - Targets - Cibles - - - Qt Versions - Versions de Qt - - - - QmakeProjectManager::Internal::TestWizard Qt Unit Test Test unitaire Qt @@ -28877,17 +28246,10 @@ Preselects Qt for Simulator and mobile targets if available Creates a QTestLib-based unit test for a feature or a class. Unit tests allow you to verify that the code is fit for use and that there are no regressions. Créer un test unitaire basé sur QTestList pour une fonctionnalité ou une classe.Les tests unitaires vous permettent de vérifier que le code est utilisable et qu'il n'y a pas de régression. - - - QmakeProjectManager::Internal::TestWizardDialog This wizard generates a Qt unit test consisting of a single source file with a test class. Cet assistant génère un test unitaire Qt consistant en un fichier source unique avec une classe de test. - - Details - Détails - Subversion::Internal::SubversionEditor @@ -29347,7 +28709,7 @@ Preselects Qt for Simulator and mobile targets if available - QmakeProjectManager::Internal::LibraryDetailsWidget + QmakeProjectManager Library: Bibliothèque : @@ -31335,26 +30697,15 @@ utilisez import Qt 4.7 au lieu de import QtQuick 1.0 - QmakeProjectManager::Internal::AddLibraryWizard + QmakeProjectManager Add Library Ajouter une bibliothèque - - Type - Type - - - Details - Détails - Summary Résumé - - - QmakeProjectManager::Internal::LibraryTypePage Library Type Type de bibliothèque @@ -31403,9 +30754,6 @@ Adds the library and include paths to the .pro file. Faire un lien vers une bibliothèque localisée dans votre arbre de compilation. Ajoute la bibliothèque et les chemins d'inclusion dans le fichier .pro. - - - QmakeProjectManager::Internal::DetailsPage System Library Bibliothèque système @@ -31438,24 +30786,10 @@ Ajoute la bibliothèque et les chemins d'inclusion dans le fichier .pro.Choose the project file of the library to link to Choisir le fichier projet de la bibliothèque vers laquelle faire un lien - - - QmakeProjectManager::Internal::SummaryPage - - Summary - Résumé - The following snippet will be added to the<br><b>%1</b> file: Le fragment de code suivant va être ajouté au <br> fichier <b>%1</b> : - - - QmakeProjectManager::Internal::LibraryDetailsController - - Linkage: - Edition de liens : - %1 Dynamic %1, c'est linkage(tr("Linkage:")), donc "edition de lien". @@ -31465,10 +30799,6 @@ Ajoute la bibliothèque et les chemins d'inclusion dans le fichier .pro.%1 Static %1 statique - - Mac: - Mac : - %1 Framework traduire framework ? pas certain que ça ait un sens en français dans le context OSX. John : non on ne traduit pas @@ -31479,9 +30809,6 @@ Ajoute la bibliothèque et les chemins d'inclusion dans le fichier .pro.On inverse l'ordre non ? Bibliothèque %1 - - - QmakeProjectManager::QmlDumpTool Only available for Qt for Desktop and Qt for Qt Simulator. Seulement disponible pour Qt for Desktop et Qt for Qt Simulator. @@ -31525,19 +30852,11 @@ Raison : %2 - QmakeProjectManager::QmlObserverTool + QmakeProjectManager Only available for Qt for Desktop or Qt for Qt Simulator. Seulement disponible pour Qt for Desktop et Qt for Qt Simulateur. - - Only available for Qt 4.7.1 or newer. - Seulement disponible pour Qt 4.7.1 ou plus récent. - - - Not needed. - Non nécessaire. - QMLObserver QMLObserver @@ -31561,7 +30880,7 @@ Raison : %2 - QmakeProjectManager::PassphraseForKeyDialog + QmakeProjectManager Passphrase: Terme anglais utilisé pour un mot de passe généralement long et plus sécurisé @@ -31583,9 +30902,6 @@ Raison : %2 Passphrase for %1 Mot de passe pour %1 - - - QmakeProjectManager::Internal::S60DeployConfiguration Deploy %1 to Symbian device Déployer %1 sur périphérique Symbian @@ -31594,24 +30910,6 @@ Raison : %2 Deploy to Symbian device Déployer sur périphérique Symbian - - - QmakeProjectManager::Internal::S60DeployConfigurationFactory - - %1 on Symbian Device - %1 sur périphérique Symbian - - - Deploy to Symbian device - Déployer sur un périphérique Symbian - - - - QmakeProjectManager::Internal::S60DeployConfigurationWidget - - Device: - Appareil mobile : - Silent installation Installation silencieuse @@ -31636,10 +30934,6 @@ Raison : %2 <a href="qthelp://com.nokia.qtcreator/doc/creator-developing-symbian.html">What are the prerequisites?</a> <a href="qthelp://com.nokia.qtcreator/doc/creator-developing-symbian.html">Quels sont les prérequis ?</a> - - Installation file: - Fichier d'installation : - Silent installation is an installation mode that does not require user's intervention. In case it fails the non silent installation is launched. L'installation silencieuse est un mode d'installation qui ne nécessite pas d'intervention d'un utilisateur. En cas d'échec, une installation non silencieuse est lancée. @@ -31689,10 +30983,6 @@ Raison : %2 Not installed on device Pas installé sur le périphérique - - Qt version: - Version de Qt : - Unrecognised Symbian version 0x%1 Version de Symbian non reconnue : 0x%1 @@ -31757,29 +31047,6 @@ Raison : %2 Screen size: Taille de l'écran : - - Device on serial port: - Appareil mobile sur port série : - - - Queries the device for information - Inspecter l'appareil mobile pour mettre à jour les informations - - - Connecting... - Connexion... - - - - QmakeProjectManager::Internal::S60DeployStep - - Unable to remove existing file '%1': %2 - Impossible de supprimer le fichier existant "%1" : %2 - - - Unable to rename file '%1' to '%2': %3 - Impossible de renommer le fichier "%1" en "%2" : %3 - Deploy Qt4 Deploystep display name @@ -31789,23 +31056,11 @@ Raison : %2 No package has been found. Please specify at least one installation package. Pas de paquet trouvé. Veuillez spécifier au moins un paquet d'installation. - - Renaming new package '%1' to '%2' - Renommer le nouveau paquet "%1" en "%2" - - - Removing old package '%1' - Supprimer l'ancien paquet "%1" - '%1': Package file not found dourouc : du paquet ou de paquet ? "%1" : fichier de paquet non trouvé - - There is no device plugged in. - Il n'y a aucun appareil mobile connecté. - Failed to find package %1 Impossible de trouver le paquet %1 @@ -31814,32 +31069,6 @@ Raison : %2 Deploying application to '%2'... Déploiement de l'application sur "%2"... - - Could not connect to phone on port '%1': %2 -Check if the phone is connected and App TRK is running. - Impossible de connecter le téléphone sur le port '%1' : %2 -Veuillez vérifier que le téléphone est connecté et que App TRK est lancé. - - - Canceled. - Annulé. - - - Could not create file %1 on device: %2 - Impossible de créer le fichier %1 sur l'appareil mobile %2 - - - Could not write to file %1 on device: %2 - Impossible d'écrire le fichier %1 sur l'appareil mobile : %2 - - - Could not close file %1 on device: %2. It will be closed when App TRK is closed. - Impossible de fermer le fichier %1 sur l'appareil mobile %2. Il sera fermé lorsque App TRK sera fermé. - - - Could not connect to App TRK on device: %1. Restarting App TRK might help. - Impossible de se connecter à App TRK sur l'appareil mobile : %1. Redémarrer App TRK pourrait résoudre le problème. - Copying "%1"... Copie de "%1"... @@ -31933,39 +31162,14 @@ Veuillez vérifier que le téléphone est connecté et que App TRK est lancé.Installation Installation - - Could not install from package %1 on device: %2 - Impossible d'installer à partir du package %1 sur l'appareil mobile : %2 - Deployment has been cancelled. Déployement annulé. - - The device '%1' has been disconnected - L'appareil mobile "%1" a été déconnecté - Copy progress: %1% Copie en cours : %1 % - - - QmakeProjectManager::Internal::S60DeployStepWidget - - Deploy SIS Package - Déployer le paquet SIS - - - - QmakeProjectManager::Internal::S60DeployStepFactory - - Deploy SIS Package - Déployer le paquet SIS - - - - QmakeProjectManager::SbsV2Parser SBSv2 build log Journal de compilation de SBSv2 @@ -31986,20 +31190,10 @@ Veuillez vérifier que le téléphone est connecté et que App TRK est lancé.je vois vraiment pas ce que recipe (recette) viens faire ici... dourouc : certains parlent bien de spells, donc bon... une recette, c'ets une liste d'instructions à suivre, ça peut se comprendre mais pas vraiment se traduire tel quel... Échec de %1 avec comme code de retour %2. - - - QmakeProjectManager::Internal::QmakeDeployConfigurationFactory - - Deploy to Symbian device - Déployer sur périphérique Symbian - Deploy to Maemo device Déployer sur périphérique Maemo - - - QmakeProjectManager::AbstractMobileApp Could not open desktop file template Impossible d'ouvrir le fichier template d'ordinateur de bureau @@ -32016,13 +31210,6 @@ Veuillez vérifier que le téléphone est connecté et que App TRK est lancé.Could not open template file '%1'. Impossible d'ouvrir le fichier template "%1". - - - QmakeProjectManager::Internal::AbstractMobileAppWizardDialog - - Qt Versions - Versions de Qt - Application Options Options de l'application @@ -32044,19 +31231,7 @@ Présélectionne la version de Qt pour le simulateur et les mobiles si disponibl - QmakeProjectManager::Internal::MobileAppWizardOptionsPage - - Automatically Rotate Orientation - Pivoter l'orientation automatiquement - - - Lock to Landscape Orientation - Verrouiller en orientation paysage - - - Lock to Portrait Orientation - Verrouiller en oriantation portrait - + QmakeProjectManager The file is not a valid image. Le fichier n'est pas une image valide. @@ -32069,9 +31244,6 @@ Présélectionne la version de Qt pour le simulateur et les mobiles si disponibl Icon unusable Icône inutilisable - - - QmakeProjectManager::Internal::QtQuickApp The QML import path '%1' cannot be found. Le chemin d'import QML "%1" est introuvable. @@ -32096,9 +31268,6 @@ Présélectionne la version de Qt pour le simulateur et les mobiles si disponibl Could not write file '%1'. Impossible d'enregistrer le fichier "%1". - - - QmakeProjectManager::Internal::QtQuickAppWizardDialog New Qt Quick Application Nouvelle application Qt Quick @@ -32123,9 +31292,6 @@ Présélectionne la version de Qt pour le simulateur et les mobiles si disponibl QML Sources Sources QML - - - QmakeProjectManager::Internal::QtQuickAppWizard Qt Quick Application Application Qt Quick @@ -32296,13 +31462,6 @@ Requires <b>Qt 4.7.0</b> or newer. Requiert <b>Qt 4.7.0</b> ou plus récent. - - QmakeProjectManager::Internal::QtQuickAppWizardSourcesPage - - Select QML File - Sélectionner un fichier QML - - TaskList::Internal::StopMonitoringHandler @@ -33172,7 +32331,7 @@ Les pulls locaux ne sont pas appliqués à la branche maître. - QmakeProjectManager::Internal::DebuggingHelper + QmakeProjectManager Used to extract QML type information from library-based plugins. Utilisé pour extraire le type d'information QML pour les plugins bibliothèques. @@ -33189,10 +32348,6 @@ Les pulls locaux ne sont pas appliqués à la branche maître. QML Observer: Observateur QML : - - Build - Compiler - QML Debugging Library: Bibliothèque de débogage QML : @@ -33459,11 +32614,7 @@ Les pulls locaux ne sont pas appliqués à la branche maître. - QmakeProjectManager::Internal::RvctToolChainConfigWidget - - Form - Formulaire - + QmakeProjectManager ARM &version: &Version ARM : @@ -33572,7 +32723,7 @@ Les version de Qt précédentes ont des limitations lors de la compilation des f - QmakeProjectManager::Internal::WinscwToolChainConfigWidget + QmakeProjectManager Dialog Boîte de dialogue @@ -33589,21 +32740,6 @@ Les version de Qt précédentes ont des limitations lors de la compilation des f System library path: Chemins des bibliothèques système : - - - QmakeProjectManager::Internal::QtVersionInfo - - Version name: - Nom de version : - - - qmake location: - Emplacement de QMake : - - - S60 SDK: - SDK S60 : - SBS v2 directory: Répertoire SBS v2 : @@ -36909,19 +36045,7 @@ Please build the debugging helpers on the Qt version options page. - QmakeProjectManager::QmlDebuggingLibrary - - Only available for Qt 4.7.1 or newer. - Seulement disponible pour Qt 4.7.1 ou plus récent. - - - Not needed. - Non nécessaire. - - - QML Debugging - Débogage QML - + QmakeProjectManager The target directory %1 could not be created. Le dossier cible %1 n'a pas pu être créé. @@ -36936,19 +36060,6 @@ Reason: %2 Raison : %2 - - - QmakeProjectManager::QmakeTarget - - Desktop - Qt4 Desktop target display name - Desktop - - - Qt Simulator - Qt4 Simulator target display name - Qt Simulator - Maemo5 Qt4 Maemo5 target display name @@ -36969,19 +36080,6 @@ Raison : %2 Qt4 Meego target display name Meego - - Symbian Emulator - Qt4 Symbian Emulator target display name - Émulateur Symbian - - - Symbian Device - Qt4 Symbian Device target display name - Périphérique Symbian - - - - QmakeProjectManager::Internal::GcceToolChainFactory GCCE GCCE @@ -36994,28 +36092,10 @@ Raison : %2 GCCE (%1) GCCE (%1) - - - QmakeProjectManager::Internal::QmakeSymbianTarget - - <b>Device:</b> Not connected - <b>Périphérique :</b>Non connecté - - - <b>Device:</b> %1 - <b>Périphérique :</b> %1 - - - <b>Device:</b> %1, %2 - <b>Périphérique :</b> %1, %2 - <b>IP address:</b> %1:%2 <b>adresse IP :</b> %1:%2 - - - QmakeProjectManager::Internal::RvctToolChainFactory ARMv5 ARMv5 @@ -37033,9 +36113,6 @@ Raison : %2 %1 arm version, %2 major version, %3 minor version, %4 build number RVCT (%1 %2.%3 Build %4) - - - QmakeProjectManager::Internal::S60CertificateInfo The certificate "%1" has already expired and cannot be used. Expiration date: %2. @@ -37091,9 +36168,6 @@ Valid from: %2. Supportant %n périphériques : - - - QmakeProjectManager::Internal::S60CreatePackageParser The binary package '%1' was patched to be installable after being self-signed. %2 @@ -37107,13 +36181,6 @@ Utilisez un certificat développeur ou une autre option de signature pour évite Cannot create Smart Installer package as the Smart Installer's base file is missing. Please ensure that it is located in the SDK. Impossible de créer le paquet Smart Installer, puisque le fichier de base Smart Installer est manquant. Veuillez vous assurer qu'il est bien situé dans le SDK. - - - QmakeProjectManager::Internal::S60PublisherOvi - - Error while reading .pro file %1: %2 - Erreur lors de la lecture du fichier .pro %1 : %2 - Created %1 @@ -37134,18 +36201,6 @@ Utilisez un certificat développeur ou une autre option de signature pour évite Fichier SIS non créé à cause d'erreurs précédentes - - Clean - Nettoyer - - - qmake - qmake - - - Build - Compiler - Freeze Geler @@ -37181,9 +36236,6 @@ Utilisez un certificat développeur ou une autre option de signature pour évite %1 créé. - - - QmakeProjectManager::Internal::WinscwToolChainFactory WINSCW WINSCW @@ -37193,19 +36245,6 @@ Utilisez un certificat développeur ou une autre option de signature pour évite WINSCW depuis la version de Qt - - QmakeProjectManager::QmakeBaseTargetFactory - - %1 Debug - Name of a debug build configuration to created by a project wizard, %1 being the Qt version name. We recommend not translating it. - %1 Debug - - - %1 Release - Name of a release build configuration to be created by a project wizard, %1 being the Qt version name. We recommend not translating it. - %1 Release - - Qt4DefaultTargetSetupWidget @@ -37220,7 +36259,7 @@ Utilisez un certificat développeur ou une autre option de signature pour évite - QmakeProjectManager::QmakeDefaultTargetSetupWidget + QmakeProjectManager Add build from: Ajouter une compilation depuis : @@ -37257,14 +36296,6 @@ Utilisez un certificat développeur ou une autre option de signature pour évite Shadow build Shadow build - - Qt version: - Version de Qt : - - - No Build Found - Pas de compilation trouvée - Incompatible Build Found Compilation incompatible trouvée @@ -37289,28 +36320,10 @@ Utilisez un certificat développeur ou une autre option de signature pour évite Use Shadow Building Utiliser les shadow build - - Qt Version: - Version de Qt : - - - debug - Debug build - debug - - - release - release build - release - No build found Pas de compilation trouvée - - No build found in %1 matching project %2. - Pas de compilation trouvée dans %1 pour le projet %2 correspondant. - The build found in %1 is incompatible with this target La compilation trouvée dans %1 est incompatible avec cette cible @@ -37331,23 +36344,6 @@ Utilisez un certificat développeur ou une autre option de signature pour évite Import build from %1 Importer la compilation depuis %1 - - <b>Error:</b> - Severity is Task::Error - <b>Erreur :</b> - - - <b>Warning:</b> - Severity is Task::Warning - <b>Alerte :</b> - - - - QmakeProjectManager::AbstractMobileAppWizardDialog - - Qt Versions - Versions de Qt - Targets Cibles @@ -37356,10 +36352,6 @@ Utilisez un certificat développeur ou une autre option de signature pour évite Mobile Options Options mobiles - - Symbian Specific - Spécifique à Symbian - Maemo5 And MeeGo Specific Spécifique à Maemo5 et MeeGo @@ -37376,13 +36368,6 @@ Utilisez un certificat développeur ou une autre option de signature pour évite Maemo Specific Spécifique à Maemo - - Kits - Kits - - - - QmakeProjectManager::Internal::Html5AppWizardDialog New HTML5 Application Nouvelle application HTML5 @@ -37395,9 +36380,6 @@ Utilisez un certificat développeur ou une autre option de signature pour évite HTML Options Options HTML - - - QmakeProjectManager::Internal::Html5AppWizard HTML5 Application Application HTML5 @@ -37418,17 +36400,11 @@ You can build the application and deploy it on desktop and mobile target platfor Voys pouvez compiler l'application et la déployer sur desktop et mobile. Par exemple, vous pouvez créer des paquest Symbian Installation System (SIS) pour ce type de projets. - - - QmakeProjectManager::Internal::Html5AppWizardOptionsPage Select HTML File impératif ? Sélectionner le fichier HTML - - - QmakeProjectManager::Internal::MobileAppWizardGenericOptionsPage Automatically Rotate Orientation Pivoter l'orientation automatiquement @@ -37441,60 +36417,30 @@ Voys pouvez compiler l'application et la déployer sur desktop et mobile. P Lock to Portrait Orientation Verrouiller en oriantation portrait - - WizardPage - WizardPage - Orientation behavior: Comportement de l'orientation : - - - QmakeProjectManager::Internal::MobileAppWizardMaemoOptionsPage Invalid Icon Icône invalide - - The file is not a valid image. - Le fichier n'est pas une image valide. - - - Wrong Icon Size - Mauvaise taille d'icône - The icon needs to be %1x%2 pixels big, but is not. Do you want Creator to scale it? L'icône doit faire %1x%2 pixels, mais elle ne remplit pas cette condition. Qt Creator doit-il la mettre à l'échelle ? - - Could not copy icon file: %1 - Impossible de copier le fichier de l'icône : %1 - The icon needs to be 64x64 pixels big, but is not. Do you want Creator to scale it? L'icône doit faire 64x64 pixels, mais elle ne remplit pas cette condition. Qt Creator doit-il la mettre à l'échelle ? - - File Error - Erreur de fichier - Could not copy icon file. Impossible de copier le fichier de l'icône. - - WizardPage - WizardPage - Application icon (64x64): Icône de l'application (64x64) : - - - QmakeProjectManager::Internal::SubdirsProjectWizard Subdirs Project Projet de sous-répertoires @@ -37516,9 +36462,6 @@ Voys pouvez compiler l'application et la déployer sur desktop et mobile. P Title of dialog Nouveau sous-projet - - - QmakeProjectManager::Internal::SubdirsProjectWizardDialog This wizard generates a Qt4 subdirs project. Add subprojects to it later on by using the other wizards. Cet assistant génère un projet Qt4 avec sous-répertoires. Ajoutez-y des sous-projets plus tard en utilisant d'autres assistants. @@ -37527,18 +36470,10 @@ Voys pouvez compiler l'application et la déployer sur desktop et mobile. P This wizard generates a Qt subdirs project. Add subprojects to it later on by using the other wizards. Cet assistant génère un projet Qt avec des sous-répertoires. Ajoutez-y des sous-projets plus tard avec d'autres assistants. - - - QmakeProjectManager::TargetSetupPage Target Setup Installation de la cible - - Qt Creator can set up the following targets for project <b>%1</b>: - %1: Project name - Qt Creator peut mettre en place les cibles suivantes pour le projet <b>%1</b> : - <span style=" font-weight:600;">No valid kits found.</span> <span style=" font-weight:600;">Aucun kit valide trouvé.</span> @@ -37568,10 +36503,6 @@ Voys pouvez compiler l'application et la déployer sur desktop et mobile. P No Build Found Pas de compilation trouvée - - No build found in %1 matching project %2. - Pas de compilation trouvée dans %1 pour le projet %2 correspondant. - TextEditor::BaseTextEditorWidget @@ -37816,11 +36747,7 @@ Voys pouvez compiler l'application et la déployer sur desktop et mobile. P - CMakeProjectManager::Internal::CMakeManager - - Run CMake - Exécuter CMake - + CMakeProjectManager Failed opening project '%1': Project is not a file Échec de l'ouverture du projet "%1" : le projet n'est pas un fichier @@ -37834,7 +36761,7 @@ Voys pouvez compiler l'application et la déployer sur desktop et mobile. P - QmakeProjectManager::Internal::MaemoToolChainConfigWidget + QmakeProjectManager <html><head/><body><table><tr><td>Path to MADDE:</td><td>%1</td></tr><tr><td>Path to MADDE target:</td><td>%2</td></tr><tr><td>Debugger:</td/><td>%3</td></tr></body></html> <html><head/><body><table><tr><td>Chemin de MADDE :</td><td>%1</td></tr><tr><td>Chemin de la cible MADDE :</td><td>%2</td></tr><tr><td>Débogueur :</td/><td>%3</td></tr></body></html> @@ -39840,7 +38767,7 @@ Avec la simulation de cache, d'autres compteurs d'événements sont ac - CMakeProjectManager::Internal::CMakeEditor + CMakeProjectManager Changes to cmake files are shown in the project tree after building. Les changements aux fichiers CMake sont montrés dans l'arbre du projet après la compilation. @@ -40692,7 +39619,7 @@ Souhaitez-vous réessayer ? - QmakeProjectManager::CodaRunControl + QmakeProjectManager No device is connected. Please connect a device and try again. @@ -40796,67 +39723,11 @@ Souhaitez-vous réessayer ? Le périphérique "%1" a été déconnecté. - - - QmakeProjectManager::S60DeployConfiguration - - Deploy %1 to Symbian device - Déployer %1 sur périphérique Symbian - - - Deploy to Symbian device - Déployer sur périphérique Symbian - - - - QmakeProjectManager::S60DeployConfigurationFactory - - %1 on Symbian Device - %1 sur périphérique Symbian - - - Deploy to Symbian device - Déployer sur périphérique Symbian - - - - QmakeProjectManager::S60DeviceRunConfiguration - - %1 on Symbian Device - S60 device runconfiguration default display name, %1 is base pro-File name - %1 sur périphérique Symbian - - - Run on Symbian device - S60 device runconfiguration default display name (no profile set) - Exécuter sur un périphérique Symbian - - - The .pro file is currently being parsed. - Le fichier .pro est en cours d'analyse. - - - The .pro file could not be parsed. - Le fichier .pro n'a pas pu être analysé. - - - - QmakeProjectManager::S60DeviceRunConfigurationFactory - - %1 on Symbian Device - %1 sur périphérique Symbian - - - - QmakeProjectManager::Internal::S60CommandPublishStep Running %1 %1 is a name of the Publish Step i.e. Clean Step Exécution de %1 - - - QmakeProjectManager::Internal::S60PublishingBuildSettingsPageOvi No valid Qt version has been detected.<br>Define a correct Qt version in "Options > Qt4" Aucune version de Qt valide n'a été détecté. <br/> Définissez-en une correcte dans "Options > Qt4" @@ -40865,10 +39736,6 @@ Souhaitez-vous réessayer ? No valid tool chain has been detected.<br>Define a correct tool chain in "Options > Tool Chains" Aucune chaîne de compilation valide n'a été détecté. <br/> Définissez-en une correcte dans "Options > Chaînes de compilation" - - Form - Formulaire - Choose a build configuration: Choisir une configuration de compilation : @@ -40883,16 +39750,10 @@ Previous Qt versions have limitations in building suitable SIS files. Seules les versions de Qt plus récentes que la 4.6.3 sont disponibles dans cet assistant. Les version de Qt précédentes ont des limitations lors de la compilation des fichiers SIS. - - - QmakeProjectManager::QmakeBuildConfiguration Parsing the .pro file Analyse du fichier .pro - - - QmakeProjectManager::QmakeProFileNode Error while parsing file %1. Giving up. Erreur pendant l'analyse du fichier %1. Abandon. @@ -40901,9 +39762,6 @@ Les version de Qt précédentes ont des limitations lors de la compilation des f Could not find .pro file for sub dir '%1' in '%2' Impossible de trouver le fichier .pro pour le sous-répertoire '%1' dans "%2" - - - QmakeProjectManager::Internal::QtQuickComponentSetOptionsPage Select QML File Sélectionner un fichier QML @@ -43382,7 +42240,7 @@ globalement dans l'éditeur QML. Vous pouvez ajouter une annotation '/ - QmakeProjectManager::QmakePriFileNode + QmakeProjectManager Headers En-têtes @@ -43407,22 +42265,10 @@ globalement dans l'éditeur QML. Vous pouvez ajouter une annotation '/ Other files Autres fichiers - - Cannot Open File - Impossible d'ouvrir le fichier - Cannot open the file for editing with VCS. Impossible d'ouvrir le fichier pour édition avec le gestionnaire de versions. - - Cannot Set Permissions - Impossible de définir les permissions - - - Cannot set permissions to writable. - Impossible d'attribuer les droits en écriture. - There are unsaved changes for project file %1. Des modifications n'ont pas été enregistrées pour le fichier de projet %1. @@ -43439,9 +42285,6 @@ globalement dans l'éditeur QML. Vous pouvez ajouter une annotation '/ File Error Erreur de fichier - - - QmakeProjectManager::Internal::PngIconScaler Wrong Icon Size Mauvaise taille d'icône @@ -43450,10 +42293,6 @@ globalement dans l'éditeur QML. Vous pouvez ajouter une annotation '/ The icon needs to be %1x%2 pixels big, but is not. Do you want Qt Creator to scale it? L'icône doit être de la taille %1x%2, mais ne l'est pas. Souhaitez vous que Qt Creator la redimensionne ? - - File Error - Erreur de fichier - Could not copy icon file: %1 Impossible de copier le fichier de l'icône : %1 @@ -44705,7 +43544,7 @@ Ces chemines sont utilisés en complément au répertoire courant pour basculer - QmakeProjectManager::Internal::MakeStep + QmakeProjectManager Make arguments: Arguments de Make : @@ -44714,21 +43553,10 @@ Ces chemines sont utilisés en complément au répertoire courant pour basculer Override %1: Écraser %1 : - - - QmakeProjectManager::Internal::QMakeStep qmake build configuration: Configuration de qmake pour la compilation : - - Debug - Déboguer - - - Release - Release - Additional arguments: Arguments supplémentaires : @@ -44741,20 +43569,10 @@ Ces chemines sont utilisés en complément au répertoire courant pour basculer Effective qmake call: Appels qmake : - - - QmakeProjectManager::Internal::S60CertificateDetailsDialog Details of Certificate Détails du certificat - - - QmakeProjectManager::Internal::Html5AppWizardSourcesPage - - WizardPage - WizardPage - Main HTML File Fichier HTML principal @@ -44791,13 +43609,6 @@ Ces chemines sont utilisés en complément au répertoire courant pour basculer Touch optimized navigation will make the HTML page flickable and enlarge the area of touch sensitive elements. If you use a JavaScript framework which optimizes the touch interaction, leave the checkbox unchecked. La navigation optimisée pour le toucher rendre la page HTML flickable et élargira la zone des éléments sensibles au toucher. Si vous utilisez un framework JavaScript qui optimise l'interaction au toucher, laissez cette case décochée. - - - QmakeProjectManager::Internal::MobileAppWizardHarmattanOptionsPage - - WizardPage - WizardPage - Application icon (80x80): Icône de l'application (80x80) : @@ -44810,13 +43621,6 @@ Ces chemines sont utilisés en complément au répertoire courant pour basculer Make application boostable Créer une application boostable - - - QmakeProjectManager::Internal::MobileAppWizardSymbianOptionsPage - - WizardPage - WizardPage - Application icon (.svg): Icône de l'application (.svg) : @@ -44829,25 +43633,10 @@ Ces chemines sont utilisés en complément au répertoire courant pour basculer Enable network access Activer l'accès réseau - - - QmakeProjectManager::Internal::MobileLibraryWizardOptionPage - - WizardPage - WizardPage - - - Target UID3: - Cible UID3 : - Plugin's directory name: Nom du répertoire du plug-in : - - Enable network access - Activer l'accès réseau - QtSupport @@ -46608,7 +45397,7 @@ si un dépôt requiert une authentification SSH (voir la documentation sur SSH e - CMakeProjectManager::Internal::CMakeLocatorFilter + CMakeProjectManager Build CMake target Compiler la cible CMake @@ -47160,14 +45949,7 @@ des références à des éléments dans d'autres fichiers, des boucles, etc - QmakeProjectManager::Internal::UnconfiguredProjectPanel - - Configure Project - Configurer le projet - - - - QmakeProjectManager::Internal::TargetSetupPageWrapper + QmakeProjectManager Configure Project Configurer le projet @@ -47204,9 +45986,6 @@ des références à des éléments dans d'autres fichiers, des boucles, etc <p>The project <b>%1</b> is not yet configured.</p><p>Qt Creator uses <b>no Qt version</b> and <b>no tool chain</b> to parse the project. You can edit these in the <b><a href="edit">settings</a></b></p> <p>Le projet <b>%1</b> n'est pas encore configuré.</p><p>Qt Creator n'utilise <b>aucune version de Qt</b> et <b>aucune chaîne de compilation</b> pour analyser le projet. Vous pouvez modifier ces paramètres dans la <b><a href="edit">configuration</a></b></p> - - - QmakeProjectManager::Internal::UnConfiguredSettingsWidget Qt Creator can open qmake projects without configuring them for building. The C++ and QML code models need a Qt version and tool chain to offer code completion. @@ -47214,10 +45993,6 @@ The C++ and QML code models need a Qt version and tool chain to offer code compl Qt Creator peut ouvrir des projets qmake sans les configurer pour la compilation. Les modèles de code C++ et QML ont besoin d'une version de Qt et d'une chaîne de compilation pour proposer la complétion de code. - - Qt Version: - Version de Qt : - Tool Chain: Chaîne de compilation : @@ -47956,7 +46731,7 @@ Le fichier APL ne sera pas utilisable sur d'autres périphériques. - ClearCase::Internal::CheckOutDialog + ClearCase Check Out Importer @@ -47983,9 +46758,6 @@ Le fichier APL ne sera pas utilisable sur d'autres périphériques.ça sent le dikkenek un peu tout ça: http://www.lembrouille.com/dikkenek/dikkenek-je-viens-de-me-faire-carjacker Utiliser fichier &Hijacké - - - ClearCase::Internal::SettingsPage Configuration Configuration @@ -48062,9 +46834,6 @@ Le fichier APL ne sera pas utilisable sur d'autres périphériques.ClearCase ClearCase - - - ClearCase::Internal::UndoCheckOut Dialog Boîte de dialogue @@ -48077,9 +46846,6 @@ Le fichier APL ne sera pas utilisable sur d'autres périphériques.&Save copy of the file with a '.keep' extension &Sauvergarder une copie du fichier avec une extension ".keep" - - - ClearCase::Internal::VersionSelector Confirm Version to Check Out Confirmer la version à importer @@ -49410,7 +48176,7 @@ Veuillez choisir un nom de paquet valide pour votre application (par exemple &qu - ClearCase::Internal::ActivitySelector + ClearCase Select &activity: Sélectionner une &activité : @@ -49423,9 +48189,6 @@ Veuillez choisir un nom de paquet valide pour votre application (par exemple &qu Keep item activity Garder l'élément de l'activité - - - ClearCase::Internal::ClearCaseControl &Check Out &Importer @@ -49438,16 +48201,10 @@ Veuillez choisir un nom de paquet valide pour votre application (par exemple &qu &Hijack &Hijack - - - ClearCase::Internal::ClearCaseEditor Annotate version "%1" Annoter la version "%1" - - - ClearCase::Internal::ClearCasePlugin C&learCase C&learCase @@ -49738,31 +48495,18 @@ Oui :) CC Indexing CC Indexing - - - ClearCase::Internal::ClearCaseSubmitEditor ClearCase Check In Import ClearCase - - - ClearCase::Internal::ClearCaseSubmitEditorWidget Chec&k in even if identical to previous version Importer même si identique à la version précédente (&K) - - &Preserve file modification time - &Préserver la date de modification du fichier - &Check In Importer (&C) - - - ClearCase::Internal::SettingsPageWidget ClearCase Command Commande ClearCase @@ -49782,7 +48526,7 @@ Oui :) - CMakeProjectManager::Internal::ChooseCMakePage + CMakeProjectManager cmake Executable: Exécutable CMake : @@ -49803,10 +48547,6 @@ Oui :) The cmake executable (%1) does not exist. L'exécutable CMake (%1) n'existe pas. - - The path %1 is not a executable. - %1 n'est pas le chemin d'un exécutable. - The path %1 is not a valid cmake. %1 n'est pas une installation valide de CMake. @@ -52255,7 +50995,7 @@ Voulez-vous que Qt Creator le génère pour votre projet ? - QmakeProjectManager::Internal::QmakeKitConfigWidget + QmakeProjectManager The mkspec to use when building the project with qmake.<br>This setting is ignored when using other build systems. Le mkspec à utiliser lors de la compilation du projet avec qmake.<br>Ce paramètre est ignoré lors de l'utilisation avec d'autres systèmes de compilation. @@ -52264,9 +51004,6 @@ Voulez-vous que Qt Creator le génère pour votre projet ? Qt mkspec: Qt mkspec : - - - QmakeProjectManager::QmakeKitInformation No Qt version set, so mkspec is ignored. Aucune version de Qt définie, mkspec est donc ignoré. @@ -52279,9 +51016,6 @@ Voulez-vous que Qt Creator le génère pour votre projet ? mkspec mkspec - - - QmakeProjectManager::QmakeTargetSetupWidget Manage... Gérer... @@ -52296,17 +51030,10 @@ Voulez-vous que Qt Creator le génère pour votre projet ? Severity is Task::Warning <b>Alerte :</b> - - - QmakeProjectManager::Internal::ImportWidget Import Build from... Importer la compilation depuis... - - Import - Importer - QtSupport @@ -54655,7 +53382,7 @@ Les noms partiels peuvent êtres utilisé s'ils ne sont pas ambigües. - CMakeProjectManager::Internal::GeneratorInfo + CMakeProjectManager Ninja (%1) Ninja (%1) @@ -54672,9 +53399,6 @@ Les noms partiels peuvent êtres utilisé s'ils ne sont pas ambigües.Unix Generator (%1) Générateur UNIX (%1) - - - CMakeProjectManager::Internal::NoKitPage Show Options Afficher les options @@ -58824,24 +57548,6 @@ Veuillez fermer toutes les instances de votre application en cours d'exécu %1 – temporaire - - QmakeProjectManager::Internal::Qt4Target - - Desktop - Qt4 Desktop target display name - Desktop - - - Maemo Emulator - Qt4 Maemo Emulator target display name - Émulateur Maemo - - - Maemo Device - Qt4 Maemo Device target display name - Périphérique Maemo - - ProjectExplorer::TargetSetupPage @@ -58936,42 +57642,11 @@ Veuillez fermer toutes les instances de votre application en cours d'exécu - QmakeProjectManager::Internal::DesktopQmakeRunConfiguration + QmakeProjectManager The .pro file '%1' is currently being parsed. Le fichier de projet "%1" est en cours d'analyse. - - Qt Run Configuration - Configuration d'exécution Qt - - - - QmakeProjectManager::Internal::DesktopQmakeRunConfigurationWidget - - Executable: - Exécutable : - - - Arguments: - Arguments : - - - Select Working Directory - Sélectionner le répertoire de travail - - - Reset to default - Restaurer les paramètres par défaut - - - Working directory: - Répertoire de travail : - - - Run in terminal - Exécuter dans un terminal - Run on QVFb Exécuter sur QVFb @@ -58980,32 +57655,10 @@ Veuillez fermer toutes les instances de votre application en cours d'exécu Check this option to run the application on a Qt Virtual Framebuffer. Cocher cette option pour exécuter l'application sur un framebuffer virtuel Qt. - - Use debug version of frameworks (DYLD_IMAGE_SUFFIX=_debug) - Utiliser les versions Debug des frameworks (DYLD_IMAGE_SUFFIX=_debug) - - - - QmakeProjectManager::Internal::QmakeProjectImporter - - Debug - Debug - - - Release - Release - - - No Build Found - Pas de compilation trouvée - No build found in %1 matching project %2. Pas de compilation trouvée dans %1 pour le projet %2 correspondant. - - - QmakeProjectManager::Internal::QtQuickComponentSetPage Select Qt Quick Component Set Sélectionner l'ensemble des composant Qt Quick @@ -59516,7 +58169,7 @@ Veuillez fermer toutes les instances de votre application en cours d'exécu - QmakeProjectManager::QtQuickAppWizard + QmakeProjectManager Creates a deployable Qt Quick 1 application using the QtQuick 1.1 import. Requires Qt 4.8 or newer. Crée une application Qt Quick 1 déployable utilisant l'importation de QtQuick 1.1. Nécessite Qt 4.8 ou plus récent. diff --git a/share/qtcreator/translations/qtcreator_hr.ts b/share/qtcreator/translations/qtcreator_hr.ts index 58607fa9241..52b30f02fc8 100644 --- a/share/qtcreator/translations/qtcreator_hr.ts +++ b/share/qtcreator/translations/qtcreator_hr.ts @@ -1926,7 +1926,7 @@ Međutim, korištenje opuštenih i proširenih pravila također znači da nije m - ClearCase::Internal::CheckOutDialog + ClearCase Check Out Odjava @@ -1952,9 +1952,6 @@ Međutim, korištenje opuštenih i proširenih pravila također znači da nije m Hijack: Unset read-only flag without check-out. This is used for local changes which the user does not want to commit. Koristi &otetu datoteku - - - ClearCase::Internal::SettingsPage Configuration Konfiguracija @@ -2036,9 +2033,6 @@ Međutim, korištenje opuštenih i proširenih pravila također znači da nije m ClearCase ClearCase - - - ClearCase::Internal::UndoCheckOut Dialog Dijalog @@ -2051,9 +2045,6 @@ Međutim, korištenje opuštenih i proširenih pravila također znači da nije m &Save copy of the file with a '.keep' extension &Spremi kopiju datoteke s nastavkom '.keep' - - - ClearCase::Internal::VersionSelector Confirm Version to Check Out Potvrdi verziju u odjavi @@ -2085,7 +2076,7 @@ Međutim, korištenje opuštenih i proširenih pravila također znači da nije m - CMakeProjectManager::Internal::CMakeSpecificSettingForm + CMakeProjectManager Determines whether file paths are copied to the clipboard for pasting to the CMakeLists.txt file when you add new files to CMake projects. Određuje, da li se staze datoteke kopiraju u međuspremnik za lijepljenje u datoteku CMakeLists.txt, kad dodaješ nove datoteke CMake projektima. @@ -6274,7 +6265,7 @@ Greška: %5 - QmakeProjectManager::Internal::ClassDefinition + QmakeProjectManager The header file Datoteka zaglavlja @@ -6375,9 +6366,6 @@ Greška: %5 Icon files (*.png *.ico *.jpg *.xpm *.tif *.svg) Datoteke ikona (*.png *.ico *.jpg *.xpm *.tif *.svg) - - - QmakeProjectManager::Internal::CustomWidgetPluginWizardPage WizardPage Stranice čarobnjaka @@ -6418,9 +6406,6 @@ Greška: %5 Plugin Details Detalji o priključku - - - QmakeProjectManager::Internal::CustomWidgetWidgetsWizardPage Custom Qt Widget Wizard Prilagođeni čarobnjak za QT programčiće @@ -6445,9 +6430,6 @@ Greška: %5 Custom Widgets Prilagođeni programčići - - - QmakeProjectManager::Internal::LibraryDetailsWidget Library file: Datoteka biblioteke: @@ -6524,9 +6506,6 @@ Greška: %5 Remove "d" suffix for release version Ukloni nastavak "d" iz verzije za objavljivanje - - - QmakeProjectManager::Internal::QmakeProjectConfigWidget Shadow build: Prikaži gradnju: @@ -6573,21 +6552,10 @@ Greška: %5 %1 error message, %2 build directory %1 Gradnja %2 će se prepisati. - - - QmakeProjectManager::Internal::QMakeStep qmake build configuration: Konfiguracija qmake gradnje: - - Debug - Uklanjanje grešaka - - - Release - Objavljivanje - Additional arguments: Dodatni argumenti: @@ -17402,7 +17370,7 @@ Izlaz: - ClearCase::Internal::ActivitySelector + ClearCase Select &activity: Odaberi &aktivnost: @@ -17415,9 +17383,6 @@ Izlaz: Keep item activity Zadrži aktivnost stavke - - - ClearCase::Internal::ClearCaseControl Check &Out @@ -17426,16 +17391,10 @@ Izlaz: &Hijack - - - ClearCase::Internal::ClearCaseEditorWidget Annotate version "%1" Pribilježi verziju "%1" - - - ClearCase::Internal::ClearCasePlugin Editing Derived Object: %1 @@ -17704,31 +17663,18 @@ Izlaz: Updating ClearCase Index - - - ClearCase::Internal::ClearCaseSubmitEditor ClearCase Check In - - - ClearCase::Internal::ClearCaseSubmitEditorWidget Chec&k in even if identical to previous version - - &Preserve file modification time - - &Check In - - - ClearCase::Internal::SettingsPageWidget ClearCase Command @@ -17743,7 +17689,7 @@ Izlaz: - CMakeProjectManager::Internal::BuildDirManager + CMakeProjectManager Failed to create build directory "%1". Neupjelo stvaranje direktorija za gradnju "%1". @@ -17788,16 +17734,10 @@ Izlaz: Apply Changes to Project Primijeni promjene u CMake - - - CMakeProjectManager::Internal::CMakeBuildConfiguration CMake configuration set by the kit was overridden in the project. CMake konfiguracija postavljena od kompleta je prepisana u ovom projektu. - - - CMakeProjectManager::Internal::CMakeBuildConfigurationFactory Default The name of the build configuration created by default for a cmake project. @@ -17823,13 +17763,6 @@ Izlaz: Release with Debug Information Izdaj s podacima o ispravkama - - - CMakeProjectManager::Internal::CMakeBuildSettingsWidget - - CMake - CMake - Build directory: Direktorij izgradnje: @@ -17922,9 +17855,6 @@ Izlaz: Force to %1 Prisili na %1 - - - CMakeProjectManager::Internal::CMakeBuildStep CMake Build Default display name for the cmake make step. @@ -17955,9 +17885,6 @@ Izlaz: Display name for CMakeProjectManager::CMakeBuildStep id. Gradnja - - - CMakeProjectManager::CMakeBuildStep The build configuration is currently disabled. Konfiguracija za gradnju je trenutačno onemogućena. @@ -17979,7 +17906,7 @@ Izlaz: - CMakeProjectManager::Internal::CMakeBuildStepConfigWidget + CMakeProjectManager Build CMakeProjectManager::CMakeBuildStepConfigWidget display name. @@ -17997,16 +17924,10 @@ Izlaz: <b>No build configuration found on this kit.</b> <b>U ovom kompletu nije nađena konfiguracija gradnje.</b> - - - CMakeProjectManager::CMakeConfigItem Failed to open %1 for reading. Neuspjelo otvaranje od %1 za čitanje. - - - CMakeProjectManager::Internal::CMakeKitConfigWidget CMake Tool CMake alat @@ -18019,9 +17940,6 @@ Izlaz: <No CMake Tool available> <Nema dostupnog CMake alata> - - - CMakeProjectManager::Internal::CMakeGeneratorKitConfigWidget Change... Promijeni … @@ -18062,13 +17980,6 @@ Izlaz: Toolset: Skup alata: - - - CMakeProjectManager::Internal::CMakeConfigurationKitConfigWidget - - Change... - Promijeni … - CMake Configuration CMake konfiguracija @@ -18085,17 +17996,10 @@ Izlaz: Enter one variable per line with the variable name separated from the variable value by "=".<br>You may provide a type hint by adding ":TYPE" before the "=". Upiši jednu varijablu po retku, a naziv varijable odvoji od vrijednosti varijable s "=". <br> Možeš navesti vrstu savjeta dodavanjem ": TYPE" prije "=". - - - CMakeProjectManager::CMakeKitInformation CMake version %1 is unsupported. Please update to version 3.0 or later. CMake verzija %1 nije podržana. Aktualiziraj na verziju 3.0 ili noviju. - - CMake - CMake - Unconfigured Nekonfigurirano @@ -18104,9 +18008,6 @@ Izlaz: Path to the cmake executable Staza do izvršne cmake - - - CMakeProjectManager::CMakeGeneratorKitInformation CMake Tool is unconfigured, CMake generator will be ignored. CMake alat nije konfiguriran, zanemarit će se CMake generator. @@ -18143,13 +18044,6 @@ Izlaz: Toolset: %1 Skup alata: %1 - - CMake Generator - CMake generator - - - - CMakeProjectManager::CMakeConfigurationKitInformation CMake configuration has no path to qmake binary set, even though the kit has a valid Qt version. @@ -18190,20 +18084,10 @@ Izlaz: CMake configuration has a path to a C++ compiler set that does not match the compiler path configured in the tool chain of the kit. - - CMake Configuration - CMake konfiguracija - - - - CMakeProjectManager::Internal::CMakeLocatorFilter Build CMake target Odredište za CMake gradnju - - - CMakeProjectManager::CMakeProject No cmake tool set. Nijedan cmake alat nije postavljen. @@ -18216,16 +18100,10 @@ Izlaz: Scan "%1" project tree Pretraži "%1" stablo projekta - - - CMakeProjectManager::Internal::CMakeEditorFactory CMake Editor CMake uređivač - - - CMakeProjectManager::Internal::CMakeManager Run CMake Pokreni CMake @@ -18275,30 +18153,20 @@ Kopirati stazu do izvornih datoteka u međuspremnik? - CMakeProjectManager::Internal::CMakeProjectPlugin + CMakeProjectManager CMake SnippetProvider CMake - - Build - Izgradi - Build "%1" Izgradi "%1" - - - CMakeProjectManager::Internal::CMakeRunConfiguration The project no longer builds the target associated with this run configuration. - - - CMakeProjectManager::CMakeSettingsPage (Default) (Zadano) @@ -18343,9 +18211,6 @@ Kopirati stazu do izvornih datoteka u međuspremnik? Path: Staza: - - - CMakeProjectManager::Internal::CMakeToolConfigWidget Add Dodaj @@ -18374,23 +18239,6 @@ Kopirati stazu do izvornih datoteka u međuspremnik? New CMake Novi CMake - - - CMakeProjectManager::Internal::CMakeSettingsPage - - CMake - CMake - - - - CMakeProjectManager::Internal::CMakeSpecificSettingsPage - - CMake - CMake - - - - CMakeProjectManager::CMakeToolManager CMake at %1 CMake pri %1 @@ -18399,17 +18247,6 @@ Kopirati stazu do izvornih datoteka u međuspremnik? System CMake at %1 CMake sustava pri %1 - - CMake - CMake - - - - CMakeProjectManager::ConfigModel - - Key - Ključ - Value Vrijednost @@ -18422,13 +18259,6 @@ Kopirati stazu do izvornih datoteka u međuspremnik? Current kit: %1 Trenutačni komplet: %1 - - <UNSET> - <NEPOSTAVLJENO> - - - - CMakeProjectManager Current CMake: %1 Trenutačni CMake: %1 @@ -18441,9 +18271,6 @@ Kopirati stazu do izvornih datoteka u međuspremnik? Value requested by kit: %1 Komplet zahtijeva vrijednost: %1 - - - CMakeProjectManager::ConfigModelItemDelegate Select a file for %1 Odaberi datoteku za %1 @@ -18452,9 +18279,6 @@ Kopirati stazu do izvornih datoteka u međuspremnik? Select a directory for %1 Odaberi direktorij za %1 - - - CMakeProjectManager::Internal::ServerMode Running "%1 %2" in %3. Pokretanje "%1 %2" u %3. @@ -18539,9 +18363,6 @@ Kopirati stazu do izvornih datoteka u međuspremnik? Received a signal in reply to a request. - - - CMakeProjectManager::Internal::ServerModeReader Parsing of CMake project failed: Connection to CMake server lost. Obrada CMake projekta neuspjela: Veza sa CMake poslužiteljem izgubljena. @@ -18598,21 +18419,10 @@ Kopirati stazu do izvornih datoteka u međuspremnik? <Headers> <Zaglavlja> - - - CMakeProjectManager::Internal::TeaLeafReader The build directory is not for %1 but for %2 Direktorij gradnje nije za %1, već za %2 - - Running "%1 %2" in %3. - Pokretanje "%1 %2" u %3. - - - Configuring "%1" - Konfiguriranje "%1" - *** cmake process crashed. *** cmake proces se urušio. @@ -33080,14 +32890,11 @@ These files are preserved. - QmakeProjectManager::Internal::AddLibraryWizard + QmakeProjectManager Add Library - - - QmakeProjectManager::Internal::LibraryTypePage Library Type @@ -33135,9 +32942,6 @@ Neither the path to the library nor the path to its includes is added to the .pr Type Vrsta - - - QmakeProjectManager::Internal::DetailsPage Details Detalji @@ -33174,9 +32978,6 @@ Neither the path to the library nor the path to its includes is added to the .pr Specify the package to link to - - - QmakeProjectManager::Internal::SummaryPage Summary @@ -33185,9 +32986,6 @@ Neither the path to the library nor the path to its includes is added to the .pr The following snippet will be added to the<br><b>%1</b> file: - - - QmakeProjectManager::Internal::ClassList <New class> @@ -33200,9 +32998,6 @@ Neither the path to the library nor the path to its includes is added to the .pr Delete class %1 from list? - - - QmakeProjectManager::Internal::CustomWidgetWizard Qt Custom Designer Widget @@ -33211,30 +33006,18 @@ Neither the path to the library nor the path to its includes is added to the .pr Creates a Qt Custom Designer Widget or a Custom Widget Collection. - - - QmakeProjectManager::Internal::CustomWidgetWizardDialog This wizard generates a Qt Designer Custom Widget or a Qt Designer Custom Widget Collection project. - - - QmakeProjectManager::Internal::PluginGenerator Creating multiple widget libraries (%1, %2) in one project (%3) is not supported. - - - QmakeProjectManager::Internal::DesktopQmakeRunConfiguration Qt Run Configuration - - - QmakeProjectManager::Internal::ExternalQtEditor Unable to start "%1" @@ -33243,9 +33026,6 @@ Neither the path to the library nor the path to its includes is added to the .pr The application "%1" could not be found. - - - QmakeProjectManager::Internal::DesignerExternalEditor Qt Designer is not responding (%1). @@ -33254,13 +33034,6 @@ Neither the path to the library nor the path to its includes is added to the .pr Unable to create server socket: %1 - - - QmakeProjectManager::Internal::LibraryDetailsController - - Linkage: - - %1 Dynamic @@ -33269,10 +33042,6 @@ Neither the path to the library nor the path to its includes is added to the .pr %1 Static - - Mac: - - %1 Framework @@ -33281,9 +33050,6 @@ Neither the path to the library nor the path to its includes is added to the .pr %1 Library - - - QmakeProjectManager::QmakeBuildConfiguration Could not parse Makefile. @@ -33308,9 +33074,6 @@ Neither the path to the library nor the path to its includes is added to the .pr Parsing the .pro file - - - QmakeProjectManager::QtVersion The build directory needs to be at the same level as the source directory. @@ -33330,7 +33093,7 @@ Neither the path to the library nor the path to its includes is added to the .pr - QmakeProjectManager::QmakeBuildConfigurationFactory + QmakeProjectManager Release The name of the release build configuration created by default for a qmake project. @@ -33364,9 +33127,6 @@ Neither the path to the library nor the path to its includes is added to the .pr Non-ASCII characters in directory suffix may cause build issues. - - - QmakeProjectManager::Internal::QmakeKitConfigWidget Qt mkspec @@ -33375,9 +33135,6 @@ Neither the path to the library nor the path to its includes is added to the .pr The mkspec to use when building the project with qmake.<br>This setting is ignored when using other build systems. - - - QmakeProjectManager::QmakeKitInformation No Qt version set, so mkspec is ignored. @@ -33394,16 +33151,10 @@ Neither the path to the library nor the path to its includes is added to the .pr Mkspec configured for qmake by the Kit. - - - QmakeProjectManager::QmakeMakeStep Cannot find Makefile. Check your build settings. - - - QmakeProjectManager::QmakePriFile Headers @@ -33432,9 +33183,6 @@ Neither the path to the library nor the path to its includes is added to the .pr Other files - - - QmakePriFile Failed @@ -33447,9 +33195,6 @@ Neither the path to the library nor the path to its includes is added to the .pr File Error - - - QmakeProFile Error while parsing file %1. Giving up. @@ -33458,9 +33203,6 @@ Neither the path to the library nor the path to its includes is added to the .pr Could not find .pro file for subdirectory "%1" in "%2". - - - QmakeProjectManager::QmakeProject Reading Project "%1" @@ -33477,35 +33219,15 @@ Neither the path to the library nor the path to its includes is added to the .pr No C++ compiler set in kit. - - - QmakeProjectManager "%1" is used by qmake, but "%2" is configured in the kit. Please update your kit (%3) or choose a mkspec for qmake that matches your target environment better. - - - QmakeProjectManager::Internal::QmakeProjectImporter - - Debug - Ispravi greške - - - Release - Objavi - - - - QmakeProjectManager::QmakeManager QMake - - - QmakeProjectManager::Internal::QmakeProjectManagerPlugin Build @@ -33566,9 +33288,6 @@ Please update your kit (%3) or choose a mkspec for qmake that matches your targe Add Library... - - - QmakeProjectManager::QMakeStep qmake QMakeStep default display name @@ -33594,9 +33313,6 @@ Please update your kit (%3) or choose a mkspec for qmake that matches your targe <no Make step found> - - - QmakeProjectManager::QMakeStepConfigWidget QML Debugging @@ -33734,7 +33450,7 @@ Please update your kit (%3) or choose a mkspec for qmake that matches your targe - QmakeProjectManager::Internal::FilesPage + QmakeProjectManager Class Information @@ -33743,13 +33459,6 @@ Please update your kit (%3) or choose a mkspec for qmake that matches your targe Specify basic information about the classes for which you want to generate skeleton source code files. - - Details - Detalji - - - - QmakeProjectManager::Internal::GuiAppWizard Qt Widgets Application @@ -33760,16 +33469,10 @@ Please update your kit (%3) or choose a mkspec for qmake that matches your targe Preselects a desktop Qt for building the application if available. - - - QmakeProjectManager::Internal::GuiAppWizardDialog This wizard generates a Qt Widgets Application project. The application derives by default from QApplication and includes an empty widget. - - - QmakeProjectManager::Internal::LibraryWizard C++ Library @@ -33778,9 +33481,6 @@ Preselects a desktop Qt for building the application if available. Creates a C++ library based on qmake. This can be used to create:<ul><li>a shared C++ library for use with <tt>QPluginLoader</tt> and runtime (Plugins)</li><li>a shared or static C++ library for use with another project at linktime</li></ul> - - - QmakeProjectManager::Internal::LibraryWizardDialog Shared Library @@ -33793,21 +33493,10 @@ Preselects a desktop Qt for building the application if available. Qt Plugin - - Type - Vrsta - This wizard generates a C++ Library project. - - Details - Detalji - - - - QmakeProjectManager::Internal::ModulesPage Select Required Modules @@ -33820,16 +33509,10 @@ Preselects a desktop Qt for building the application if available. Modules - - - QmakeProjectManager::Internal::FilesSelectionWizardPage Files Datoteke - - - QmakeProjectManager::Internal::SimpleProjectWizardDialog Import Existing Project @@ -33850,9 +33533,6 @@ Preselects a desktop Qt for building the application if available. File Selection - - - QmakeProjectManager::Internal::SimpleProjectWizard Import as qmake Project (Limited Functionality) @@ -33861,9 +33541,6 @@ Preselects a desktop Qt for building the application if available. Imports existing projects that do not use qmake, CMake or Autotools.<p>This creates a qmake .pro file that allows you to use %1 as a code editor and as a launcher for debugging and analyzing tools. If you want to build the project, you might need to edit the generated .pro file. - - - QmakeProjectManager::Internal::SubdirsProjectWizard Subdirs Project @@ -33885,9 +33562,6 @@ Preselects a desktop Qt for building the application if available. Title of dialog - - - QmakeProjectManager::Internal::SubdirsProjectWizardDialog This wizard generates a Qt Subdirs project. Add subprojects to it later on by using the other wizards. diff --git a/share/qtcreator/translations/qtcreator_hu.ts b/share/qtcreator/translations/qtcreator_hu.ts index ae7512670fd..5f485187fec 100644 --- a/share/qtcreator/translations/qtcreator_hu.ts +++ b/share/qtcreator/translations/qtcreator_hu.ts @@ -263,7 +263,7 @@ - CMakeProjectManager::Internal::0 + CMakeProjectManager Build Environment Fordítási környezet @@ -356,9 +356,6 @@ Qt Creator has found a recent cbp file, which Qt Creator will parse to gather information about the project. You can change the command line arguments used to create this file in the project mode. Click finish to load the project A Qt Creator megtalálta a legutolsó cbp fájlt, amelyet a Qt Creator elemzésre for használni, hogy információkat nyerhessen a projektről. Megváltoztathatja aparancssori argumentumokat, amelyeket új fájl létrehozására hoztak létre projekt módban. Kattintson a befejezés gombra a projekt betöltéséhez. - - - CMakeProjectManager::Internal::CMakeBuildConfigurationFactory Create Létrehozás @@ -371,9 +368,6 @@ New Configuration Name: Új konfiguráció név: - - - CMakeProjectManager::Internal::CMakeBuildEnvironmentWidget Clear system environment Rendszer környezet megtisztítása @@ -382,23 +376,14 @@ Build Environment Fordítási környezet - - - CMakeProjectManager::Internal::CMakeBuildSettingsWidget &Change &Váltotatás - - - CMakeProjectManager::Internal::CMakeOpenProjectWizard CMake Wizard CMake Varázsló - - - CMakeProjectManager::Internal::CMakeRunConfigurationWidget Arguments: Argumentumok: @@ -431,17 +416,10 @@ System Environment Rendszer környezet - - Build Environment - Fordítási környezet - Running executable: <b>%1</b> %2 - - - CMakeProjectManager::Internal::CMakeRunPage Please specify the path to the cmake executable. No cmake executable was found in the path. Kérem határozza meg a cmake futtatható fájl útvonalát. Nem található cmake futtatható fájl az útvonalon. @@ -502,9 +480,6 @@ No valid cmake executable specified. Nincsen érvényes, meghatározott cmake futtatható. - - - CMakeProjectManager::Internal::CMakeSettingsPage CMake CMake @@ -513,16 +488,10 @@ CMake executable CMake futtatható fájl - - - CMakeProjectManager::Internal::InSourceBuildPage Qt Creator has detected an <b>in-source-build in %1</b> which prevents shadow builds. Qt Creator will not allow you to change the build directory. If you want a shadow build, clean your source directory and re-open the project. A Qt Creator egy <b>beépített forrást észlelt a(z) %1-ben</b>, amely megelőzi az árnyék építéstől. A Qt Creator nem fogja engedélyezni Önnek, hogy megváltoztassa az építési könyvtárat. Ha árnyék építést szeretne végrehajtani, ürítse ki a forrás könyvtárat és nyissa meg újra a projektet. - - - CMakeProjectManager::Internal::MakeStepConfigWidget Additional arguments: További argumentumok: @@ -535,9 +504,6 @@ <b>Make:</b> %1 %2 <b>Make:</b> %1 %2 - - - CMakeProjectManager::Internal::ShadowBuildPage Please enter the directory in which you want to build your project. Kérem gépelje be a könyvtár nevét, amelybe a projektet szeretné felépíteni. @@ -12631,7 +12597,7 @@ a verziókövetőhöz (%2)? - QMakeStep + QmakeProjectManager QMake Build Configuration: QMake Építési Konfiguráció: @@ -13030,7 +12996,7 @@ a verziókövetőhöz (%2)? - QmakeProjectManager::0 + QmakeProjectManager <font color="#ff0000">Could not find make command: %1 in the build environment</font> <font color="#ff0000">A make parancs nem található: %1 a fordító környezetben</font> @@ -13099,9 +13065,6 @@ a verziókövetőhöz (%2)? Auto-detected Qt Automatikusan észlelt Qt - - - QmakeProjectManager::Internal::0 Qt4 Console Application Qt4 konzol alkalmazás @@ -13678,9 +13641,6 @@ p, li { white-space: pre-wrap; } Edit Advanced Expression Speciális kifejezés szerkesztése - - - QmakeProjectManager::Internal::ClassDefinition Form Forma @@ -13785,9 +13745,6 @@ p, li { white-space: pre-wrap; } Icon files (*.png *.ico *.jpg *.xpm *.tif *.svg) ikon fájlok (*.png *.ico *.jpg *.xpm *.tif *.svg) - - - QmakeProjectManager::Internal::ClassList <New class> <Új osztály> @@ -13800,9 +13757,6 @@ p, li { white-space: pre-wrap; } Delete class %1 from list? %1 osztály törlése a listáról? - - - QmakeProjectManager::Internal::ConsoleAppWizard Qt4 Console Application Qt4 konzol alkalmazás @@ -13811,16 +13765,10 @@ p, li { white-space: pre-wrap; } Creates a Qt4 console application. Egy Qt4 konzol alkalmazás létrehozása. - - - QmakeProjectManager::Internal::ConsoleAppWizardDialog This wizard generates a Qt4 console application project. The application derives from QCoreApplication and does not provide a GUI. Ez a varázsló egy Qt4 konzol alkalmazási projektet generál. Az alkalmazás a QCoreApplication-ből származik és nem biztosít GUI-t. - - - QmakeProjectManager::Internal::CustomWidgetPluginWizardPage WizardPage Varázsló lap @@ -13857,9 +13805,6 @@ p, li { white-space: pre-wrap; } icons.qrc icons.qrc - - - QmakeProjectManager::Internal::CustomWidgetWidgetsWizardPage Custom Qt Widget Wizard Szokásos Qt Widget Varázsló @@ -13876,9 +13821,6 @@ p, li { white-space: pre-wrap; } Specify the list of custom widgets and their properties. Határozza meg a szokásos widgetek listáját és tulajdonságaikat. - - - QmakeProjectManager::Internal::CustomWidgetWizard Qt4 Designer Custom Widget Qt4 Designer Szokásos Widget @@ -13887,16 +13829,10 @@ p, li { white-space: pre-wrap; } Creates a Qt4 Designer Custom Widget or a Custom Widget Collection. Qt4 Designer Szokásos Widget vagy szokásos Widget gyűjtemény létrehozása. - - - QmakeProjectManager::Internal::CustomWidgetWizardDialog This wizard generates a Qt4 Designer Custom Widget or a Qt4 Designer Custom Widget Collection project. Ez a varázsló egy Qt4 Designer szokásos Widget-t vagy Qt4 Designer szokásos Widget gyűjtemény projektet generál. - - - QmakeProjectManager::Internal::DesignerExternalEditor Qt Designer is not responding (%1). A Qt Designer nem válaszol (%1). @@ -13905,16 +13841,10 @@ p, li { white-space: pre-wrap; } Unable to create server socket: %1 Nem lehet szerver socket-et létrehozni: %1 - - - QmakeProjectManager::Internal::EmbeddedPropertiesPanel Embedded Linux Beágyazott Linux - - - QmakeProjectManager::Internal::EmptyProjectWizard Empty Qt4 Project Üres Qt4 Projekt @@ -13923,16 +13853,10 @@ p, li { white-space: pre-wrap; } Creates an empty Qt project. Egy üres Qt projekt létrehozása. - - - QmakeProjectManager::Internal::EmptyProjectWizardDialog This wizard generates an empty Qt4 project. Add files to it later on by using the other wizards. Ez a varázsló egy üres Qt4 projektet generál. Fájlok hozzáadása később más varázslók használatával.können später Dateien hinzufügt werden. - - - QmakeProjectManager::Internal::ExternalQtEditor Unable to start "%1" Nem lehet elindítani a(z) "%1"-t @@ -13941,9 +13865,6 @@ p, li { white-space: pre-wrap; } The application "%1" could not be found. A(z) "%1" alkalmazás nem található. - - - QmakeProjectManager::Internal::FilesPage Class Information Osztály információ @@ -14108,7 +14029,7 @@ p, li { white-space: pre-wrap; } - QmakeProjectManager::Internal::GuiAppWizard + QmakeProjectManager Qt4 Gui Application Qt4 Gui Alkalmazás @@ -14121,16 +14042,10 @@ p, li { white-space: pre-wrap; } The template file '%1' could not be opened for reading: %2 A(z) '%1'-es példa fájlt nem sikerült megnyitni olvasásra: %2 - - - QmakeProjectManager::Internal::GuiAppWizardDialog This wizard generates a Qt4 GUI application project. The application derives by default from QApplication and includes an empty widget. Ez a varázsló egy Qt4 GUI alkalmazói projektet generál. Az alkalmazás az alapértelmezett QApplication-ből származik és egy üres widget tartalmaz. - - - QmakeProjectManager::Internal::LibraryWizard C++ Library C++ könyvtár @@ -14139,9 +14054,6 @@ p, li { white-space: pre-wrap; } Creates a C++ Library. C++ könyvtár létrehozása. - - - QmakeProjectManager::Internal::LibraryWizardDialog Shared library Megosztott könyvtár @@ -14162,16 +14074,10 @@ p, li { white-space: pre-wrap; } This wizard generates a C++ library project. Ez a varázsló C++ könyvtár projektet generál. - - - QmakeProjectManager::Internal::MakeStepFactory Make Make - - - QmakeProjectManager::Internal::ModulesPage Select required modules Az igényelt modulok kiválasztása @@ -14180,9 +14086,6 @@ p, li { white-space: pre-wrap; } Select the modules you want to include in your project. The recommended modules for this project are selected by default. Válassza ki a projektbe betenni kívánt modulokat. Az erre a projektre ajánlott modulok automatikusan ki vannak választva. - - - QmakeProjectManager::Internal::PluginGenerator Cannot open icon file %1. Nem lehet megnyitni a(z) ikon fájlt. @@ -14195,9 +14098,6 @@ p, li { white-space: pre-wrap; } Cannot open %1: %2 Nem lehet megnyitni a(z) %1-t: %2 - - - QmakeProjectManager::Internal::ProEditor New Új @@ -14250,9 +14150,6 @@ p, li { white-space: pre-wrap; } Add Block Blokk hozzáadása - - - QmakeProjectManager::Internal::ProEditorModel <Global Scope> <Globális hatókör> @@ -14289,9 +14186,6 @@ p, li { white-space: pre-wrap; } Insert Item Elem beszúrása - - - QmakeProjectManager::Internal::ProjectLoadWizard Import existing build settings Meglevő építési beállítások importolása @@ -14308,16 +14202,10 @@ p, li { white-space: pre-wrap; } <b>Note:</b> Importing the settings will automatically add the Qt Version identified by <br><b>%1</b> to the list of Qt versions. <b>Megjegyzés:</b> A beállítások importálása automatikusan hozzá fogja adni a Qt verziót, amely <br><b>%1</b> -val van azonosítva a Qt verziók listájához.. - - - QmakeProjectManager::Internal::QMakeStepFactory QMake QMake - - - QmakeProjectManager::Internal::QmakeBuildEnvironmentWidget Clear system environment Rendszer környezet megtisztítása @@ -14326,9 +14214,6 @@ p, li { white-space: pre-wrap; } Build Environment Fordítási környezet - - - QmakeProjectManager::Internal::QmakePriFileNode Headers Fejállomány @@ -14373,20 +14258,10 @@ p, li { white-space: pre-wrap; } Error while changing pro file %1. Hiba történt a(z) %1 pro fájl módosítása közben. - - - QmakeProjectManager::Internal::QmakeProFileNode - - Error while parsing file %1. Giving up. - Hiba történt a(z) fájl elemzése közben. Leáll. - Could not find .pro file for sub dir '%1' in '%2' Nem sikerült megtalálni a .pro fájlt a(z) '%2'-ben a(z) '%1'alkönytár számára - - - QmakeProjectManager::Internal::QmakeProjectConfigWidget Qt Version: Qt verzió: @@ -14439,16 +14314,10 @@ p, li { white-space: pre-wrap; } General Általános - - - QmakeProjectManager::Internal::QmakeProjectManagerPlugin Run qmake qmake futtatása - - - QmakeProjectManager::Internal::QmakeRunConfiguration Qt4RunConfiguration Qt4RunConfiguration @@ -14457,9 +14326,6 @@ p, li { white-space: pre-wrap; } Could not parse %1. The Qt4 run configuration %2 can not be started. Nem sikerült az %1 emlemzése. A(z) %2-t futtató Qt4 elindítása nem sikerült. - - - QmakeProjectManager::Internal::QmakeRunConfigurationWidget Name: Név: @@ -14508,10 +14374,6 @@ p, li { white-space: pre-wrap; } System Environment Rendszer környezet - - Build Environment - Fordítási környezet - Running executable: <b>%1</b> %2 (in terminal) Futtatható fájl futtatása: <b>%1</b> %2 (terminálban) @@ -14520,9 +14382,6 @@ p, li { white-space: pre-wrap; } Running executable: <b>%1</b> %2 Futtatható fájl futtatása: <b>%1</b> %2 - - - QmakeProjectManager::Internal::QtOptionsPageWidget <specify a name> <egy név meghatározása> @@ -14579,9 +14438,6 @@ p, li { white-space: pre-wrap; } Found Qt version %1, using mkspec %2 Talált Qt verzió: %1, mkspec használata: %2 - - - QmakeProjectManager::Internal::QtVersionManager Qt versions Qt verziók @@ -14662,16 +14518,10 @@ p, li { white-space: pre-wrap; } Default Qt Version: Alapértelmezett Qt Verzió: - - - QmakeProjectManager::Internal::QtWizard The project %1 could not be opened. Nem sikerült megnyitni a(z) %1 prokeltet. - - - QmakeProjectManager::Internal::S60DeviceDebugRunControl Warning: Cannot locate the symbol file belonging to %1. Figyelmeztetés: Nem sikerült behatárolni a szimbólum fájlt ami a(z) %1-hez tartozik. @@ -14684,9 +14534,6 @@ p, li { white-space: pre-wrap; } Debugging finished. Debuggolás befejezve. - - - QmakeProjectManager::Internal::S60DeviceRunConfiguration %1 on Symbian Device %1 Symbian eszközön @@ -14699,24 +14546,10 @@ p, li { white-space: pre-wrap; } Could not parse %1. The QtS60 Device run configuration %2 can not be started. Nem sikerült a(z) %1 elemzése. A QtS60 eszköz futtatási konfigurációját %2 nem lehet elindítani. - - - QmakeProjectManager::Internal::S60DeviceRunConfigurationFactory - - %1 on Symbian Device - %1 Symbian eszközön - - - - QmakeProjectManager::Internal::S60DeviceRunConfigurationWidget Device: Eszköz: - - Name: - Név: - Install File: Teleptő fájl: @@ -14769,9 +14602,6 @@ p, li { white-space: pre-wrap; } Connecting... Csatlakozás... - - - QmakeProjectManager::Internal::S60DeviceRunControl Finished. Befejezve. @@ -14788,9 +14618,6 @@ p, li { white-space: pre-wrap; } Could not start application: %1 Nem sikerült elindítani az alkalmazást: %1 - - - QmakeProjectManager::Internal::S60DeviceRunControlBase There is no device plugged in. Nincsen bedugott eszköz. @@ -14891,17 +14718,10 @@ Ellenőrizze le, hogy vajon a telefon csatlakoztatva van-e és a TRK alkalmazás An error has occurred while running %1. Hiba történt a(z) %1 futtatása közben. - - - QmakeProjectManager::Internal::S60Devices::0 Id: Azonosító: - - Name: - Név: - EPOC: EPOC: @@ -14914,17 +14734,10 @@ Ellenőrizze le, hogy vajon a telefon csatlakoztatva van-e és a TRK alkalmazás Qt: Qt: - - - QmakeProjectManager::Internal::S60Devices::Device Id: Azonosító: - - Name: - Név: - EPOC: EPOC: @@ -14937,13 +14750,6 @@ Ellenőrizze le, hogy vajon a telefon csatlakoztatva van-e és a TRK alkalmazás Qt: Qt: - - - QmakeProjectManager::Internal::S60DevicesPreferencePane - - Form - Forma - Installed S60 SDKs: S60 SDK-k installálva: @@ -14968,16 +14774,10 @@ Ellenőrizze le, hogy vajon a telefon csatlakoztatva van-e és a TRK alkalmazás S60 SDKs S60 SDK-k - - - QmakeProjectManager::Internal::S60DevicesWidget No Qt installed Nincsen a Qt installálva - - - QmakeProjectManager::Internal::S60EmulatorRunConfiguration %1 in Symbian Emulator %1 Symbian emulátorban @@ -14990,31 +14790,14 @@ Ellenőrizze le, hogy vajon a telefon csatlakoztatva van-e és a TRK alkalmazás Could not parse %1. The Qt for Symbian emulator run configuration %2 can not be started. Nem sikerült a(z) %1 elemzése. Nem lehet elindítani a Qt-t a Symbian emulátor futtatási konfigurációjára (%2). - - - QmakeProjectManager::Internal::S60EmulatorRunConfigurationFactory %1 in Symbian Emulator %1 Symbian Emulátorban - - - QmakeProjectManager::Internal::S60EmulatorRunConfigurationWidget - - Name: - Név: - - - Executable: - Futtatható: - Summary: Run %1 in emulator - - - QmakeProjectManager::Internal::S60EmulatorRunControl Starting %1... %1 elindítása... @@ -15027,9 +14810,6 @@ Ellenőrizze le, hogy vajon a telefon csatlakoztatva van-e és a TRK alkalmazás %1 exited with code %2 %1 befejeződött %2-s kóddal - - - QmakeProjectManager::Internal::S60Manager Run in Emulator Futtatás emulátorban @@ -15042,9 +14822,6 @@ Ellenőrizze le, hogy vajon a telefon csatlakoztatva van-e és a TRK alkalmazás Debug on Device Debug eszközön - - - QmakeProjectManager::Internal::ValueEditor Edit Variable Variable bearbeiten @@ -15097,14 +14874,6 @@ Ellenőrizze le, hogy vajon a telefon csatlakoztatva van-e és a TRK alkalmazás Edit Items Elemek szerkesztése - - New - Új - - - Remove - Eltávolítás - Edit Values Értékek szerkesztése @@ -15121,9 +14890,6 @@ Ellenőrizze le, hogy vajon a telefon csatlakoztatva van-e és a TRK alkalmazás Edit Advanced Expression Speciális kifejezés szerkesztése - - - QmakeProjectManager::MakeStep <font color="#ff0000">Could not find make command: %1 in the build environment</font> <font color="#ff0000">A make parancs nem található: %1 a fordító környezetben</font> @@ -15132,9 +14898,6 @@ Ellenőrizze le, hogy vajon a telefon csatlakoztatva van-e és a TRK alkalmazás <font color="#0000ff"><b>No Makefile found, assuming project is clean.</b></font> <font color="#0000ff"><b>Makefile nem található, feltételezve hogy a projekt tiszta.</b></font> - - - QmakeProjectManager::MakeStepConfigWidget Override %1: %1 megsemmisítése: @@ -15147,9 +14910,6 @@ Ellenőrizze le, hogy vajon a telefon csatlakoztatva van-e és a TRK alkalmazás <b>Make:</b> %1 %2 in %3 <b>Make:</b> %1 %2 %3-ban - - - QmakeProjectManager::QMakeStep <font color="#ff0000"><b>No valid Qt version set. Set one in Preferences </b></font> @@ -15170,9 +14930,6 @@ Ellenőrizze le, hogy vajon a telefon csatlakoztatva van-e és a TRK alkalmazás <font color="#0000ff">Configuration unchanged, skipping QMake step.</font> <font color="#0000ff">Nem változott a konfiguráció, QMake lépés átugrása </font> - - - QmakeProjectManager::QMakeStepConfigWidget <b>QMake:</b> No Qt version set. QMake can not be run. <b>QMake:</b> Nincsen beállított Qt verzió. Nem lehet futtatni a QMake-t. @@ -15185,9 +14942,6 @@ Ellenőrizze le, hogy vajon a telefon csatlakoztatva van-e és a TRK alkalmazás No valid Qt version set. Nincs érvényes Qt verzió beállítva. - - - QmakeProjectManager::QmakeBuildConfigurationFactory Using Default Qt Version Alapértelmezett Qt verzió használata @@ -15212,9 +14966,6 @@ Ellenőrizze le, hogy vajon a telefon csatlakoztatva van-e és a TRK alkalmazás %1 Release %1 Release - - - QmakeProjectManager::QmakeManager Loading project %1 ... %1 Projekt betöltése ... @@ -15239,9 +14990,6 @@ Ellenőrizze le, hogy vajon a telefon csatlakoztatva van-e és a TRK alkalmazás Done opening project Projektek megnyitva - - - QmakeProjectManager::QtVersionManager <not found> <nem található> @@ -15250,10 +14998,6 @@ Ellenőrizze le, hogy vajon a telefon csatlakoztatva van-e és a TRK alkalmazás Qt in PATH Qt az útvonalon - - Name: - Név: - Source: Forrás: diff --git a/share/qtcreator/translations/qtcreator_it.ts b/share/qtcreator/translations/qtcreator_it.ts index a18a50ad194..f675922862e 100644 --- a/share/qtcreator/translations/qtcreator_it.ts +++ b/share/qtcreator/translations/qtcreator_it.ts @@ -294,7 +294,7 @@ - CMakeProjectManager::Internal::CMakeBuildEnvironmentWidget + CMakeProjectManager Clear system environment @@ -303,9 +303,6 @@ Build Environment Ambiente di Compilazione - - - CMakeProjectManager::Internal::CMakeBuildConfigurationFactory Create @@ -318,23 +315,14 @@ New Configuration Name: Nome della Nuova Configurazione: - - - CMakeProjectManager::Internal::CMakeBuildSettingsWidget &Change &Cambia - - - CMakeProjectManager::Internal::CMakeOpenProjectWizard CMake Wizard Procedura Guidata di CMake - - - CMakeProjectManager::Internal::CMakeRunConfigurationWidget Arguments: Parametri: @@ -375,9 +363,6 @@ Running executable: <b>%1</b> %2 - - - CMakeProjectManager::Internal::InSourceBuildPage Qt Creator has detected an <b>in-source-build in %1</b> which prevents shadow builds. Qt Creator will not allow you to change the build directory. If you want a shadow build, clean your source directory and re-open the project. @@ -386,9 +371,6 @@ Qt Creator has detected an in-source-build which prevents shadow builds. Qt Creator will not allow you to change the build directory. If you want a shadow build, clean your source directory and re-open the project. Qt Creator ha rilevato che la compilazione avviene nella cartella dei file sorgenti e ciò impedisce la compilazione in cartelle separate. Qt Creator non permette di di cambiare la cartella di compilazione, perciò se vuoi una compilazione in cartella separata, pulisci la cartella dei file sorgenti e apri nuovamente il progetto. - - - CMakeProjectManager::Internal::CMakeRunPage Please specify the path to the cmake executable. No cmake executable was found in the path. @@ -449,9 +431,6 @@ No valid cmake executable specified. - - - CMakeProjectManager::Internal::CMakeSettingsPage CMake CMake @@ -460,9 +439,6 @@ CMake executable Eseguibile CMake - - - CMakeProjectManager::Internal::MakeStepConfigWidget Additional arguments: Parametri aggiuntivi: @@ -475,9 +451,6 @@ <b>Make:</b> %1 %2 - - - CMakeProjectManager::Internal::ShadowBuildPage Please enter the directory in which you want to build your project. Inserisci la cartella in cui vuoi compilare il tuo progetto. @@ -490,9 +463,6 @@ Build directory: Cartella di compilazione: - - - CMakeProjectManager::Internal::XmlFileUpToDatePage Qt Creator has found a recent cbp file, which Qt Creator will parse to gather information about the project. You can change the command line arguments used to create this file in the project mode. Click finish to load the project. Qt Creator ha rilevato un file cbp recente, e lo leggerà per ricavare informazioni sul progetto. Puoi cambiare i parametri usati per creare questo file nella modalità di progetto. Fai clic su fine per caricare il progetto. @@ -8051,7 +8021,7 @@ al VCS (%2)? - QMakeStep + QmakeProjectManager QMake Build Configuration: Configurazione di QMake: @@ -8274,7 +8244,7 @@ al VCS (%2)? - QmakeProjectManager::Internal::ConsoleAppWizard + QmakeProjectManager Qt4 Console Application Applicazione Qt4 per Linea di Comando @@ -8283,16 +8253,10 @@ al VCS (%2)? Creates a Qt4 console application. Crea una applicazione per console Qt4. - - - QmakeProjectManager::Internal::ConsoleAppWizardDialog This wizard generates a Qt4 console application project. The application derives from QCoreApplication and does not provide a GUI. Questa procedura guidata genera un progetto per applicazione console Qt4. L'applicazione deriva da QCoreApplication e non include una GUI. - - - QmakeProjectManager::Internal::DesignerExternalEditor Qt Designer is not responding (%1). Qt Designer non risponde (%1). @@ -8301,16 +8265,10 @@ al VCS (%2)? Unable to create server socket: %1 Impossibile creare il socket del server: %1 - - - QmakeProjectManager::Internal::EmbeddedPropertiesPanel Embedded Linux Embedded Linux - - - QmakeProjectManager::Internal::EmptyProjectWizard Empty Qt4 Project Progetto Qt4 Vuoto @@ -8319,16 +8277,10 @@ al VCS (%2)? Creates an empty Qt project. Crea un progetto Qt4 vuoto. - - - QmakeProjectManager::Internal::EmptyProjectWizardDialog This wizard generates an empty Qt4 project. Add files to it later on by using the other wizards. Questa procedura guidata genera un progetto Qt4 vuoto. Altri file potranno essere aggiunti in seguito con altre procedure guidate. - - - QmakeProjectManager::Internal::ExternalQtEditor Unable to start "%1" Impossibile avviare "%1" @@ -8337,9 +8289,6 @@ al VCS (%2)? The application "%1" could not be found. L'applicazione "%1" non è stata trovata. - - - QmakeProjectManager::Internal::FilesPage Class Information Informazioni sulla Classe @@ -8348,9 +8297,6 @@ al VCS (%2)? Specify basic information about the classes for which you want to generate skeleton source code files. Inserisci le informazioni fondamentali sulla classe di cui vuoi generare lo scheletro dei file sorgenti. - - - QmakeProjectManager::Internal::GuiAppWizard Qt4 Gui Application Applicazione Qt4 Gui @@ -8363,16 +8309,10 @@ al VCS (%2)? The template file '%1' could not be opened for reading: %2 Il file template '%1' non può essere aperto in lettura: %2 - - - QmakeProjectManager::Internal::GuiAppWizardDialog This wizard generates a Qt4 GUI application project. The application derives by default from QApplication and includes an empty widget. Questa procedura guidata genera un progetto per applicazione Gui Qt4. L'applicazione deriva da QApplication ed include un widget vuoto. - - - QmakeProjectManager::Internal::LibraryWizard C++ Library Libreria C++ @@ -8381,9 +8321,6 @@ al VCS (%2)? Creates a C++ Library. Crea una Libreria C++. - - - QmakeProjectManager::Internal::LibraryWizardDialog Shared library Libreria condivisa @@ -8404,9 +8341,6 @@ al VCS (%2)? This wizard generates a C++ library project. Questa procedura guidata genera un progetto per una libreria C++. - - - QmakeProjectManager::Internal::ModulesPage Select required modules Marca i moduli richiesti @@ -8415,9 +8349,6 @@ al VCS (%2)? Select the modules you want to include in your project. The recommended modules for this project are selected by default. Seleziona tutti i moduli che vuoi includere nel tuo progetto. Quelli raccomandati per questo progetto sono già selezionati. - - - QmakeProjectManager::Internal::ProEditor New Nuovo @@ -8473,9 +8404,6 @@ al VCS (%2)? Add Block Aggiungi Blocco - - - QmakeProjectManager::Internal::ProEditorModel <Global Scope> <Ambito Globale> @@ -8512,9 +8440,6 @@ al VCS (%2)? Insert Item Inserisci Elemento - - - QmakeProjectManager::Internal::ProjectLoadWizard Import existing settings Importa le impostazioni esistenti @@ -8539,9 +8464,6 @@ al VCS (%2)? <b>Note:</b> Importing the settings will automatically add the Qt Version from:<br><b>%1</b> to the list of Qt versions. <b>Nota:</b> Importando le impostazioni, si aggiungerà automaticamente la Versione di Qt in:<br><b>%1</b> alla lista delle Versioni di Qt. - - - QmakeProjectManager::Internal::QmakeBuildEnvironmentWidget Clear system environment @@ -8550,9 +8472,6 @@ al VCS (%2)? Build Environment Ambiente di Compilazione - - - QmakeProjectManager::Internal::QmakePriFileNode Headers @@ -8597,20 +8516,10 @@ al VCS (%2)? Error while changing pro file %1. Errore durante la modifica del file pro %1. - - - QmakeProjectManager::Internal::QmakeProFileNode - - Error while parsing file %1. Giving up. - Errore durante la lettura del file %1. Rinuncio. - Could not find .pro file for sub dir '%1' in '%2' Impossibile trovare il file .pro della sottocartella '%1' in '%2' - - - QmakeProjectManager::Internal::QmakeProjectConfigWidget Configuration Name: Nome della Configurazione: @@ -8677,16 +8586,10 @@ al VCS (%2)? Tool Chain: - - - QmakeProjectManager::Internal::QmakeProjectManagerPlugin Run qmake Avvia qmake - - - QmakeProjectManager::Internal::QmakeRunConfiguration Qt4RunConfiguration Qt4RunConfiguration @@ -8695,9 +8598,6 @@ al VCS (%2)? Could not parse %1. The Qt4 run configuration %2 can not be started. Impossibile leggere %1. L'esecuzione '%2' non può essere avviata. - - - QmakeProjectManager::Internal::QmakeRunConfigurationWidget Arguments: Parametri: @@ -8766,9 +8666,6 @@ al VCS (%2)? Use debug version of frameworks (DYLD_IMAGE_SUFFIX=_debug) Utilizza la versione di debug dei framework (DYLD_IMAGE_SUFFIX=_debug) - - - QmakeProjectManager::Internal::QtOptionsPageWidget <specify a name> <specifica un nome> @@ -8838,9 +8735,6 @@ al VCS (%2)? Found Qt version %1, using mkspec %2 Trovata la versione Qt %1, uso l'mkspec %2 - - - QmakeProjectManager::Internal::QtVersionManager Qt versions Versioni Qt @@ -8936,16 +8830,10 @@ p, li { white-space: pre-wrap; } MWC Directory: - - - QmakeProjectManager::Internal::QtWizard The project %1 could not be opened. Impossibile aprire il progetto %1. - - - QmakeProjectManager::Internal::ValueEditor Edit Variable Modifica Variabile @@ -9015,11 +8903,6 @@ p, li { white-space: pre-wrap; } New Nuovo - - - Remove - Rimuovi - Edit Values Modifica i Valori @@ -9036,9 +8919,6 @@ p, li { white-space: pre-wrap; } Edit Advanced Expression Modifica Espressione Avanzata - - - QmakeProjectManager::MakeStep <font color="#ff0000">Could not find make command: %1 in the build environment</font> <font color="#ff0000">Impossibile trovare il comando make: %1 nell'ambiente di compilazione</font> @@ -9047,9 +8927,6 @@ p, li { white-space: pre-wrap; } <font color="#0000ff"><b>No Makefile found, assuming project is clean.</b></font> <font color="#0000ff"><b>Non trovo il Makefile. Assumo che il progetto sia pulito.</b></font> - - - QmakeProjectManager::MakeStepConfigWidget Override %1: Ridefinisci %1: @@ -9062,16 +8939,10 @@ p, li { white-space: pre-wrap; } <b>Make:</b> %1 %2 in %3 - - - QmakeProjectManager::Internal::MakeStepFactory Make - - - QmakeProjectManager::QMakeStep <font color="#ff0000"><b>No valid Qt version set. Set one in Preferences </b></font> @@ -9092,9 +8963,6 @@ p, li { white-space: pre-wrap; } <font color="#0000ff">Configuration unchanged, skipping QMake step.</font> <font color="#0000ff">La configurazione non è cambiata, salto la fase QMake.</font> - - - QmakeProjectManager::QMakeStepConfigWidget <b>QMake:</b> No Qt version set. QMake can not be run. @@ -9107,16 +8975,10 @@ p, li { white-space: pre-wrap; } No valid Qt version set. - - - QmakeProjectManager::Internal::QMakeStepFactory QMake - - - QmakeProjectManager::QmakeManager Loading project %1 ... Caricamento del progetto %1 ... @@ -9141,9 +9003,6 @@ p, li { white-space: pre-wrap; } Done opening project Progetto aperto - - - QmakeProjectManager::QtVersionManager <not found> <non trovato> @@ -11648,7 +11507,7 @@ p, li { white-space: pre-wrap; } - QmakeProjectManager::Internal::ClassDefinition + QmakeProjectManager Form @@ -11776,9 +11635,6 @@ p, li { white-space: pre-wrap; } Icon files (*.png *.ico *.jpg *.xpm *.tif *.svg) - - - QmakeProjectManager::Internal::CustomWidgetPluginWizardPage WizardPage @@ -11823,9 +11679,6 @@ p, li { white-space: pre-wrap; } icons.qrc - - - QmakeProjectManager::Internal::CustomWidgetWidgetsWizardPage Custom Qt Widget Wizard @@ -11977,11 +11830,7 @@ p, li { white-space: pre-wrap; } - QmakeProjectManager::Internal::S60DevicesPreferencePane - - Form - - + QmakeProjectManager Installed S60 SDKs: @@ -12958,7 +12807,7 @@ Reason: %2 - QmakeProjectManager::Internal::ClassList + QmakeProjectManager <New class> @@ -12971,9 +12820,6 @@ Reason: %2 Delete class %1 from list? - - - QmakeProjectManager::Internal::CustomWidgetWizard Qt4 Designer Custom Widget @@ -12982,16 +12828,10 @@ Reason: %2 Creates a Qt4 Designer Custom Widget or a Custom Widget Collection. - - - QmakeProjectManager::Internal::CustomWidgetWizardDialog This wizard generates a Qt4 Designer Custom Widget or a Qt4 Designer Custom Widget Collection project. - - - QmakeProjectManager::Internal::PluginGenerator Cannot open icon file %1. @@ -13013,7 +12853,7 @@ Reason: %2 - QmakeProjectManager::Internal::S60DeviceRunConfiguration + QmakeProjectManager %1 on Device @@ -13026,9 +12866,6 @@ Reason: %2 Could not parse %1. The QtS60 Device run configuration %2 can not be started. - - - QmakeProjectManager::Internal::S60DeviceRunConfigurationWidget Name: Nome: @@ -13061,16 +12898,6 @@ Reason: %2 Key file: - - - QmakeProjectManager::Internal::S60DeviceRunConfigurationFactory - - %1 on Device - - - - - QmakeProjectManager::Internal::S60DeviceRunControlBase Creating %1.sisx ... @@ -13145,9 +12972,6 @@ Check if the phone is connected and the TRK application is running. An error has occurred while running %1. - - - QmakeProjectManager::Internal::S60DeviceRunControl Finished. @@ -13164,9 +12988,6 @@ Check if the phone is connected and the TRK application is running. Could not start application: %1 - - - QmakeProjectManager::Internal::S60DeviceDebugRunControl Warning: Cannot locate the symbol file belonging to %1. @@ -13179,16 +13000,10 @@ Check if the phone is connected and the TRK application is running. Debugging finished. - - - QmakeProjectManager::Internal::S60DevicesWidget No Qt installed - - - QmakeProjectManager::Internal::S60EmulatorRunConfiguration %1 in Emulator @@ -13201,27 +13016,10 @@ Check if the phone is connected and the TRK application is running. Could not parse %1. The QtS60 emulator run configuration %2 can not be started. - - - QmakeProjectManager::Internal::S60EmulatorRunConfigurationWidget - - Name: - Nome: - Executable: Eseguibile: - - - QmakeProjectManager::Internal::S60EmulatorRunConfigurationFactory - - %1 in Emulator - - - - - QmakeProjectManager::Internal::S60EmulatorRunControl Starting %1... Avvio di %1... @@ -13234,9 +13032,6 @@ Check if the phone is connected and the TRK application is running. %1 exited with code %2 %1 è uscito con il codice %2 - - - QmakeProjectManager::Internal::S60Manager Run in Emulator @@ -13249,9 +13044,6 @@ Check if the phone is connected and the TRK application is running. Debug on Device - - - QmakeProjectManager::QmakeBuildConfigurationFactory Using Default Qt Version diff --git a/share/qtcreator/translations/qtcreator_ja.ts b/share/qtcreator/translations/qtcreator_ja.ts index b1f0a8a6e1d..aa9f96e65ba 100644 --- a/share/qtcreator/translations/qtcreator_ja.ts +++ b/share/qtcreator/translations/qtcreator_ja.ts @@ -1084,7 +1084,7 @@ Local pulls are not applied to the master branch. - ClearCase::Internal::CheckOutDialog + ClearCase Check Out チェックアウト @@ -1110,9 +1110,6 @@ Local pulls are not applied to the master branch. Hijack: Unset read-only flag without check-out. This is used for local changes which the user does not want to commit. ハイジャックファイルを使う(&H) - - - ClearCase::Internal::SettingsPage Configuration 設定 @@ -1194,9 +1191,6 @@ Local pulls are not applied to the master branch. Do &not prompt for comment during checkout or check-in チェックアウトまたはチェックイン時にコメントを確認しない(&N) - - - ClearCase::Internal::UndoCheckOut Dialog ダイアログ @@ -1209,9 +1203,6 @@ Local pulls are not applied to the master branch. &Save copy of the file with a '.keep' extension '.keep' 拡張子を付けてコピーを保存する(&S) - - - ClearCase::Internal::VersionSelector Confirm Version to Check Out チェックアウトバージョンの確認 @@ -4872,7 +4863,7 @@ Add, modify, and remove document filters, which determine the documentation set - QmakeProjectManager::Internal::ClassDefinition + QmakeProjectManager Form フォーム @@ -4977,9 +4968,6 @@ Add, modify, and remove document filters, which determine the documentation set Icon files (*.png *.ico *.jpg *.xpm *.tif *.svg) アイコンファイル (*.png *.ico *.jpg *.xpm *.tif *.svg) - - - QmakeProjectManager::Internal::CustomWidgetPluginWizardPage WizardPage ウィザードページ @@ -5020,9 +5008,6 @@ Add, modify, and remove document filters, which determine the documentation set Plugin Details プラグインの詳細 - - - QmakeProjectManager::Internal::CustomWidgetWidgetsWizardPage Custom Qt Widget Wizard カスタム Qt ウィジェットウィザード @@ -5047,9 +5032,6 @@ Add, modify, and remove document filters, which determine the documentation set Custom Widgets カスタムウィジェット - - - QmakeProjectManager::Internal::LibraryDetailsWidget Library: ライブラリ: @@ -5126,9 +5108,6 @@ Add, modify, and remove document filters, which determine the documentation set Library type: ライブラリタイプ: - - - QmakeProjectManager::Internal::MakeStep Make arguments: Make の引数: @@ -5137,9 +5116,6 @@ Add, modify, and remove document filters, which determine the documentation set Override %1: %1 の代わりに使用するコマンド: - - - QmakeProjectManager::Internal::QmakeProjectConfigWidget Shadow build: シャドウビルド: @@ -5186,21 +5162,10 @@ Add, modify, and remove document filters, which determine the documentation set %1 error message, %2 build directory %1 %2 のビルドは上書きされます。 - - - QmakeProjectManager::Internal::QMakeStep qmake build configuration: qmake ビルド設定: - - Debug - デバッグ - - - Release - リリース - Additional arguments: 追加の引数: @@ -5221,13 +5186,6 @@ Add, modify, and remove document filters, which determine the documentation set Use QML compiler: QML コンパイラを使用する: - - - QmakeProjectManager::Internal::TestWizardPage - - WizardPage - ウィザードページ - Specify basic information about the test class for which you want to generate skeleton source code file. スケルトンソースコードファイルを生成するテストクラスの基本的な情報を指定してください。 @@ -13122,7 +13080,7 @@ in the system's browser for manual download. - ClearCase::Internal::ActivitySelector + ClearCase Select &activity: アクティビティの選択 (&A): @@ -13135,9 +13093,6 @@ in the system's browser for manual download. Keep item activity アイテムのアクティビティを保持 - - - ClearCase::Internal::ClearCaseControl Check &Out チェックアウト(&O) @@ -13146,9 +13101,6 @@ in the system's browser for manual download. &Hijack ハイジャック(&H) - - - ClearCase::Internal::ClearCasePlugin Editing Derived Object: %1 派生オブジェクトの編集中: %1 @@ -13441,31 +13393,18 @@ in the system's browser for manual download. Enter activity headline アクティビティ ヘッドラインに入る - - - ClearCase::Internal::ClearCaseSubmitEditor ClearCase Check In ClearCase チェックイン - - - ClearCase::Internal::ClearCaseSubmitEditorWidget Chec&k in even if identical to previous version 以前のバージョンが指定されている場合でもチェックインする(&K) - - &Preserve file modification time - ファイルの更新日時を保持する(&P) - &Check In チェックイン(&C) - - - ClearCase::Internal::SettingsPageWidget ClearCase Command ClearCase コマンド @@ -13478,13 +13417,9 @@ in the system's browser for manual download. DiffUtils is available for free download at http://gnuwin32.sourceforge.net/packages/diffutils.htm. Extract it to a directory in your PATH. DiffUtils は http://gnuwin32.sourceforge.net/packages/diffutils.htm からフリーでダウンロードできます。PATH の通ったディレクトリに展開してください。 - - ClearCase - ClearCase - - CMakeProjectManager::Internal::CMakeBuildConfigurationFactory + CMakeProjectManager Default The name of the build configuration created by default for a cmake project. @@ -13510,16 +13445,10 @@ in the system's browser for manual download. Release with Debug Information デバッグ情報付きリリース - - - CMakeProjectManager::Internal::CMakeLocatorFilter Build CMake target CMake ターゲットをビルド - - - CMakeProjectManager::Internal::CMakeBuildSettingsWidget Build directory: ビルドディレクトリ: @@ -13672,9 +13601,6 @@ To unset a variable, use -U<variable>. CMake CMake - - - CMakeProjectManager::Internal::CMakeManager Run CMake CMake の実行 @@ -13687,10 +13613,6 @@ To unset a variable, use -U<variable>. Rescan Project プロジェクトを再スキャン - - Build - ビルド - Build File ファイルのビルド @@ -13711,16 +13633,6 @@ To unset a variable, use -U<variable>. Failed opening project "%1": Project is not a file プロジェクト "%1" が開けません: プロジェクトがファイルではありません - - - CMakeProjectManager::Internal::CMakeSettingsPage - - CMake - CMake - - - - CMakeProjectManager::Internal::CMakeRunConfiguration Run CMake kit CMake キットの実行 @@ -26835,7 +26747,7 @@ to project "%2". - CMakeProjectManager::Internal::CMakeTarget + CMakeProjectManager Desktop CMake Default target display name @@ -26843,7 +26755,7 @@ to project "%2". - QmakeProjectManager::Internal::Qt4Target + QmakeProjectManager Desktop Qt4 Desktop target display name @@ -27407,14 +27319,11 @@ Enable this if you plan to create 32-bit x86 binaries without using a dedicated - QmakeProjectManager::Internal::AddLibraryWizard + QmakeProjectManager Add Library ライブラリの追加 - - - QmakeProjectManager::Internal::LibraryTypePage Library Type ライブラリの種類 @@ -27465,13 +27374,6 @@ Neither the path to the library nor the path to its includes is added to the .pr Type タイプ - - - QmakeProjectManager::Internal::DetailsPage - - Details - 詳細 - Internal Library 内部ライブラリ @@ -27504,9 +27406,6 @@ Neither the path to the library nor the path to its includes is added to the .pr Specify the package to link to リンクするパッケージの指定 - - - QmakeProjectManager::Internal::SummaryPage Summary 概要 @@ -27515,9 +27414,6 @@ Neither the path to the library nor the path to its includes is added to the .pr The following snippet will be added to the<br><b>%1</b> file: 以下のテンプレートが追加されます<br>ファイル <b>%1</b>: - - - QmakeProjectManager::Internal::ClassList <New class> <新しいクラス> @@ -27530,9 +27426,6 @@ Neither the path to the library nor the path to its includes is added to the .pr Delete class %1 from list? クラス %1 をリストから削除しますか? - - - QmakeProjectManager::Internal::CustomWidgetWizard Qt Custom Designer Widget Qt カスタム Designer ウィジェット @@ -27541,23 +27434,14 @@ Neither the path to the library nor the path to its includes is added to the .pr Creates a Qt Custom Designer Widget or a Custom Widget Collection. Qt カスタム Designer ウィジェットかカスタムウィジェットコレクションを作成します。 - - - QmakeProjectManager::Internal::CustomWidgetWizardDialog This wizard generates a Qt Designer Custom Widget or a Qt Designer Custom Widget Collection project. このウィザードは Qt Designer カスタムウィジェットあるいは Qt Designer カスタムウィジェットコレクションプロジェクトを生成します。 - - - QmakeProjectManager::Internal::PluginGenerator Creating multiple widget libraries (%1, %2) in one project (%3) is not supported. 一つのプロジェクト(%3)で複数のウィジェットライブラリ(%1, %2)の作成はサポートしていません。 - - - QmakeProjectManager::Internal::DesktopQmakeRunConfiguration The .pro file "%1" is currently being parsed. .pro ファイル "%1" を現在解析しています。 @@ -27566,9 +27450,6 @@ Neither the path to the library nor the path to its includes is added to the .pr Qt Run Configuration Qt 実行設定 - - - QmakeProjectManager::Internal::DesktopQmakeRunConfigurationWidget Executable: 実行ファイル: @@ -27597,9 +27478,6 @@ Neither the path to the library nor the path to its includes is added to the .pr Add build library search path to LD_LIBRARY_PATH LD_LIBRARY_PATH にビルドライブラリ検索パスを追加する - - - QmakeProjectManager::Internal::ExternalQtEditor Unable to start "%1" "%1" を開始できません @@ -27608,9 +27486,6 @@ Neither the path to the library nor the path to its includes is added to the .pr The application "%1" could not be found. アプリケーション "%1" が見つかりませんでした。 - - - QmakeProjectManager::Internal::DesignerExternalEditor Qt Designer is not responding (%1). Qt Designer が無応答です(%1)。 @@ -27619,13 +27494,6 @@ Neither the path to the library nor the path to its includes is added to the .pr Unable to create server socket: %1 サーバーソケットが作成できません: %1 - - - QmakeProjectManager::Internal::LibraryDetailsController - - Linkage: - リンク方法: - %1 Dynamic %1 ダイナミック @@ -27634,10 +27502,6 @@ Neither the path to the library nor the path to its includes is added to the .pr %1 Static %1 スタティック - - Mac: - Mac: - %1 Framework %1 フレームワーク @@ -27646,9 +27510,6 @@ Neither the path to the library nor the path to its includes is added to the .pr %1 Library %1 ライブラリ - - - QmakeProjectManager::MakeStep Make Qt MakeStep display name. @@ -27658,13 +27519,6 @@ Neither the path to the library nor the path to its includes is added to the .pr Cannot find Makefile. Check your build settings. Makefile が見つかりません。ビルド設定を確認してください。 - - - QmakeProjectManager::MakeStepConfigWidget - - Override %1: - %1 の代わりに使用するコマンド: - Make: Make: @@ -27681,32 +27535,10 @@ Neither the path to the library nor the path to its includes is added to the .pr <b>Make:</b> %1 not found in the environment. <b>Make:</b> 環境に %1 が見つかりません。 - - - QmakeProjectManager::Internal::MakeStepFactory Make Make - - - QmakeProjectManager::QmakeBuildConfiguration - - General - 一般 - - - This kit cannot build this project since it does not define a Qt version. - このキットには Qt が定義されていないため、このプロジェクトをビルドできません。 - - - Error: - エラー: - - - Warning: - 警告: - The build directory contains a build for a different project, which will be overwritten. ビルドディレクトリには、別のプロジェクト用のビルドが含まれていますが、これは上書きされます。 @@ -27740,31 +27572,10 @@ Neither the path to the library nor the path to its includes is added to the .pr The mkspec has changed. mkspec が変更されました。 - - Release - Shadow build directory suffix - Non-ASCII characters in directory suffix may cause build issues. - リリース - - - Debug - Shadow build directory suffix - Non-ASCII characters in directory suffix may cause build issues. - デバッグ - - - Profile - Shadow build directory suffix - Non-ASCII characters in directory suffix may cause build issues. - プロファイル - Parsing the .pro file .pro ファイルの解析中 - - - QmakeProjectManager::QmakeBuildConfigurationFactory Release The name of the release build configuration created by default for a qmake project. @@ -27798,9 +27609,6 @@ Neither the path to the library nor the path to its includes is added to the .pr Non-ASCII characters in directory suffix may cause build issues. Profile - - - QmakeProjectManager::Internal::QmakeKitConfigWidget Qt mkspec: Qt mkspec: @@ -27809,9 +27617,6 @@ Neither the path to the library nor the path to its includes is added to the .pr The mkspec to use when building the project with qmake.<br>This setting is ignored when using other build systems. qmake でこのプロジェクトをビルドするときに用いる mkspec です。<br>他のビルドシステムを使用する場合にはこの設定は無視されます。 - - - QmakeProjectManager::QmakeKitInformation No Qt version set, so mkspec is ignored. Qt バージョンが設定されていないため、mkspec を無視します。 @@ -27828,13 +27633,6 @@ Neither the path to the library nor the path to its includes is added to the .pr Mkspec configured for qmake by the Kit. キットで設定されている qmake 用 Mkspec です。 - - - QmakeProjectManager::QmakePriFileNode - - Headers - ヘッダー - Sources ソース @@ -27859,21 +27657,10 @@ Neither the path to the library nor the path to its includes is added to the .pr Other files その他のファイル - - - QmakeProjectManager::QmakeManager Failed opening project "%1": Project is not a file プロジェクト "%1" が開けません: プロジェクトがファイルではありません - - QMake - QMake - - - - - QmakeProjectManager::QmakeProject Reading Project "%1" プロジェクト "%1" の読込中 @@ -27906,17 +27693,6 @@ Neither the path to the library nor the path to its includes is added to the .pr The .pro file "%1" could not be parsed. .pro ファイル "%1" を解析できませんでした。 - - - QmakeProjectManager::Internal::QmakeProjectImporter - - Debug - デバッグ - - - Release - リリース - No Build Found ビルドが見つかりません @@ -27925,9 +27701,6 @@ Neither the path to the library nor the path to its includes is added to the .pr No build found in %1 matching project %2. %1 にプロジェクト %2 のビルドが見つかりません。 - - - QmakeProjectManager::Internal::QmakeProjectManagerPlugin Build ビルド @@ -28000,34 +27773,11 @@ Neither the path to the library nor the path to its includes is added to the .pr QMake QMake - - - QmakeProjectManager::QMakeStep qmake QMakeStep default display name qmake - - qmake build configuration: - qmake ビルド設定: - - - Debug - デバッグ - - - Release - リリース - - - Additional arguments: - 追加の引数: - - - Effective qmake call: - 実際の qmake コマンドライン: - <b>qmake:</b> No Qt version set. Cannot run qmake. <b>qmake:</b> Qt が設定されていません。qmake を実行できませんでした。 @@ -28076,25 +27826,6 @@ Neither the path to the library nor the path to its includes is added to the .pr The option will only take effect if the project is recompiled. Do you want to recompile now? このオプションはプロジェクトの再コンパイル時に有効になります。再コンパイルを行いますか? - - - QmakeProjectManager::QMakeStepConfigWidget - - QML Debugging - QML デバッグ - - - The option will only take effect if the project is recompiled. Do you want to recompile now? - このオプションはプロジェクトの再コンパイル時に有効になります。再コンパイルを行いますか? - - - <b>qmake:</b> No Qt version set. Cannot run qmake. - <b>qmake:</b> Qt が設定されていません。qmake を実行できませんでした。 - - - <b>qmake:</b> %1 %2 - <b>qmake:</b> %1 %2 - Enable QML debugging and profiling: QML デバッグとプロファイルを有効にする: @@ -28114,13 +27845,6 @@ Neither the path to the library nor the path to its includes is added to the .pr QML デバッグを無効化します。QML プロファイラは利用可能です。 - - QmakeProjectManager::Internal::QMakeStepFactory - - qmake - qmake - - QtModulesInfo @@ -28221,7 +27945,7 @@ Neither the path to the library nor the path to its includes is added to the .pr - QmakeProjectManager::Internal::FilesPage + QmakeProjectManager Class Information クラス情報 @@ -28230,13 +27954,6 @@ Neither the path to the library nor the path to its includes is added to the .pr Specify basic information about the classes for which you want to generate skeleton source code files. ソースコードのスケルトンファイルを生成したいクラスの基本的な情報を指定してください。 - - Details - 詳細 - - - - QmakeProjectManager::Internal::GuiAppWizard Qt Widgets Application Qt ウィジェットアプリケーション @@ -28249,16 +27966,10 @@ Preselects a desktop Qt for building the application if available. デスクトップ用 Qt が存在する場合、アプリケーションのビルド用に選択します。 - - - QmakeProjectManager::Internal::GuiAppWizardDialog This wizard generates a Qt Widgets Application project. The application derives by default from QApplication and includes an empty widget. このウィザードは Qt ウイジェットアプリケーションプロジェクトを生成します。アプリケーションは QApplication を使用し、空のウィジェットを持ちます。 - - - QmakeProjectManager::Internal::LibraryWizard C++ Library C++ ライブラリ @@ -28267,9 +27978,6 @@ Preselects a desktop Qt for building the application if available. Creates a C++ library based on qmake. This can be used to create:<ul><li>a shared C++ library for use with <tt>QPluginLoader</tt> and runtime (Plugins)</li><li>a shared or static C++ library for use with another project at linktime</li></ul> qmake ベースの C++ ライブラリを作成します。以下のいずれかが作成できます。<ul><li><tt>QPluginLoader</tt> から使用する C++ 共有ライブラリとランタイム(プラグイン)</li><li>他のプロジェクトからリンクして使用する C++ の共有あるいは静的ライブラリ</li></ul> - - - QmakeProjectManager::Internal::LibraryWizardDialog Shared Library 共有ライブラリ @@ -28282,21 +27990,10 @@ Preselects a desktop Qt for building the application if available. Qt Plugin Qt プラグイン - - Type - 種類 - This wizard generates a C++ Library project. このウィザードは C++ ライブラリプロジェクトを生成します。 - - Details - 詳細 - - - - QmakeProjectManager::Internal::ModulesPage Select Required Modules 必要なモジュールの選択 @@ -28309,9 +28006,6 @@ Preselects a desktop Qt for building the application if available. Modules モジュール - - - QmakeProjectManager::Internal::SubdirsProjectWizard Subdirs Project サブディレクトリプロジェクト @@ -28333,9 +28027,6 @@ Preselects a desktop Qt for building the application if available. Title of dialog 新しいサブプロジェクト - - - QmakeProjectManager::Internal::TestWizard Qt Unit Test Qt ユニットテスト @@ -28344,9 +28035,6 @@ Preselects a desktop Qt for building the application if available. Creates a QTestLib-based unit test for a feature or a class. Unit tests allow you to verify that the code is fit for use and that there are no regressions. QTestLib ベースに機能あるいはクラス用ユニットテストを作成します。ユニットテストはコードが目的に沿ったものであるか、デグレードが無いかなどの検証を行うことができます。 - - - QmakeProjectManager::Internal::TestWizardDialog This wizard generates a Qt Unit Test consisting of a single source file with a test class. このウィザードはテストクラスを持つ単一ファイルで構成される Qt ユニットテストを生成します。 @@ -30680,7 +30368,7 @@ Do you want to save the data first? - QmakeProjectManager::QtVersion + QmakeProjectManager The build directory needs to be at the same level as the source directory. ビルドディレクトリはソースディレクトリと同じ階層にある必要があります。 @@ -35235,7 +34923,7 @@ kill しますか? - QmakeProjectManager::Internal::SubdirsProjectWizardDialog + QmakeProjectManager This wizard generates a Qt Subdirs project. Add subprojects to it later on by using the other wizards. このウィザードは Qt サブディレクトリプロジェクトを生成します。プロジェクト生成後に他のウィザードを用いてサブプロジェクトを追加してください。 @@ -39449,14 +39137,14 @@ clang の実行ファイルを設定してください。 - ClearCase::Internal::ClearCaseEditorWidget + ClearCase Annotate version "%1" バージョン "%1" のアノテーション - CMakeProjectManager::Internal::BuildDirManager + CMakeProjectManager The build directory is not for %1 but for %2 このビルドディレクトリは %2 向けで %1 向けではありません @@ -39497,9 +39185,6 @@ clang の実行ファイルを設定してください。 Failed to open %1 for reading. 読み込み用に %1 を開くのに失敗しました。 - - - CMakeProjectManager::Internal::CMakeBuildStep Make Default display name for the cmake make step. @@ -39567,24 +39252,10 @@ clang の実行ファイルを設定してください。 Display name for CMakeProjectManager::CMakeBuildStep id. CMake ビルド - - - CMakeProjectManager::CMakeBuildStep Qt Creator needs a CMake Tool set up to build. Configure a CMake Tool in the kit options. ビルドする為には CMake ツールの設定が必要です。キットのオプションの CMake ツールを設定してください。 - - - CMakeProjectManager::Internal::CMakeBuildStepConfigWidget - - Tool arguments: - ツールの引数: - - - Targets: - ターゲット: - Build CMakeProjectManager::CMakeBuildStepConfigWidget display name. @@ -39594,17 +39265,11 @@ clang の実行ファイルを設定してください。 <b>No build configuration found on this kit.</b> <b>このキットからビルド設定が見つかりません。</b> - - - CMakeProjectManager::Internal::CMakeBuildStepFactory Build Display name for CMakeProjectManager::CMakeBuildStep id. ビルド - - - CMakeProjectManager::Internal::CMakeKitConfigWidget CMake Tool: CMake ツール: @@ -39617,9 +39282,6 @@ clang の実行ファイルを設定してください。 <No CMake Tool available> <CMake ツールが見つかりません> - - - CMakeProjectManager::Internal::CMakeGeneratorKitConfigWidget CMake Generator: CMake ジェネレータ: @@ -39632,9 +39294,6 @@ clang の実行ファイルを設定してください。 CMake generator defines how a project is built when using CMake.<br>This setting is ignored when using other build systems. CMake ジェネレータは CMake 使用時のプロジェクトビルド方法を定義します。<br>他のビルドシステム使用時には無視されます。 - - - CMakeProjectManager::Internal::CMakeConfigurationKitConfigWidget Change... 変更... @@ -39647,21 +39306,10 @@ clang の実行ファイルを設定してください。 Default configuration passed to CMake when setting up a project. プロジェクト設定時に既定の設定が CMake に渡されます。 - - Edit CMake Configuration - CMake 設定の編集 - Enter one variable per line with the variable name separated from the variable value by "=".<br>You may provide a type hint by adding ":TYPE" before the "=". 一行に付き一つの変数をその名と値を "=" で繋ぐ形式で入力してください。<br>"=" の前に ":TYPE" 形式で型のヒントを指定できます。 - - - CMakeProjectManager::CMakeKitInformation - - CMake - CMake - Unconfigured 未設定 @@ -39670,9 +39318,6 @@ clang の実行ファイルを設定してください。 Path to the cmake executable cmake 実行ファイルへのパス - - - CMakeProjectManager::CMakeGeneratorKitInformation CMake Tool is unconfigured, CMake generator will be ignored. CMake ツールが設定されていないため、CMake ジェネレータは無視されます。 @@ -39689,13 +39334,6 @@ clang の実行ファイルを設定してください。 CMake Generator CMake ジェネレータ - - <Use Default Generator> - <既定のジェネレータを使用> - - - - CMakeProjectManager::CMakeConfigurationKitInformation CMake configuration has no path to qmake binary set, even though the kit has a valid Qt version. キットに有効な Qt が存在するにもかかわらず、CMake の設定に qmake へのパスが見つかりません。 @@ -39720,13 +39358,6 @@ clang の実行ファイルを設定してください。 CMake configuration has a path to a C++ compiler set, that does not match up with the compiler path configured in the tool chain of the kit. CMake の設定で指定されている C++ コンパイラのパスがキットのツールチェインのパスとは異なります。 - - CMake Configuration - CMake 設定 - - - - CMakeProjectManager::CMakeProject No cmake tool set. CMake ツールが見つかりません。 @@ -39735,9 +39366,6 @@ clang の実行ファイルを設定してください。 No compilers set in kit. キットにコンパイラが設定されていません。 - - - CMakeProjectManager::CMakeSettingsPage yes はい @@ -39778,9 +39406,6 @@ clang の実行ファイルを設定してください。 Help file: ヘルプファイル: - - - CMakeProjectManager::Internal::CMakeToolConfigWidget Add 追加 @@ -39809,13 +39434,6 @@ clang の実行ファイルを設定してください。 New CMake 新しい CMake - - CMake - CMake - - - - CMakeProjectManager::CMakeToolManager CMake at %1 CMake(パス: %1) @@ -39824,21 +39442,10 @@ clang の実行ファイルを設定してください。 System CMake at %1 システムの CMake(パス: %1) - - CMake - CMake - - - - CMakeProjectManager::ConfigModel (ADVANCED) (拡張) - - <UNSET> - <未定義> - Setting 設定 @@ -39847,10 +39454,6 @@ clang の実行ファイルを設定してください。 Value - - Advanced - 拡張 - Core::BaseFileWizard @@ -44055,7 +43658,7 @@ Android パッケージソースディレクトリのファイルはビルドデ - QmakePriFileNode + QmakeProjectManager Failed 失敗 @@ -44068,9 +43671,6 @@ Android パッケージソースディレクトリのファイルはビルドデ File Error ファイルエラー - - - QmakeProFileNode Error while parsing file %1. Giving up. ファイル %1 の解析中にエラーが発生しました。中断します。 @@ -45882,22 +45482,11 @@ Output: - CMakeProjectManager::Internal::CMakeBuildConfiguration + CMakeProjectManager CMake configuration set by the kit was overridden in the project. キットで設定された CMake 設定はプロジェクトで上書きされました。 - - Minimum Size Release - 最小サイズリリース - - - Release with Debug Information - デバッグ情報付きリリース - - - - CMakeProjectManager::Internal::CMakeEditorFactory CMake Editor CMake エディタ @@ -46063,14 +45652,11 @@ Output: - QmakeProjectManager::Internal::FilesSelectionWizardPage + QmakeProjectManager Files ファイル - - - QmakeProjectManager::Internal::SimpleProjectWizardDialog Import Existing Project 既存プロジェクトのインポート @@ -46091,9 +45677,6 @@ Output: File Selection ファイル選択 - - - QmakeProjectManager::Internal::SimpleProjectWizard Import as qmake Project (Limited Functionality) qmake プロジェクトとしてインポート(機能限定版) @@ -49967,278 +49550,7 @@ Output: - ClearCase::Internal::ClearCasePluginPrivate - - Editing Derived Object: %1 - 派生オブジェクトの編集中: %1 - - - C&learCase - C&learCase - - - Check Out... - チェックアウト... - - - Check &Out "%1"... - "%1" をチェックアウト(&O)... - - - Meta+L,Meta+O - Meta+L,Meta+O - - - Alt+L,Alt+O - Alt+L,Alt+O - - - Check &In... - チェックイン(&I)... - - - Check &In "%1"... - "%1" をチェックイン(&I)... - - - Meta+L,Meta+I - Meta+L,Meta+I - - - Alt+L,Alt+I - Alt+L,Alt+I - - - Undo Check Out - チェックアウトを元に戻す - - - &Undo Check Out "%1" - "%1" のチェックアウトを元に戻す(&U) - - - Meta+L,Meta+U - Meta+L,Meta+U - - - Alt+L,Alt+U - Alt+L,Alt+U - - - Undo Hijack - ハイジャックを元に戻す - - - Undo Hi&jack "%1" - "%1" のハイジャックを元に戻す(&J) - - - Meta+L,Meta+R - Meta+L,Meta+R - - - Alt+L,Alt+R - Alt+L,Alt+R - - - &Diff "%1" - "%1" の差分表示(&D) - - - Meta+L,Meta+D - Meta+L,Meta+D - - - Alt+L,Alt+D - Alt+L,Alt+D - - - History Current File - 現在のファイルの履歴 - - - &History "%1" - "%1" の履歴(&H) - - - Meta+L,Meta+H - Meta+L,Meta+H - - - Alt+L,Alt+H - Alt+L,Alt+H - - - &Annotate "%1" - "%1" のアノテーション(&A) - - - Meta+L,Meta+A - Meta+L,Meta+A - - - Alt+L,Alt+A - Alt+L,Alt+A - - - Add File... - ファイルを追加... - - - Add File "%1" - ファイル "%1" を追加 - - - Diff A&ctivity... - アクティビティの差分表示(&C)... - - - Ch&eck In Activity - アクティビティをチェックイン(&E) - - - Chec&k In Activity "%1"... - アクティビティ "%1" をチェックイン(&K)... - - - Update Index - インデックス更新 - - - Update View - ビュー更新 - - - U&pdate View "%1" - ビュー "%1" 更新(&P) - - - Check In All &Files... - すべてのファイルをチェックイン(&F)... - - - Meta+L,Meta+F - Meta+L,Meta+F - - - Alt+L,Alt+F - Alt+L,Alt+F - - - View &Status - ステータス更新(&S) - - - Meta+L,Meta+S - Meta+L,Meta+S - - - Alt+L,Alt+S - Alt+L,Alt+S - - - Check In - チェックイン - - - Do you want to undo the check out of "%1"? - "%1" のチェックアウトを元に戻しますか? - - - Undo Hijack File - ハイジャックファイルを元に戻す - - - Do you want to undo hijack of "%1"? - "%1" のハイジャックを元に戻しますか? - - - External diff is required to compare multiple files. - 外部 diff ツールは、複数のファイルを比較できる必要があります。 - - - Enter Activity - アクティビティに入る - - - Activity Name - アクティビティ名 - - - Check In Activity - アクティビティをチェックイン - - - Another check in is currently being executed. - 別のチェックインが実行中です。 - - - There are no modified files. - 変更されたファイルはありません。 - - - No ClearCase executable specified. - 実行可能な ClearCase が指定されていません。 - - - ClearCase Checkout - ClearCase チェックアウト - - - File is already checked out. - ファイルは、既にチェックアウトされています。 - - - Set current activity failed: %1 - アクティビティ設定失敗: %1 - - - Enter &comment: - コメントを入力(&C): - - - ClearCase Add File %1 - ClearCase ファイル %1 を追加 - - - ClearCase Remove Element %1 - ClearCase 要素 %1 を削除 - - - This operation is irreversible. Are you sure? - この操作は元に戻せませんが、よろしいですか? - - - ClearCase Remove File %1 - ClearCase ファイル %1 を削除 - - - ClearCase Rename File %1 -> %2 - ClearCase ファイル名変更 %1 -> %2 - - - Activity Headline - アクティビティ ヘッドライン - - - Enter activity headline - アクティビティ ヘッドラインに入る - - - Updating ClearCase Index - ClearCase インデックスの更新中 - - - Check &Out - チェックアウト(&O) - - - &Hijack - ハイジャック(&H) - - - - CMakeProjectManager::CMakeBuildConfiguration + CMakeProjectManager Changing Build Directory ビルドディレクトリの変更 @@ -50255,144 +49567,6 @@ Output: The CMake flag for the provisioning profile プロビジョニングプロファイルの CMake フラグ - - Minimum Size Release - 最小サイズリリース - - - Release with Debug Information - デバッグ情報付きリリース - - - - CMakeProjectManager::CMakeConfigItem - - Failed to open %1 for reading. - 読み込み用に %1 を開くのに失敗しました。 - - - - CMakeProjectManager::Internal::CMakeKitAspect - - <No CMake Tool available> - <CMake ツールが見つかりません> - - - - CMakeProjectManager::CMakeKitAspect - - The CMake Tool to use when building a project with CMake.<br>This setting is ignored when using other build systems. - CMake ツールはプロジェクトを CMake でビルドする際に使用します。<br>他のビルドシステム使用時には無視されます。 - - - CMake - CMake - - - Unconfigured - 未設定 - - - Path to the cmake executable - cmake 実行ファイルへのパス - - - - CMakeProjectManager::Internal::CMakeGeneratorKitAspect - - Change... - 変更... - - - CMake Generator - CMake ジェネレータ - - - - CMakeProjectManager::CMakeGeneratorKitAspect - - CMake generator defines how a project is built when using CMake.<br>This setting is ignored when using other build systems. - CMake ジェネレータは CMake 使用時のプロジェクトビルド方法を定義します。<br>他のビルドシステム使用時には無視されます。 - - - CMake Tool is unconfigured, CMake generator will be ignored. - CMake ツールが設定されていないため、CMake ジェネレータは無視されます。 - - - CMake Tool does not support the configured generator. - CMake ツールがジェネレータに対応していません。 - - - <Use Default Generator> - <既定のジェネレータを使用> - - - CMake Generator - CMake ジェネレータ - - - - CMakeProjectManager::Internal::CMakeConfigurationKitAspect - - Change... - 変更... - - - Edit CMake Configuration - CMake 設定の編集 - - - Enter one variable per line with the variable name separated from the variable value by "=".<br>You may provide a type hint by adding ":TYPE" before the "=". - 一行に付き一つの変数をその名と値を "=" で繋ぐ形式で入力してください。<br>"=" の前に ":TYPE" 形式で型のヒントを指定できます。 - - - - CMakeProjectManager::CMakeConfigurationKitAspect - - CMake Configuration - CMake 設定 - - - Default configuration passed to CMake when setting up a project. - プロジェクト設定時に既定の設定が CMake に渡されます。 - - - CMake configuration has no path to qmake binary set, even though the kit has a valid Qt version. - キットに有効な Qt が存在するにもかかわらず、CMake の設定に qmake へのパスが見つかりません。 - - - CMake configuration has a path to a qmake binary set, even though the kit has no valid Qt version. - キットに有効な Qt が存在しないにもかかわらず、CMake の設定に qmake へのパスが存在します。 - - - CMake configuration has no path to a C++ compiler set, even though the kit has a valid tool chain. - キットに有効なツールチェインが存在するにもかかわらず、CMake の設定に C++ コンパイラへのパスが見つかりません。 - - - CMake configuration has a path to a C++ compiler set, even though the kit has no valid tool chain. - キットに有効なツールチェインが存在しないにもかかわらず、CMake の設定に C++ コンパイラへのパスが存在します。 - - - - CMakeProjectManager::Internal::BuildCMakeTargetLocatorFilter - - Build CMake target - CMake ターゲットをビルド - - - - CMakeProjectManager::Internal::CMakeProcess - - Configuring "%1" - "%1" の設定中 - - - - CMakeProjectManager::Internal::CMakeProjectPlugin - - Build - ビルド - Build "%1" "%1" のビルド @@ -50403,13 +49577,6 @@ Output: CMake - - CMakeProjectManager::Internal::CMakeSpecificSettingWidget - - CMake - CMake - - ConanPackageManager::Internal::ConanInstallStep @@ -53038,7 +52205,7 @@ Stepping into the module or setting breakpoints by file and line is expected to - QmakeProjectManager::RunSystemAspect + QmakeProjectManager Run 実行 @@ -53047,96 +52214,10 @@ Stepping into the module or setting breakpoints by file and line is expected to Ignore 無視 - - - QmakeProjectManager::Internal::QmakeKitAspect - - The mkspec to use when building the project with qmake.<br>This setting is ignored when using other build systems. - qmake でこのプロジェクトをビルドするときに用いる mkspec です。<br>他のビルドシステムを使用する場合にはこの設定は無視されます。 - - - No Qt version set, so mkspec is ignored. - Qt バージョンが設定されていないため、mkspec を無視します。 - - - Mkspec not found for Qt version. - 指定された mkspec が Qt にありません。 - - - mkspec - mkspec - - - - QmakeProjectManager::QmakeMakeStep - - Cannot find Makefile. Check your build settings. - Makefile が見つかりません。ビルド設定を確認してください。 - - - - QmakeProjectManager::QmakePriFile Headers ヘッダ - - Sources - ソース - - - Forms - フォーム - - - State charts - 状態遷移図 - - - Resources - リソース - - - QML - QML - - - Other files - その他のファイル - - - - QmakePriFile - - Failed - 失敗 - - - Could not write project file %1. - プロジェクトファイル %1 に書き込みできませんでした。 - - - File Error - ファイルエラー - - - - QmakeProFile - - Error while parsing file %1. Giving up. - ファイル %1 の解析中にエラーが発生しました。中断します。 - - - Could not find .pro file for subdirectory "%1" in "%2". - "%2" に サブディレクトリ "%1" 用 .pro ファイルが見つかりませんでした。 - - - - QmakeProjectManager::QmakeBuildSystem - - Reading Project "%1" - プロジェクト "%1" の読込中 - QmlDesigner::AssetExporter diff --git a/share/qtcreator/translations/qtcreator_pl.ts b/share/qtcreator/translations/qtcreator_pl.ts index d67bfd5e7d2..a61f64966f7 100644 --- a/share/qtcreator/translations/qtcreator_pl.ts +++ b/share/qtcreator/translations/qtcreator_pl.ts @@ -984,7 +984,7 @@ - QmakeProjectManager::Internal::ClassDefinition + QmakeProjectManager Form Formularz @@ -1089,9 +1089,6 @@ Icon files (*.png *.ico *.jpg *.xpm *.tif *.svg) Pliki z ikonami (*.png *.ico *.jpg *.xpm *.tif *.svg) - - - QmakeProjectManager::Internal::CustomWidgetPluginWizardPage WizardPage StronaKreatora @@ -1132,9 +1129,6 @@ Plugin Details Szczegóły wtyczki - - - QmakeProjectManager::Internal::CustomWidgetWidgetsWizardPage Custom Qt Widget Wizard Kreator własnych widżetów Qt @@ -1159,9 +1153,6 @@ Custom Widgets Własne widżety - - - QmakeProjectManager::Internal::QmakeProjectConfigWidget Shadow Build Directory Katalog kompilacji w innym miejscu @@ -2081,7 +2072,7 @@ Przyczyna: %3 - CMakeProjectManager::Internal::CMakeBuildSettingsWidget + CMakeProjectManager Build directory: Katalog wersji: @@ -2135,13 +2126,6 @@ Przyczyna: %3 CMake - - CMakeProjectManager::Internal::CMakeSettingsPage - - CMake - CMake - - Core::BaseFileWizard @@ -8462,7 +8446,7 @@ do projektu "%2". - QmakeProjectManager::Internal::ClassList + QmakeProjectManager <New class> <Nowa klasa> @@ -8475,9 +8459,6 @@ do projektu "%2". Delete class %1 from list? Czy usunąć klasę %1 z listy? - - - QmakeProjectManager::Internal::CustomWidgetWizard Qt Custom Designer Widget Własny widżet Qt Designera @@ -8486,23 +8467,14 @@ do projektu "%2". Creates a Qt Custom Designer Widget or a Custom Widget Collection. Tworzy własny widżet Qt Designera lub kolekcję własnych widżetów. - - - QmakeProjectManager::Internal::CustomWidgetWizardDialog This wizard generates a Qt Designer Custom Widget or a Qt Designer Custom Widget Collection project. Ten kreator generuje projekt własnego widżetu Qt Designera lub projekt kolekcji własnych widżetów Qt4 Designera. - - - QmakeProjectManager::Internal::PluginGenerator Creating multiple widget libraries (%1, %2) in one project (%3) is not supported. Tworzenie wielu bibliotek z widżetami (%1, %2) w jednym projekcie (%3) nie jest obsługiwane. - - - QmakeProjectManager::Internal::ExternalQtEditor Unable to start "%1" Nie można uruchomić "%1" @@ -8511,9 +8483,6 @@ do projektu "%2". The application "%1" could not be found. Nie można odnaleźć aplikacji "%1". - - - QmakeProjectManager::Internal::DesignerExternalEditor Qt Designer is not responding (%1). Qt Designer nie odpowiada (%1). @@ -8522,9 +8491,6 @@ do projektu "%2". Unable to create server socket: %1 Nie można utworzyć gniazda serwera: %1 - - - QmakeProjectManager::MakeStep Make Qt MakeStep display name. @@ -8534,9 +8500,6 @@ do projektu "%2". Cannot find Makefile. Check your build settings. Nie można odnaleźć pliku Makefile. Sprawdź swoje ustawienia budowania. - - - QmakeProjectManager::MakeStepConfigWidget Override %1: Nadpisz %1: @@ -8557,16 +8520,10 @@ do projektu "%2". <b>Make:</b> %1 not found in the environment. <b>Make:</b> Nie odnaleziono %1 w środowisku. - - - QmakeProjectManager::Internal::MakeStepFactory Make Make - - - QmakeProjectManager::QMakeStep qmake QMakeStep default display name @@ -8592,9 +8549,6 @@ do projektu "%2". <no Make step found> <brak kroku Make> - - - QmakeProjectManager::QMakeStepConfigWidget QML Debugging Debugowanie QML @@ -8627,23 +8581,10 @@ do projektu "%2". Disables QML debugging. QML profiling will still work. Blokuje debugowanie QML, profilowanie QML pozostawia włączone. - - - QmakeProjectManager::Internal::QMakeStepFactory - - qmake - qmake - - - - QmakeProjectManager::QmakeManager QMake QMake - - - QmakeProjectManager::Internal::QmakeProjectManagerPlugin Run qmake Uruchom qmake @@ -8805,7 +8746,7 @@ do projektu "%2". - QmakeProjectManager::Internal::FilesPage + QmakeProjectManager Class Information Informacje o klasie @@ -8818,9 +8759,6 @@ do projektu "%2". Details Szczegóły - - - QmakeProjectManager::Internal::GuiAppWizard Qt Widgets Application Aplikacja Qt Widgets @@ -8833,16 +8771,10 @@ Preselects a desktop Qt for building the application if available. Wstępnie wybiera wersję desktopową Qt do budowania aplikacji (jeśli jest dostępna). - - - QmakeProjectManager::Internal::GuiAppWizardDialog This wizard generates a Qt Widgets Application project. The application derives by default from QApplication and includes an empty widget. Ten kreator generuje projekt aplikacji Qt Widgets. Aplikacja domyślnie dziedziczy z QApplication i zawiera pusty widżet. - - - QmakeProjectManager::Internal::LibraryWizard C++ Library Biblioteka C++ @@ -8851,9 +8783,6 @@ Wstępnie wybiera wersję desktopową Qt do budowania aplikacji (jeśli jest dos Creates a C++ library based on qmake. This can be used to create:<ul><li>a shared C++ library for use with <tt>QPluginLoader</tt> and runtime (Plugins)</li><li>a shared or static C++ library for use with another project at linktime</li></ul> Tworzy bibliotekę C++ bazującą na qmake. Umożliwia utworzenie:<ul><li>dzielonej biblioteki C++, zdolnej do ładowania wtyczek za pomocą <tt>QPluginLoader</tt></li><li>dzielonej lub statycznej biblioteki C++, którą można dowiązać do innego projektu</li></ul> - - - QmakeProjectManager::Internal::LibraryWizardDialog Shared Library Biblioteka współdzielona @@ -8874,13 +8803,6 @@ Wstępnie wybiera wersję desktopową Qt do budowania aplikacji (jeśli jest dos This wizard generates a C++ Library project. Ten kreator generuje projekt biblioteki C++. - - Details - Szczegóły - - - - QmakeProjectManager::Internal::ModulesPage Select Required Modules Wybierz wymagane moduły @@ -10636,11 +10558,7 @@ Możesz odłożyć zmiany lub je porzucić. - QmakeProjectManager::Internal::TestWizardPage - - WizardPage - StronaKreatora - + QmakeProjectManager Specify basic information about the test class for which you want to generate skeleton source code file. Podaj podstawowe informacje o klasie testowej, dla której ma zostać wygenerowany szkielet pliku z kodem źródłowym. @@ -10685,10 +10603,6 @@ Możesz odłożyć zmiany lub je porzucić. Test Class Information Informacje o klasie testowej - - Details - Szczegóły - VcsBase::CleanDialog @@ -10946,7 +10860,7 @@ Dla projektów CMake, upewnij się, że zmienna QML_IMPORT_PATH jest obecna w CM - CMakeProjectManager::Internal::CMakeRunConfiguration + CMakeProjectManager Run CMake kit Uruchom zestaw CMake @@ -10959,9 +10873,6 @@ Dla projektów CMake, upewnij się, że zmienna QML_IMPORT_PATH jest obecna w CM The executable is not built by the current build configuration Plik wykonywalny nie został zbudowany przez bieżącą konfigurację budowania - - - CMakeProjectManager::Internal::CMakeTarget Desktop CMake Default target display name @@ -12238,7 +12149,7 @@ Dla projektów CMake, upewnij się, że zmienna QML_IMPORT_PATH jest obecna w CM - QmakeProjectManager::Internal::TestWizard + QmakeProjectManager Qt Unit Test Test jednostkowy Qt @@ -12247,9 +12158,6 @@ Dla projektów CMake, upewnij się, że zmienna QML_IMPORT_PATH jest obecna w CM Creates a QTestLib-based unit test for a feature or a class. Unit tests allow you to verify that the code is fit for use and that there are no regressions. Tworzy test jednostkowy funkcjonalności lub klasy, dziedzicząc z QTestLib. Testy jednostkowe pozwalają na weryfikowanie działania kodu i wykrywanie regresji. - - - QmakeProjectManager::Internal::TestWizardDialog This wizard generates a Qt Unit Test consisting of a single source file with a test class. Ten kreator generuje test jednostkowy Qt składający się z pojedynczego pliku źródłowego z klasą testową. @@ -12540,7 +12448,7 @@ które można ustawić poniżej. - QmakeProjectManager::QmakeProject + QmakeProjectManager Reading Project "%1" Odczyt projektu "%1" @@ -12576,7 +12484,7 @@ które można ustawić poniżej. - QmakeProjectManager::QtVersion + QmakeProjectManager The build directory needs to be at the same level as the source directory. Katalog przeznaczony do budowania musi być na tym samym poziomie co katalog ze źródłami. @@ -13055,7 +12963,7 @@ Identyfikatory muszą rozpoczynać się małą literą. - QmakeProjectManager::Internal::LibraryDetailsWidget + QmakeProjectManager Library: Biblioteka: @@ -13810,14 +13718,11 @@ zamiast w jego katalogu instalacyjnym. - QmakeProjectManager::Internal::AddLibraryWizard + QmakeProjectManager Add Library Dodaj bibliotekę - - - QmakeProjectManager::Internal::LibraryTypePage Library Type Typ biblioteki @@ -13844,10 +13749,6 @@ Neither the path to the library nor the path to its includes is added to the .pr Links to a system library using pkg-config. Dowiązuje bibliotekę systemową używając pkg-config. - - Type - Typ - External library Zewnętrzna biblioteka @@ -13868,9 +13769,6 @@ Adds the library and include paths to the .pro file. Dowiązuje bibliotekę, która jest wewnątrz drzewa budowy projektu. Ścieżki do biblioteki i jej nagłówków zostaną dodane do pliku .pro. - - - QmakeProjectManager::Internal::DetailsPage System Library Biblioteka systemowa @@ -13891,10 +13789,6 @@ Adds the library and include paths to the .pro file. External Library Zewnętrzna biblioteka - - Details - Szczegóły - Specify the library to link to and the includes path Wskaż bibliotekę, która ma zostać dowiązana i podaj ścieżkę do jej nagłówków @@ -13907,9 +13801,6 @@ Adds the library and include paths to the .pro file. Choose the project file of the library to link to Wybierz plik projektu biblioteki, która ma zostać dowiązana - - - QmakeProjectManager::Internal::SummaryPage Summary Podsumowanie @@ -13918,13 +13809,6 @@ Adds the library and include paths to the .pro file. The following snippet will be added to the<br><b>%1</b> file: Do pliku <b>%1</b><br>zostanie dodany następujący fragment: - - - QmakeProjectManager::Internal::LibraryDetailsController - - Linkage: - Dowiązanie: - %1 Dynamic %1 Dynamiczne @@ -13933,10 +13817,6 @@ Adds the library and include paths to the .pro file. %1 Static %1 Statyczne - - Mac: - Mac: - %1 Framework %1 Framework @@ -15041,7 +14921,7 @@ Local pulls are not applied to the master branch. - CMakeProjectManager::Internal::CMakeManager + CMakeProjectManager Run CMake Uruchom CMake @@ -16177,7 +16057,7 @@ Ponowić próbę? - QmakeProjectManager::Internal::SubdirsProjectWizard + QmakeProjectManager Subdirs Project Projekt z podkatalogami @@ -16199,9 +16079,6 @@ Ponowić próbę? Title of dialog Nowy podprojekt - - - QmakeProjectManager::Internal::SubdirsProjectWizardDialog This wizard generates a Qt Subdirs project. Add subprojects to it later on by using the other wizards. Ten kreator generuje projekt z podkatalogami Qt. Podprojekty mogą być dodane później przy użyciu innych kreatorów. @@ -17748,7 +17625,7 @@ Do you want to save the data first? - QmakeProjectManager::QmakeBuildConfiguration + QmakeProjectManager Could not parse Makefile. Błąd parsowania pliku Makefile. @@ -17773,9 +17650,6 @@ Do you want to save the data first? Parsing the .pro file Parsowanie pliku .pro - - - QmakeProjectManager::QmakeBuildConfigurationFactory Release Shadow build directory suffix @@ -19990,30 +19864,15 @@ Przedrostki te, w dodatku do nazwy bieżącego pliku, używane są do przełącz - QmakeProjectManager::Internal::MakeStep + QmakeProjectManager Make arguments: Argumenty make'a: - - Override %1: - Nadpisz %1: - - - - QmakeProjectManager::Internal::QMakeStep qmake build configuration: Konfiguracja qmake: - - Debug - Debug - - - Release - Release - Additional arguments: Dodatkowe argumenty: @@ -21577,7 +21436,7 @@ Wersje Qt można dodać w: Opcje > Budowanie i uruchamianie > Wersje Qt. - CMakeProjectManager::Internal::CMakeLocatorFilter + CMakeProjectManager Build CMake target Zbudowanie programu CMake'owego @@ -23008,7 +22867,7 @@ poinstruuje Qt Creatora o URI. - ClearCase::Internal::CheckOutDialog + ClearCase Check Out Kopia robocza @@ -23034,9 +22893,6 @@ poinstruuje Qt Creatora o URI. &Checkout comment: - - - ClearCase::Internal::SettingsPage Configuration Konfiguracja @@ -23118,9 +22974,6 @@ poinstruuje Qt Creatora o URI. Do &not prompt for comment during checkout or check-in - - - ClearCase::Internal::UndoCheckOut Dialog Dialog @@ -23133,9 +22986,6 @@ poinstruuje Qt Creatora o URI. &Save copy of the file with a '.keep' extension &Zachowaj kopię pliku z rozszerzeniem ".keep" - - - ClearCase::Internal::VersionSelector Confirm Version to Check Out Potwierdź wersję dla kopii roboczej @@ -23174,7 +23024,7 @@ poinstruuje Qt Creatora o URI. - ClearCase::Internal::ActivitySelector + ClearCase Select &activity: Wybierz &aktywność: @@ -23187,9 +23037,6 @@ poinstruuje Qt Creatora o URI. Keep item activity Zachowaj aktywność elementu - - - ClearCase::Internal::ClearCasePlugin C&learCase C&learCase @@ -23482,31 +23329,18 @@ poinstruuje Qt Creatora o URI. Enter activity headline - - - ClearCase::Internal::ClearCaseSubmitEditor ClearCase Check In Wrzuć do ClearCase - - - ClearCase::Internal::ClearCaseSubmitEditorWidget Chec&k in even if identical to previous version W&rzuć, nawet jeśli wersja jest identyczna z wersją poprzednią - - &Preserve file modification time - Zachowaj czas modyfikacji &pliku - &Check In &Wrzuć - - - ClearCase::Internal::SettingsPageWidget ClearCase Command Komenda ClearCase @@ -23628,7 +23462,7 @@ You can choose another communication channel here, such as a serial line or cust - ClearCase::Internal::ClearCaseControl + ClearCase Check &Out @@ -23974,7 +23808,7 @@ You can choose another communication channel here, such as a serial line or cust - QmakeProjectManager::Internal::QmakeKitConfigWidget + QmakeProjectManager The mkspec to use when building the project with qmake.<br>This setting is ignored when using other build systems. Mkspec, który należy użyć do budowania projektów qmake.<br>To ustawienie zostanie zignorowane dla innych systemów budowania. @@ -23983,9 +23817,6 @@ You can choose another communication channel here, such as a serial line or cust Qt mkspec: Qt mkspec: - - - QmakeProjectManager::QmakeKitInformation No Qt version set, so mkspec is ignored. Brak ustawionej wersji Qt, mkspec zostanie zignorowany. @@ -28213,7 +28044,7 @@ Proszę zamknąć wszystkie instancje tej aplikacji przed uruchomieniem budowani - QmakeProjectManager::Internal::Qt4Target + QmakeProjectManager Desktop Qt4 Desktop target display name @@ -28276,7 +28107,7 @@ Proszę zamknąć wszystkie instancje tej aplikacji przed uruchomieniem budowani - QmakeProjectManager::Internal::DesktopQmakeRunConfiguration + QmakeProjectManager The .pro file "%1" is currently being parsed. Trwa parsowanie pliku .pro "%1". @@ -28285,9 +28116,6 @@ Proszę zamknąć wszystkie instancje tej aplikacji przed uruchomieniem budowani Qt Run Configuration Konfiguracja uruchamiania Qt - - - QmakeProjectManager::Internal::DesktopQmakeRunConfigurationWidget Executable: Plik wykonywalny: @@ -28317,17 +28145,6 @@ Proszę zamknąć wszystkie instancje tej aplikacji przed uruchomieniem budowani Dodaj ścieżkę poszukiwań bibliotek na potrzeby budowania do zmiennej LD_LIBRARY_PATH - - QmakeProjectManager::Internal::QmakeProjectImporter - - Debug - Debug - - - Release - Release - - TabViewToolAction @@ -30646,7 +30463,7 @@ Zainstaluj SDK o wersji %1 lub wyższej. - ClearCase::Internal::ClearCaseEditorWidget + ClearCase Annotate version "%1" Dołącz adnotację do wersji "%1" @@ -34389,7 +34206,7 @@ Pliki z katalogu źródłowego pakietu Android są kopiowane do katalogu budowan - CMakeProjectManager::Internal::CMakeKitConfigWidget + CMakeProjectManager CMake Tool: Narzędzie CMake: @@ -34402,17 +34219,10 @@ Pliki z katalogu źródłowego pakietu Android są kopiowane do katalogu budowan <No CMake Tool available> <Brak narzędzia CMake> - - - CMakeProjectManager::CMakeKitInformation CMake version %1 is unsupported. Please update to version 3.0 or later. Wersja CMake %1 nie jest obsługiwana. Należy zainstalować wersję 3.0 lub nowszą. - - CMake - CMake - Unconfigured Nieskonfigurowane @@ -34421,9 +34231,6 @@ Pliki z katalogu źródłowego pakietu Android są kopiowane do katalogu budowan Path to the cmake executable Ścieżka do pliku wykonywalnego cmake - - - CMakeProjectManager::CMakeSettingsPage (Default) what default??? @@ -34461,9 +34268,6 @@ Pliki z katalogu źródłowego pakietu Android są kopiowane do katalogu budowan Path: Ścieżka: - - - CMakeProjectManager::Internal::CMakeToolConfigWidget Add Dodaj @@ -34492,9 +34296,6 @@ Pliki z katalogu źródłowego pakietu Android są kopiowane do katalogu budowan New CMake Nowy CMake - - - CMakeProjectManager::CMakeToolManager CMake at %1 CMake w %1 @@ -36532,7 +36333,7 @@ itself takes time. - CMakeProjectManager::CMakeProject + CMakeProjectManager No cmake tool set. Nie ustawiono narzędzia cmake. @@ -37912,7 +37713,7 @@ Ustaw prawdziwy plik wykonywalny Clang. - CMakeProjectManager::Internal::BuildDirManager + CMakeProjectManager Failed to create temporary directory "%1". Nie można utworzyć katalogu tymczasowego "%1". @@ -37945,16 +37746,10 @@ Ustaw prawdziwy plik wykonywalny Clang. Apply Changes to Project Zastosuj zmiany w projekcie - - - CMakeProjectManager::Internal::CMakeBuildConfiguration CMake configuration set by the kit was overridden in the project. Konfiguracja CMake, ustawiona przez zestaw narzędzi, została nadpisana przez projekt. - - - CMakeProjectManager::Internal::CMakeBuildStep CMake Build Default display name for the cmake make step. @@ -37982,16 +37777,10 @@ Ustaw prawdziwy plik wykonywalny Clang. Błąd parsowania QMake: %1 - - - CMakeProjectManager::CMakeBuildStep The build configuration is currently disabled. Konfiguracja budowania aktualnie wyłączona. - - - CMakeProjectManager::Internal::CMakeBuildStepConfigWidget Tool arguments: Argumenty narzędzia: @@ -38009,17 +37798,11 @@ Ustaw prawdziwy plik wykonywalny Clang. <b>No build configuration found on this kit.</b> <b>Brak konfiguracji budowania dla tego zestawu narzędzi.</b> - - - CMakeProjectManager::Internal::CMakeBuildStepFactory Build Display name for CMakeProjectManager::CMakeBuildStep id. Budowanie - - - CMakeProjectManager::Internal::CMakeGeneratorKitConfigWidget Change... Zmień... @@ -38060,13 +37843,6 @@ Ustaw prawdziwy plik wykonywalny Clang. Toolset: Zestaw narzędzi: - - - CMakeProjectManager::Internal::CMakeConfigurationKitConfigWidget - - Change... - Zmień... - CMake Configuration Konfiguracja CMake @@ -38083,9 +37859,6 @@ Ustaw prawdziwy plik wykonywalny Clang. Enter one variable per line with the variable name separated from the variable value by "=".<br>You may provide a type hint by adding ":TYPE" before the "=". W każdej linii podaj jedną zmienną. Nazwa zmiennej powinna być oddzielona od wartości zmiennej przy użyciu "=".<br>Informacje o typie można dodać poprzez umieszczenie ":TYP" przed "=". - - - CMakeProjectManager::CMakeGeneratorKitInformation CMake Tool is unconfigured, CMake generator will be ignored. Narzędzie CMake nie jest skonfigurowane. Generator CMake zostanie zignorowany. @@ -38118,17 +37891,10 @@ Ustaw prawdziwy plik wykonywalny Clang. <br>Toolset: %1 <br>Zestaw narzędzi: %1 - - CMake Generator - Generator CMake - <Use Default Generator> <Użyj domyślnego generatora> - - - CMakeProjectManager::CMakeConfigurationKitInformation CMake configuration has no path to qmake binary set, even though the kit has a valid Qt version. Brak ścieżki do pliku wykonywalnego qmake w konfiguracji CMake, mimo że zestaw narzędzi posiada poprawną wersję Qt. @@ -38169,17 +37935,6 @@ Ustaw prawdziwy plik wykonywalny Clang. CMake configuration has a path to a C++ compiler set, even though the kit has no valid tool chain. Konfiguracja CMake posiada ustawioną ścieżkę do kompilatora C++, mimo że zestaw narzędzi nie posiada poprawnej ścieżki. - - CMake Configuration - Konfiguracja CMake - - - - CMakeProjectManager::ConfigModel - - <UNSET> - <USUNIĘTO> - Kit value: %1 Wartość zestawu narzędzi: %1 @@ -38192,10 +37947,6 @@ Ustaw prawdziwy plik wykonywalny Clang. Value Wartość - - Advanced - Zaawansowane - Core::Internal::ThemeChooser @@ -39300,7 +39051,7 @@ Komunikat: - CMakeProjectManager::Internal::CMakeEditorFactory + CMakeProjectManager CMake Editor Edytor CMake @@ -39541,14 +39292,11 @@ w ścieżce. - QmakeProjectManager::Internal::FilesSelectionWizardPage + QmakeProjectManager Files Pliki - - - QmakeProjectManager::Internal::SimpleProjectWizardDialog Import Existing Project Import istniejącego projektu @@ -39569,9 +39317,6 @@ w ścieżce. File Selection Wybór pliku - - - QmakeProjectManager::Internal::SimpleProjectWizard Import as qmake Project (Limited Functionality) Zaimportuj jako projekt qmake (ograniczona funkcjonalność) @@ -42013,7 +41758,7 @@ Błąd: %2 - CMakeProjectManager::CMakeConfigItem + CMakeProjectManager Failed to open %1 for reading. Błąd otwierania %1 do odczytu. @@ -42042,7 +41787,7 @@ Błąd: %2 - CMakeProjectManager::Internal::CMakeProjectPlugin + CMakeProjectManager CMake SnippetProvider @@ -42056,9 +41801,6 @@ Błąd: %2 Build "%1" Zbuduj "%1" - - - CMakeProjectManager Current CMake: %1 Bieżący CMake: %1 @@ -42067,9 +41809,6 @@ Błąd: %2 Not in CMakeCache.txt Brak w CMakeCache.txt - - - CMakeProjectManager::Internal::ServerMode Running "%1 %2" in %3. Uruchamianie "%1 %2" w %3. @@ -42154,9 +41893,6 @@ Błąd: %2 Received a signal in reply to a request. Otrzymano sygnał w odpowiedzi na żądanie. - - - CMakeProjectManager::Internal::ServerModeReader Configuring "%1" Konfiguracja "%1" @@ -42189,21 +41925,10 @@ Błąd: %2 <Headers> <Nagłówki> - - - CMakeProjectManager::Internal::TeaLeafReader The build directory is not for %1 but for %2 Katalog budowania nie jest przeznaczony dla %1, lecz dla %2 - - Running "%1 %2" in %3. - Uruchamianie "%1 %2" w %3. - - - Configuring "%1" - Konfiguracja "%1" - *** cmake process crashed. *** Proces cmake przerwał pracę. @@ -42503,7 +42228,7 @@ Termin wygaśnięcia: %3 - QmakeProjectManager::QmakePriFile + QmakeProjectManager Headers Nagłówki @@ -42532,9 +42257,6 @@ Termin wygaśnięcia: %3 Other files Inne pliki - - - QmakePriFile Failed Niepoprawnie zakończone @@ -42547,9 +42269,6 @@ Termin wygaśnięcia: %3 File Error Błąd pliku - - - QmakeProFile Error while parsing file %1. Giving up. Błąd parsowania pliku %1. Przetwarzanie przerwane. diff --git a/share/qtcreator/translations/qtcreator_ru.ts b/share/qtcreator/translations/qtcreator_ru.ts index d11b80268f5..b7f138be074 100644 --- a/share/qtcreator/translations/qtcreator_ru.ts +++ b/share/qtcreator/translations/qtcreator_ru.ts @@ -6074,16 +6074,10 @@ For example, "Revision: 15" will leave the branch at revision 15.Value requested by kit: %1 Запрошенное комплектом значение: %1 - - - CMakeProjectManager::CMakeConfigItem Failed to open %1 for reading. Не удалось открыть %1 для чтения. - - - CMakeProjectManager::CMakeConfigurationKitAspect CMake Configuration Конфигурация CMake @@ -6132,9 +6126,6 @@ For example, "Revision: 15" will leave the branch at revision 15.CMake configuration has a path to a C++ compiler set that does not match the compiler path configured in the tool chain of the kit. В конфигурации CMake указан путь к компилятору С++, но он не совпадает с заданным в инструментарии комплекта. - - - CMakeProjectManager::CMakeGeneratorKitAspect CMake generator Генератор CMake @@ -6183,9 +6174,6 @@ For example, "Revision: 15" will leave the branch at revision 15.CMake Generator Генератор CMake - - - CMakeProjectManager::CMakeKitAspect CMake Tool Программа CMake @@ -6210,9 +6198,6 @@ For example, "Revision: 15" will leave the branch at revision 15.Path to the cmake executable Путь к программе cmake - - - CMakeProjectManager::CMakeProject No cmake tool set. Программа cmake не указана. @@ -6221,9 +6206,6 @@ For example, "Revision: 15" will leave the branch at revision 15.No compilers set in kit. У комплекта не заданы компиляторы. - - - CMakeProjectManager::CMakeSettingsPage Version: %1<br>Supports fileApi: %2 Версия: %1<br>Поддерживается fileApi: %2 @@ -6288,20 +6270,10 @@ For example, "Revision: 15" will leave the branch at revision 15.Help file: Файл справки: - - - CMakeProjectManager::CMakeToolManager System CMake at %1 Системная CMake в %1 - - CMake - CMake - - - - CMakeProjectManager::ConfigModel Key Ключ @@ -6322,9 +6294,6 @@ For example, "Revision: 15" will leave the branch at revision 15.Value Значение - - - CMakeProjectManager::ConfigModelItemDelegate Select a file for %1 Выберите файл для %1 @@ -6333,9 +6302,6 @@ For example, "Revision: 15" will leave the branch at revision 15.Select a directory for %1 Выберите каталог для %1 - - - CMakeProjectManager::Internal Failed to set up CMake file API support. Qt Creator cannot extract project information. Не удалось настроить поддержку API файла CMake. Qt Creator не может извлечь информацию о проекте. @@ -6408,16 +6374,10 @@ For example, "Revision: 15" will leave the branch at revision 15.Invalid target file generated by CMake: Broken indexes in target details. CMake создал неверный цели файл: повреждены индексы в деталях цели. - - - CMakeProjectManager::Internal::BuildCMakeTargetLocatorFilter Build CMake target Собрать цель CMake - - - CMakeProjectManager::Internal::CMakeBuildConfiguration Changing Build Directory Изменение каталога сборки @@ -6434,9 +6394,6 @@ For example, "Revision: 15" will leave the branch at revision 15.Release with Debug Information Выпуск с отладочной информацией - - - CMakeProjectManager::Internal::CMakeBuildSettingsWidget Filter Фильтр @@ -6497,10 +6454,6 @@ For example, "Revision: 15" will leave the branch at revision 15.Apply Configuration Changes Применить изменения - - <UNSET> - <не задано> - bool display string for cmake type BOOLEAN @@ -6526,13 +6479,6 @@ For example, "Revision: 15" will leave the branch at revision 15.Принудительно булевый/файл/каталог/строка Принудительно %1 - - CMake - CMake - - - - CMakeProjectManager::Internal::CMakeBuildStep CMake Build Default display name for the cmake make step. @@ -6567,9 +6513,6 @@ For example, "Revision: 15" will leave the branch at revision 15.Display name for CMakeProjectManager::CMakeBuildStep id. Сборка - - - CMakeProjectManager::Internal::CMakeBuildStepConfigWidget CMake arguments: Параметры CMake: @@ -6587,9 +6530,6 @@ For example, "Revision: 15" will leave the branch at revision 15.CMakeProjectManager::CMakeBuildStepConfigWidget display name. Сборка - - - CMakeProjectManager::Internal::CMakeBuildSystem Scan "%1" project tree Сканирование дерева проекта «%1» @@ -6618,9 +6558,6 @@ For example, "Revision: 15" will leave the branch at revision 15.CMakeCache.txt file not found. Не удалось найти файл CMakeCache.txt. - - - CMakeProjectManager::Internal::CMakeConfigurationKitAspect Change... Изменить... @@ -6633,13 +6570,6 @@ For example, "Revision: 15" will leave the branch at revision 15.Enter one variable per line with the variable name separated from the variable value by "=".<br>You may provide a type hint by adding ":TYPE" before the "=". Задавайте значения переменных по одной в строке, отделяя значение от имени символом "=".<br>Можно указывать тип, добавляя «:ТИП» перед "=".<br>Например: CMAKE_BUILD_TYPE:STRING=DebWithRelInfo. - - - CMakeProjectManager::Internal::CMakeGeneratorKitAspect - - Change... - Изменить... - %1 - %2, Platform: %3, Toolset: %4 %1 - %2, Платформа: %3, Инструментарий: %4 @@ -6648,10 +6578,6 @@ For example, "Revision: 15" will leave the branch at revision 15.<none> <нет> - - CMake Generator - Генератор CMake - Generator: Генератор: @@ -6668,16 +6594,10 @@ For example, "Revision: 15" will leave the branch at revision 15.Toolset: Инструментарий: - - - CMakeProjectManager::Internal::CMakeKitAspect <No CMake Tool available> <Программа CMake недоступна> - - - CMakeProjectManager::Internal::CMakeManager Run CMake Запустить CMake @@ -6730,9 +6650,6 @@ For example, "Revision: 15" will leave the branch at revision 15.Build File is not supported for generator "%1" Операция «Собрать файл» не поддерживается генератором «%1» - - - CMakeProjectManager::Internal::CMakeProcess Running %1 in %2. Работа %1 на %2. @@ -6753,25 +6670,15 @@ For example, "Revision: 15" will leave the branch at revision 15.CMake process exited with exit code %1. Процесс CMake завершился с кодом %1. - - - CMakeProjectManager::Internal::CMakeProjectPlugin CMake SnippetProvider CMake - - Build - Собрать - Build "%1" Собрать «%1» - - - CMakeProjectManager::Internal::CMakeSpecificSettingForm Determines whether file paths are copied to the clipboard for pasting to the CMakeLists.txt file when you add new files to CMake projects. Определяет, будут ли копироваться в буфер обмена пути файлов для вставки в файл CMakeLists.txt при добавлении их в проект CMake. @@ -6792,16 +6699,6 @@ For example, "Revision: 15" will leave the branch at revision 15.Copy file paths Копировать - - - CMakeProjectManager::Internal::CMakeSpecificSettingWidget - - CMake - CMake - - - - CMakeProjectManager::Internal::CMakeToolConfigWidget Add Добавить @@ -6830,13 +6727,6 @@ For example, "Revision: 15" will leave the branch at revision 15.New CMake Новый CMake - - CMake - CMake - - - - CMakeProjectManager::Internal::CMakeToolTreeItem CMake executable path does not exist. Не найден путь к программе CMake. @@ -6853,9 +6743,6 @@ For example, "Revision: 15" will leave the branch at revision 15.CMake executable does not provided required IDE integration features. Не указана программа CMake необходимая для среды разработки. - - - CMakeProjectManager::Internal::FileApi <Build Directory> <Каталог сборки> @@ -6864,38 +6751,18 @@ For example, "Revision: 15" will leave the branch at revision 15.<Other Locations> <Другие места> - - - CMakeProjectManager::Internal::FileApiReader Parsing has been canceled. Разбор был отменён. - - - CMakeProjectManager::Internal::InitialCMakeArgumentsAspect Initial CMake parameters: Начальные параметры CMake: - - - CMakeProjectManager::Internal::OpenCMakeTargetLocatorFilter Open CMake target Открыть цель CMake - - - CMakeProjectManager::Internal::ProjectTreeHelper - - <Build Directory> - <Каталог сборки> - - - <Other Locations> - <Другие места> - <Headers> <Заголовки> @@ -8072,7 +7939,7 @@ Set a valid executable first. - ClearCase::Internal::ActivitySelector + ClearCase Select &activity: Выбрать &активность: @@ -8085,9 +7952,6 @@ Set a valid executable first. Keep item activity Сохранить активность элемента - - - ClearCase::Internal::CheckOutDialog Check Out Создание изменяемой копии @@ -8113,16 +7977,10 @@ Set a valid executable first. &Checkout comment: &Комментарий: - - - ClearCase::Internal::ClearCaseEditorWidget Annotate version "%1" Аннотация версии «%1» - - - ClearCase::Internal::ClearCasePluginPrivate Editing Derived Object: %1 Изменение производного объекта: %1 @@ -8399,31 +8257,18 @@ Set a valid executable first. &Hijack &Исправить - - - ClearCase::Internal::ClearCaseSubmitEditor ClearCase Check In Фиксация ClearCase - - - ClearCase::Internal::ClearCaseSubmitEditorWidget Chec&k in even if identical to previous version Фиксироват&ь, даже если совпадает с предыдущей версией - - &Preserve file modification time - &Сохранять время изменения файлов - &Check In &Фиксировать - - - ClearCase::Internal::SettingsPage Configuration Конфигурация @@ -8503,9 +8348,6 @@ Set a valid executable first. Do &not prompt for comment during checkout or check-in &Не спрашивать комментарии при получении и фиксации - - - ClearCase::Internal::SettingsPageWidget ClearCase Command Команда ClearCase @@ -8522,9 +8364,6 @@ Set a valid executable first. ClearCase ClearCase - - - ClearCase::Internal::UndoCheckOut Dialog @@ -8537,9 +8376,6 @@ Set a valid executable first. &Save copy of the file with a '.keep' extension &Сохранить копию файла с расширением «.keep» - - - ClearCase::Internal::VersionSelector Confirm Version to Check Out Подтвердите версию для извлечения @@ -37486,7 +37322,7 @@ The affected files are: - QmakePriFile + QmakeProjectManager Failed Сбой @@ -37499,9 +37335,6 @@ The affected files are: File Error Ошибка файла - - - QmakeProFile Error while parsing file %1. Giving up. Ошибка разбора файла %1. Отмена. @@ -37510,25 +37343,16 @@ The affected files are: Could not find .pro file for subdirectory "%1" in "%2". Не удалось найти .pro файл для подкаталога «%1» в «%2». - - - QmakeProjectManager "%1" is used by qmake, but "%2" is configured in the kit. Please update your kit (%3) or choose a mkspec for qmake that matches your target environment better. «%1» используется qmake, но «%2» задан в комплекте. Обновите комплект (%3) или выберите подходящей для вашей целевой платформы mkspec для qmake. - - - QmakeProjectManager::Internal::AddLibraryWizard Add Library Добавить библиотеку - - - QmakeProjectManager::Internal::BaseQmakeProjectWizardDialog Required Qt features not present. Отсутствуют необходимые особенности Qt. @@ -37541,9 +37365,6 @@ Please update your kit (%3) or choose a mkspec for qmake that matches your targe Qt version does not provide all features. Профиль Qt не имеет всех особенностей. - - - QmakeProjectManager::Internal::ClassDefinition The header file Заголовочный файл @@ -37644,9 +37465,6 @@ Please update your kit (%3) or choose a mkspec for qmake that matches your targe Icon files (*.png *.ico *.jpg *.xpm *.tif *.svg) Файлы значков (*.png *.ico *.jpg *.xpm *.tif *.svg) - - - QmakeProjectManager::Internal::ClassList <New class> <Новый класс> @@ -37659,9 +37477,6 @@ Please update your kit (%3) or choose a mkspec for qmake that matches your targe Delete class %1 from list? Удалить класс %1 из списка? - - - QmakeProjectManager::Internal::CustomWidgetPluginWizardPage WizardPage @@ -37702,9 +37517,6 @@ Please update your kit (%3) or choose a mkspec for qmake that matches your targe Plugin Details Подробнее о модуле - - - QmakeProjectManager::Internal::CustomWidgetWidgetsWizardPage Custom Qt Widget Wizard Мастер пользовательских виджетов @@ -37729,9 +37541,6 @@ Please update your kit (%3) or choose a mkspec for qmake that matches your targe Custom Widgets Особые виджеты - - - QmakeProjectManager::Internal::CustomWidgetWizard Qt Custom Designer Widget Пользовательский виджет Qt Designer @@ -37740,16 +37549,10 @@ Please update your kit (%3) or choose a mkspec for qmake that matches your targe Creates a Qt Custom Designer Widget or a Custom Widget Collection. Создание пользовательского виджета Qt Designer или набора пользовательских виджетов. - - - QmakeProjectManager::Internal::CustomWidgetWizardDialog This wizard generates a Qt Designer Custom Widget or a Qt Designer Custom Widget Collection project. Этот мастер создаст пользовательский виджет или набор пользовательских виджетов для Qt Designer. - - - QmakeProjectManager::Internal::DesignerExternalEditor Qt Designer is not responding (%1). Qt Designer не отвечает (%1). @@ -37758,9 +37561,6 @@ Please update your kit (%3) or choose a mkspec for qmake that matches your targe Unable to create server socket: %1 Невозможно создать серверный сокет: %1 - - - QmakeProjectManager::Internal::DetailsPage Details Подробнее @@ -37797,9 +37597,6 @@ Please update your kit (%3) or choose a mkspec for qmake that matches your targe Specify the package to link to Выберите пакет для компоновки - - - QmakeProjectManager::Internal::ExternalQtEditor Unable to start "%1" Не удалось запустить «%1» @@ -37808,9 +37605,6 @@ Please update your kit (%3) or choose a mkspec for qmake that matches your targe The application "%1" could not be found. Не удалось найти приложение «%1». - - - QmakeProjectManager::Internal::LibraryDetailsController Linkage: Компоновка: @@ -37835,9 +37629,6 @@ Please update your kit (%3) or choose a mkspec for qmake that matches your targe %1 Library %1 Библиотека - - - QmakeProjectManager::Internal::LibraryDetailsWidget Library: Библиотека: @@ -37870,10 +37661,6 @@ Please update your kit (%3) or choose a mkspec for qmake that matches your targe Windows Windows - - Linkage: - Компоновка: - Dynamic Динамическая @@ -37882,10 +37669,6 @@ Please update your kit (%3) or choose a mkspec for qmake that matches your targe Static Статическая - - Mac: - Mac: - Library Библиотека @@ -37914,9 +37697,6 @@ Please update your kit (%3) or choose a mkspec for qmake that matches your targe Library type: Тип библиотеки: - - - QmakeProjectManager::Internal::LibraryTypePage Library Type Тип библиотеки @@ -37967,16 +37747,10 @@ Neither the path to the library nor the path to its includes is added to the .pr Type Тип - - - QmakeProjectManager::Internal::PluginGenerator Creating multiple widget libraries (%1, %2) in one project (%3) is not supported. Создание нескольких библиотек виджетов (%1, %2) в одном проекте (%3) не поддерживается. - - - QmakeProjectManager::Internal::QmakeKitAspect Qt mkspec Qt mkspec @@ -38001,9 +37775,6 @@ Neither the path to the library nor the path to its includes is added to the .pr Mkspec configured for qmake by the kit. Mkspec настроенный комплектом для qmake. - - - QmakeProjectManager::Internal::QmakeProjectImporter Debug Отладка @@ -38012,9 +37783,6 @@ Neither the path to the library nor the path to its includes is added to the .pr Release Выпуск - - - QmakeProjectManager::Internal::QmakeProjectManagerPlugin Build Собрать @@ -38079,9 +37847,6 @@ Neither the path to the library nor the path to its includes is added to the .pr QMake QMake - - - QmakeProjectManager::Internal::QmakeSettingsPage Warn if a project's source and build directories are not at the same level Предупреждать, если каталоги сборки и исходников проекта находятся на разных уровнях @@ -38102,9 +37867,6 @@ Neither the path to the library nor the path to its includes is added to the .pr Qmake QMake - - - QmakeProjectManager::Internal::SubdirsProjectWizard Subdirs Project Проект с поддиректориями @@ -38126,16 +37888,10 @@ Neither the path to the library nor the path to its includes is added to the .pr Title of dialog Создание подпроекта - - - QmakeProjectManager::Internal::SubdirsProjectWizardDialog This wizard generates a Qt Subdirs project. Add subprojects to it later on by using the other wizards. Этот мастер создаст проект Qt с подкаталогами. Затем с помощью других мастеров добавьте в него подпроекты. - - - QmakeProjectManager::Internal::SummaryPage Summary Итог @@ -38144,9 +37900,6 @@ Neither the path to the library nor the path to its includes is added to the .pr The following snippet will be added to the<br><b>%1</b> file: Следующий код будет добавлен в<br>файл <b>%1</b>: - - - QmakeProjectManager::QMakeStep qmake QMakeStep default display name @@ -38172,9 +37925,6 @@ Neither the path to the library nor the path to its includes is added to the .pr <no Make step found> <этап Make не найден> - - - QmakeProjectManager::QMakeStepConfigWidget QML Debugging Отладка QML @@ -38183,14 +37933,6 @@ Neither the path to the library nor the path to its includes is added to the .pr qmake build configuration: Конфигурация сборки qmake: - - Debug - Отладка - - - Release - Выпуск - Additional arguments: Дополнительные параметры: @@ -38223,9 +37965,6 @@ Neither the path to the library nor the path to its includes is added to the .pr <b>qmake:</b> %1 %2 <b>qmake:</b> %1 %2 - - - QmakeProjectManager::QmakeBuildConfiguration General Основное @@ -38293,9 +38032,6 @@ Neither the path to the library nor the path to its includes is added to the .pr Non-ASCII characters in directory suffix may cause build issues. Profile - - - QmakeProjectManager::QmakeBuildSystem Reading Project "%1" Чтение проекта «%1» @@ -38308,9 +38044,6 @@ Neither the path to the library nor the path to its includes is added to the .pr Cannot parse project "%1": No kit selected. Не удалось разобрать проект «%1»: комплект не выбран. - - - QmakeProjectManager::QmakeMakeStep Cannot find Makefile. Check your build settings. Не удалось обнаружить Makefile. Проверьте настройки сборки. @@ -38319,9 +38052,6 @@ Neither the path to the library nor the path to its includes is added to the .pr The build directory is not at the same level as the source directory, which could be the reason for the build failure. Каталог сборки не на том же уровне, что каталог исходников. Из-за этого может возникнуть сбой сборки. - - - QmakeProjectManager::QmakePriFile Headers Заголовочные @@ -38354,9 +38084,6 @@ Neither the path to the library nor the path to its includes is added to the .pr Generated Files Созданные файлы - - - QmakeProjectManager::QmakeProject No Qt version set in kit. Для комплекта не задан профиль Qt. diff --git a/share/qtcreator/translations/qtcreator_sl.ts b/share/qtcreator/translations/qtcreator_sl.ts index ad42e92e2ad..e36ea3677b6 100644 --- a/share/qtcreator/translations/qtcreator_sl.ts +++ b/share/qtcreator/translations/qtcreator_sl.ts @@ -280,7 +280,7 @@ - CMakeProjectManager::Internal::CMakeBuildConfigurationFactory + CMakeProjectManager Build Zgradi @@ -301,9 +301,6 @@ New Configuration Name: Ime nove nastavitve: - - - CMakeProjectManager::Internal::CMakeBuildSettingsWidget Reconfigure project: Ponastavi projekt: @@ -312,16 +309,10 @@ &Change &Spremeni - - - CMakeProjectManager::Internal::CMakeOpenProjectWizard CMake Wizard Čarovnik za CMake - - - CMakeProjectManager::Internal::InSourceBuildPage Qt Creator has detected an <b>in-source-build in %1</b> which prevents shadow builds. Qt Creator will not allow you to change the build directory. If you want a shadow build, clean your source directory and re-open the project. Qt Creator je zaznal <b>gradnjo znotraj mape %1 z izvorno kodo</b>, kar preprečuje gradnje izven te mape, zato vam Qt Creator ne bo dovolil spremeniti mape za gradnjo. Če želite gradnjo v ločeni mapi, počistite mapo z izvorno kodo in projekt odprite znova. @@ -330,9 +321,6 @@ Build Location Mesto gradnje - - - CMakeProjectManager::Internal::CMakeRunPage Please specify the path to the cmake executable. No cmake executable was found in the path. Določite pot do programa cmake. Programa cmak ni bilo moč najti v poti. @@ -437,9 +425,6 @@ MinGW Generator Ustvarjalnik za MinGW - - - CMakeProjectManager::Internal::CMakeSettingsPage CMake CMake @@ -448,9 +433,6 @@ Executable: Program: - - - CMakeProjectManager::Internal::MakeStepConfigWidget Additional arguments: Dodatni argumenti: @@ -476,9 +458,6 @@ <b>Unknown Toolchain</b> <b>Neznana veriga orodij</b> - - - CMakeProjectManager::Internal::ShadowBuildPage Please enter the directory in which you want to build your project. Vnesite mapo, v kateri želite zgraditi svoj projekt. @@ -491,10 +470,6 @@ Build directory: Mapa za gradnjo: - - Build Location - Mesto gradnje - CPlusPlus::OverviewModel @@ -8453,7 +8428,7 @@ v sistem za nadzor različic (%2)? - QMakeStep + QmakeProjectManager Additional arguments: Dodatni argumenti: @@ -8517,7 +8492,7 @@ v sistem za nadzor različic (%2)? - QmakeProjectManager::Internal::ConsoleAppWizard + QmakeProjectManager Qt Console Application Konzolni program Qt @@ -8530,16 +8505,10 @@ Preselects a desktop Qt for building the application if available. Če je na voljo, za gradnjo programa Izbere Qt za namizje. - - - QmakeProjectManager::Internal::ConsoleAppWizardDialog This wizard generates a Qt4 console application project. The application derives from QCoreApplication and does not provide a GUI. Ta čarovnik ustvari projekt konzolnega programa Qt 4. Program je izpeljan iz QCoreApplication in nima grafičnega uporabniškega vmesnika. - - - QmakeProjectManager::Internal::EmptyProjectWizard Empty Qt Project Prazen projekt Qt @@ -8548,16 +8517,10 @@ Preselects a desktop Qt for building the application if available. Creates a qmake-based project without any files. This allows you to create an application without any default classes. Ustvari projekt temelječ na QMake, ki ne vsebuje nobene datoteke. To vam omogoča ustvariti program brez privzetega razreda. - - - QmakeProjectManager::Internal::EmptyProjectWizardDialog This wizard generates an empty Qt4 project. Add files to it later on by using the other wizards. Ta čarovnik ustvari prazen projekt Qt 4. Datoteke dodajte kasneje z uporabo drugih čarovnikov. - - - QmakeProjectManager::Internal::FilesPage Class Information Podatki o razredih @@ -8566,9 +8529,6 @@ Preselects a desktop Qt for building the application if available. Specify basic information about the classes for which you want to generate skeleton source code files. Podajte osnovne podatke o razredih, za katere želite ustvariti datoteke z ogrodjem izvorne kode. - - - QmakeProjectManager::Internal::GuiAppWizard Qt Gui Application Grafični program Qt @@ -8585,9 +8545,6 @@ Preselects a desktop Qt for building the application if available. The template file '%1' could not be opened for reading: %2 Datoteke s predlogo »%1« ni bilo moč odpreti za branje: %2 - - - QmakeProjectManager::Internal::GuiAppWizardDialog This wizard generates a Qt4 GUI application project. The application derives by default from QApplication and includes an empty widget. Ta čarovnik ustvari projekt programa Qt 4 z grafičnim uporabniškim vmesnikom. Program je privzeto izpeljan iz QApplication in vsebuje prazen gradnik. @@ -8596,9 +8553,6 @@ Preselects a desktop Qt for building the application if available. Details Podrobnosti - - - QmakeProjectManager::Internal::LibraryWizard C++ Library Knjižnica C++ @@ -8607,9 +8561,6 @@ Preselects a desktop Qt for building the application if available. Creates a C++ library based on qmake. This can be used to create:<ul><li>a shared C++ library for use with <tt>QPluginLoader</tt> and runtime (Plugins)</li><li>a shared or static C++ library for use with another project at linktime</li></ul>. Ustvari knjižnico C++ temelječo na QMake. To lahko uporabite, da ustvarite:<ul><li>deljeno knjižnico C++ za uporabo s <tt>QPluginLoader</tt>, ko program že teče (vstavki)</li><li>deljeno ali statično knjižnico C++ za uporabo v drugem projektu v času povezovanja</li></ul> - - - QmakeProjectManager::Internal::LibraryWizardDialog Shared Library Deljena knjižnica @@ -8634,10 +8585,6 @@ Preselects a desktop Qt for building the application if available. Symbian Specific Posebno za Symbian - - Details - Podrobnosti - Shared library Deljena knjižnica @@ -8650,9 +8597,6 @@ Preselects a desktop Qt for building the application if available. Qt 4 plugin Vstavek Qt 4 - - - QmakeProjectManager::Internal::ModulesPage Select Required Modules Izberite potrebne module @@ -8665,9 +8609,6 @@ Preselects a desktop Qt for building the application if available. Select required modules Izberite potrebne module - - - QmakeProjectManager::Internal::ProjectLoadWizard Project Setup Nastavitev projekta @@ -8676,9 +8617,6 @@ Preselects a desktop Qt for building the application if available. Project setup Nastavitev projekta - - - QmakeProjectManager::Internal::QmakePriFileNode Headers Glave @@ -8747,9 +8685,6 @@ Preselects a desktop Qt for building the application if available. Error while reading PRO file %1: %2 Napaka med branjem projektne datoteke %1: %2 - - - QmakeProjectManager::Internal::QmakeProjectConfigWidget <a href="import">Import existing build</a> <a href="import">Uvozi obstoječo gradnjo</a> @@ -8795,22 +8730,6 @@ Preselects a desktop Qt for building the application if available. Warning: Opozorilo: - - %1 Debug - Name of a debug build configuration to created by a project wizard, %1 being the Qt version name. We recommend not translating it. - - %1, za razhroščevanje - - - %1 Release - Name of a release build configuration to created by a project wizard, %1 being the Qt version name. We recommend not translating it. - - %1, za izdajo - - - <No tool chain selected> - <izbrano ni nobeno zaporedje orodij> - An incompatible build exists in %1, which will be overwritten. %1 build directory @@ -8865,9 +8784,6 @@ Preselects a desktop Qt for building the application if available. Building in subdirectories of the source directory is not supported by qmake. QMake ne podpira gradnje v podmapah mape z izvorno kodo. - - - QmakeProjectManager::Internal::QmakeProjectManagerPlugin Run qmake Zaženi qmake @@ -8900,9 +8816,6 @@ Preselects a desktop Qt for building the application if available. Build in %1 Zgradi v %1 - - - QmakeProjectManager::Internal::QmakeRunConfiguration The .pro file is currently being parsed. Datoteko *.pro se trenutno razčlenjuje. @@ -8927,9 +8840,6 @@ Preselects a desktop Qt for building the application if available. Qt4 RunConfiguration Qt4 nastavitve za zaganjanje - - - QmakeProjectManager::Internal::QmakeRunConfigurationWidget Arguments: Argumenti: @@ -8958,18 +8868,6 @@ Preselects a desktop Qt for building the application if available. Base environment for this runconfiguration: Osnovno okolje za te nastavitve zagona: - - Clean Environment - Čisto okolje - - - System Environment - Sistemsko okolje - - - Build Environment - Okolje za gradnjo - Executable: Izvršljiva datoteka: @@ -8986,9 +8884,6 @@ Preselects a desktop Qt for building the application if available. Name: Ime: - - - QmakeProjectManager::MakeStep Make Qt4 MakeStep display name. @@ -9010,9 +8905,6 @@ Preselects a desktop Qt for building the application if available. Could not find make command: %1 in the build environment Ni bilo moč najti ukaza make: %1 v okolju za gradnjo - - - QmakeProjectManager::MakeStepConfigWidget Override %1: Povozi %1: @@ -9025,16 +8917,10 @@ Preselects a desktop Qt for building the application if available. <b>Make:</b> %1 %2 in %3 <b>Make:</b> %1 %2 v %3 - - - QmakeProjectManager::Internal::MakeStepFactory Make Make - - - QmakeProjectManager::QMakeStep qmake QMakeStep default display name @@ -9078,9 +8964,6 @@ Preselects a desktop Qt for building the application if available. QMakeStep display name. QMake - - - QmakeProjectManager::QMakeStepConfigWidget Building helpers Pomočniki za gradnjo @@ -9097,10 +8980,6 @@ Preselects a desktop Qt for building the application if available. Enable QML debugging: Omogoči razhroščevanje QML: - - Link QML debugging library: - Poveži razhroščevalno knjižnico QML: - Might make your application vulnerable. Only use in a safe environment. Vaš program lahko postane ranljiv. Uporabite le v varnem okolju. @@ -9109,16 +8988,6 @@ Preselects a desktop Qt for building the application if available. <No Qt version> <ni različice Qt> - - - QmakeProjectManager::Internal::QMakeStepFactory - - qmake - QMake - - - - QmakeProjectManager::QmakeManager Full path to the bin/ install directory of the current project's Qt version. Celotna pot do mape »bin« z namestitvijo različice Qt za trenutni projekt. @@ -11711,7 +11580,7 @@ Za uporabo v polje Iskalnika vtipkajte to bližnjico in presledek ter nato iskan - QmakeProjectManager::Internal::ClassDefinition + QmakeProjectManager Form Obrazec @@ -11839,9 +11708,6 @@ Za uporabo v polje Iskalnika vtipkajte to bližnjico in presledek ter nato iskan Icon files (*.png *.ico *.jpg *.xpm *.tif *.svg) Datoteke z ikono (*.png *.ico *.jpg *.xpm *.tif *.svg) - - - QmakeProjectManager::Internal::CustomWidgetPluginWizardPage WizardPage StranČarovnika @@ -11886,9 +11752,6 @@ Za uporabo v polje Iskalnika vtipkajte to bližnjico in presledek ter nato iskan icons.qrc icons.qrc - - - QmakeProjectManager::Internal::CustomWidgetWidgetsWizardPage Custom Qt Widget Wizard Čarovnik za gradnike Qt po meri @@ -12318,11 +12181,7 @@ Za uporabo v polje Iskalnika vtipkajte to bližnjico in presledek ter nato iskan - CMakeProjectManager::Internal::CMakeRunConfigurationWidget - - Arguments: - Argumenti: - + CMakeProjectManager Select Working Directory Izberite delovno mapo @@ -13335,7 +13194,7 @@ Razlog: %2 - QmakeProjectManager::Internal::ClassList + QmakeProjectManager <New class> <nov razred> @@ -13348,9 +13207,6 @@ Razlog: %2 Delete class %1 from list? Ali želite izbrisati razred %1 s seznama? - - - QmakeProjectManager::Internal::CustomWidgetWizard Qt Custom Designer Widget Gradnik za Qt Designer po meri @@ -13359,9 +13215,6 @@ Razlog: %2 Creates a Qt Custom Designer Widget or a Custom Widget Collection. Ustvari gradnik za Qt Designer po meri ali pa zbirko gradnikov po meri - - - QmakeProjectManager::Internal::CustomWidgetWizardDialog This wizard generates a Qt4 Designer Custom Widget or a Qt4 Designer Custom Widget Collection project. Ta čarovnik ustvari projekt gradnika po meri za Qt Designer ali pa projekt zbirke gradnikov po meri za Qt Designer. @@ -13374,9 +13227,6 @@ Razlog: %2 Plugin Details Podrobnosti vstavka - - - QmakeProjectManager::Internal::PluginGenerator Creating multiple widget libraries (%1, %2) in one project (%3) is not supported. Ustvarjanje več knjižnic gradnikov (%1, %2) v enem projektu (%3) ni podprto. @@ -13389,9 +13239,6 @@ Razlog: %2 Cannot open %1: %2 Ni moč odpreti %1: %2 - - - QmakeProjectManager::Internal::ExternalQtEditor Unable to start "%1" Ni moč zagnati »%1« @@ -13400,9 +13247,6 @@ Razlog: %2 The application "%1" could not be found. Programa »%1« ni bilo moč najti. - - - QmakeProjectManager::Internal::DesignerExternalEditor Qt Designer is not responding (%1). Qt Designer se ne odziva (%1). @@ -13725,23 +13569,11 @@ Razlog: %2 - CMakeProjectManager::Internal::CMakeRunConfiguration + CMakeProjectManager Run CMake target Zaženi cilj CMake - - Clean Environment - Čisto okolje - - - System Environment - Sistemsko okolje - - - Build Environment - Okolje za gradnjo - The executable is not built by the current buildconfiguration Izvršljiva datoteka ni zgrajena s trenutno nastavitvijo gradnje @@ -14534,7 +14366,7 @@ Spremembe lahko zapišete na stran ali pa jih zavržete. - QmakeProjectManager::Internal::TargetSetupPage + QmakeProjectManager Setup targets for your project Nastavite cilje za svoj projekt @@ -14575,11 +14407,6 @@ Spremembe lahko zapišete na stran ali pa jih zavržete. Is this an import of an existing build or a new one? Nova - - Qt Creator can set up the following targets for project <b>%1</b>: - %1: Project name - Qt Creator lahko nastavi naslednje cilje za projekt <b>%1</b>: - Choose a directory to scan for additional shadow builds Izberite mapo, v kateri se bo preveril obstoj dodatne gradnje @@ -14593,23 +14420,6 @@ Spremembe lahko zapišete na stran ali pa jih zavržete. %1: pro-file, %2: directory that was checked. V mapi »%2« ni bilo najdene nobene gradnje za projektno datoteko »%1«. - - <b>Error:</b> - Severity is Task::Error - <b>Napaka:</b> - - - <b>Warning:</b> - Severity is Task::Warning - <b>Opozorilo:</b> - - - - QmakeProjectManager::Internal::TestWizardPage - - WizardPage - StranČarovnika - Specify basic information about the test class for which you want to generate skeleton source code file. @@ -15762,15 +15572,12 @@ Desetiška predznačena vrednost (najprej veliki konec): %4 - CMakeProjectManager::Internal::CMakeTarget + CMakeProjectManager Desktop CMake Default target display name Namizje - - - CMakeProjectManager::Internal::MakeStep Make Default display name for the cmake make step. @@ -15782,9 +15589,6 @@ Desetiška predznačena vrednost (najprej veliki konec): %4 CMakeProjectManager::MakeStep display name. Make - - - CMakeProjectManager::Internal::MakeStepFactory Make Display name for CMakeProjectManager::MakeStep id. @@ -17136,7 +16940,7 @@ cilj »%1«? - QmakeProjectManager::Internal::QmakeTarget + QmakeProjectManager Desktop Qt4 Desktop target display name @@ -17167,23 +16971,6 @@ cilj »%1«? Qt4 Maemo target display name Maemo - - Qt Simulator - Qt4 Simulator target display name - Qt Simulator - - - <b>Device:</b> Not connected - <b>Naprava:</b> Ni povezana - - - <b>Device:</b> %1 - <b>Naprava:</b> %1 - - - <b>Device:</b> %1, %2 - <b>Naprava:</b> %1, %2 - QmlProjectManager::QmlTarget @@ -17914,14 +17701,11 @@ Projekte programov QML izvede pregledovalnik QML in jih ni potrebno zgraditi. - QmakeProjectManager::QmakeProject + QmakeProjectManager Evaluating Vrednotenje - - - QmakeProjectManager Qt4 Qt 4 @@ -17959,7 +17743,7 @@ Projekte programov QML izvede pregledovalnik QML in jih ni potrebno zgraditi. - QmakeProjectManager::QtVersion + QmakeProjectManager Qmake does not support build directories below the source directory. QMake ne podpira map za gradnjo v mapi z izvorno kodo. @@ -18080,7 +17864,7 @@ Projekte programov QML izvede pregledovalnik QML in jih ni potrebno zgraditi. - QmakeProjectManager::Internal::BaseQmakeProjectWizardDialog + QmakeProjectManager Modules Moduli @@ -18089,13 +17873,6 @@ Projekte programov QML izvede pregledovalnik QML in jih ni potrebno zgraditi.Targets Cilji - - Qt Versions - Različice Qt - - - - QmakeProjectManager::Internal::TestWizard Qt Unit Test Preizkus enot Qt @@ -18104,17 +17881,10 @@ Projekte programov QML izvede pregledovalnik QML in jih ni potrebno zgraditi.Creates a QTestLib-based unit test for a feature or a class. Unit tests allow you to verify that the code is fit for use and that there are no regressions. Ustvari preizkus enote, ki temelji na QTestLib. Preizkusi enot vam omogočajo preverjanje izvorne kode, da se prepričate ali je primerna za uporabo in brez regresij. - - - QmakeProjectManager::Internal::TestWizardDialog This wizard generates a Qt unit test consisting of a single source file with a test class. Ta čarovnik ustvari preizkus enote Qt, ki je sestavljen iz ene datoteke z izvorno kodo za razred preizkusa. - - Details - Podrobnosti - Subversion::Internal::SubversionEditor @@ -20030,7 +19800,7 @@ GDB omogoča navedbo zaporedja ukazov, ki so ločeni z »\n«. - QmakeProjectManager::Internal::LibraryDetailsWidget + QmakeProjectManager Library: Knjižnica: @@ -20090,11 +19860,6 @@ GDB omogoča navedbo zaporedja ukazov, ki so ločeni z »\n«. Static Statično - - - Mac: - Mac: - Library @@ -20125,13 +19890,6 @@ GDB omogoča navedbo zaporedja ukazov, ki so ločeni z »\n«. Remove "d" suffix for release version Različici za izdajo odstrani pripono »d« - - - QmakeProjectManager::Internal::RvctToolChainConfigWidget - - Form - Obrazec - ARM &version: @@ -20244,7 +20002,7 @@ Starejše različice so pri gradnji ustreznih datotek SIS omejene. - QmakeProjectManager::Internal::WinscwToolChainConfigWidget + QmakeProjectManager Dialog Pogovorno okno @@ -23074,7 +22832,7 @@ Seznam za strežnik je: %2. - CMakeProjectManager::Internal::CMakeEditor + CMakeProjectManager Changes to cmake files are shown in the project tree after building. Spremembe datotek *.cmake so v drevesu projektov vidne po gradnji. @@ -23084,13 +22842,6 @@ Seznam za strežnik je: %2. Zgradi sedaj - - CMakeProjectManager::Internal::CMakeManager - - Run CMake - Zaženi CMake - - Core::Internal::ExternalToolModel @@ -26205,26 +25956,15 @@ Raje uporabite gumb za ustavitev. - QmakeProjectManager::Internal::AddLibraryWizard + QmakeProjectManager Add Library Dodajanje knjižnice - - Type - Vrsta - - - Details - Podrobnosti - Summary Povzetek - - - QmakeProjectManager::Internal::LibraryTypePage Library Type Vrsta knjižnice @@ -26271,9 +26011,6 @@ V datoteko *.pro se ne doda niti poti do knjižnice niti poti do vključitev.Links to a system library using pkg-config. S pomočjo pkg-config se poveže s sistemsko knjižnico. - - - QmakeProjectManager::Internal::DetailsPage Internal Library Notranja knjižnica @@ -26306,24 +26043,10 @@ V datoteko *.pro se ne doda niti poti do knjižnice niti poti do vključitev.Specify the package to link to Določite paket za povezavo - - - QmakeProjectManager::Internal::SummaryPage - - Summary - Povzetek - The following snippet will be added to the<br><b>%1</b> file: Naslednji izrezek bo dodan v<br> datoteko <b>%1</b>: - - - QmakeProjectManager::Internal::LibraryDetailsController - - Linkage: - Povezovanje: - %1 Dynamic %1 Dinamično @@ -26344,29 +26067,11 @@ V datoteko *.pro se ne doda niti poti do knjižnice niti poti do vključitev.%1 Library Knjižnica %1 - - - QmakeProjectManager::QmakeTarget - - Desktop - Qt4 Desktop target display name - Namizje - Qt Simulator Qt4 Simulator target display name Qt Simulator - - Symbian Emulator - Qt4 Symbian Emulator target display name - Posnemovalnik Symbian - - - Symbian Device - Qt4 Symbian Device target display name - Naprava Symbian - Maemo5 Qt4 Maemo5 target display name @@ -26382,9 +26087,6 @@ V datoteko *.pro se ne doda niti poti do knjižnice niti poti do vključitev.Qt4 Meego target display name MeeGo - - - QmakeProjectManager::CodaRunControl No device is connected. Please connect a device and try again. @@ -26489,9 +26191,6 @@ V datoteko *.pro se ne doda niti poti do knjižnice niti poti do vključitev.Povezava z napravo »%1« je bila prekinjena. - - - QmakeProjectManager::Internal::GcceToolChainFactory GCCE GCCE @@ -26504,9 +26203,6 @@ V datoteko *.pro se ne doda niti poti do knjižnice niti poti do vključitev.GCCE (%1) GCCE (%1) - - - QmakeProjectManager::PassphraseForKeyDialog Passphrase: Šifrirna fraza: @@ -26523,9 +26219,6 @@ V datoteko *.pro se ne doda niti poti do knjižnice niti poti do vključitev.Passphrase for %1 Šifrirna fraza za %1 - - - QmakeProjectManager::Internal::QmakeSymbianTarget <b>Device:</b> Not connected <b>Naprava:</b> ni povezana @@ -26542,9 +26235,6 @@ V datoteko *.pro se ne doda niti poti do knjižnice niti poti do vključitev.<b>IP address:</b> %1:%2 <b>Naslov IP:</b> %1:%2 - - - QmakeProjectManager::Internal::RvctToolChainFactory ARMv5 ARMv5 @@ -27013,7 +26703,7 @@ Da preprečite to popravljanje, uporabite potrdilo razvijalca ali pa kak drug na - QmakeProjectManager::SbsV2Parser + QmakeProjectManager SBSv2 build log Dnevnik gradnje SBS 2 @@ -27034,9 +26724,6 @@ Da preprečite to popravljanje, uporabite potrdilo razvijalca ali pa kak drug na Recept %1 je spodletel z izvorno kodo %2. - - - QmakeProjectManager::Internal::SymbianQtConfigWidget S60 SDK: S60 SDK: @@ -27045,9 +26732,6 @@ Da preprečite to popravljanje, uporabite potrdilo razvijalca ali pa kak drug na SBS v2 directory: Mapa za SBS 2: - - - QmakeProjectManager::Internal::WinscwToolChainFactory WINSCW WINSCW @@ -27056,16 +26740,10 @@ Da preprečite to popravljanje, uporabite potrdilo razvijalca ali pa kak drug na WINSCW from Qt version WINSCW iz različice Qt - - - QmakeProjectManager::QmakeBuildConfiguration Parsing the .pro file Razčlenjevanje datoteke *.pro - - - QmakeProjectManager::QmakeBuildConfigurationFactory Using Qt Version "%1" Uporablja Qt različice »%1« @@ -27090,9 +26768,6 @@ Da preprečite to popravljanje, uporabite potrdilo razvijalca ali pa kak drug na %1 (izdaja) - - - QmakeProjectManager::QmakeProFileNode Error while parsing file %1. Giving up. Napaka med razčlenjevanjem datoteke %1. @@ -27102,21 +26777,6 @@ Da preprečite to popravljanje, uporabite potrdilo razvijalca ali pa kak drug na Ni bilo moč najti datoteke *.pro za podmapo »%1« v »%2« - - QmakeProjectManager::QmakeBaseTargetFactory - - %1 Debug - Name of a debug build configuration to created by a project wizard, %1 being the Qt version name. We recommend not translating it. - - %1 (razhroščevanje) - - - %1 Release - Name of a release build configuration to be created by a project wizard, %1 being the Qt version name. We recommend not translating it. - - %1 (izdaja) - - Qt4DefaultTargetSetupWidget @@ -27131,7 +26791,7 @@ Da preprečite to popravljanje, uporabite potrdilo razvijalca ali pa kak drug na - QmakeProjectManager::QmakeDefaultTargetSetupWidget + QmakeProjectManager Add build from: Dodaj gradnjo it: @@ -27186,21 +26846,10 @@ Da preprečite to popravljanje, uporabite potrdilo razvijalca ali pa kak drug na Severity is Task::Warning <b>Opozorilo:</b> - - - QmakeProjectManager::AbstractMobileAppWizardDialog - - Qt Versions - Različice Qt - Mobile Options Možnosti za mobilne naprave - - Symbian Specific - Posebno za Symbian - Maemo5 And Meego Specific Posebno za MeeGo in Maemo 5 @@ -27209,16 +26858,10 @@ Da preprečite to popravljanje, uporabite potrdilo razvijalca ali pa kak drug na Harmattan Specific Posebno za Harmattan - - - QmakeProjectManager::AbstractMobileApp Could not open template file '%1'. Datoteke s predlogo »%1« ni bilo moč odpreti. - - - QmakeProjectManager::Internal::Html5AppWizardDialog New HTML5 Application Nov program HTML 5 @@ -27231,9 +26874,6 @@ Da preprečite to popravljanje, uporabite potrdilo razvijalca ali pa kak drug na HTML Options Možnosti za HTML - - - QmakeProjectManager::Internal::Html5AppWizard HTML5 Application Program HTML 5 @@ -27246,9 +26886,6 @@ You can build the application and deploy it on desktop and mobile target platfor Program lahko zgradite in ga razmestite na namizju ali na mobilnih platformah. Na primer: ustvarite lahko podpisane pakete za MeeGo. - - - QmakeProjectManager::Internal::Html5AppWizardOptionsPage Select HTML File Izberite datoteko HTML @@ -27270,7 +26907,7 @@ V naprej izbere Qt za simulator in razpoložljive ciljne mobilne naprave. - QmakeProjectManager::Internal::MobileAppWizardGenericOptionsPage + QmakeProjectManager Automatically Rotate Orientation Samodejno spreminjaj usmeritev @@ -27283,9 +26920,6 @@ V naprej izbere Qt za simulator in razpoložljive ciljne mobilne naprave.Lock to Portrait Orientation Zakleni na pokončno usmeritev - - - QmakeProjectManager::Internal::MobileAppWizardMaemoOptionsPage Invalid Icon Neveljavna ikona @@ -27302,17 +26936,10 @@ V naprej izbere Qt za simulator in razpoložljive ciljne mobilne naprave.The icon needs to be %1x%2 pixels big, but is not. Do you want Creator to scale it? Datoteka mora biti velika %1 ⨯ %2 pik, vendar ni. Ali želite, da Qt Creator prilagodi njeno velikost? - - File Error - Napaka glede datoteke - Could not copy icon file: %1 Datoteke z ikono ni bilo moč skopirati: %1 - - - QmakeProjectManager::Internal::QtQuickApp The QML import path '%1' cannot be found. Uvozne poti QML »%1« ni moč najti. @@ -27329,9 +26956,6 @@ V naprej izbere Qt za simulator in razpoložljive ciljne mobilne naprave.No .pro file for plugin '%1' cannot be found. Za vstavek »%1« ni moč najti nobene datoteke *.pro. - - - QmakeProjectManager::Internal::QtQuickAppWizardDialog New Qt Quick Application Nov program Qt Quick @@ -27344,9 +26968,6 @@ V naprej izbere Qt za simulator in razpoložljive ciljne mobilne naprave.Application Type Vrsta programa - - - QmakeProjectManager::Internal::QtQuickAppWizard Qt Quick Application Program Qt Quick @@ -27359,16 +26980,10 @@ You can build the application and deploy it on desktop and mobile target platfor Program lahko zgradite in ga razmestite na namizju ali na mobilnih platformah. Na primer: ustvarite lahko podpisane pakete za MeeGo. Poleg tega se lahko odločite za uporabo nabora v naprej pripravljenih komponent za uporabniški vmesnik. Za uporabo komponent je potreben Qt 4.7.3 ali novejši - - - QmakeProjectManager::Internal::QtQuickComponentSetOptionsPage Select QML File Izberite datoteko QML - - - QmakeProjectManager::Internal::SubdirsProjectWizard Subdirs Project Projekt podmap @@ -27390,16 +27005,10 @@ Program lahko zgradite in ga razmestite na namizju ali na mobilnih platformah. N Title of dialog Nov podprojekt - - - QmakeProjectManager::Internal::SubdirsProjectWizardDialog This wizard generates a Qt4 subdirs project. Add subprojects to it later on by using the other wizards. Ta čarovnik ustvari projekt podmap Qt 4. Podprojekte lahko vanj dodate kasneje z uporabo drugih čarovnikov. - - - QmakeProjectManager::TargetSetupPage Target Setup Nastavitev ciljev @@ -27485,15 +27094,11 @@ Program lahko zgradite in ga razmestite na namizju ali na mobilnih platformah. N - QmakeProjectManager::QmlDebuggingLibrary + QmakeProjectManager Only available for Qt 4.7.1 or newer. Na voljo samo za Qt 4.7.1 ali novejši. - - QML Debugging - Razhroščevanje QML - The target directory %1 could not be created. Ciljne mape %1 ni bilo moč ustvariti. @@ -27508,17 +27113,10 @@ Reason: %2 Razlog: %2 - - - QmakeProjectManager::QmlDumpTool Only available for Qt for Desktop and Qt for Qt Simulator. Na voljo samo za Qt za namizje in Qt za Qt Simulator. - - Only available for Qt 4.7.1 or newer. - Na voljo samo za Qt 4.7.1 ali novejši. - Private headers are missing for this Qt version. Zasebne glave za to različico Qt manjkajo. @@ -27549,15 +27147,11 @@ Razlog: %2 - QmakeProjectManager::QmlObserverTool + QmakeProjectManager Only available for Qt for Desktop or Qt for Qt Simulator. Na voljo samo za Qt za namizje in Qt za Qt Simulator. - - Only available for Qt 4.7.1 or newer. - Na voljo samo za Qt 4.7.1 ali novejši. - QMLObserver QMLObserver @@ -31031,18 +30625,7 @@ Preverite pravice za dostop do mape. - QmakeProjectManager::Internal::QmakeProFileNode - - Error while parsing file %1. Giving up. - Napaka med razčlenjevanjem datoteke %1. - - - Could not find .pro file for sub dir '%1' in '%2' - Ni bilo moč najti datoteke *.pro za podmapo »%1« v »%2« - - - - QmakeProjectManager::Internal::QtOptionsPageWidget + QmakeProjectManager <specify a name> <vnesite ime> @@ -31079,10 +30662,6 @@ Preverite pravice za dostop do mape. Manual Ročno - - Building helpers - Pomočniki za gradnjo - <html><body><table><tr><td>File:</td><td><pre>%1</pre></td></tr><tr><td>Last&nbsp;modified:</td><td>%2</td></tr><tr><td>Size:</td><td>%3 Bytes</td></tr></table></body></html> Tooltip showing the debugging helper library file. @@ -31108,11 +30687,6 @@ Preverite pravice za dostop do mape. Qt Version is meant for Maemo Maemo - - Qt Simulator - Qt Version is meant for Qt Simulator - Qt Simulator - unkown No idea what this Qt Version is meant for! @@ -31122,9 +30696,6 @@ Preverite pravice za dostop do mape. Found Qt version %1, using mkspec %2 (%3) Najden je Qt različice %1, uporabljen mkspec %2 (%3) - - - QmakeProjectManager::Internal::QtVersionManager + + @@ -31161,10 +30732,6 @@ p, li { white-space: pre-wrap; } </style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;"> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#ff0000;">Ni moč zaznati različice MSVC.</span></p></body></html> - - S60 SDK: - S60 SDK: - qmake Location Lokacija QMake @@ -31197,9 +30764,6 @@ p, li { white-space: pre-wrap; } Debugging helper: Razhroščevalni pomočnik: - - - QmakeProjectManager::QtVersionManager <not found> <ni najdeno> @@ -31208,10 +30772,6 @@ p, li { white-space: pre-wrap; } Qt in PATH Qt v PATH - - Name: - Ime: - Source: Vir: @@ -31232,10 +30792,6 @@ p, li { white-space: pre-wrap; } Version: Različica: - - Debugging helper: - Razhroščevalni pomočnik: - RegExp::Internal::RegExpWindow @@ -33478,7 +33034,7 @@ Preverite nastavitve projekta. - QmakeProjectManager::Internal::MaemoConfigTestDialog + QmakeProjectManager Testing configuration... Preizkušanje nastavitve … @@ -33533,9 +33089,6 @@ Preverite nastavitve projekta. List of installed Qt packages: Seznam nameščenih paketov Qt: - - - QmakeProjectManager::Internal::MaemoPackageContents Local File Path Pot do krajevne datoteke @@ -33544,9 +33097,6 @@ Preverite nastavitve projekta. Remote File Path Pot do oddaljene datoteke - - - QmakeProjectManager::Internal::MaemoPackageCreationStep Creating package file ... Ustvarjanje datoteke paketa … @@ -33603,9 +33153,6 @@ Preverite nastavitve projekta. Exit code: %1 Izhodna koda. %1 - - - QmakeProjectManager::Internal::MaemoPackageCreationWidget <b>Create Package:</b> <b>Ustvarjanje paketa:</b> @@ -33622,16 +33169,10 @@ Preverite nastavitve projekta. You have already added this file. To datoteko ste že dodali. - - - QmakeProjectManager::Internal::MaemoRunConfiguration New Maemo Run Configuration Nove nastavitve za zagon za Maemo - - - QmakeProjectManager::Internal::MaemoRunConfigurationWidget Run configuration name: Ime nastavitev za zagon: @@ -33648,17 +33189,6 @@ Preverite nastavitve projekta. Device configuration: Nastavitev naprave: - - Executable: - Program: - - - Arguments: - Argumenti: - - - - QmakeProjectManager::Internal::AbstractMaemoRunControl No device configuration set for run configuration. V nastavitvah za zagon ni bilo nastavljenih nobenih nastavitev naprave. @@ -33715,9 +33245,6 @@ Preverite nastavitve projekta. Remote Execution Failure Napaka pri oddaljeni izvedbi - - - QmakeProjectManager::Internal::QemuRuntimeManager Start Maemo Emulator Zaženi posnemovalnik Maemo @@ -33793,11 +33320,7 @@ Preverite nastavitve projekta. - QmakeProjectManager::Internal::QmakeBuildConfigurationFactory - - Using Qt Version "%1" - Uporablja Qt različice »%1« - + QmakeProjectManager New configuration Nova nastavitev @@ -33806,28 +33329,6 @@ Preverite nastavitve projekta. New Configuration Name: Ime nove nastavitve: - - %1 Debug - %1, za razhroščevanje - - - %1 Release - %1, za izdajo - - - - QmakeProjectManager::Internal::QmakeTargetFactory - - Debug - Razhroščevanje - - - Release - Izdaja - - - - QmakeProjectManager::Internal::MobileGuiAppWizard Mobile Qt Application Mobilni program Qt diff --git a/share/qtcreator/translations/qtcreator_uk.ts b/share/qtcreator/translations/qtcreator_uk.ts index c13de92d49e..fdcd6b6d282 100644 --- a/share/qtcreator/translations/qtcreator_uk.ts +++ b/share/qtcreator/translations/qtcreator_uk.ts @@ -1047,7 +1047,7 @@ Local pulls are not applied to the master branch. - CMakeProjectManager::Internal::CMakeBuildConfigurationFactory + CMakeProjectManager Default The name of the build configuration created by default for a cmake project. @@ -1081,9 +1081,6 @@ Local pulls are not applied to the master branch. New configuration name: Назва нової конфігурації: - - - CMakeProjectManager::Internal::CMakeBuildSettingsWidget Run cmake Запустити cmake @@ -1124,20 +1121,6 @@ Local pulls are not applied to the master branch. CMake CMake - - - CMakeProjectManager::Internal::CMakeEditor - - Changes to cmake files are shown in the project tree after building. - Зміни у файлах cmake будуть відображені в дереві проекту після збірки. - - - Build now - Зібрати зараз - - - - CMakeProjectManager::Internal::CMakeManager Run CMake Запустити CMake @@ -1154,16 +1137,10 @@ Local pulls are not applied to the master branch. Failed opening project '%1': Project is not a file Збій відкриття проекту '%1': Проект не є файлом - - - CMakeProjectManager::Internal::CMakeOpenProjectWizard CMake Wizard Майстер CMake - - - CMakeProjectManager::Internal::CMakeRunConfiguration Run CMake kit Запустити комплект cmake @@ -1180,9 +1157,6 @@ Local pulls are not applied to the master branch. (disabled) (вимкнено) - - - CMakeProjectManager::Internal::CMakeRunConfigurationWidget Arguments: Аргументи: @@ -1211,17 +1185,6 @@ Local pulls are not applied to the master branch. Run in Terminal Запускати в терміналі - - - CMakeProjectManager::Internal::CMakeRunPage - - Run CMake - Запустити CMake - - - Arguments: - Аргументи: - Generator: Генератор: @@ -1290,13 +1253,6 @@ Local pulls are not applied to the master branch. CMake exited with errors. Please check CMake output. CMake завершився з помилками. Будь ласка, перевірте виведення CMake. - - - CMakeProjectManager::Internal::CMakeSettingsPage - - CMake - CMake - Executable: Виконуваний модуль: @@ -1305,9 +1261,6 @@ Local pulls are not applied to the master branch. Prefer Ninja generator (CMake 2.8.9 or higher required) Надавати перевагу генератору Ninja (необхідний CMake 2.8.9 або вище) - - - CMakeProjectManager::Internal::CMakeTarget Desktop CMake Default target display name @@ -1317,9 +1270,6 @@ Local pulls are not applied to the master branch. Desktop Стаціонарний комп'ютер - - - CMakeProjectManager::Internal::InSourceBuildPage Qt Creator has detected an <b>in-source-build in %1</b> which prevents shadow builds. Qt Creator will not allow you to change the build directory. If you want a shadow build, clean your source directory and re-open the project. Qt Creator знайшов <b>збірку в теці з кодом в%1</b>, яка заважає тіньовим збіркам. Qt Creator не дозволить вам змінити теку збірки. Якщо ви хочете тіньової збірки, то очистіть теку з кодом та перевідкрийте проект. @@ -1328,14 +1278,6 @@ Local pulls are not applied to the master branch. Build Location Розташування збірки - - - CMakeProjectManager::Internal::MakeStep - - Make - Default display name for the cmake make step. - Make - Qt Creator needs a compiler set up to build. Configure a compiler in the kit options. Qt Creator потребує компілятора для збірки. Сконфігуруйте компілятор в налаштуваннях комплекту. @@ -1344,9 +1286,6 @@ Local pulls are not applied to the master branch. Configuration is faulty. Check the Issues view for details. Конфігурація збійна. Перевірте вид "Проблеми" для деталей. - - - CMakeProjectManager::Internal::MakeStepConfigWidget Override command: Команда на заміну: @@ -1355,38 +1294,11 @@ Local pulls are not applied to the master branch. Additional arguments: Додаткові аргументи: - - Targets: - Цілі: - - - <b>No build configuration found on this kit.</b> - <b>Для цього комплекту відсутня конфігурація збірки.</b> - - - Make - CMakeProjectManager::MakeStepConfigWidget display name. - Make - - - Make - Make - - - - CMakeProjectManager::Internal::MakeStepFactory Make Display name for CMakeProjectManager::MakeStep id. Make - - Make - Make - - - - CMakeProjectManager::Internal::ShadowBuildPage Please enter the directory in which you want to build your project. Будь ласка, введіть теку, в якій ви хочете зібрати ваш проект. @@ -1399,14 +1311,6 @@ Local pulls are not applied to the master branch. Please enter the directory in which you want to build your project. Qt Creator recommends to not use the source directory for building. This ensures that the source directory remains clean and enables multiple builds with different settings. Будь ласка, введіть теку, в якій ви хочете зібрати ваш проект. Qt Creator рекомендує не використовувати теку з кодом для збірки. Це гарантуватиме, що тека з кодом лишатиметься чистою, та дозволить здійснювати декілька збірок з різними налаштуваннями. - - Build directory: - Тека збірки: - - - Build Location - Розташування збірки - CPlusPlus::OverviewModel @@ -18432,16 +18336,10 @@ Do you want to save the data first? Qt Versions Версії Qt - - - QmakeProjectManager::AbstractMobileApp Could not open template file '%1'. Не вдалось відкрити файл шаблону '%1'. - - - QmakeProjectManager::AbstractMobileAppWizardDialog Mobile Options Мобільні параметри @@ -18462,39 +18360,10 @@ Do you want to save the data first? Kits Комплекти - - - QmakeProjectManager::Internal::AddLibraryWizard Add Library Додати бібліотеку - - Type - Тип - - - Details - Деталі - - - Summary - Підсумок - - - - QmakeProjectManager::Internal::BaseQmakeProjectWizardDialog - - Modules - Модулі - - - Kits - Комплекти - - - - QmakeProjectManager::Internal::ClassDefinition Form Форма @@ -18599,9 +18468,6 @@ Do you want to save the data first? Icon files (*.png *.ico *.jpg *.xpm *.tif *.svg) Файли піктограм (*.png *.ico *.jpg *.xpm *.tif *.svg) - - - QmakeProjectManager::Internal::ClassList <New class> <Новий клас> @@ -18614,9 +18480,6 @@ Do you want to save the data first? Delete class %1 from list? Видалити клас %1 зі списку? - - - QmakeProjectManager::Internal::ConsoleAppWizard Qt Console Application Консольна програма Qt @@ -18629,9 +18492,6 @@ Preselects a desktop Qt for building the application if available. Попередньо обирає Qt для стільниці для збірки програми, якщо доступно. - - - QmakeProjectManager::Internal::ConsoleAppWizardDialog This wizard generates a Qt console application project. The application derives from QCoreApplication and does not provide a GUI. Цей майстер генерує проект консольної програми Qt. Програма походить від QCoreApplication та не надає графічного інтерфейсу користувача. @@ -18640,9 +18500,6 @@ Preselects a desktop Qt for building the application if available. This wizard generates a Qt Console Application project. The application derives from QCoreApplication and does not provide a GUI. Цей майстер генерує проект консольної програми Qt. Програма походить від QCoreApplication та не надає графічного інтерфейсу користувача. - - - QmakeProjectManager::Internal::CustomWidgetPluginWizardPage WizardPage Сторінка майстра @@ -18683,9 +18540,6 @@ Preselects a desktop Qt for building the application if available. Plugin Details Деталі додатку - - - QmakeProjectManager::Internal::CustomWidgetWidgetsWizardPage Custom Qt Widget Wizard Майстер користувацького віджета Qt Widget @@ -18710,9 +18564,6 @@ Preselects a desktop Qt for building the application if available. Custom Widgets Користувацькі віджети - - - QmakeProjectManager::Internal::CustomWidgetWizard Qt Custom Designer Widget Користувацький віджет Qt Designer @@ -18721,24 +18572,10 @@ Preselects a desktop Qt for building the application if available. Creates a Qt Custom Designer Widget or a Custom Widget Collection. Створює користувацький віджет Qt Designer або колекцію користувацьких віджетів. - - - QmakeProjectManager::Internal::CustomWidgetWizardDialog This wizard generates a Qt Designer Custom Widget or a Qt Designer Custom Widget Collection project. Цей майстер генерує проект користувацького віджета Qt Designer або колекції користувацьких віджетів Qt Designer. - - Custom Widgets - Користувацькі віджети - - - Plugin Details - Деталі додатку - - - - QmakeProjectManager::Internal::DesignerExternalEditor Qt Designer is not responding (%1). Qt Designer не відповідає (%1). @@ -18747,9 +18584,6 @@ Preselects a desktop Qt for building the application if available. Unable to create server socket: %1 Неможливо створити серверний сокет: %1 - - - QmakeProjectManager::Internal::DetailsPage System Library Системна бібліотека @@ -18786,9 +18620,6 @@ Preselects a desktop Qt for building the application if available. Internal Library Внутрішня бібліотека - - - QmakeProjectManager::Internal::EmptyProjectWizard Empty Qt Project Порожній проект Qt @@ -18797,16 +18628,10 @@ Preselects a desktop Qt for building the application if available. Creates a qmake-based project without any files. This allows you to create an application without any default classes. Створює проект, що базується на qmake, без жодних файлів. Це дозволить вам створити програму без будь-яких типових класів. - - - QmakeProjectManager::Internal::EmptyProjectWizardDialog This wizard generates an empty Qt project. Add files to it later on by using the other wizards. Цей майстер генерує порожній проект Qt. Використовуйте інші майстри, щоб пізніше додати до нього файли. - - - QmakeProjectManager::Internal::ExternalQtEditor Unable to start "%1" Неможливо запустити "%1" @@ -18815,9 +18640,6 @@ Preselects a desktop Qt for building the application if available. The application "%1" could not be found. Не вдалось знайти програму "%1". - - - QmakeProjectManager::Internal::FilesPage Class Information Інформація про клас @@ -18826,13 +18648,6 @@ Preselects a desktop Qt for building the application if available. Specify basic information about the classes for which you want to generate skeleton source code files. Вкажіть базову інформацію про класи, для яких ви бажаєте згенерувати каркасні файли з кодом. - - Details - Деталі - - - - QmakeProjectManager::Internal::GuiAppWizard Qt Gui Application Графічна програма Qt @@ -18849,9 +18664,6 @@ Preselects a desktop Qt for building the application if available. Обирає Qt для стільниці для збірки програми, якщо доступно. - - - QmakeProjectManager::Internal::GuiAppWizardDialog This wizard generates a Qt GUI application project. The application derives by default from QApplication and includes an empty widget. Цей майстер генерує проект графічної програми Qt. Програма походить від QApplication та включає порожній віджет. @@ -18860,13 +18672,6 @@ Preselects a desktop Qt for building the application if available. This wizard generates a Qt Widgets Application project. The application derives by default from QApplication and includes an empty widget. Цей майстер генерує проект програми Qt Widgets. Програма походить типово від QApplication та включає порожній віджет. - - Details - Деталі - - - - QmakeProjectManager::Internal::Html5AppWizard HTML5 Application Програма HTML5 @@ -18879,9 +18684,6 @@ You can build the application and deploy it on desktop and mobile target platfor Ви можете зібрати програму та розгорнути її на стаціонарні та мобільні платформи. - - - QmakeProjectManager::Internal::Html5AppWizardDialog New HTML5 Application Нова програма HTML5 @@ -18898,16 +18700,10 @@ You can build the application and deploy it on desktop and mobile target platfor HTML Options Опції HTML - - - QmakeProjectManager::Internal::Html5AppWizardOptionsPage Select HTML File Виберіть файл HTML - - - QmakeProjectManager::Internal::LibraryDetailsController Linkage: Компонування: @@ -18932,9 +18728,6 @@ You can build the application and deploy it on desktop and mobile target platfor %1 Library %1 бібліотека - - - QmakeProjectManager::Internal::LibraryDetailsWidget Library: Бібліотека: @@ -18963,10 +18756,6 @@ You can build the application and deploy it on desktop and mobile target platfor Windows Windows - - Linkage: - Компонування: - Dynamic Динамічне @@ -18975,10 +18764,6 @@ You can build the application and deploy it on desktop and mobile target platfor Static Статичне - - Mac: - Mac: - Library Бібліотека @@ -19007,9 +18792,6 @@ You can build the application and deploy it on desktop and mobile target platfor Package: Пакунок: - - - QmakeProjectManager::Internal::LibraryTypePage Library Type Тип бібліотеки @@ -19060,9 +18842,6 @@ Adds the library and include paths to the .pro file. Компонування з бібліотекою, що розташована у вашому дереві збірки. Додає шляхи до до бібліотеки та заголовочних файлів до файлу .pro. - - - QmakeProjectManager::Internal::LibraryWizard C++ Library Бібліотека C++ @@ -19071,9 +18850,6 @@ Adds the library and include paths to the .pro file. Creates a C++ library based on qmake. This can be used to create:<ul><li>a shared C++ library for use with <tt>QPluginLoader</tt> and runtime (Plugins)</li><li>a shared or static C++ library for use with another project at linktime</li></ul> Створює бібліотеку C++ за допомогою qmake. Може використовуватись, щоб створити:<ul><li>динамічну бібліотеку C++ для використання з <tt>QPluginLoader</tt> та під час виконання (додаток)</li><li>динамічну або статичну бібліотеку C++ для використання з іншим проектом під час компонування</li></ul> - - - QmakeProjectManager::Internal::LibraryWizardDialog Shared Library Динамічна бібліотека @@ -19086,10 +18862,6 @@ Adds the library and include paths to the .pro file. Qt Plugin Додаток Qt - - Type - Тип - This wizard generates a C++ Library project. Цей майстер генерує проект бібліотеки C++. @@ -19098,27 +18870,10 @@ Adds the library and include paths to the .pro file. This wizard generates a C++ library project. Цей майстер генерує проект бібліотеки C++. - - Details - Деталі - - - - QmakeProjectManager::Internal::MakeStepFactory Make Make - - - QmakeProjectManager::Internal::MobileAppWizardGenericOptionsPage - - WizardPage - Сторінка майстра - - - - QmakeProjectManager::Internal::ModulesPage Select Required Modules Виберіть необхідні модулі @@ -19131,16 +18886,10 @@ Adds the library and include paths to the .pro file. Modules Модулі - - - QmakeProjectManager::Internal::PluginGenerator Creating multiple widget libraries (%1, %2) in one project (%3) is not supported. Створення декількох бібліотек віджетів (%1, %2) в одному проекті (%3) не підтримується. - - - QmakeProjectManager::Internal::PngIconScaler Wrong Icon Size Невірний розмір піктограми @@ -19149,24 +18898,10 @@ Adds the library and include paths to the .pro file. The icon needs to be %1x%2 pixels big, but is not. Do you want Qt Creator to scale it? Ця піктограма має бути розміром %1x%2 пікселів. Бажаєте, щоб Qt Creator відмасштабував її? - - File Error - Помилка файлу - Could not copy icon file: %1 Не вдалось скопіювати файл піктограми: %1 - - - QmakeProjectManager::Internal::QMakeStepFactory - - qmake - qmake - - - - QmakeProjectManager::Internal::QmakeProjectConfigWidget Shadow build: Тіньова збірка: @@ -19230,9 +18965,6 @@ Adds the library and include paths to the .pro file. A build for a different project exists in %1, which will be overwritten. Збірка для іншого проекту існує в %1, яка не буде перезаписана. - - - QmakeProjectManager::Internal::QmakeProjectManagerPlugin Run qmake Запустити qmake @@ -19293,24 +19025,10 @@ Adds the library and include paths to the .pro file. Add Library... Додати бібліотеку... - - - QmakeProjectManager::Internal::QmakeRunConfiguration The .pro file '%1' is currently being parsed. Здійснюється розбір файлу .pro '%1'. - - Qt Run Configuration - Конфігурація запуску Qt - - - - QmakeProjectManager::Internal::QmakeRunConfigurationWidget - - Executable: - Виконуваний модуль: - Arguments: Аргументи: @@ -19331,21 +19049,6 @@ Adds the library and include paths to the .pro file. Run in terminal Запускати в терміналі - - Run on QVFb - Запустити в QVFb - - - Check this option to run the application on a Qt Virtual Framebuffer. - Увімкніть цю опцію, що запустити програму в віртуальному буфері кадрів Qt. - - - Use debug version of frameworks (DYLD_IMAGE_SUFFIX=_debug) - Використовувати зневаджувальну версію фреймворку (DYLD_IMAGE_SUFFIX=_debug) - - - - QmakeProjectManager::Internal::QmakeTarget Desktop Qt4 Desktop target display name @@ -19355,9 +19058,6 @@ Adds the library and include paths to the .pro file. Desktop Стаціонарний комп'ютер - - - QmakeProjectManager::Internal::QtQuickAppWizardDialog New Qt Quick Application Нова програма Qt Quick @@ -19378,9 +19078,6 @@ Adds the library and include paths to the .pro file. Select existing QML file Вибір існуючого файлу QML - - - QmakeProjectManager::Internal::QtQuickComponentSetOptionsPage Select QML File Виберіть файл QML @@ -19389,9 +19086,6 @@ Adds the library and include paths to the .pro file. Select Existing QML file Вибір існуючого файлу QML - - - QmakeProjectManager::Internal::SubdirsProjectWizard Subdirs Project Проект з підтеками @@ -19417,9 +19111,6 @@ Adds the library and include paths to the .pro file. New Subproject Новий підпроект - - - QmakeProjectManager::Internal::SubdirsProjectWizardDialog This wizard generates a Qt subdirs project. Add subprojects to it later on by using the other wizards. Цей майстер генерує проект Qt з підтеками. Використовуйте інші майстри, щоб пізніше додати до нього підпроекти. @@ -19428,9 +19119,6 @@ Adds the library and include paths to the .pro file. This wizard generates a Qt Subdirs project. Add subprojects to it later on by using the other wizards. Цей майстер генерує проект Qt з підтеками. Використовуйте інші майстри, щоб пізніше додати до нього підпроекти. - - - QmakeProjectManager::Internal::SummaryPage Summary Підсумок @@ -19439,9 +19127,6 @@ Adds the library and include paths to the .pro file. The following snippet will be added to the<br><b>%1</b> file: Наступний фрагмент буде додано до файлу <br><b>%1</b>: - - - QmakeProjectManager::Internal::TestWizard Qt Unit Test Модульний тест Qt @@ -19450,9 +19135,6 @@ Adds the library and include paths to the .pro file. Creates a QTestLib-based unit test for a feature or a class. Unit tests allow you to verify that the code is fit for use and that there are no regressions. Створює модульний тест, оснований на QTestLib для властивості або класу. Модульні тести дозволяють вам перевірити, що код придатний для використання і в ньому немає регресій. - - - QmakeProjectManager::Internal::TestWizardDialog This wizard generates a Qt unit test consisting of a single source file with a test class. Цей майстер створює Qt unit test, що складається з одного файлу коду, який містить тестовий клас. @@ -19461,17 +19143,6 @@ Adds the library and include paths to the .pro file. This wizard generates a Qt Unit Test consisting of a single source file with a test class. Цей майстер генерує модульний тест Qt, що складається з одного файлу коду, який містить тестовий клас. - - Details - Деталі - - - - QmakeProjectManager::Internal::TestWizardPage - - WizardPage - Сторінка майстра - Specify basic information about the test class for which you want to generate skeleton source code file. Вкажіть базову інформацію про тестовий клас, для якого ви хочете згенерувати каркас файлу коду. @@ -19516,13 +19187,6 @@ Adds the library and include paths to the .pro file. Test Class Information Інформація про тестовий клас - - Details - Деталі - - - - QmakeProjectManager::MakeStep Make Qt MakeStep display name. @@ -19540,13 +19204,6 @@ Adds the library and include paths to the .pro file. Configuration is faulty. Check the Issues view for details. Конфігурація збійна. Перевірте вид "Проблеми" для деталей. - - Make - Make - - - - QmakeProjectManager::MakeStepConfigWidget Override %1: Перевизначити %1: @@ -19567,9 +19224,6 @@ Adds the library and include paths to the .pro file. <b>Make:</b> %1 not found in the environment. <b>Make:</b> %1 не знайдено в середовищі. - - - QmakeProjectManager::QMakeStep qmake QMakeStep default display name @@ -19583,9 +19237,6 @@ Adds the library and include paths to the .pro file. Configuration unchanged, skipping qmake step. Конфігурація не змінилась, пропускаємо крок qmake. - - - QmakeProjectManager::QMakeStepConfigWidget QML Debugging Зневадження QML @@ -19626,17 +19277,6 @@ Adds the library and include paths to the .pro file. <No Qt version> <Немає версії Qt> - - - QmakeProjectManager::QmlDebuggingLibrary - - Not needed. - Не потрібна. - - - QML Debugging - Зневадження QML - The target directory %1 could not be created. Не вдалось створити цільову теку %1. @@ -19651,13 +19291,6 @@ Reason: %2 Причина: %2 - - Only available for Qt 4.7.1 or newer. - Доступно лише з Qt 4.7.1 або новіше. - - - - QmakeProjectManager::QmlDumpTool qmldump qmldump @@ -19682,9 +19315,6 @@ Reason: %2 Private headers are missing for this Qt version. У цієї версії Qt відсутні приватні файли заголовків. - - - QmakeProjectManager::QmlObserverTool QMLObserver Оглядач QML @@ -19693,17 +19323,6 @@ Reason: %2 Only available for Qt for Desktop or Qt for Qt Simulator. Доступно лише з Qt для стаціонарних комп'ютерів та Qt для Qt Simulator. - - Only available for Qt 4.7.1 or newer. - Доступно лише з Qt 4.7.1 або новіше. - - - Not needed. - Не потрібна. - - - - QmakeProjectManager::QmakeBuildConfiguration Could not parse Makefile. Не вдалось розібрати Makefile. @@ -19728,9 +19347,6 @@ Reason: %2 Parsing the .pro file Розбір файлу .pro - - - QmakeProjectManager::QmakeBuildConfigurationFactory Qmake based build Збірка на базі qmake @@ -19779,18 +19395,11 @@ Reason: %2 Non-ASCII characters in directory suffix may cause build issues. Profile - - Build - Збірка - Release The name of the release build configuration created by default for a qmake project. Реліз - - - QmakeProjectManager::QmakeManager Update of Generated Files Оновлення згенерованих файлів @@ -19811,9 +19420,6 @@ Reason: %2 QMake QMake - - - QmakeProjectManager::QmakePriFileNode Headers Заголовки @@ -19846,29 +19452,10 @@ Reason: %2 There are unsaved changes for project file %1. В файлі проект %1 є незбережені зміни. - - Failed - Збій - Failed! Збій! - - Could not write project file %1. - Не вдалось записати файл проекту %1. - - - File Error - Помилка файлу - - - - QmakeProjectManager::QmakeProFileNode - - Error while parsing file %1. Giving up. - Помилка під час розбору файлу %1. Припиняємо. - Could not find .pro file for sub dir "%1" in "%2" Не вдалось знайти файл .pro для підтеки "%1" в "%2" @@ -19877,9 +19464,6 @@ Reason: %2 Could not find .pro file for sub dir '%1' in '%2' Не вдалось знайти файл .pro для підтеки '%1' в '%2' - - - QmakeProjectManager::QmakeProject Evaluating Оцінка @@ -19916,14 +19500,6 @@ Reason: %2 The .pro file '%1' could not be parsed. Не вдалось розібрати файл .pro '%1'. - - Debug - Debug - - - Release - Release - QtSuppport @@ -19939,7 +19515,7 @@ Reason: %2 - QmakeProjectManager::QtVersion + QmakeProjectManager Qmake does not support build directories below the source directory. Qmake не підтримує тек збірки нижче теки з кодом. @@ -19948,9 +19524,6 @@ Reason: %2 The build directory needs to be at the same level as the source directory. Тека збірки має бути на тому ж рівні, що й тека з кодом. - - - QmakeProjectManager::TargetSetupPage <span style=" font-weight:600;">No valid kits found.</span> <span style=" font-weight:600;">Не знайдено комплектів.</span> @@ -19976,14 +19549,6 @@ Reason: %2 %1: Project name Qt Creator може використовувати наступні комплекти для проекту <b>%1</b>: - - No Build Found - Збірку не знайдено - - - No build found in %1 matching project %2. - Не знайдено збірку в %1, яка б відповідала проекту %2. - Qt Creator can use the following kits for project <b>%1</b>: Qt Creator може використовувати наступні комплекти для проекту <b>%1</b>: @@ -25601,30 +25166,15 @@ These prefixes are used in addition to current file name on Switch Header/Source - QmakeProjectManager::Internal::MakeStep + QmakeProjectManager Make arguments: Аргументи make: - - Override %1: - Перевизначити %1: - - - - QmakeProjectManager::Internal::QMakeStep qmake build configuration: Конфігурація збірки qmake: - - Debug - Зневадження - - - Release - Реліз - Additional arguments: Додаткові аргументи: @@ -25649,13 +25199,6 @@ These prefixes are used in addition to current file name on Switch Header/Source Use QML compiler: Використовувати компілятор QML: - - - QmakeProjectManager::Internal::Html5AppWizardSourcesPage - - WizardPage - Сторінка майстра - Main HTML File Головний файл HTML @@ -25688,35 +25231,14 @@ These prefixes are used in addition to current file name on Switch Header/Source Enable touch optimized navigation Увімкнути навігацію, оптимізовану для дотиків - - - QmakeProjectManager::Internal::MobileAppWizardHarmattanOptionsPage - - WizardPage - Сторінка майстра - Application icon (80x80): Піктограма програми (80x80): - - - QmakeProjectManager::Internal::MobileAppWizardMaemoOptionsPage - - WizardPage - Сторінка майстра - Application icon (64x64): Піктограма програми (64x64): - - - QmakeProjectManager::Internal::MobileLibraryWizardOptionPage - - WizardPage - Сторінка майстра - Plugin's directory name: Назва теки додатка: @@ -27083,7 +26605,7 @@ should a repository require SSH-authentication (see documentation on SSH and the - CMakeProjectManager::Internal::CMakeLocatorFilter + CMakeProjectManager Build CMake target Зібрати ціль CMake @@ -27735,14 +27257,7 @@ Do you want to kill it? - QmakeProjectManager::Internal::UnconfiguredProjectPanel - - Configure Project - Конфігурування проекту - - - - QmakeProjectManager::Internal::TargetSetupPageWrapper + QmakeProjectManager Configure Project Конфігурування проекту @@ -27763,9 +27278,6 @@ Do you want to kill it? The project <b>%1</b> is not yet configured.<br/>Qt Creator uses the <b>invalid</b> kit <b>%2</b> to parse the project. Проект <b>%1</b> ще не сконфігуровано.<br/>Qt Creator використовує неправильний комплект <b>%2</b>, щоб розібрати проект. - - - QmakeProjectManager::Internal::QtQuickAppWizard Creates a Qt Quick 1 application project that can contain both QML and C++ code and includes a QDeclarativeView. @@ -28798,7 +28310,7 @@ The APK will not be usable on any other device. - ClearCase::Internal::CheckOutDialog + ClearCase Check Out @@ -28824,9 +28336,6 @@ The APK will not be usable on any other device. Hijack: Unset read-only flag without check-out. This is used for local changes which the user does not want to commit. - - - ClearCase::Internal::SettingsPage Configuration Конфігурація @@ -28912,9 +28421,6 @@ The APK will not be usable on any other device. Do &not prompt for comment during checkout or check-in - - - ClearCase::Internal::UndoCheckOut Dialog Діалог @@ -28927,9 +28433,6 @@ The APK will not be usable on any other device. &Save copy of the file with a '.keep' extension &Зберегти копію файлу з розширенням '.keep' - - - ClearCase::Internal::VersionSelector Confirm Version to Check Out @@ -30321,7 +29824,7 @@ To add the Qt versions, select Options > Build & Run > Qt Versions. - ClearCase::Internal::ActivitySelector + ClearCase Select &activity: @@ -30334,9 +29837,6 @@ To add the Qt versions, select Options > Build & Run > Qt Versions.Keep item activity - - - ClearCase::Internal::ClearCaseControl Check &Out @@ -30345,9 +29845,6 @@ To add the Qt versions, select Options > Build & Run > Qt Versions.&Hijack - - - ClearCase::Internal::ClearCasePlugin Editing Derived Object: %1 @@ -30640,31 +30137,18 @@ To add the Qt versions, select Options > Build & Run > Qt Versions.Enter activity headline - - - ClearCase::Internal::ClearCaseSubmitEditor ClearCase Check In - - - ClearCase::Internal::ClearCaseSubmitEditorWidget Chec&k in even if identical to previous version - - &Preserve file modification time - - &Check In - - - ClearCase::Internal::SettingsPageWidget ClearCase Command Команда ClearCase @@ -30679,7 +30163,7 @@ To add the Qt versions, select Options > Build & Run > Qt Versions. - CMakeProjectManager::Internal::ChooseCMakePage + CMakeProjectManager CMake Executable: Виконуваний модуль CMake: @@ -33094,7 +32578,7 @@ Do you want to retry? - QmakeProjectManager::Internal::QmakeKitConfigWidget + QmakeProjectManager The mkspec to use when building the project with qmake.<br>This setting is ignored when using other build systems. mkspec, що використовується для збірки проектів за допомогою qmake.<br>Це налаштування ігнорується при використанні інших систем збірки. @@ -33103,9 +32587,6 @@ Do you want to retry? Qt mkspec: Qt mkspec: - - - QmakeProjectManager::QmakeKitInformation No Qt version set, so mkspec is ignored. Версія Qt не задана, mkspec ігнорується. @@ -33118,9 +32599,6 @@ Do you want to retry? mkspec mkspec - - - QmakeProjectManager::QmakeTargetSetupWidget Manage... Управління... @@ -33143,9 +32621,6 @@ Do you want to retry? <b>Warning:</b> <b>Попередження:</b> - - - QmakeProjectManager::Internal::ImportWidget Import Build from... Імпортувати збірку з... @@ -34552,7 +34027,7 @@ cannot be found in the path. - CMakeProjectManager::Internal::GeneratorInfo + CMakeProjectManager Ninja (%1) Ninja (%1) @@ -34569,9 +34044,6 @@ cannot be found in the path. Unix Generator (%1) Генератор для Unix (%1) - - - CMakeProjectManager::Internal::NoKitPage Show Options Показати опції @@ -39698,18 +39170,6 @@ Please close all running instances of your application before starting a build.< %1 - тимчасовий - - QmakeProjectManager::Internal::Qt4Target - - Desktop - Qt4 Desktop target display name - Стаціонарний комп'ютер - - - Desktop - Стаціонарний комп'ютер - - ProjectExplorer::TargetSetupPage @@ -39828,11 +39288,7 @@ Please close all running instances of your application before starting a build.< - QmakeProjectManager::Internal::DesktopQmakeRunConfiguration - - The .pro file '%1' is currently being parsed. - Здійснюється розбір файлу .pro '%1'. - + QmakeProjectManager The .pro file "%1" is currently being parsed. Здійснюється розбір файлу .pro "%1". @@ -39841,37 +39297,14 @@ Please close all running instances of your application before starting a build.< Qt Run Configuration Конфігурація запуску Qt - - - QmakeProjectManager::Internal::DesktopQmakeRunConfigurationWidget Executable: Виконуваний модуль: - - Arguments: - Аргументи: - - - Select Working Directory - Оберіть робочу теку - - - Reset to default - Скинути до типового - Reset to Default Скинути до типового - - Working directory: - Робоча тека: - - - Run in terminal - Запускати в терміналі - Run on QVFb Запустити в QVFb @@ -39896,17 +39329,6 @@ Please close all running instances of your application before starting a build.< Add build library search path to LD_LIBRARY_PATH Додати шлях до бібліотеки, що збирається, до LD_LIBRARY_PATH - - - QmakeProjectManager::Internal::QmakeProjectImporter - - Debug - Зневадження - - - Release - Реліз - No Build Found Збірку не знайдено @@ -39915,9 +39337,6 @@ Please close all running instances of your application before starting a build.< No build found in %1 matching project %2. Не знайдено збірку в %1, яка б відповідала проекту %2. - - - QmakeProjectManager::Internal::QtQuickComponentSetPage Select Qt Quick Component Set Вибір набору компонентів Qt Quick @@ -39926,10 +39345,6 @@ Please close all running instances of your application before starting a build.< Qt Quick component set: Набір компонентів Qt Quick: - - Component Set - Набір компонентів - TabViewToolAction @@ -40328,7 +39743,7 @@ Please close all running instances of your application before starting a build.< QbsProjectManager - QmakeProjectManager::QtQuickAppWizard + QmakeProjectManager Creates a deployable Qt Quick 1 application using the QtQuick 1.1 import. Requires Qt 4.8 or newer. Створює додаток Qt Quick 1 для розгортання використовуючи імпорт QtQuick 1.1. Необхідна Qt 4.8 або новіша. @@ -44754,7 +44169,7 @@ Deploying local Qt libraries is incompatible with Android 5. - ClearCase::Internal::ClearCaseEditorWidget + ClearCase Annotate version "%1" @@ -48673,7 +48088,7 @@ Setting breakpoints by file name and line number may fail. - QmakePriFileNode + QmakeProjectManager Failed Збій @@ -48686,9 +48101,6 @@ Setting breakpoints by file name and line number may fail. File Error Помилка файлу - - - QmakeProFileNode Error while parsing file %1. Giving up. Помилка під час розбору файлу %1. Припиняємо. @@ -49278,7 +48690,7 @@ Setting breakpoints by file name and line number may fail. - CMakeProjectManager::Internal::CMakeKitConfigWidget + CMakeProjectManager CMake Tool: Інструмент CMake: @@ -49291,20 +48703,10 @@ Setting breakpoints by file name and line number may fail. <No CMake Tool available> <Немає інструмента CMake> - - - CMakeProjectManager::CMakeKitInformation - - CMake - CMake - Unconfigured Не сконфігуровано - - - CMakeProjectManager::Internal::NoCMakePage Check CMake Tools Перевірити інструменти CMake @@ -49317,9 +48719,6 @@ Setting breakpoints by file name and line number may fail. Qt Creator has no CMake Tools that are required for CMake projects. Please configure at least one. В Qt Creator немає інструментів CMake, які необхідні для проектів CMake. Будь ласка, сконфігуруйте хоча б один. - - - CMakeProjectManager::CMakeSettingsPage (Default) (Типово) @@ -49348,9 +48747,6 @@ Setting breakpoints by file name and line number may fail. Path: Шлях: - - - CMakeProjectManager::Internal::CMakeToolConfigWidget Add Додати @@ -49375,10 +48771,6 @@ Setting breakpoints by file name and line number may fail. Set as the default CMake Tool to use when creating a new Kit, or no value is set. Встановити як типовий інструмент CMake для використання при створенні нових комлектів. - - Prefer Ninja generator (CMake 2.8.9 or higher required) - Надавати перевагу генератору Ninja (необхідний CMake 2.8.9 або вище) - Clone of %1 Клон %1 @@ -49387,9 +48779,6 @@ Setting breakpoints by file name and line number may fail. New CMake Новий CMake - - - CMakeProjectManager::CMakeToolManager CMake at %1 CMake в %1 @@ -50718,7 +50107,7 @@ the program. - CMakeProjectManager::CMakeProject + CMakeProjectManager Internal Error: No build configuration found in settings file. Внутрішня помилка: конфігурацію збірки не знайдено в файлі налаштувань. @@ -52169,7 +51558,7 @@ Please set a real Clang executable. - CMakeProjectManager::Internal::BuildDirManager + CMakeProjectManager The build directory is not for %1 Тека збірки не для %1 @@ -52194,9 +51583,6 @@ Please set a real Clang executable. Failed to open %1 for reading. Збій відкриття %1 для читання. - - - CMakeProjectManager::Internal::CMakeBuildStep Make Default display name for the cmake make step. @@ -52206,16 +51592,10 @@ Please set a real Clang executable. Persisting CMake state... Збереження стану CMake... - - - CMakeProjectManager::CMakeBuildStep Qt Creator needs a CMake Tool set up to build. Configure a CMake Tool in the kit options. Qt Creator потребує заданого засобу CMake для збірки. Налаштуйте засіб CMake в опціях комплекту. - - - CMakeProjectManager::Internal::CMakeBuildStepConfigWidget Tool arguments: Аргументи для засобу: @@ -52233,17 +51613,11 @@ Please set a real Clang executable. <b>No build configuration found on this kit.</b> <b>Для цього комплекту відсутня конфігурація збірки.</b> - - - CMakeProjectManager::Internal::CMakeBuildStepFactory Build Display name for CMakeProjectManager::CMakeBuildStep id. Збірка - - - CMakeProjectManager::Internal::CMakeGeneratorKitConfigWidget CMake Generator: Генератор CMake: @@ -52256,9 +51630,6 @@ Please set a real Clang executable. CMake generator defines how a project is built when using CMake.<br>This setting is ignored when using other build systems. Генератор CMake визначає, як проект буде збудовано за допомогою CMake.<br>Це налаштування ігнорується для інших систем збірки. - - - CMakeProjectManager::Internal::CMakeConfigurationKitConfigWidget Change... Змінити... @@ -52283,9 +51654,6 @@ Please set a real Clang executable. Enter one variable per line with the variable name separated from the variable value by "=".<br>You may provide a type hint by adding ":TYPE" before the "=". Введіть змінні, по одній на кожний рядок. Назва змінної має відділятись від значення символом "=".<br>Ви можете давати підказку типу, додаючи ":TYPE" перед "=". - - - CMakeProjectManager::CMakeGeneratorKitInformation No CMake Tool configured, CMake generator will be ignored. Засіб CMake не задано, генератор CMake буде зігноровано. @@ -52306,13 +51674,6 @@ Please set a real Clang executable. CMake Generator Генератор CMake - - <Use Default Generator> - <Типовий генератор> - - - - CMakeProjectManager::CMakeConfigurationKitInformation CMake configuration has no path to qmake binary set, even though the kit has a valid Qt version. Конфігурація CMake не має встановленого шляху до виконуваного модуля qmake, хоча комплект має правильну версію Qt. @@ -52337,13 +51698,6 @@ Please set a real Clang executable. CMake configuration has a path to a C++ compiler set, that does not match up with the compiler path configured in the tool chain of the kit. Конфігурація CMake має встановлений шлях до компілятора C++, який не збігається з шляхом до компілятора налаштованим в наборі інструментів комплекту. - - CMake Configuration - Конфігурація CMake - - - - CMakeProjectManager::ConfigModel <UNSET> <НЕ ЗАДАНО> @@ -52356,10 +51710,6 @@ Please set a real Clang executable. Value Значення - - Advanced - Додатково - Core::Internal::ThemeChooser diff --git a/share/qtcreator/translations/qtcreator_zh_CN.ts b/share/qtcreator/translations/qtcreator_zh_CN.ts index 2373d079f74..7e32dfa3128 100644 --- a/share/qtcreator/translations/qtcreator_zh_CN.ts +++ b/share/qtcreator/translations/qtcreator_zh_CN.ts @@ -313,18 +313,11 @@ - CMakeProjectManager::Internal::CMakeBuildEnvironmentWidget + CMakeProjectManager Clear system environment 清除系统环境变量 - - Build Environment - 构建时的环境变量 - - - - CMakeProjectManager::Internal::CMakeBuildConfigurationFactory Create 创建 @@ -349,9 +342,6 @@ New Configuration Name: 新配置名称: - - - CMakeProjectManager::Internal::CMakeBuildSettingsWidget Run cmake 执行cmake @@ -368,16 +358,10 @@ Build directory: 构建目录: - - - CMakeProjectManager::Internal::CMakeOpenProjectWizard CMake Wizard CMake 向导 - - - CMakeProjectManager::Internal::CMakeRunConfigurationWidget Arguments: 参数: @@ -434,9 +418,6 @@ Running executable: <b>%1</b> %2 运行的执行档: <b>%1</b> %2 - - - CMakeProjectManager::Internal::InSourceBuildPage Qt Creator has detected an <b>in-source-build in %1</b> which prevents shadow builds. Qt Creator will not allow you to change the build directory. If you want a shadow build, clean your source directory and re-open the project. Qt Creator在<b>%1</b>检测到一个<b>在源代码中的构建</b>,无法进行shadow build. Qt Creator将不允许您更改编译目录。如果您想要进行shadow build,请清理源码目录再重新打开此项目。 @@ -445,29 +426,6 @@ Build Location 构建路径 - - - CMakeProjectManager::Internal::CMakeRunPage - - Please specify the path to the cmake executable. No cmake executable was found in the path. - 请指定cmake可执行档的路径,在环境变量path中没有找到cmake执行档。 - - - The cmake executable (%1) does not exist. - cmake执行档 (%1) 不存在。 - - - The path %1 is not a executable. - 路径 (%1) 不是可执行程序。 - - - The path %1 is not a valid cmake. - 路径 (%1) 不是有效的cmake。 - - - Arguments: - 参数: - Generator: 创建器: @@ -564,9 +522,6 @@ No valid cmake executable specified. 没有指定有效的cmake执行档。 - - - CMakeProjectManager::Internal::CMakeSettingsPage CMake CMake @@ -579,9 +534,6 @@ CMake executable 可执行的cmake - - - CMakeProjectManager::Internal::MakeStepConfigWidget Additional arguments: 额外的参数: @@ -611,9 +563,6 @@ <b>Unknown Toolchain</b> <b>未知工具链</b> - - - CMakeProjectManager::Internal::ShadowBuildPage Please enter the directory in which you want to build your project. 请进入您想构建项目的目录。 @@ -622,14 +571,6 @@ Please enter the directory in which you want to build your project. Qt Creator recommends to not use the source directory for building. This ensures that the source directory remains clean and enables multiple builds with different settings. 请进入您想构建项目的目录。Qt Creator 建议您不要使用源目录构建。这能确保源目录干净,并且可以针对不同设定多次构建。 - - Build directory: - 构建目录: - - - Build Location - 构建路径 - CPlusPlus::OverviewModel @@ -11974,31 +11915,15 @@ Do you want to ignore them? - QMakeStep + QmakeProjectManager QMake Build Configuration: qmake 构建配置: - - Additional arguments: - 额外的参数: - - - Effective qmake call: - 有效的qmake调用: - qmake Build Configuration: qmake 构建配置: - - qmake build configuration: - qmake 构建配置: - - - Link QML debugging library: - 连接QML 调试库: - QObject @@ -12242,7 +12167,7 @@ Ids must begin with a lowercase letter. - QmakeProjectManager::Internal::ConsoleAppWizard + QmakeProjectManager Qt4 Console Application Qt4 控制台应用 @@ -12267,16 +12192,10 @@ Preselects a desktop Qt for building the application if available. Creates a Qt console application. 创建一个Qt4 控制台应用。 - - - QmakeProjectManager::Internal::ConsoleAppWizardDialog This wizard generates a Qt4 console application project. The application derives from QCoreApplication and does not provide a GUI. 本向导创建一个Qt4控制台应用项目,该应用继承自QCoreApplication,没有图形界面。 - - - QmakeProjectManager::Internal::DesignerExternalEditor Qt Designer is not responding (%1). Qt设计师无响应 (%1)。 @@ -12285,16 +12204,10 @@ Preselects a desktop Qt for building the application if available. Unable to create server socket: %1 无法创建服务器套接字: %1 - - - QmakeProjectManager::Internal::EmbeddedPropertiesPanel Embedded Linux 嵌入式 Linux - - - QmakeProjectManager::Internal::EmptyProjectWizard Empty Qt4 Project 空的 Qt4 项目 @@ -12311,16 +12224,10 @@ Preselects a desktop Qt for building the application if available. Creates an empty Qt project. 创建一个空的 Qt 项目. - - - QmakeProjectManager::Internal::EmptyProjectWizardDialog This wizard generates an empty Qt4 project. Add files to it later on by using the other wizards. 本向导将创建一个空的Qt4项目,稍后使用其他向导添加文件. - - - QmakeProjectManager::Internal::ExternalQtEditor Unable to start "%1" 无法启动"%1" @@ -12329,9 +12236,6 @@ Preselects a desktop Qt for building the application if available. The application "%1" could not be found. 找不到应用 "%1"。 - - - QmakeProjectManager::Internal::FilesPage Class Information 类信息 @@ -12340,9 +12244,6 @@ Preselects a desktop Qt for building the application if available. Specify basic information about the classes for which you want to generate skeleton source code files. 指定您要创建的源码文件的基本类信息。 - - - QmakeProjectManager::Internal::GuiAppWizard Qt4 Gui Application Qt4 GUI 应用 @@ -12371,9 +12272,6 @@ Preselects a desktop Qt for building the application if available. The template file '%1' could not be opened for reading: %2 无法打开读取模板文件 '%1': %2 - - - QmakeProjectManager::Internal::GuiAppWizardDialog This wizard generates a Qt4 GUI application project. The application derives by default from QApplication and includes an empty widget. 本向导将创建一个Qt4 GUI应用项目,应用程序默认继承自QApplication并且包含一个空白的窗体。 @@ -12382,9 +12280,6 @@ Preselects a desktop Qt for building the application if available. Details 详情 - - - QmakeProjectManager::Internal::LibraryWizard C++ Library C++ 库 @@ -12405,9 +12300,6 @@ Preselects a desktop Qt for building the application if available. Creates a C++ Library. 创建一个C++ 库 - - - QmakeProjectManager::Internal::LibraryWizardDialog Shared library 共享库 @@ -12440,17 +12332,10 @@ Preselects a desktop Qt for building the application if available. This wizard generates a C++ library project. 本向导将创建一个C++ 库项目. - - Details - 详情 - Symbian Specific Symbian 特定 - - - QmakeProjectManager::Internal::ModulesPage Select required modules 选择需要的模块 @@ -12463,13 +12348,6 @@ Preselects a desktop Qt for building the application if available. Select the modules you want to include in your project. The recommended modules for this project are selected by default. 请选择您的项目需要包含的模块,推荐的模块已经被默认选中。 - - - QmakeProjectManager::Internal::ProEditor - - New - 新建 - Remove 删除 @@ -12518,9 +12396,6 @@ Preselects a desktop Qt for building the application if available. Add Block 添加段落 - - - QmakeProjectManager::Internal::ProEditorModel <Global Scope> <全局范围> @@ -12557,9 +12432,6 @@ Preselects a desktop Qt for building the application if available. Insert Item 插入项目 - - - QmakeProjectManager::Internal::ProjectLoadWizard Import existing build settings 导入现有的构建设置 @@ -12580,72 +12452,18 @@ Preselects a desktop Qt for building the application if available. Project setup 项目设置 - - Targets - 目标 - Project Setup 项目设置 - - - QmakeProjectManager::Internal::QmakeBuildEnvironmentWidget Clear system environment 清除系统环境变量 - - Build Environment - 构建环境 - - - - QmakeProjectManager::Internal::QmakePriFileNode - - Headers - 头文件 - - - Sources - 源文件 - - - Forms - 界面文件 - - - Resources - 资源文件 - - - Other files - 其他文件 - - - Cannot Open File - 无法打开文件 - Cannot open the file for edit with VCS. 无法使用VCS打开用于编辑的文件. - - Cannot Set Permissions - 无法设置权限 - - - Cannot set permissions to writable. - 无法设置文件的可写权限. - - - Failed! - 发生错误! - - - File Error - 文件错误 - Could not open the file for edit with VCS. 无法使用VCS打开用于编辑的文件。 @@ -12662,14 +12480,6 @@ Preselects a desktop Qt for building the application if available. Could not set permissions to writable. 无法设置可写权限。 - - There are unsaved changes for project file %1. - 项目文件 %1 中还有未保存的改变. - - - Could not write project file %1. - 无法写入项目文件 %1。 - Error while reading PRO file %1: %2 打开PRO文件%1出错: %2 @@ -12678,20 +12488,6 @@ Preselects a desktop Qt for building the application if available. Error while changing pro file %1. 修改pro文件 %1 时发生错误 - - - QmakeProjectManager::Internal::QmakeProFileNode - - Error while parsing file %1. Giving up. - 解析文件 '%1'时发生错误,终止。 - - - Could not find .pro file for sub dir '%1' in '%2' - 在'%2'的子目录'%1' 中找不到.pro文件 - - - - QmakeProjectManager::Internal::QmakeProjectConfigWidget Configuration Name: 配置名称: @@ -12778,16 +12574,6 @@ Preselects a desktop Qt for building the application if available. Warning: 警告: - - %1 Debug - Name of a debug build configuration to created by a project wizard, %1 being the Qt version name. We recommend not translating it. - %1 Debug - - - %1 Release - Name of a release build configuration to created by a project wizard, %1 being the Qt version name. We recommend not translating it. - %1 Release - <No tool chain selected> <没有选择工具链> @@ -12837,13 +12623,6 @@ Preselects a desktop Qt for building the application if available. Build directory: 构建目录: - - Manage... - 管理... - - - - QmakeProjectManager::Internal::QmakeProjectManagerPlugin Run qmake 执行qmake @@ -12916,9 +12695,6 @@ Preselects a desktop Qt for building the application if available. Build in %1 在%1构建 - - - QmakeProjectManager::Internal::QmakeRunConfiguration Qt4RunConfiguration Qt4 运行配置 @@ -12947,9 +12723,6 @@ Preselects a desktop Qt for building the application if available. Qt4 RunConfiguration Qt4 运行配置 - - - QmakeProjectManager::Internal::QmakeRunConfigurationWidget Running executable: <b>%1</b> %2 (in terminal) 正在执行程序: <b>%1</b> %2 (在控制台) @@ -12994,18 +12767,6 @@ Preselects a desktop Qt for building the application if available. Base environment for this runconfiguration: 运行配置的基本环境变量: - - Clean Environment - 清理时的环境变量 - - - System Environment - 系统环境变量 - - - Build Environment - 构建时的环境变量 - Name: 名称: @@ -13030,9 +12791,6 @@ Preselects a desktop Qt for building the application if available. Use debug version of frameworks (DYLD_IMAGE_SUFFIX=_debug) 使用开发框架的调试版 (DYLD_IMAGE_SUFFIX=_debug) - - - QmakeProjectManager::Internal::QtOptionsPageWidget <specify a name> <指定一个名字> @@ -13073,10 +12831,6 @@ Preselects a desktop Qt for building the application if available. Manual 手动设置 - - Building helpers - 构建助手 - Debugging Helper Build Log for '%1' 调试助手为 '%1' 构建日志 @@ -13156,9 +12910,6 @@ Preselects a desktop Qt for building the application if available. Found Qt version %1, using mkspec %2 找到Qt 版本 %1 使用mkspec %2 - - - QmakeProjectManager::Internal::QtVersionManager Qt versions Qt 版本 @@ -13287,20 +13038,10 @@ p, li { white-space: pre-wrap; } Add 添加 - - Remove - 删除 - - - - QmakeProjectManager::Internal::QtWizard The project %1 could not be opened. 无法打开项目 %1 - - - QmakeProjectManager::Internal::ValueEditor Edit Variable 编辑变量 @@ -13349,14 +13090,6 @@ p, li { white-space: pre-wrap; } Edit Items 编辑项目 - - New - 新建 - - - Remove - 删除 - Edit Values 编辑数值 @@ -13373,9 +13106,6 @@ p, li { white-space: pre-wrap; } Edit Advanced Expression 编辑高级表达式 - - - QmakeProjectManager::MakeStep Make Qt4 MakeStep display name. @@ -13421,9 +13151,6 @@ p, li { white-space: pre-wrap; } <font color="#ff0000">Could not find make command: %1 in the build environment</font> <font color="#ff0000">在构建环境中找不到 make 命令: %1 </font> - - - QmakeProjectManager::MakeStepConfigWidget Override %1: 覆盖 %1: @@ -13452,16 +13179,10 @@ p, li { white-space: pre-wrap; } <b>Make:</b> %1 %2 in %3 <b>Make:</b> %1 %2 在目录 %3 - - - QmakeProjectManager::Internal::MakeStepFactory Make Make - - - QmakeProjectManager::QMakeStep <font color="#ff0000"><b>No valid Qt version set. Set one in Preferences </b></font> @@ -13485,10 +13206,6 @@ p, li { white-space: pre-wrap; } QMakeStep default display name qmake - - Configuration is faulty, please check the Build Issues view for details. - 配置有误,请检查“构建问题”视图来获得更多信息. - Configuration is faulty, please check the Issues view for details. 配置有误,请检查“问题”视图来获得更多信息。 @@ -13513,10 +13230,6 @@ p, li { white-space: pre-wrap; } Library not available. <a href='compile'>Compile...</a> 库不可用. <a href='compile'>编译...</a> - - QML Debugging - QML 调试 - <font color="#0000ff">Configuration is faulty, please check the Build Issues view for details.</font> <font color="#0000ff">配置有缺陷, 请检查构建输出来查看详情.</font> @@ -13551,9 +13264,6 @@ p, li { white-space: pre-wrap; } <font color="#0000ff">Configuration unchanged, skipping qmake step.</font> <font color="#0000ff">配置未改变,跳过 qmake 步骤.</font> - - - QmakeProjectManager::QMakeStepConfigWidget <b>QMake:</b> No Qt version set. QMake can not be run. <b>QMake:</b> 没有设置 Qt 版本. QMake 无法运行. @@ -13594,10 +13304,6 @@ p, li { white-space: pre-wrap; } Enable QML debugging: 打开QML调试: - - Link QML debugging library: - 连接QML 调试库: - Might make your application vulnerable. Only use in a safe environment. 可能导致应用程序易受攻击,请仅在安全环境中使用。 @@ -13610,9 +13316,6 @@ p, li { white-space: pre-wrap; } Might make the application vulnerable. Use only in a safe environment. 可能导致应用程序不稳定,仅可在安全模式下运行. - - - QmakeProjectManager::QmakeManager Loading project %1 ... 载入项目 %1 ... @@ -13657,9 +13360,6 @@ p, li { white-space: pre-wrap; } Done opening project 完成打开项目 - - - QmakeProjectManager::QtVersionManager MinGW from %1 MinGW 从%1 @@ -13672,14 +13372,6 @@ p, li { white-space: pre-wrap; } Qt in PATH PATH中的 Qt - - Name: - 名称: - - - Invalid Qt version - 无效的 Qt 版本 - Source: 源: @@ -13704,10 +13396,6 @@ p, li { white-space: pre-wrap; } Version: 版本: - - Debugging helper: - 调试助手: - QApplication @@ -17372,7 +17060,7 @@ Will not be applied to whitespace in comments and strings. - QmakeProjectManager::Internal::ClassDefinition + QmakeProjectManager Form 界面 @@ -17477,9 +17165,6 @@ Will not be applied to whitespace in comments and strings. Icon files (*.png *.ico *.jpg *.xpm *.tif *.svg) 图标文件 (*.png *.ico *.jpg *.xpm *.tif *.svg) - - - QmakeProjectManager::Internal::CustomWidgetPluginWizardPage WizardPage 向导页面 @@ -17516,9 +17201,6 @@ Will not be applied to whitespace in comments and strings. icons.qrc icons.qrc - - - QmakeProjectManager::Internal::CustomWidgetWidgetsWizardPage Custom Qt Widget Wizard 自定义 Qt 控件向导 @@ -19127,7 +18809,7 @@ Reason: %2 - QmakeProjectManager::Internal::ClassList + QmakeProjectManager <New class> <新类> @@ -19140,9 +18822,6 @@ Reason: %2 Delete class %1 from list? 从列表中删除类 %1 吗? - - - QmakeProjectManager::Internal::CustomWidgetWizard Qt4 Designer Custom Widget Qt4 设计师自定义控件 @@ -19159,9 +18838,6 @@ Reason: %2 Creates a Qt Custom Designer Widget or a Custom Widget Collection. 创建一个Qt设计师自定义控件或者一个自定义控件集合。 - - - QmakeProjectManager::Internal::CustomWidgetWizardDialog This wizard generates a Qt4 Designer Custom Widget or a Qt4 Designer Custom Widget Collection project. 本向导将创建一个Qt4设计师自定义控件或者一个Qt4设计师自定义控件集合项目。 @@ -19174,9 +18850,6 @@ Reason: %2 Plugin Details 插件详细信息 - - - QmakeProjectManager::Internal::PluginGenerator Cannot open icon file %1. 无法打开图标文件 %1. @@ -19500,7 +19173,7 @@ S60 emulator run configuration default display name, %1 is base pro-File name - QmakeProjectManager::QmakeBuildConfigurationFactory + QmakeProjectManager Using Default Qt Version 使用默认Qt版本 @@ -20254,11 +19927,7 @@ S60 emulator run configuration default display name, %1 is base pro-File name - QmakeProjectManager::Internal::TestWizardPage - - WizardPage - 向导页面 - + QmakeProjectManager Class name: 类名: @@ -20305,31 +19974,15 @@ S60 emulator run configuration default display name, %1 is base pro-File name - CMakeProjectManager::Internal::CMakeRunConfiguration + CMakeProjectManager Run CMake target 执行 CMake 目标 - - Clean Environment - 清理时的环境变量 - - - System Environment - 系统环境变量 - - - Build Environment - 构建时的环境变量 - The executable is not built by the current build configuration 这个可执行档不是使用当前的构建配置构建出来的 - - The executable is not built by the current buildconfiguration - 这个可执行档不是使用当前的构建配置制作出来的 - (disabled) (禁用) @@ -20839,7 +20492,7 @@ S60 emulator run configuration default display name, %1 is base pro-File name - QmakeProjectManager::Internal::MaemoRunConfiguration + QmakeProjectManager %1 on Maemo device Maemo 设备上的 %1 @@ -20861,42 +20514,18 @@ S60 emulator run configuration default display name, %1 is base pro-File nameMaemo run configuration default display name 在Maemo设备上运行 - - Clean Environment - 清除环境变量 - - - System Environment - 系统环境变量 - - - - QmakeProjectManager::Internal::MaemoRunConfigurationFactory %1 on Maemo Device Maemo 设备上的 %1 - - New Maemo Run Configuration - 新建Maemo运行配置 - - - - QmakeProjectManager::Internal::MaemoRunControlFactory Run on device 在设备上运行 - - - QmakeProjectManager::Internal::MaemoSshConnection Could not connect to host 无法连接主机 - - - QmakeProjectManager::Internal::MaemoInteractiveSshConnection Could not start remote shell: %1 不能启动远程 shell: %1 @@ -20909,9 +20538,6 @@ S60 emulator run configuration default display name, %1 is base pro-File nameSSH error: %1 SSH 错误: %1 - - - QmakeProjectManager::Internal::MaemoSftpConnection Error setting up SFTP subsystem: %1 设置 SFTP 子系统发生错误: %1 @@ -20924,9 +20550,6 @@ S60 emulator run configuration default display name, %1 is base pro-File nameCould not copy local file '%1' to remote file '%2': %3 无法复制本地文件 '%1' 到远程文件 '%2': %3 - - - QmakeProjectManager Qt Versions Qt 版本 @@ -22626,15 +22249,12 @@ Previous decimal signed value (big endian): %4 - CMakeProjectManager::Internal::CMakeTarget + CMakeProjectManager Desktop CMake Default target display name 桌面 - - - CMakeProjectManager::Internal::MakeStepFactory Make Display name for CMakeProjectManager::MakeStep id. @@ -23742,7 +23362,7 @@ Previous decimal signed value (big endian): %4 - QmakeProjectManager::Internal::QmakeTarget + QmakeProjectManager Desktop Qt4 Desktop target display name @@ -24993,14 +24613,7 @@ Requires <b>Qt 4.7.4</b> or newer. - QmakeProjectManager::Internal::QMakeStepFactory - - qmake - qmake - - - - QmakeProjectManager::Internal::MaemoConfigTestDialog + QmakeProjectManager Testing configuration... 测试配置... @@ -25091,9 +24704,6 @@ Requires <b>Qt 4.7.4</b> or newer. List of installed Qt packages: 已经安装的Qt包列表: - - - QmakeProjectManager::Internal::MaemoManager Start Maemo Emulator 启动Maemo模拟器 @@ -25102,9 +24712,6 @@ Requires <b>Qt 4.7.4</b> or newer. Stop Maemo Emulator 停止Maemo模拟器 - - - QmakeProjectManager::Internal::MaemoPackageCreationWidget Package Creation 生成包 @@ -25133,10 +24740,6 @@ Requires <b>Qt 4.7.4</b> or newer. Could Not Set New Icon 无法设置新图标 - - File Error - 文件错误 - Could not set project name. 无法设置项目名称。 @@ -25169,9 +24772,6 @@ Requires <b>Qt 4.7.4</b> or newer. File already in package 文件已经存在于包中 - - - QmakeProjectManager::Internal::MaemoRunConfigurationWidget Run configuration name: 运行配置名称: @@ -25240,18 +24840,6 @@ Requires <b>Qt 4.7.4</b> or newer. Use remote gdbserver 使用远程gdbserver - - Base environment for this run configuration: - 运行设置的基础环境: - - - Clean Environment - 清理环境 - - - System Environment - 系统环境变量 - Choose directory to mount 选择挂载的目录 @@ -25295,21 +24883,10 @@ Requires <b>Qt 4.7.4</b> or newer. Device Configuration: 设备配置: - - Executable: - 执行档: - - - Arguments: - 参数: - Simulator: 模拟器: - - - QmakeProjectManager::Internal::MaemoSettingsWidget New Device Configuration %1 Standard Configuration name with number @@ -25367,21 +24944,6 @@ Requires <b>Qt 4.7.4</b> or newer. Deploy Key ... 部署公钥... - - - QmakeProjectManager::Internal::MaemoSshConfigDialog - - Stop deploying - 停止部署 - - - Key deployment failed: %1 - 部署密钥失败:%1 - - - Key was successfully deployed. - 展开秘钥成功 - Deploy Public Key 展开公钥 @@ -25412,9 +24974,6 @@ Requires <b>Qt 4.7.4</b> or newer. 无法写入文件 '%1': %2 - - - QmakeProjectManager::Internal::MaemoSshThread Error in cryptography backend: %1 后台加密发生错误:%1 @@ -25520,48 +25079,7 @@ Requires <b>Qt 4.7.4</b> or newer. - QmakeProjectManager::Internal::QmakeBuildConfigurationFactory - - Using Qt Version "%1" - 使用Qt版本 "%1" - - - New configuration - 新建配置 - - - New Configuration Name: - 新配置名称: - - - New Configuration - 新配置 - - - New configuration name: - 新配置名称: - - - %1 Debug - Debug build configuration. We recommend not translating it. - %1 Debug - - - %1 Release - Release build configuration. We recommend not translating it. - %1 Release - - - - QmakeProjectManager::QmakeProject - - Debug - Debug - - - Release - Release - + QmakeProjectManager Evaluating 评估中 @@ -25729,7 +25247,7 @@ Requires <b>Qt 4.7.4</b> or newer. - QmakeProjectManager::Internal::MobileGuiAppWizard + QmakeProjectManager Mobile Qt Application 移动Qt应用 @@ -25746,9 +25264,6 @@ Preselects Qt for Simulator and mobile targets if available Creates a mobile Qt Gui Application with one form. 创建有一个界面的移动Qt Gui应用. - - - QmakeProjectManager::Internal::BaseQmakeProjectWizardDialog Modules 模块 @@ -25757,17 +25272,6 @@ Preselects Qt for Simulator and mobile targets if available Kits 构建套件(Kit) - - Targets - 目标 - - - Qt Versions - Qt版本 - - - - QmakeProjectManager::Internal::TargetSetupPage Qt Creator can set up the following targets: Qt Creator可以设置如下目标: @@ -25831,16 +25335,6 @@ Preselects Qt for Simulator and mobile targets if available Uncheck all versions 取消选中所有版本 - - <b>Error:</b> - Severity is Task::Error - <b>错误:</b> - - - <b>Warning:</b> - Severity is Task::Warning - <b>警告:</b> - debug and release We are going to build debug and release @@ -25861,11 +25355,6 @@ Preselects Qt for Simulator and mobile targets if available %1: qmake used (incl. full path), %2: "debug", "release" or "debug and release" <br>使用%1(%2) - - Import - Is this an import of an existing build or a new one? - 导入 - New Is this an import of an existing build or a new one? @@ -25899,9 +25388,6 @@ Preselects Qt for Simulator and mobile targets if available <html><head/><body><p><b>No valid Qt versions found.</b></p><p>Please add a Qt version in <i>Tools/Options</i> or via the maintenance tool of the SDK.</p></body></html> <html><head/><body><p><b>没有有效的Qt版本.</b></p><p> 请添加Qt 版本在<i>工具/选项</i> 或者使用SDK的管理工具.</p></body></html> - - - QmakeProjectManager::Internal::TestWizard Qt Unit Test Qt单元测试 @@ -25914,17 +25400,10 @@ Preselects Qt for Simulator and mobile targets if available Creates a Qt Unit Test. 创建一个Qt单元测试. - - - QmakeProjectManager::Internal::TestWizardDialog This wizard generates a Qt unit test consisting of a single source file with a test class. 本向导将创建一个Qt单元测试,其中包括一个含有测试类的源文件。 - - Details - 详情 - Subversion::Internal::SubversionEditor @@ -26414,7 +25893,7 @@ with a password, which you can enter below. - QmakeProjectManager::Internal::MaemoPackageContents + QmakeProjectManager Local File Path 本地文件路径 @@ -26423,9 +25902,6 @@ with a password, which you can enter below. Remote File Path 远程文件路径 - - - QmakeProjectManager::Internal::MaemoPackageCreationStep Creating package file ... 创建包文件... @@ -26657,7 +26133,7 @@ with a password, which you can enter below. - QmakeProjectManager::QtVersion + QmakeProjectManager Qmake does not support build directories below the source directory. Qmake不支持源文件目录下的构建目录。 @@ -27523,11 +26999,7 @@ Id必须以小写字母开头。 - QmakeProjectManager::Internal::QemuRuntimeManager - - Start Maemo Emulator - 启动Maemo模拟器 - + QmakeProjectManager Qemu finished with error: Exit code was %1. Qemu 在有错误的情况下结束: 退出代码 %1. @@ -27544,10 +27016,6 @@ Id必须以小写字母开头。 Qemu error Qemu 错误 - - Stop Maemo Emulator - 停止Maemo模拟器 - ContextPaneWidgetBorderImage @@ -27895,7 +27363,7 @@ Id必须以小写字母开头。 - QmakeProjectManager::Internal::LibraryDetailsWidget + QmakeProjectManager Library: 库: @@ -28235,7 +27703,7 @@ Id必须以小写字母开头。 - CMakeProjectManager::Internal::MakeStep + CMakeProjectManager Make Default display name for the cmake make step. @@ -29853,26 +29321,15 @@ import QtQuick 1.0 use import Qt 4.7 instead - QmakeProjectManager::Internal::AddLibraryWizard + QmakeProjectManager Add Library 添加库 - - Type - 类型 - - - Details - 详情 - Summary 汇总 - - - QmakeProjectManager::Internal::LibraryTypePage Library Type 库类型 @@ -29919,9 +29376,6 @@ Adds the library and include paths to the .pro file. 链接到在您的构建树中的库。 请将库和它的include 路径添加到.pro文件中。 - - - QmakeProjectManager::Internal::DetailsPage System Library 系统库 @@ -29954,24 +29408,10 @@ Adds the library and include paths to the .pro file. Choose the project file of the library to link to 选择要链接的库的项目文件 - - - QmakeProjectManager::Internal::SummaryPage - - Summary - 汇总 - The following snippet will be added to the<br><b>%1</b> file: 下列代码段将被添加到文件<br><b>%1</b> 中: - - - QmakeProjectManager::Internal::LibraryDetailsController - - Linkage: - 链接: - %1 Dynamic %1 动态 @@ -29980,10 +29420,6 @@ Adds the library and include paths to the .pro file. %1 Static %1 静态 - - Mac: - Mac: - %1 Framework %1 框架 @@ -29992,17 +29428,10 @@ Adds the library and include paths to the .pro file. %1 Library %1 库 - - - QmakeProjectManager::QmlDumpTool Only available for Qt for Desktop and Qt for Qt Simulator. 仅限 Qt 桌面版 或者 Qt 模拟器版本。 - - Only available for Qt 4.7.1 or newer. - 仅限 Qt 4.7.1 或更新。 - Not needed. 不需要。 @@ -30037,19 +29466,11 @@ Reason: %2 - QmakeProjectManager::QmlObserverTool + QmakeProjectManager Only available for Qt for Desktop or Qt for Qt Simulator. 仅限 Qt 桌面版 或者 Qt 模拟器版本。 - - Only available for Qt 4.7.1 or newer. - 仅限 Qt 4.7.1 或更新。 - - - Not needed. - 不需要。 - QMLObserver QMLObserver @@ -30073,7 +29494,7 @@ Reason: %2 - QmakeProjectManager::SbsV2Parser + QmakeProjectManager SBSv2 build log SBSv2构建日志 @@ -30092,9 +29513,6 @@ Reason: %2 %1 is the SBSv2 build recipe name, %2 the return code of the failed command SBSv2 build recipe %1错误,错误代码为%2. - - - QmakeProjectManager::AbstractMobileApp Could not open desktop file template 无法打开桌面文件模板 @@ -30111,13 +29529,6 @@ Reason: %2 Could not open template file '%1'. 无法打开模板文件'%1'。 - - - QmakeProjectManager::Internal::AbstractMobileAppWizardDialog - - Qt Versions - Qt版本 - Application Options 应用程序选项 @@ -30139,19 +29550,7 @@ Preselects Qt for Simulator and mobile targets if available. - QmakeProjectManager::Internal::MobileAppWizardOptionsPage - - Automatically Rotate Orientation - 自动旋转方向 - - - Lock to Landscape Orientation - 横向锁定 - - - Lock to Portrait Orientation - 纵向锁定 - + QmakeProjectManager The file is not a valid image. 不是一个合法的图片文件. @@ -30164,9 +29563,6 @@ Preselects Qt for Simulator and mobile targets if available. Icon unusable 图标不可用 - - - QmakeProjectManager::Internal::QtQuickApp The QML import path '%1' cannot be found. QML导入路径'%1'无法找到。 @@ -30191,9 +29587,6 @@ Preselects Qt for Simulator and mobile targets if available. Could not write file '%1'. 无法写文件'%1'. - - - QmakeProjectManager::Internal::QtQuickAppWizardDialog New Qt Quick Application 新建Qt Quick程序 @@ -30214,9 +29607,6 @@ Preselects Qt for Simulator and mobile targets if available. QML Sources QML源文件 - - - QmakeProjectManager::Internal::QtQuickAppWizard Qt Quick Application Qt Quick应用程序 @@ -30282,13 +29672,6 @@ Requires <b>Qt 4.7.0</b> or newer. 需要<b>Qt 4.7.0</b> 或更新版本。 - - QmakeProjectManager::Internal::QtQuickAppWizardSourcesPage - - Select QML File - 选择QMl文件 - - TaskList::Internal::StopMonitoringHandler @@ -31192,7 +30575,7 @@ Local pulls are not applied to the master branch. - QmakeProjectManager::Internal::DebuggingHelper + QmakeProjectManager Used to extract QML type information from library-based plugins. 使用基于库的插件来解压QML类型的信息。 @@ -31209,10 +30592,6 @@ Local pulls are not applied to the master branch. QML Observer: QML Observer: - - Build - 构建 - QML Debugging Library: QML 调试库: @@ -31428,11 +30807,7 @@ Local pulls are not applied to the master branch. - QmakeProjectManager::Internal::RvctToolChainConfigWidget - - Form - 界面 - + QmakeProjectManager ARM &version: ARM版本(&V): @@ -31523,7 +30898,7 @@ Previous Qt versions have limitations in building suitable SIS files. - QmakeProjectManager::Internal::WinscwToolChainConfigWidget + QmakeProjectManager Dialog 对话框 @@ -31540,21 +30915,6 @@ Previous Qt versions have limitations in building suitable SIS files. System library path: 系统库路径: - - - QmakeProjectManager::Internal::QtVersionInfo - - Version name: - 版本名称: - - - qmake location: - qmake 路径: - - - S60 SDK: - S60 SDK: - SBS v2 directory: SBS v2 目录: @@ -32733,17 +32093,6 @@ Specifies how backspace interacts with indentation. Bazaar 命令 - - CMakeProjectManager::Internal::CMakeManager - - Run cmake - 执行CMake - - - Run CMake - 执行CMake - - Core::Internal::ExternalToolModel @@ -34637,19 +33986,11 @@ Please build the debugging helpers on the Qt version options page. - QmakeProjectManager::QmlDebuggingLibrary + QmakeProjectManager Only available for Qt 4.7.1 or newer. 仅可用于 Qt 4.7.1 或更新版本。 - - Not needed. - 不需要。 - - - QML Debugging - QML 调试 - The target directory %1 could not be created. 目标目录 %1 无法被创建。 @@ -34664,39 +34005,10 @@ Reason: %2 原因: %2 - - - QmakeProjectManager::QmakeTarget - - Desktop - Qt4 Desktop target display name - 桌面 - - - Qt Simulator - Qt4 Simulator target display name - Qt模拟器 - - - Symbian Emulator - Qt4 Symbian Emulator target display name - 塞班模拟器 - - - Symbian Device - Qt4 Symbian Device target display name - 塞班设备 - - - - QmakeProjectManager::Internal::MaemoDeviceConfigurations (default for %1) (默认 %1) - - - QmakeProjectManager::Internal::MaemoDeviceConfigurationsSettingsWidget Physical Device 物理设备 @@ -34705,58 +34017,18 @@ Reason: %2 Emulator (Qemu) 模拟器(Qemu) - - Choose Public Key File - 选择公钥文件 - - - Public Key Files(*.pub);;All Files (*) - 选择公钥文件(*.pub);;所有文件 (*) - - - Stop Deploying - 停止部署 - - - Deployment Failed - 部署失败 - - - Deployment Succeeded - 部署成功 - - - Key was successfully deployed. - 部署密钥成功. - - - Deploy Public Key ... - 部署公钥... - - - - QmakeProjectManager::Internal::MaemoDeviceConfigWizardStartPage General Information 概要 - - - QmakeProjectManager::Internal::MaemoDeviceConfigWizardPreviousKeySetupCheckPage Device Status Check 检测设备状态 - - - QmakeProjectManager::Internal::MaemoDeviceConfigWizardReuseKeysCheckPage Existing Keys Check 现有密钥检测 - - - QmakeProjectManager::Internal::MaemoDeviceConfigWizardKeyCreationPage Key Creation 密钥创建 @@ -34781,9 +34053,6 @@ Reason: %2 Failed to save key file %1: %2 保存密钥文件失败%1: %2 - - - QmakeProjectManager::Internal::MaemoDeviceConfigWizardKeyDeploymentPage Key Deployment 公钥部署 @@ -34804,9 +34073,6 @@ Reason: %2 Done. 完成。 - - - QmakeProjectManager::Internal::MaemoDeviceConfigWizardFinalPage Setup Finished 设置完成 @@ -34819,16 +34085,10 @@ Reason: %2 The new device configuration will now be created. 新设备配置将会被创建。 - - - QmakeProjectManager::Internal::MaemoDeviceConfigWizard New Device Configuration Setup 新设备配置设置 - - - QmakeProjectManager::Internal::MaemoGlobal Is the device connected and set up for network access? @@ -34997,7 +34257,7 @@ Is the device connected and set up for network access? - QmakeProjectManager::Internal::TrkRunControl + QmakeProjectManager No device is connected. Please connect a device and try again. 没有设备连接。请连接设备后再试。 @@ -35032,9 +34292,6 @@ Check if the phone is connected and App TRK is running. Could not start application: %1 无法启动应用: %1 - - - QmakeProjectManager::Internal::WinscwToolChainFactory WINSCW WINSCW @@ -35044,19 +34301,6 @@ Check if the phone is connected and App TRK is running. Qt version中的WINSCW - - QmakeProjectManager::QmakeBaseTargetFactory - - %1 Debug - Name of a debug build configuration to created by a project wizard, %1 being the Qt version name. We recommend not translating it. - %1 Debug - - - %1 Release - Name of a release build configuration to be created by a project wizard, %1 being the Qt version name. We recommend not translating it. - %1 Release - - Qt4DefaultTargetSetupWidget @@ -35071,7 +34315,7 @@ Check if the phone is connected and App TRK is running. - QmakeProjectManager::QmakeDefaultTargetSetupWidget + QmakeProjectManager Add build from: 从添加构建: @@ -35104,28 +34348,10 @@ Check if the phone is connected and App TRK is running. Use Shadow Building 使用影子构建 - - Qt Version: - Qt 版本: - - - debug - Debug build - 调试 - - - release - release build - 发布 - No build found 没有找到构建 - - No build found in %1 matching project %2. - 在%1没有找到构建 符合项目%2. - The build found in %1 is incompatible with this target 在%1找到的构建与目标不是完全匹配 @@ -35146,23 +34372,6 @@ Check if the phone is connected and App TRK is running. Import build from %1 从%1导入构建 - - <b>Error:</b> - Severity is Task::Error - <b>错误:</b> - - - <b>Warning:</b> - Severity is Task::Warning - <b>警告:</b> - - - - QmakeProjectManager::AbstractMobileAppWizardDialog - - Qt Versions - Qt 版本 - Targets 目标 @@ -35171,10 +34380,6 @@ Check if the phone is connected and App TRK is running. Mobile Options 移动选项 - - Symbian Specific - Symbian 特定 - Maemo5 And MeeGo Specific Maemo5 和Meego 的特定选项 @@ -35191,9 +34396,6 @@ Check if the phone is connected and App TRK is running. Maemo Specific Maemo设备配置 - - - QmakeProjectManager::Internal::Html5AppWizardDialog New HTML5 Application 新的HTML5 应用 @@ -35206,9 +34408,6 @@ Check if the phone is connected and App TRK is running. HTML Options HTML 选项 - - - QmakeProjectManager::Internal::Html5AppWizard HTML5 Application HTML5 应用 @@ -35221,16 +34420,10 @@ You can build the application and deploy it on desktop and mobile target platfor 您可以构建此程序并将其部署到桌面和移动目标平台上。 - - - QmakeProjectManager::Internal::Html5AppWizardOptionsPage Select HTML File 选择HTML文件 - - - QmakeProjectManager::Internal::MobileAppWizardGenericOptionsPage Automatically Rotate Orientation 自动旋转方向 @@ -35243,48 +34436,18 @@ You can build the application and deploy it on desktop and mobile target platfor Lock to Portrait Orientation 纵向锁定(Portrait) - - WizardPage - 向导页面 - Orientation behavior: 方向行为: - - - QmakeProjectManager::Internal::MobileAppWizardMaemoOptionsPage - - The file is not a valid image. - 不是一个合法的图片文件. - - - Wrong Icon Size - 错误的图标大小 - - - Could not copy icon file: %1 - 无法复制图标文件: %1 - - - File Error - 文件错误 - Could not copy icon file. 无法复制图标文件。 - - WizardPage - 向导页面 - Application icon (64x64): 应用程序图标(64x64): - - - QmakeProjectManager::Internal::SubdirsProjectWizard Subdirs Project 子目录项目 @@ -35306,16 +34469,10 @@ You can build the application and deploy it on desktop and mobile target platfor Title of dialog 新建子项目 - - - QmakeProjectManager::Internal::SubdirsProjectWizardDialog This wizard generates a Qt4 subdirs project. Add subprojects to it later on by using the other wizards. 本向导将创建一个Qt4子目录项目,稍后可以用其他向导添加子项目。 - - - QmakeProjectManager::TargetSetupPage Target Setup 目标设置 @@ -36862,7 +36019,7 @@ With cache simulation, further event counters are enabled: - CMakeProjectManager::Internal::CMakeEditor + CMakeProjectManager Changes to cmake files are shown in the project tree after building. 构建之后在项目树中显示cmake文件的变化。 @@ -37602,7 +36759,7 @@ Do you want to continue? - QmakeProjectManager::CodaRunControl + QmakeProjectManager No device is connected. Please connect a device and try again. @@ -37718,27 +36875,10 @@ Do you want to continue? 完成. - - - QmakeProjectManager::Internal::SymbianQtConfigWidget - - S60 SDK: - S60 SDK: - - - SBS v2 directory: - SBS v2 目录: - - - - QmakeProjectManager::QmakeBuildConfiguration Parsing the .pro file 正在解析.pro文件 - - - QmakeProjectManager::QmakeProFileNode Error while parsing file %1. Giving up. 分析文件%1时发生错误,放弃中。 @@ -37747,9 +36887,6 @@ Do you want to continue? Could not find .pro file for sub dir '%1' in '%2' 在'%2'的子目录'%1' 中找不到.pro文件 - - - QmakeProjectManager::Internal::QtQuickComponentSetOptionsPage Select QML File 选择QML文件 @@ -41162,7 +40299,7 @@ Qt Creator 知道一个相似的URI. - QmakeProjectManager::QmakePriFileNode + QmakeProjectManager Headers 头文件 @@ -41195,10 +40332,6 @@ Qt Creator 知道一个相似的URI. Cannot open the file for editing with VCS. 无法使用VCS打开用于编辑的文件。 - - Cannot open the file for edit with VCS. - 无法使用VCS打开用于编辑的文件. - Cannot Set Permissions 无法设置权限 @@ -41223,9 +40356,6 @@ Qt Creator 知道一个相似的URI. File Error 文件错误 - - - QmakeProjectManager::Internal::PngIconScaler Wrong Icon Size 错误的图标大小 @@ -41234,10 +40364,6 @@ Qt Creator 知道一个相似的URI. The icon needs to be %1x%2 pixels big, but is not. Do you want Qt Creator to scale it? 图标必须要%1x%2像素大, 但现在不是。您希望Qt Creator缩放图标吗? - - File Error - 文件错误 - Could not copy icon file: %1 无法复制图标文件: %1 @@ -42353,7 +41479,7 @@ This option is useful when you want to try your application on devices which don - ClearCase::Internal::CheckOutDialog + ClearCase Check Out Check Out @@ -42379,9 +41505,6 @@ This option is useful when you want to try your application on devices which don Hijack: Unset read-only flag without check-out. This is used for local changes which the user does not want to commit. 使用&Hijack文件 - - - ClearCase::Internal::SettingsPage Configuration 配置 @@ -42455,9 +41578,6 @@ This option is useful when you want to try your application on devices which don ClearCase ClearCase - - - ClearCase::Internal::UndoCheckOut Dialog 对话框 @@ -42470,9 +41590,6 @@ This option is useful when you want to try your application on devices which don &Save copy of the file with a '.keep' extension 以'.keep'为扩展名保存文件的拷贝(&S) - - - ClearCase::Internal::VersionSelector Confirm Version to Check Out 确定checkout的版本 @@ -43261,30 +42378,15 @@ p, li { white-space: pre-wrap; } - QmakeProjectManager::Internal::MakeStep + QmakeProjectManager Make arguments: Make 参数: - - Override %1: - 覆盖 %1: - - - - QmakeProjectManager::Internal::QMakeStep qmake build configuration: qmake 构建配置: - - Debug - Debug - - - Release - Release - Additional arguments: 额外的参数: @@ -43297,13 +42399,6 @@ p, li { white-space: pre-wrap; } Effective qmake call: 有效的qmake调用: - - - QmakeProjectManager::Internal::Html5AppWizardSourcesPage - - WizardPage - 向导页面 - Main HTML File 主HTML 文件 @@ -43340,13 +42435,6 @@ p, li { white-space: pre-wrap; } Touch optimized navigation will make the HTML page flickable and enlarge the area of touch sensitive elements. If you use a JavaScript framework which optimizes the touch interaction, leave the checkbox unchecked. “触摸优化的导航”使 HTML 页面可以用手指拂动(flickable),或放大触摸敏感的元素的区域。如果您使用一个优化触摸互动的JavaScript 框架,那么不要检选此项。 - - - QmakeProjectManager::Internal::MobileAppWizardHarmattanOptionsPage - - WizardPage - 向导页面 - Application icon (80x80): 应用程序图标 (80x80): @@ -43359,13 +42447,6 @@ p, li { white-space: pre-wrap; } Make application boostable 使应用程序加速启动 - - - QmakeProjectManager::Internal::MobileLibraryWizardOptionPage - - WizardPage - 向导页面 - Plugin's directory name: 插件的目录名: @@ -45691,7 +44772,7 @@ Please choose a valid package name for your application (e.g. "org.example. - ClearCase::Internal::ActivitySelector + ClearCase Select &activity: 选择活动(&A): @@ -45704,9 +44785,6 @@ Please choose a valid package name for your application (e.g. "org.example. Keep item activity 保留项的活动 - - - ClearCase::Internal::ClearCaseControl &Check Out &Check Out @@ -45715,16 +44793,10 @@ Please choose a valid package name for your application (e.g. "org.example. &Hijack &Hijack - - - ClearCase::Internal::ClearCaseEditor Annotate version "%1" 注释版本 "%1" - - - ClearCase::Internal::ClearCasePlugin C&learCase C&learCase @@ -46013,31 +45085,18 @@ Please choose a valid package name for your application (e.g. "org.example. CC Indexing CC 正在索引 - - - ClearCase::Internal::ClearCaseSubmitEditor ClearCase Check In ClearCase Check In - - - ClearCase::Internal::ClearCaseSubmitEditorWidget Chec&k in even if identical to previous version 即使与前一版本完全相同仍然checkin (&K) - - &Preserve file modification time - 保留文件被修改的时间(&P) - &Check In &Check In - - - ClearCase::Internal::SettingsPageWidget ClearCase Command ClearCase 命令 @@ -46052,14 +45111,11 @@ Please choose a valid package name for your application (e.g. "org.example. - CMakeProjectManager::Internal::CMakeLocatorFilter + CMakeProjectManager Build CMake target 构建 CMake 目标 - - - CMakeProjectManager::Internal::ChooseCMakePage Choose Cmake Executable 选择CMake 的执行档 @@ -48711,7 +47767,7 @@ references to elements in other files, loops, etc.) - QmakeProjectManager::Internal::QmakeKitConfigWidget + QmakeProjectManager The mkspec to use when building the project with qmake.<br>This setting is ignored when using other build systems. 用qmake构建项目时使用的mkspec。<br>当使用其他构建系统时该设置被忽略。 @@ -48720,9 +47776,6 @@ references to elements in other files, loops, etc.) Qt mkspec: Qt mkspec: - - - QmakeProjectManager::QmakeKitInformation No Qt version set, so mkspec is ignored. 未设置Qt版本,所以mkspec被忽略。 @@ -48735,9 +47788,6 @@ references to elements in other files, loops, etc.) mkspec mkspec - - - QmakeProjectManager::QmakeTargetSetupWidget Manage... 管理... @@ -48752,16 +47802,6 @@ references to elements in other files, loops, etc.) Severity is Task::Warning <b>警告:</b> - - - QmakeProjectManager::Internal::UnconfiguredProjectPanel - - Configure Project - 配置项目 - - - - QmakeProjectManager::Internal::TargetSetupPageWrapper Configure Project 配置项目 @@ -48778,9 +47818,6 @@ references to elements in other files, loops, etc.) The project <b>%1</b> is not yet configured.<br/>Qt Creator uses the <b>invalid</b> kit <b>%2</b> to parse the project. 项目 <b>%1</b>尚未配置。<br/>Qt Creator使用<b>无效的</b>构建套件<b>%2</b> 来解析项目。 - - - QmakeProjectManager::Internal::ImportWidget Import Build from... 导入构建,从... diff --git a/share/qtcreator/translations/qtcreator_zh_TW.ts b/share/qtcreator/translations/qtcreator_zh_TW.ts index 0b2327588d8..5f51f6b37fd 100644 --- a/share/qtcreator/translations/qtcreator_zh_TW.ts +++ b/share/qtcreator/translations/qtcreator_zh_TW.ts @@ -192,7 +192,7 @@ - CMakeProjectManager::Internal::CMakeBuildConfigurationFactory + CMakeProjectManager Build 建置 @@ -205,9 +205,6 @@ New configuration name: 新設置名稱: - - - CMakeProjectManager::Internal::CMakeBuildSettingsWidget Run cmake 執行 cmake @@ -220,20 +217,10 @@ &Change 變更(&C) - - Build directory: - 建置目錄: - - - - CMakeProjectManager::Internal::CMakeOpenProjectWizard CMake Wizard CMake 精靈 - - - CMakeProjectManager::Internal::CMakeRunConfigurationWidget Arguments: 參數: @@ -274,9 +261,6 @@ Build Environment 建置環境變數 - - - CMakeProjectManager::Internal::InSourceBuildPage Qt Creator has detected an <b>in-source-build in %1</b> which prevents shadow builds. Qt Creator will not allow you to change the build directory. If you want a shadow build, clean your source directory and re-open the project. Qt Creator在<b>%1</b>中偵測到先前做過<b>直接在源碼中建置</b>,因此無法進行分離建置(shadow build)。Qt Creator將不會允許您變更建置目錄。如果你想要進行分離建置,請清除源碼中的編譯後再重新開啟此專案。 @@ -285,29 +269,6 @@ Build Location 建置路徑 - - - CMakeProjectManager::Internal::CMakeRunPage - - Please specify the path to the cmake executable. No cmake executable was found in the path. - 請指定 cmake 執行檔的路徑。在環境變數 path 中找不到 cmake 執行檔。 - - - The cmake executable (%1) does not exist. - cmake 執行檔 (%1) 不存在。 - - - The path %1 is not a executable. - 路徑 (%1) 不是可執行檔。 - - - The path %1 is not a valid cmake. - 路徑 (%1) 不是有效的 cmake。 - - - Arguments: - 參數: - Generator: 建立器: @@ -368,9 +329,6 @@ No valid cmake executable specified. 沒有指定有效的 cmake 執行檔。 - - - CMakeProjectManager::Internal::CMakeSettingsPage CMake CMake @@ -379,9 +337,6 @@ Executable: 執行檔: - - - CMakeProjectManager::Internal::MakeStepConfigWidget Additional arguments: 額外的參數: @@ -403,9 +358,6 @@ <b>Unknown tool chain</b> <b>未知的工具鍊</b> - - - CMakeProjectManager::Internal::ShadowBuildPage Please enter the directory in which you want to build your project. 請輸入您想建置專案的目錄。 @@ -414,14 +366,6 @@ Please enter the directory in which you want to build your project. Qt Creator recommends to not use the source directory for building. This ensures that the source directory remains clean and enables multiple builds with different settings. 請輸入您想建置專案的目錄。Qt Creator 建議您不要直接用源碼的目錄來做建置。這樣可以保持源碼目錄的乾淨,並且可以讓您用不同的設定進行多個建置。 - - Build directory: - 建置目錄: - - - Build Location - 建置路徑 - CPlusPlus::OverviewModel @@ -7972,7 +7916,7 @@ to version control (%2)? - QmakeProjectManager::Internal::ConsoleAppWizard + QmakeProjectManager Qt Console Application Qt4 主控台應用程式 @@ -7985,16 +7929,10 @@ Preselects a desktop Qt for building the application if available. 它會預選一個可用的 Qt 桌面版本來建置此應用程式。 - - - QmakeProjectManager::Internal::ConsoleAppWizardDialog This wizard generates a Qt4 console application project. The application derives from QCoreApplication and does not provide a GUI. 此精靈會產生一個 Qt4 主控台的應用程式專案。該應用程式會衍生自 QCoreApplication 而沒有圖形介面。 - - - QmakeProjectManager::Internal::DesignerExternalEditor Qt Designer is not responding (%1). Qt 設計師未回應 (%1)。 @@ -8003,9 +7941,6 @@ Preselects a desktop Qt for building the application if available. Unable to create server socket: %1 無法建立伺服器的 socket:%1 - - - QmakeProjectManager::Internal::EmptyProjectWizard Empty Qt Project 空的 Qt 專案 @@ -8014,16 +7949,10 @@ Preselects a desktop Qt for building the application if available. Creates a qmake-based project without any files. This allows you to create an application without any default classes. 建立一個基於 qmake 的空白專案,不含任何檔案。這樣可以讓您建立一個不包含任何預設類別的應用程式。 - - - QmakeProjectManager::Internal::EmptyProjectWizardDialog This wizard generates an empty Qt4 project. Add files to it later on by using the other wizards. 本精靈將建立一個空的 Qt4 專案。您稍後可以使用其他精靈來新增檔案。 - - - QmakeProjectManager::Internal::ExternalQtEditor Unable to start "%1" 無法啟動 "%1" @@ -8032,9 +7961,6 @@ Preselects a desktop Qt for building the application if available. The application "%1" could not be found. 找不到應用程式 "%1"。 - - - QmakeProjectManager::Internal::FilesPage Class Information 類別資訊 @@ -8043,9 +7969,6 @@ Preselects a desktop Qt for building the application if available. Specify basic information about the classes for which you want to generate skeleton source code files. 指定您要建立的源碼檔案的基本類別資訊。 - - - QmakeProjectManager::Internal::GuiAppWizard Qt Gui Application Qt 圖形介面應用程式 @@ -8058,9 +7981,6 @@ Preselects a desktop Qt for building the application if available. 它會預選一個可用的 Qt 桌面版本來建置此應用程式。 - - - QmakeProjectManager::Internal::GuiAppWizardDialog This wizard generates a Qt4 GUI application project. The application derives by default from QApplication and includes an empty widget. 本精靈將建立一個 Qt4 圖形介面應用程式專案。此應用程式預設衍生自 QApplication 並包含一個空白的元件。 @@ -8069,9 +7989,6 @@ Preselects a desktop Qt for building the application if available. Details 詳情 - - - QmakeProjectManager::Internal::LibraryWizard C++ Library C++ 函式庫 @@ -8080,9 +7997,6 @@ Preselects a desktop Qt for building the application if available. Creates a C++ library based on qmake. This can be used to create:<ul><li>a shared C++ library for use with <tt>QPluginLoader</tt> and runtime (Plugins)</li><li>a shared or static C++ library for use with another project at linktime</li></ul> 建立一個基於 qmake 的 C++ 函式庫。它可以用於建立:<ul><li>用於 <tt>QPluginLoader</tt> 和執行時外掛程式的共享 C++ 函式庫</li><li>在其他專案中連結時使用的動態或靜態 C++ 函式庫</li></ul> - - - QmakeProjectManager::Internal::LibraryWizardDialog Shared Library 共享函式庫 @@ -8103,17 +8017,10 @@ Preselects a desktop Qt for building the application if available. This wizard generates a C++ library project. 本精靈將建立一個 C++ 函式庫專案。 - - Details - 詳情 - Symbian Specific Symbian 特定 - - - QmakeProjectManager::Internal::ModulesPage Select Required Modules 選擇需要的模組 @@ -8122,9 +8029,6 @@ Preselects a desktop Qt for building the application if available. Select the modules you want to include in your project. The recommended modules for this project are selected by default. 選擇您要包含在專案中的模組。本專案建議使用的模組預設已經先選好了。 - - - QmakeProjectManager::Internal::QmakeProjectConfigWidget <a href="import">Import existing build</a> <a href="import">匯入現有建置</a> @@ -8182,16 +8086,6 @@ Preselects a desktop Qt for building the application if available. Warning: 警告: - - %1 Debug - Name of a debug build configuration to created by a project wizard, %1 being the Qt version name. We recommend not translating it. - %1 Debug - - - %1 Release - Name of a release build configuration to created by a project wizard, %1 being the Qt version name. We recommend not translating it. - %1 Release - <No tool chain selected> <沒有選擇工具鍊> @@ -8221,13 +8115,6 @@ Preselects a desktop Qt for building the application if available. Build directory: 建置目錄: - - Manage... - 管理... - - - - QmakeProjectManager::Internal::QmakeProjectManagerPlugin Run qmake 執行 qmake @@ -8292,9 +8179,6 @@ Preselects a desktop Qt for building the application if available. Add Library... 新增函式庫... - - - QmakeProjectManager::Internal::QmakeRunConfiguration The .pro file is currently being parsed. 正在分析 .pro 檔案中。 @@ -8323,9 +8207,6 @@ Preselects a desktop Qt for building the application if available. Qt4 Run Configuration Qt4 執行設置 - - - QmakeProjectManager::Internal::QmakeRunConfigurationWidget Arguments: 參數: @@ -8350,18 +8231,6 @@ Preselects a desktop Qt for building the application if available. Run Environment 執行時的環境變數 - - Clean Environment - 清理環境變數 - - - System Environment - 系統環境變數 - - - Build Environment - 建置環境變數 - Executable: 執行檔: @@ -8374,9 +8243,6 @@ Preselects a desktop Qt for building the application if available. Use debug version of frameworks (DYLD_IMAGE_SUFFIX=_debug) 使用框架的除錯版 (DYLD_IMAGE_SUFFIX=_debug) - - - QmakeProjectManager::MakeStep Make Qt4 MakeStep display name. @@ -8402,9 +8268,6 @@ Preselects a desktop Qt for building the application if available. Configuration is faulty. Check the Issues view for details. 設置錯誤。請在錯誤檢視中看詳情。 - - - QmakeProjectManager::MakeStepConfigWidget Override %1: 覆蓋 %1: @@ -8429,16 +8292,10 @@ Preselects a desktop Qt for building the application if available. <b>Make:</b> %1 not found in the environment. <b>Make</b>:在環境中找不到 %1。 - - - QmakeProjectManager::Internal::MakeStepFactory Make Make - - - QmakeProjectManager::QMakeStep qmake QMakeStep default display name @@ -8468,9 +8325,6 @@ Preselects a desktop Qt for building the application if available. Library not available. <a href='compile'>Compile...</a> 函式庫無法使用。<a href='compile'>編譯...</a> - - - QmakeProjectManager::QMakeStepConfigWidget QML Debugging QML 除錯 @@ -8507,9 +8361,6 @@ Preselects a desktop Qt for building the application if available. <No Qt version> <沒有 Qt 版本> - - - QmakeProjectManager::QmakeManager Full path to the bin directory of the current project's Qt version. 目前專案的 Qt 版本的 bin 目錄的完整路徑。 @@ -10636,7 +10487,7 @@ Will not be applied to whitespace in comments and strings. - QmakeProjectManager::Internal::ClassDefinition + QmakeProjectManager Form 表單 @@ -10741,9 +10592,6 @@ Will not be applied to whitespace in comments and strings. Icon files (*.png *.ico *.jpg *.xpm *.tif *.svg) 圖示檔案 (*.png *.ico *.jpg *.xpm *.tif *.svg) - - - QmakeProjectManager::Internal::CustomWidgetPluginWizardPage WizardPage 精靈頁面 @@ -10780,9 +10628,6 @@ Will not be applied to whitespace in comments and strings. icons.qrc icons.qrc - - - QmakeProjectManager::Internal::CustomWidgetWidgetsWizardPage Custom Qt Widget Wizard 自訂 Qt 元件精靈 @@ -11629,7 +11474,7 @@ Reason: %2 - QmakeProjectManager::Internal::ClassList + QmakeProjectManager <New class> <新類別> @@ -11642,9 +11487,6 @@ Reason: %2 Delete class %1 from list? 是否從列表中刪除類別 %1? - - - QmakeProjectManager::Internal::CustomWidgetWizard Qt Custom Designer Widget Qt 設計師自訂元件 @@ -11653,9 +11495,6 @@ Reason: %2 Creates a Qt Custom Designer Widget or a Custom Widget Collection. 建立 Qt 設計師自訂元件,或是一個自訂元件收藏。 - - - QmakeProjectManager::Internal::CustomWidgetWizardDialog This wizard generates a Qt4 Designer Custom Widget or a Qt4 Designer Custom Widget Collection project. 此精靈將產生一個 Qt4 設計師自訂元件,或是 Qt4 設計師自訂元件收藏的專案。 @@ -11668,16 +11507,10 @@ Reason: %2 Plugin Details 外掛程式詳情 - - - QmakeProjectManager::Internal::PluginGenerator Creating multiple widget libraries (%1, %2) in one project (%3) is not supported. 不支援在一個專案中 (%3) 建立多個元件函式庫 (%1, %2)。 - - - QmakeProjectManager::QmakeBuildConfigurationFactory Using Qt Version "%1" 使用 Qt 版本 "%1" @@ -12248,11 +12081,7 @@ Reason: %2 - QmakeProjectManager::Internal::TestWizardPage - - WizardPage - 精靈頁面 - + QmakeProjectManager Class name: 類別名稱: @@ -12299,23 +12128,11 @@ Reason: %2 - CMakeProjectManager::Internal::CMakeRunConfiguration + CMakeProjectManager Run CMake target 執行 CMake 目標 - - Clean Environment - 清除環境變數 - - - System Environment - 系統環境變數 - - - Build Environment - 建置環境變數 - The executable is not built by the current build configuration 這個可執行檔不是使用目前的建置設置製作出來的 @@ -13201,15 +13018,12 @@ For qmlproject projects, use the importPaths property to add import paths. - CMakeProjectManager::Internal::CMakeTarget + CMakeProjectManager Desktop CMake Default target display name 桌面 - - - CMakeProjectManager::Internal::MakeStepFactory Make Display name for CMakeProjectManager::MakeStep id. @@ -13996,7 +13810,7 @@ For qmlproject projects, use the importPaths property to add import paths. - QmakeProjectManager::Internal::QmakeTarget + QmakeProjectManager Desktop Qt4 Desktop target display name @@ -14521,13 +14335,6 @@ Requires <b>Qt 4.7.4</b> or newer. - - QmakeProjectManager::Internal::QMakeStepFactory - - qmake - qmake - - RemoteLinux @@ -14643,7 +14450,7 @@ Requires <b>Qt 4.7.4</b> or newer. - QmakeProjectManager::QmakeProject + QmakeProjectManager Evaluating 計算中 @@ -14664,14 +14471,6 @@ Requires <b>Qt 4.7.4</b> or newer. The .pro file '%1' could not be parsed. - - Debug - 除錯 - - - Release - 發佈 - QtSupport @@ -14803,7 +14602,7 @@ Requires <b>Qt 4.7.4</b> or newer. - QmakeProjectManager::Internal::BaseQmakeProjectWizardDialog + QmakeProjectManager Modules 模組 @@ -14812,13 +14611,6 @@ Requires <b>Qt 4.7.4</b> or newer. Kits - - Targets - 目標 - - - - QmakeProjectManager::Internal::TargetSetupPage Qt Creator can set up the following targets: Qt Creator可以設定以下目標: @@ -14831,9 +14623,6 @@ Requires <b>Qt 4.7.4</b> or newer. <html><head/><body><p><span style=" font-weight:600;">No valid Qt versions found.</span></p><p>Please add a Qt version in <span style=" font-style:italic;">Tools &gt; Options &gt; Build &amp; Run</span> (<span style=" font-style:italic;">Qt Creator &gt; Preferences &gt; Build &amp; Run</span> on Mac OS) or via the maintenance tool of the SDK.</p></body></html> <html><head/><body><p><span style=" font-weight:600;">找不到正確的 Qt 版本。</span></p><p>請在<span style=" font-style:italic;">「工具」 &gt; 「選項」 &gt; 「建置並執行」</span>(在 MacOS 上則是<span style=" font-style:italic;">「Qt Creator」 &gt; 「喜好設定」 &gt; 「建置並執行」</span>)裡新增 Qt 版本,或是透過 SDK 的維護工具來新增。</p></body></html> - - - QmakeProjectManager::Internal::TestWizard Qt Unit Test Qt 單元測試 @@ -14842,17 +14631,10 @@ Requires <b>Qt 4.7.4</b> or newer. Creates a QTestLib-based unit test for a feature or a class. Unit tests allow you to verify that the code is fit for use and that there are no regressions. 為某個功能或類別建立一個基於 QTestLib 的單元測試。單元測試讓您可以驗證程式碼是合適的,並且沒有倒退問題。 - - - QmakeProjectManager::Internal::TestWizardDialog This wizard generates a Qt unit test consisting of a single source file with a test class. 此精靈會產生一個 Qt 單元測試,其中包括一個含有測試類別的源碼檔。 - - Details - 詳情 - Subversion::Internal::SubversionEditor @@ -15139,7 +14921,7 @@ with a password, which you can enter below. - QmakeProjectManager::QtVersion + QmakeProjectManager Qmake does not support build directories below the source directory. Qmake 不支援在源碼目錄下使用建置目錄。 @@ -16056,7 +15838,7 @@ Ids must begin with a lowercase letter. - QmakeProjectManager::Internal::LibraryDetailsWidget + QmakeProjectManager Library: 函式庫: @@ -16278,7 +16060,7 @@ Ids must begin with a lowercase letter. - CMakeProjectManager::Internal::MakeStep + CMakeProjectManager Make Default display name for the cmake make step. @@ -17528,26 +17310,15 @@ instead of its installation directory when run outside git bash. - QmakeProjectManager::Internal::AddLibraryWizard + QmakeProjectManager Add Library 新增函式庫 - - Type - 型態 - - - Details - 詳情 - Summary 摘要 - - - QmakeProjectManager::Internal::LibraryTypePage Library Type 函式庫型態 @@ -17594,9 +17365,6 @@ Adds the library and include paths to the .pro file. 連結到在您的建置樹狀結構中的函式庫。 請新增該函式庫並在 .pro 檔中加入引入路徑。 - - - QmakeProjectManager::Internal::DetailsPage System Library 系統函式庫 @@ -17629,24 +17397,10 @@ Adds the library and include paths to the .pro file. Choose the project file of the library to link to 選擇要連結的函式庫的專案檔 - - - QmakeProjectManager::Internal::SummaryPage - - Summary - 摘要 - The following snippet will be added to the<br><b>%1</b> file: 以下的片段將會被加入<br><b>%1</b> 檔: - - - QmakeProjectManager::Internal::LibraryDetailsController - - Linkage: - 連結: - %1 Dynamic %1 動態 @@ -17655,10 +17409,6 @@ Adds the library and include paths to the .pro file. %1 Static %1 靜態 - - Mac: - Mac: - %1 Framework %1 框架 @@ -17667,9 +17417,6 @@ Adds the library and include paths to the .pro file. %1 Library %1 函式庫 - - - QmakeProjectManager::QmlDumpTool Only available for Qt for Desktop and Qt for Qt Simulator. 僅限 Qt 桌面版或者 Qt 模擬器版本使用。 @@ -17712,19 +17459,11 @@ Reason: %2 - QmakeProjectManager::QmlObserverTool + QmakeProjectManager Only available for Qt for Desktop or Qt for Qt Simulator. 僅限 Qt 桌面版或者 Qt 模擬器版本使用。 - - Only available for Qt 4.7.1 or newer. - 僅限 Qt 4.7.1 或更新版使用。 - - - Not needed. - 不需要。 - QMLObserver QMLObserver @@ -17748,7 +17487,7 @@ Reason: %2 - QmakeProjectManager::PassphraseForKeyDialog + QmakeProjectManager Passphrase: 密碼片語: @@ -18022,7 +17761,7 @@ Reason: %2 - QmakeProjectManager::SbsV2Parser + QmakeProjectManager SBSv2 build log SBSv2 建置紀錄 @@ -18041,9 +17780,6 @@ Reason: %2 %1 is the SBSv2 build recipe name, %2 the return code of the failed command 方法 %1 失敗,離開代碼 %2。 - - - QmakeProjectManager::AbstractMobileApp Could not open template file '%1'. 無法開啟樣本檔 '%1'。 @@ -18065,7 +17801,7 @@ Preselects Qt for Simulator and mobile targets if available. - QmakeProjectManager::Internal::QtQuickApp + QmakeProjectManager The QML import path '%1' cannot be found. 找不到 QML 匯入路徑 '%1'。 @@ -18082,9 +17818,6 @@ Preselects Qt for Simulator and mobile targets if available. No .pro file for plugin '%1' can be found. 找不到外掛程式 '%1' 對應的 .pro 檔案。 - - - QmakeProjectManager::Internal::QtQuickAppWizardDialog New Qt Quick Application 新增 Qt Quick 應用程式 @@ -18097,9 +17830,6 @@ Preselects Qt for Simulator and mobile targets if available. Select existing QML file 選擇現有的 QML 檔案 - - - QmakeProjectManager::Internal::QtQuickAppWizard Creates a Qt Quick application project that can contain both QML and C++ code and includes a QDeclarativeView. @@ -18775,11 +18505,7 @@ Local pulls are not applied to the master branch. - QmakeProjectManager::Internal::RvctToolChainConfigWidget - - Form - 表單 - + QmakeProjectManager ARM &version: ARM 版本(&V): @@ -18800,9 +18526,6 @@ Local pulls are not applied to the master branch. Environment Variables 環境變數 - - - QmakeProjectManager::Internal::WinscwToolChainConfigWidget Dialog 對話框 @@ -19455,11 +19178,7 @@ Local pulls are not applied to the master branch. - CMakeProjectManager::Internal::CMakeManager - - Run CMake - 執行 CMake - + CMakeProjectManager Core::Internal::ExternalToolModel @@ -21072,19 +20791,7 @@ Error: %2 - QmakeProjectManager::QmlDebuggingLibrary - - Only available for Qt 4.7.1 or newer. - 僅限 Qt 4.7.1 或更新版使用。 - - - Not needed. - 不需要。 - - - QML Debugging - QML 除錯 - + QmakeProjectManager The target directory %1 could not be created. 目標目錄 %1 無法被建立。 @@ -21099,14 +20806,6 @@ Reason: %2 原因:%2 - - - QmakeProjectManager::QmakeTarget - - Desktop - Qt4 Desktop target display name - 桌面 - Qt Simulator Qt4 Simulator target display name @@ -21127,19 +20826,6 @@ Reason: %2 Qt4 MeeGo target display name MeeGo - - Symbian Emulator - Qt4 Symbian Emulator target display name - Symbian 模擬器 - - - Symbian Device - Qt4 Symbian Device target display name - Symbian 裝置 - - - - QmakeProjectManager::Internal::GcceToolChainFactory GCCE GCCE @@ -21152,9 +20838,6 @@ Reason: %2 GCCE (%1) GCCE (%1) - - - QmakeProjectManager::Internal::QmakeSymbianTarget <b>Device:</b> Not connected <b>裝置:</b>未連線 @@ -21171,9 +20854,6 @@ Reason: %2 <b>IP address:</b> %1:%2 <b>IP 位址:</b> %1:%2 - - - QmakeProjectManager::Internal::RvctToolChainFactory ARMv5 ARMv5 @@ -21454,7 +21134,7 @@ Your application will also be rejected by Nokia Store QA if you choose an unrele - QmakeProjectManager::Internal::WinscwToolChainFactory + QmakeProjectManager WINSCW WINSCW @@ -21464,19 +21144,6 @@ Your application will also be rejected by Nokia Store QA if you choose an unrele Qt 版本中的 WINSCW - - QmakeProjectManager::QmakeBaseTargetFactory - - %1 Debug - Name of a debug build configuration to created by a project wizard, %1 being the Qt version name. We recommend not translating it. - %1 Debug - - - %1 Release - Name of a release build configuration to be created by a project wizard, %1 being the Qt version name. We recommend not translating it. - %1 Release - - Qt4DefaultTargetSetupWidget @@ -21491,7 +21158,7 @@ Your application will also be rejected by Nokia Store QA if you choose an unrele - QmakeProjectManager::QmakeDefaultTargetSetupWidget + QmakeProjectManager Add build from: 新增建置來源: @@ -21524,14 +21191,6 @@ Your application will also be rejected by Nokia Store QA if you choose an unrele Shadow build 分離建置 - - Qt version: - Qt 版本: - - - No Build Found - 沒有找到建置 - Incompatible Build Found 找到不相容的建置 @@ -21562,35 +21221,10 @@ Your application will also be rejected by Nokia Store QA if you choose an unrele release build 發佈 - - No build found in %1 matching project %2. - 在 %1 沒有找到符合專案 %2 的建置。 - - - <b>Error:</b> - Severity is Task::Error - <b>錯誤:</b> - - - <b>Warning:</b> - Severity is Task::Warning - <b>警告:</b> - - - - QmakeProjectManager::AbstractMobileAppWizardDialog - - Qt Versions - Qt 版本 - Mobile Options 行動裝置選項 - - Symbian Specific - Symbian 特定 - Targets 目標 @@ -21603,9 +21237,6 @@ Your application will also be rejected by Nokia Store QA if you choose an unrele Harmattan Specific 指定 Harmattan - - - QmakeProjectManager::Internal::Html5AppWizardDialog New HTML5 Application 新的 HTML5 應用程式 @@ -21618,9 +21249,6 @@ Your application will also be rejected by Nokia Store QA if you choose an unrele HTML Options HTML 選項 - - - QmakeProjectManager::Internal::Html5AppWizard HTML5 Application HTML5 應用程式 @@ -21639,16 +21267,10 @@ You can build the application and deploy it on desktop and mobile target platfor 你可以建置應用來佈署到桌面和移動環境. 比如, 你可以為這種類型的專案建立一個簽名過的 Symbian 安裝系統 (SIS) 包。 - - - QmakeProjectManager::Internal::Html5AppWizardOptionsPage Select HTML File 選擇 HTML 檔案 - - - QmakeProjectManager::Internal::MobileAppWizardGenericOptionsPage Automatically Rotate Orientation 自動旋轉方向 @@ -21661,28 +21283,14 @@ You can build the application and deploy it on desktop and mobile target platfor Lock to Portrait Orientation 鎖定在縱向 - - WizardPage - 精靈頁面 - Orientation behavior: 方向行為: - - - QmakeProjectManager::Internal::MobileAppWizardMaemoOptionsPage - - WizardPage - 精靈頁面 - Application icon (64x64): 應用程式圖示(64x64): - - - QmakeProjectManager::Internal::SubdirsProjectWizard Subdirs Project 子目錄專案 @@ -21704,16 +21312,10 @@ You can build the application and deploy it on desktop and mobile target platfor Title of dialog 新增子專案 - - - QmakeProjectManager::Internal::SubdirsProjectWizardDialog This wizard generates a Qt4 subdirs project. Add subprojects to it later on by using the other wizards. 本精靈將產生一個 Qt4 子目錄專案。您稍後可以用其它的精靈來新增子專案到這裡。 - - - QmakeProjectManager::TargetSetupPage Target Setup 目標設置 @@ -22707,7 +22309,7 @@ With cache simulation, further event counters are enabled: - CMakeProjectManager::Internal::CMakeEditor + CMakeProjectManager Changes to cmake files are shown in the project tree after building. 建置之後在專案樹中顯示 cmake 檔的變化。 @@ -23392,7 +22994,7 @@ Do you want to retry? - QmakeProjectManager::CodaRunControl + QmakeProjectManager No device is connected. Please connect a device and try again. @@ -23579,7 +23181,7 @@ Do you want to retry? - QmakeProjectManager::Internal::SymbianQtConfigWidget + QmakeProjectManager S60 SDK: S60 SDK: @@ -23588,16 +23190,10 @@ Do you want to retry? SBS v2 directory: SBS v2 目錄: - - - QmakeProjectManager::QmakeBuildConfiguration Parsing the .pro file 正在剖析 .pro 檔 - - - QmakeProjectManager::QmakeProFileNode Error while parsing file %1. Giving up. 剖析檔案 %1 時發生錯誤。準備放棄。 @@ -23606,9 +23202,6 @@ Do you want to retry? Could not find .pro file for sub dir '%1' in '%2' 在 '%2' 的子目錄 '%1' 中找不到 .pro 檔 - - - QmakeProjectManager::Internal::QtQuickComponentSetOptionsPage Select QML File 選擇 QML 檔案 @@ -25729,7 +25322,7 @@ Qt Creator 知道一個相似的URI. - QmakeProjectManager::QmakePriFileNode + QmakeProjectManager Headers 標頭 @@ -25786,9 +25379,6 @@ Qt Creator 知道一個相似的URI. File Error 檔案錯誤 - - - QmakeProjectManager::Internal::PngIconScaler Wrong Icon Size 錯誤的圖示大小 @@ -25797,10 +25387,6 @@ Qt Creator 知道一個相似的URI. The icon needs to be %1x%2 pixels big, but is not. Do you want Qt Creator to scale it? 圖示必須要 %1x%2 像素大,但現在不是。您希望 Qt Creator 調整它的大小嗎? - - File Error - 檔案錯誤 - Could not copy icon file: %1 無法複製圖示檔案:%1 @@ -27140,30 +26726,15 @@ p, li { white-space: pre-wrap; } - QmakeProjectManager::Internal::MakeStep + QmakeProjectManager Make arguments: Make 參數: - - Override %1: - 覆寫 %1: - - - - QmakeProjectManager::Internal::QMakeStep qmake build configuration: qmake 建置設置: - - Debug - 除錯 - - - Release - 發佈 - Additional arguments: 額外的參數: @@ -27185,11 +26756,7 @@ p, li { white-space: pre-wrap; } - QmakeProjectManager::Internal::Html5AppWizardSourcesPage - - WizardPage - 精靈頁面 - + QmakeProjectManager Main HTML File 主 HTML 檔案 @@ -27226,13 +26793,6 @@ p, li { white-space: pre-wrap; } Touch optimized navigation will make the HTML page flickable and enlarge the area of touch sensitive elements. If you use a JavaScript framework which optimizes the touch interaction, leave the checkbox unchecked. Touch optimized navigation 將會使得 HTML 頁面上的元素具有動感. 如果你使用JavaScript 框架來優化觸摸互動, 那麼不要選擇此項. - - - QmakeProjectManager::Internal::MobileAppWizardHarmattanOptionsPage - - WizardPage - 精靈頁面 - Application icon (80x80): 應用程式圖示 (80x80): @@ -27245,13 +26805,6 @@ p, li { white-space: pre-wrap; } Make application boostable 使應用程式啟動穩定 - - - QmakeProjectManager::Internal::MobileAppWizardSymbianOptionsPage - - WizardPage - 精靈頁面 - Application icon (.svg): 應用程式圖示 (.svg): @@ -27264,25 +26817,10 @@ p, li { white-space: pre-wrap; } Enable network access 開啟網路存取 - - - QmakeProjectManager::Internal::MobileLibraryWizardOptionPage - - WizardPage - 精靈頁面 - - - Target UID3: - 目標 UID3: - Plugin's directory name: 外掛程式目錄名稱: - - Enable network access - 開啟網路存取 - QtSupport @@ -28847,7 +28385,7 @@ should a repository require SSH-authentication (see documentation on SSH and the - CMakeProjectManager::Internal::CMakeLocatorFilter + CMakeProjectManager Build CMake target 建置 CMake 目標 @@ -29339,14 +28877,7 @@ references to elements in other files, loops, etc.) - QmakeProjectManager::Internal::UnconfiguredProjectPanel - - Configure Project - 設置專案 - - - - QmakeProjectManager::Internal::TargetSetupPageWrapper + QmakeProjectManager Configure Project 設置專案 @@ -29367,9 +28898,6 @@ references to elements in other files, loops, etc.) <p>The project <b>%1</b> is not yet configured.</p><p>Qt Creator uses the Qt version: <b>%2</b> and the tool chain: <b>%3</b> to parse the project. You can edit these in the <b><a href="edit">options.</a></b></p> <p>專案 <b>%1</b>還沒設置。</p><p>Qt Creator 使用的 Qt 版本: <b>%2</b> 和工具鍊: <b>%3</b> 來解析專案。 你可以編輯這些 <b><a href="edit">選項.</a></b></p> - - - QmakeProjectManager::Internal::UnConfiguredSettingsWidget Qt Version: Qt 版本: @@ -30001,7 +29529,7 @@ This option is useful when you want to try your application on devices which don - ClearCase::Internal::CheckOutDialog + ClearCase Check Out @@ -30027,9 +29555,6 @@ This option is useful when you want to try your application on devices which don Hijack: Unset read-only flag without check-out. This is used for local changes which the user does not want to commit. - - - ClearCase::Internal::SettingsPage Configuration 設置 @@ -30103,9 +29628,6 @@ This option is useful when you want to try your application on devices which don ClearCase - - - ClearCase::Internal::UndoCheckOut Dialog 對話框 @@ -30118,9 +29640,6 @@ This option is useful when you want to try your application on devices which don &Save copy of the file with a '.keep' extension - - - ClearCase::Internal::VersionSelector Confirm Version to Check Out @@ -31307,7 +30826,7 @@ Please choose a valid package name for your application (e.g. "org.example. - ClearCase::Internal::ActivitySelector + ClearCase Select &activity: @@ -31320,9 +30839,6 @@ Please choose a valid package name for your application (e.g. "org.example. Keep item activity - - - ClearCase::Internal::ClearCaseControl &Check Out @@ -31331,16 +30847,10 @@ Please choose a valid package name for your application (e.g. "org.example. &Hijack - - - ClearCase::Internal::ClearCaseEditor Annotate version "%1" - - - ClearCase::Internal::ClearCasePlugin C&learCase @@ -31629,31 +31139,18 @@ Please choose a valid package name for your application (e.g. "org.example. CC Indexing - - - ClearCase::Internal::ClearCaseSubmitEditor ClearCase Check In - - - ClearCase::Internal::ClearCaseSubmitEditorWidget Chec&k in even if identical to previous version - - &Preserve file modification time - - &Check In - - - ClearCase::Internal::SettingsPageWidget ClearCase Command @@ -31687,7 +31184,7 @@ Please choose a valid package name for your application (e.g. "org.example. - CMakeProjectManager::Internal::ChooseCMakePage + CMakeProjectManager Choose Cmake Executable @@ -33390,7 +32887,7 @@ Qt Creator 知道一個相似的URI. - QmakeProjectManager::QmakeTargetSetupWidget + QmakeProjectManager Manage... 管理... @@ -33405,9 +32902,6 @@ Qt Creator 知道一個相似的URI. Severity is Task::Warning <b>警告:</b> - - - QmakeProjectManager::Internal::ImportWidget Import Build from... diff --git a/src/libs/utils/filepath.cpp b/src/libs/utils/filepath.cpp index 0c49bf4fe47..fe2f6cbc6e3 100644 --- a/src/libs/utils/filepath.cpp +++ b/src/libs/utils/filepath.cpp @@ -1219,6 +1219,8 @@ FilePath FilePath::searchInDirectories(const FilePaths &dirs) const FilePath FilePath::searchInPath(const FilePaths &additionalDirs, PathAmending amending) const { + if (isAbsolutePath()) + return *this; FilePaths directories = deviceEnvironment().path(); if (!additionalDirs.isEmpty()) { if (amending == AppendToPath) diff --git a/src/libs/utils/layoutbuilder.h b/src/libs/utils/layoutbuilder.h index 86373dd93ef..23134446676 100644 --- a/src/libs/utils/layoutbuilder.h +++ b/src/libs/utils/layoutbuilder.h @@ -217,6 +217,13 @@ public: Stack(std::initializer_list items) : LayoutBuilder(StackLayout, items) {} }; +class QTCREATOR_UTILS_EXPORT Splitter : public LayoutBuilder +{ +public: + Splitter() : LayoutBuilder(StackLayout) {} + Splitter(std::initializer_list items) : LayoutBuilder(StackLayout, items) {} +}; + using Space = LayoutBuilder::Space; using Span = LayoutBuilder::Span; diff --git a/src/plugins/android/androidavdmanager.cpp b/src/plugins/android/androidavdmanager.cpp index 63d90367bd8..2e998efd499 100644 --- a/src/plugins/android/androidavdmanager.cpp +++ b/src/plugins/android/androidavdmanager.cpp @@ -15,7 +15,6 @@ #include #include -#include #include #include #include @@ -26,17 +25,14 @@ using namespace Utils; -namespace { -static Q_LOGGING_CATEGORY(avdManagerLog, "qtc.android.avdManager", QtWarningMsg) -} - -namespace Android { -namespace Internal { +namespace Android::Internal { using namespace std; const int avdCreateTimeoutMs = 30000; +static Q_LOGGING_CATEGORY(avdManagerLog, "qtc.android.avdManager", QtWarningMsg) + /*! Runs the \c avdmanager tool specific to configuration \a config with arguments \a args. Returns \c true if the command is successfully executed. Output is copied into \a output. The function @@ -244,16 +240,15 @@ QString AndroidAvdManager::startAvd(const QString &name) const bool AndroidAvdManager::startAvdAsync(const QString &avdName) const { - QFileInfo info(m_config.emulatorToolPath().toString()); - if (!info.exists()) { - const QString emulatorToolPath = m_config.emulatorToolPath().toUserOutput(); - QMetaObject::invokeMethod(Core::ICore::mainWindow(), [emulatorToolPath] { + const FilePath emulator = m_config.emulatorToolPath(); + if (!emulator.exists()) { + QMetaObject::invokeMethod(Core::ICore::mainWindow(), [emulator] { QMessageBox::critical(Core::ICore::dialogParent(), AndroidAvdManager::tr("Emulator Tool Is Missing"), AndroidAvdManager::tr( "Install the missing emulator tool (%1) to the" " installed Android SDK.") - .arg(emulatorToolPath)); + .arg(emulator.displayName())); }); return false; } @@ -343,16 +338,13 @@ bool AndroidAvdManager::waitForBooted(const QString &serialNumber, for (int i = 0; i < 60; ++i) { if (cancelChecker && cancelChecker()) return false; - if (isAvdBooted(serialNumber)) { + if (isAvdBooted(serialNumber)) return true; - } else { - QThread::sleep(2); - if (!m_config.isConnected(serialNumber)) // device was disconnected - return false; - } + QThread::sleep(2); + if (!m_config.isConnected(serialNumber)) // device was disconnected + return false; } return false; } -} // namespace Internal -} // namespace Android +} // Android::Internal diff --git a/src/plugins/android/androidavdmanager.h b/src/plugins/android/androidavdmanager.h index 2dd2dcaf907..670016ed7f3 100644 --- a/src/plugins/android/androidavdmanager.h +++ b/src/plugins/android/androidavdmanager.h @@ -7,8 +7,7 @@ #include #include -namespace Android { -namespace Internal { +namespace Android::Internal { class AndroidAvdManager { @@ -40,5 +39,4 @@ private: const AndroidConfig &m_config; }; -} // namespace Internal -} // namespace Android +} // Android::Internal diff --git a/src/plugins/android/androiddeployqtstep.cpp b/src/plugins/android/androiddeployqtstep.cpp index dec905a6bcc..03795b4d349 100644 --- a/src/plugins/android/androiddeployqtstep.cpp +++ b/src/plugins/android/androiddeployqtstep.cpp @@ -42,6 +42,7 @@ #include #include #include +#include #include using namespace ProjectExplorer; diff --git a/src/plugins/android/androidtoolchain.cpp b/src/plugins/android/androidtoolchain.cpp index 3356ee1eb65..7d3763c2fb8 100644 --- a/src/plugins/android/androidtoolchain.cpp +++ b/src/plugins/android/androidtoolchain.cpp @@ -11,19 +11,15 @@ #include -#include #include - -namespace { -static Q_LOGGING_CATEGORY(androidTCLog, "qtc.android.toolchainmanagement", QtWarningMsg); -} +using namespace ProjectExplorer; +using namespace Utils; namespace Android { namespace Internal { -using namespace ProjectExplorer; -using namespace Utils; +static Q_LOGGING_CATEGORY(androidTCLog, "qtc.android.toolchainmanagement", QtWarningMsg); using ClangTargetsType = QHash; Q_GLOBAL_STATIC_WITH_ARGS(ClangTargetsType, ClangTargets, ({ @@ -37,14 +33,10 @@ Q_GLOBAL_STATIC_WITH_ARGS(ClangTargetsType, ClangTargets, ({ Abi(Abi::ArmArchitecture, Abi::LinuxOS, Abi::AndroidLinuxFlavor, Abi::ElfFormat, 64)}} )); -Q_GLOBAL_STATIC_WITH_ARGS(QList, LanguageIds, ( - {ProjectExplorer::Constants::CXX_LANGUAGE_ID, - ProjectExplorer::Constants::C_LANGUAGE_ID})) - -static ToolChain *findToolChain(Utils::FilePath &compilerPath, Utils::Id lang, const QString &target, +static ToolChain *findToolChain(FilePath &compilerPath, Id lang, const QString &target, const ToolChainList &alreadyKnown) { - ToolChain * tc = Utils::findOrDefault(alreadyKnown, [target, compilerPath, lang](ToolChain *tc) { + ToolChain *tc = Utils::findOrDefault(alreadyKnown, [target, compilerPath, lang](ToolChain *tc) { return tc->typeId() == Constants::ANDROID_TOOLCHAIN_TYPEID && tc->language() == lang && tc->targetAbi() == ClangTargets->value(target) @@ -59,12 +51,12 @@ AndroidToolChain::AndroidToolChain() setTypeDisplayName(AndroidToolChain::tr("Android Clang")); } -Utils::FilePath AndroidToolChain::ndkLocation() const +FilePath AndroidToolChain::ndkLocation() const { return m_ndkLocation; } -void AndroidToolChain::setNdkLocation(const Utils::FilePath &ndkLocation) +void AndroidToolChain::setNdkLocation(const FilePath &ndkLocation) { m_ndkLocation = ndkLocation; } @@ -96,7 +88,7 @@ void AndroidToolChain::addToEnvironment(Environment &env) const { const AndroidConfig &config = AndroidConfigurations::currentConfig(); env.set(QLatin1String("ANDROID_NDK_HOST"), config.toolchainHostFromNdk(m_ndkLocation)); - const Utils::FilePath javaHome = config.openJDKLocation(); + const FilePath javaHome = config.openJDKLocation(); if (javaHome.exists()) { env.set(Constants::JAVA_HOME_ENV_VAR, javaHome.toUserOutput()); const FilePath javaBin = javaHome.pathAppended("bin"); @@ -175,19 +167,24 @@ static FilePaths uniqueNdksForCurrentQtVersions() ToolChainList AndroidToolChainFactory::autodetectToolChains(const ToolChainList &alreadyKnown) { - const QList uniqueNdks = uniqueNdksForCurrentQtVersions(); + const QList uniqueNdks = uniqueNdksForCurrentQtVersions(); return autodetectToolChainsFromNdks(alreadyKnown, uniqueNdks); } ToolChainList AndroidToolChainFactory::autodetectToolChainsFromNdks( const ToolChainList &alreadyKnown, - const QList &ndkLocations, + const QList &ndkLocations, const bool isCustom) { QList result; const AndroidConfig config = AndroidConfigurations::currentConfig(); - for (const Utils::FilePath &ndkLocation : ndkLocations) { + const Id LanguageIds[] { + ProjectExplorer::Constants::CXX_LANGUAGE_ID, + ProjectExplorer::Constants::C_LANGUAGE_ID + }; + + for (const FilePath &ndkLocation : ndkLocations) { FilePath clangPath = config.clangPathFromNdk(ndkLocation); if (!clangPath.exists()) { qCDebug(androidTCLog) << "Clang toolchains detection fails. Can not find Clang" @@ -195,7 +192,7 @@ ToolChainList AndroidToolChainFactory::autodetectToolChainsFromNdks( continue; } - for (const Utils::Id &lang : *LanguageIds) { + for (const Id &lang : LanguageIds) { FilePath compilerCommand = clangPath; if (lang == ProjectExplorer::Constants::CXX_LANGUAGE_ID) compilerCommand = clangPlusPlusPath(clangPath); diff --git a/src/plugins/android/createandroidmanifestwizard.cpp b/src/plugins/android/createandroidmanifestwizard.cpp index 03b564a9e44..30b2aa5c453 100644 --- a/src/plugins/android/createandroidmanifestwizard.cpp +++ b/src/plugins/android/createandroidmanifestwizard.cpp @@ -172,10 +172,10 @@ void ChooseDirectoryPage::checkPackageSourceDir() { const QString buildKey = m_wizard->buildKey(); const BuildTargetInfo bti = m_wizard->buildSystem()->buildTarget(buildKey); - const QString projectDir = bti.projectFilePath.toFileInfo().absolutePath(); + const FilePath projectDir = bti.projectFilePath.absolutePath(); - const QString newDir = m_androidPackageSourceDir->filePath().toString(); - bool isComplete = QFileInfo(projectDir) != QFileInfo(newDir); + const FilePath newDir = m_androidPackageSourceDir->filePath(); + bool isComplete = projectDir.canonicalPath() != newDir.canonicalPath(); m_sourceDirectoryWarning->setVisible(!isComplete); diff --git a/src/plugins/android/javaeditor.cpp b/src/plugins/android/javaeditor.cpp index c29417393c0..843b3158b49 100644 --- a/src/plugins/android/javaeditor.cpp +++ b/src/plugins/android/javaeditor.cpp @@ -5,21 +5,18 @@ #include "javaindenter.h" #include "androidconstants.h" -#include #include + +#include #include #include #include #include -#include -#include +#include #include -#include - -namespace Android { -namespace Internal { +namespace Android::Internal { static TextEditor::TextDocument *createJavaDocument() { @@ -55,5 +52,4 @@ JavaEditorFactory::JavaEditorFactory() setCompletionAssistProvider(new TextEditor::KeywordsCompletionAssistProvider(keywords)); } -} // namespace Internal -} // namespace Android +} // Android::Internal diff --git a/src/plugins/android/javaeditor.h b/src/plugins/android/javaeditor.h index 6ba941a7240..429bba923a1 100644 --- a/src/plugins/android/javaeditor.h +++ b/src/plugins/android/javaeditor.h @@ -5,8 +5,7 @@ #include -namespace Android { -namespace Internal { +namespace Android::Internal { class JavaEditorFactory : public TextEditor::TextEditorFactory { @@ -14,5 +13,4 @@ public: JavaEditorFactory(); }; -} // namespace Internal -} // namespace Android +} // Android::Internal diff --git a/src/plugins/android/javaparser.cpp b/src/plugins/android/javaparser.cpp index e121d4fd51f..db53c597878 100644 --- a/src/plugins/android/javaparser.cpp +++ b/src/plugins/android/javaparser.cpp @@ -5,35 +5,38 @@ #include #include -#include -using namespace Android::Internal; +#include + using namespace ProjectExplorer; +using namespace Utils; -JavaParser::JavaParser() : - m_javaRegExp(QLatin1String("^(.*\\[javac\\]\\s)(.*\\.java):(\\d+):(.*)$")) +namespace Android::Internal { + +JavaParser::JavaParser() { } -void JavaParser::setProjectFileList(const Utils::FilePaths &fileList) +void JavaParser::setProjectFileList(const FilePaths &fileList) { m_fileList = fileList; } -void JavaParser::setBuildDirectory(const Utils::FilePath &buildDirectory) +void JavaParser::setBuildDirectory(const FilePath &buildDirectory) { m_buildDirectory = buildDirectory; } -void JavaParser::setSourceDirectory(const Utils::FilePath &sourceDirectory) +void JavaParser::setSourceDirectory(const FilePath &sourceDirectory) { m_sourceDirectory = sourceDirectory; } -Utils::OutputLineParser::Result JavaParser::handleLine(const QString &line, - Utils::OutputFormat type) +OutputLineParser::Result JavaParser::handleLine(const QString &line, OutputFormat type) { Q_UNUSED(type); - const QRegularExpressionMatch match = m_javaRegExp.match(line); + static const QRegularExpression javaRegExp("^(.*\\[javac\\]\\s)(.*\\.java):(\\d+):(.*)$"); + + const QRegularExpressionMatch match = javaRegExp.match(line); if (!match.hasMatch()) return Status::NotHandled; @@ -41,9 +44,9 @@ Utils::OutputLineParser::Result JavaParser::handleLine(const QString &line, int lineno = match.captured(3).toInt(&ok); if (!ok) lineno = -1; - Utils::FilePath file = Utils::FilePath::fromUserInput(match.captured(2)); + FilePath file = FilePath::fromUserInput(match.captured(2)); if (file.isChildOf(m_buildDirectory)) { - Utils::FilePath relativePath = file.relativeChildPath(m_buildDirectory); + FilePath relativePath = file.relativeChildPath(m_buildDirectory); file = m_sourceDirectory.pathAppended(relativePath.toString()); } if (file.toFileInfo().isRelative()) { @@ -63,3 +66,5 @@ Utils::OutputLineParser::Result JavaParser::handleLine(const QString &line, scheduleTask(task, 1); return {Status::Done, linkSpecs}; } + +} // Android::Internal diff --git a/src/plugins/android/javaparser.h b/src/plugins/android/javaparser.h index 5a7cb982893..30b3170a7f0 100644 --- a/src/plugins/android/javaparser.h +++ b/src/plugins/android/javaparser.h @@ -4,17 +4,13 @@ #pragma once #include -#include -#include +#include -namespace Android { -namespace Internal { +namespace Android::Internal { class JavaParser : public ProjectExplorer::OutputTaskParser { - Q_OBJECT - public: JavaParser(); @@ -23,13 +19,11 @@ public: void setSourceDirectory(const Utils::FilePath &sourceDirectory); private: - Result handleLine(const QString &line, Utils::OutputFormat type) override; + Result handleLine(const QString &line, Utils::OutputFormat type) final; - const QRegularExpression m_javaRegExp; Utils::FilePaths m_fileList; Utils::FilePath m_sourceDirectory; Utils::FilePath m_buildDirectory; }; -} // namespace Internal -} // namespace Android +} // Android::Internal diff --git a/src/plugins/android/splashscreenwidget.cpp b/src/plugins/android/splashscreenwidget.cpp index b15f855697c..35bd714970f 100644 --- a/src/plugins/android/splashscreenwidget.cpp +++ b/src/plugins/android/splashscreenwidget.cpp @@ -7,8 +7,6 @@ #include #include -#include -#include #include #include #include @@ -18,8 +16,7 @@ using namespace Utils; -namespace Android { -namespace Internal { +namespace Android::Internal { static Q_LOGGING_CATEGORY(androidManifestEditorLog, "qtc.android.splashScreenWidget", QtWarningMsg) @@ -244,5 +241,4 @@ void SplashScreenWidget::setImageFileName(const QString &imageFileName) m_imageFileName = imageFileName; } -} // namespace Internal -} // namespace Android +} // Android::Internal diff --git a/src/plugins/android/splashscreenwidget.h b/src/plugins/android/splashscreenwidget.h index a430577c5fc..984b5d9bca1 100644 --- a/src/plugins/android/splashscreenwidget.h +++ b/src/plugins/android/splashscreenwidget.h @@ -15,8 +15,7 @@ class QColor; class QImage; QT_END_NAMESPACE -namespace Android { -namespace Internal { +namespace Android::Internal { class SplashScreenWidget : public QWidget { @@ -73,5 +72,4 @@ private: bool m_showImageFullScreen = false; }; -} // namespace Internal -} // namespace Android +} // Android::Internal diff --git a/src/plugins/clangcodemodel/clangdclient.cpp b/src/plugins/clangcodemodel/clangdclient.cpp index 76322df24d6..36bf395a0a8 100644 --- a/src/plugins/clangcodemodel/clangdclient.cpp +++ b/src/plugins/clangcodemodel/clangdclient.cpp @@ -138,9 +138,12 @@ void setupClangdConfigFile() static BaseClientInterface *clientInterface(Project *project, const Utils::FilePath &jsonDbDir) { + using CppEditor::ClangdSettings; QString indexingOption = "--background-index"; - const CppEditor::ClangdSettings settings(CppEditor::ClangdProjectSettings(project).settings()); - if (!settings.indexingEnabled() || jsonDbDir.isEmpty()) + const ClangdSettings settings(CppEditor::ClangdProjectSettings(project).settings()); + const ClangdSettings::IndexingPriority indexingPriority = settings.indexingPriority(); + const bool indexingEnabled = indexingPriority != ClangdSettings::IndexingPriority::Off; + if (!indexingEnabled) indexingOption += "=0"; const QString headerInsertionOption = QString("--header-insertion=") + (settings.autoIncludeHeaders() ? "iwyu" : "never"); @@ -153,6 +156,10 @@ static BaseClientInterface *clientInterface(Project *project, const Utils::FileP "--clang-tidy=0"}}; if (settings.workerThreadLimit() != 0) cmd.addArg("-j=" + QString::number(settings.workerThreadLimit())); + if (indexingEnabled && settings.clangdVersion() >= QVersionNumber(15)) { + cmd.addArg("--background-index-priority=" + + ClangdSettings::priorityToString(indexingPriority)); + } if (!jsonDbDir.isEmpty()) cmd.addArg("--compile-commands-dir=" + jsonDbDir.toString()); if (clangdLogServer().isDebugEnabled()) diff --git a/src/plugins/clangtools/CMakeLists.txt b/src/plugins/clangtools/CMakeLists.txt index 9527f9b2758..c0216eb0571 100644 --- a/src/plugins/clangtools/CMakeLists.txt +++ b/src/plugins/clangtools/CMakeLists.txt @@ -33,16 +33,14 @@ add_qtc_plugin(ClangTools clangtoolsprojectsettingswidget.cpp clangtoolsprojectsettingswidget.h clangtoolssettings.cpp clangtoolssettings.h clangtoolsutils.cpp clangtoolsutils.h - clazychecks.ui diagnosticconfigswidget.cpp diagnosticconfigswidget.h diagnosticmark.cpp diagnosticmark.h documentclangtoolrunner.cpp documentclangtoolrunner.h documentquickfixfactory.cpp documentquickfixfactory.h executableinfo.cpp executableinfo.h - filterdialog.cpp filterdialog.h filterdialog.ui - runsettingswidget.cpp runsettingswidget.h runsettingswidget.ui - settingswidget.cpp settingswidget.h settingswidget.ui - tidychecks.ui + filterdialog.cpp filterdialog.h + runsettingswidget.cpp runsettingswidget.h + settingswidget.cpp settingswidget.h virtualfilesystemoverlay.cpp virtualfilesystemoverlay.h ) diff --git a/src/plugins/clangtools/clangtools.qbs b/src/plugins/clangtools/clangtools.qbs index 9be1d720a18..54d47db9a25 100644 --- a/src/plugins/clangtools/clangtools.qbs +++ b/src/plugins/clangtools/clangtools.qbs @@ -56,7 +56,6 @@ QtcPlugin { "clangtoolssettings.h", "clangtoolsutils.cpp", "clangtoolsutils.h", - "clazychecks.ui", "diagnosticconfigswidget.cpp", "diagnosticconfigswidget.h", "diagnosticmark.cpp", @@ -69,14 +68,10 @@ QtcPlugin { "executableinfo.h", "filterdialog.cpp", "filterdialog.h", - "filterdialog.ui", "runsettingswidget.cpp", "runsettingswidget.h", - "runsettingswidget.ui", "settingswidget.cpp", "settingswidget.h", - "settingswidget.ui", - "tidychecks.ui", "virtualfilesystemoverlay.cpp", "virtualfilesystemoverlay.h", ] diff --git a/src/plugins/clangtools/clazychecks.ui b/src/plugins/clangtools/clazychecks.ui deleted file mode 100644 index 0eca019f1f7..00000000000 --- a/src/plugins/clangtools/clazychecks.ui +++ /dev/null @@ -1,183 +0,0 @@ - - - ClangTools::Internal::ClazyChecks - - - - 0 - 0 - 800 - 500 - - - - - 0 - 0 - - - - - - - - 6 - - - 0 - - - 0 - - - 0 - - - 0 - - - - - 0 - - - - - - - See <a href="https://github.com/KDE/clazy">Clazy's homepage</a> for more information. - - - true - - - - - - - - - - 0 - 0 - - - - Filters - - - - - - - 0 - 0 - - - - - - - - Reset Topic Filter - - - - - - - - 0 - 0 - - - - - 150 - 16777215 - - - - QAbstractItemView::NoEditTriggers - - - - - - - - - - Checks - - - - - - When enabling a level explicitly, also enable lower levels (Clazy semantic). - - - Enable lower levels automatically - - - true - - - - - - - - - - - - - - - - - - - Could not query the supported checks from the clazy-standalone executable. -Set a valid executable first. - - - Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop - - - - - - - Qt::Vertical - - - - 20 - 382 - - - - - - - - - - - - - Utils::InfoLabel - QLabel -
utils/infolabel.h
-
- - Utils::FancyLineEdit - QLineEdit -
utils/fancylineedit.h
-
-
- - -
diff --git a/src/plugins/clangtools/diagnosticconfigswidget.cpp b/src/plugins/clangtools/diagnosticconfigswidget.cpp index 8503fd88a7a..8fedb32ca7e 100644 --- a/src/plugins/clangtools/diagnosticconfigswidget.cpp +++ b/src/plugins/clangtools/diagnosticconfigswidget.cpp @@ -9,36 +9,192 @@ #include "clangtoolsutils.h" #include "executableinfo.h" -#include "ui_clazychecks.h" -#include "ui_tidychecks.h" - #include #include #include + #include #include #include +#include #include +#include +#include #include #include +#include +#include +#include #include #include #include -#include +#include +#include +#include +#include #include #include +#include #include +#include #include #include #include -#include + using namespace CppEditor; +using namespace Utils; -namespace ClangTools { -namespace Internal { +namespace ClangTools::Internal { + +QString removeClangTidyCheck(const QString &checks, const QString &check); +QString removeClazyCheck(const QString &checks, const QString &check); + +class TidyChecksWidget : public QWidget +{ + Q_DECLARE_TR_FUNCTIONS(ClangTools::Internal::TidyChecks) + +public: + QComboBox *tidyMode; + QPushButton *plainTextEditButton; + FancyLineEdit *filterLineEdit; + QTreeView *checksPrefixesTree; + + QStackedWidget *stackedWidget; + + TidyChecksWidget() + { + tidyMode = new QComboBox; + tidyMode->addItem(tr("Select Checks")); + tidyMode->addItem(tr("Use .clang-tidy config file")); + + plainTextEditButton = new QPushButton(tr("Edit Checks as String...")); + + filterLineEdit = new FancyLineEdit; + + auto checksPage = new QWidget; + checksPrefixesTree = new QTreeView; + checksPrefixesTree->header()->setVisible(false); + checksPrefixesTree->setMinimumHeight(380); + + auto invalidExecutableLabel = new InfoLabel; + invalidExecutableLabel->setAlignment(Qt::AlignLeft|Qt::AlignTop); + invalidExecutableLabel->setType(InfoLabel::Warning); + invalidExecutableLabel->setElideMode(Qt::ElideNone); + invalidExecutableLabel->setText(tr("Could not query the supported checks from the " + "clang-tidy executable.\nSet a valid executable first.")); + + auto invalidExecutablePage = new QWidget; + + stackedWidget = new QStackedWidget; + stackedWidget->addWidget(checksPage); + stackedWidget->addWidget(new QWidget); + stackedWidget->addWidget(invalidExecutablePage); + + using namespace Layouting; + + Column { + checksPrefixesTree + }.attachTo(checksPage, WithoutMargins); + + Column { + invalidExecutableLabel, + st, + }.attachTo(invalidExecutablePage, WithoutMargins); + + Column { + Row { tidyMode, plainTextEditButton, filterLineEdit }, + stackedWidget, + }.attachTo(this); + } +}; + +class ClazyChecksWidget : public QWidget +{ + Q_DECLARE_TR_FUNCTIONS(ClangTools::Internal::ClazyChecks) + +public: + QStackedWidget *stackedWidget; + FancyLineEdit *filterLineEdit; + QPushButton *topicsResetButton; + QListView *topicsView; + QGroupBox *checksGroupBox; + QCheckBox *enableLowerLevelsCheckBox; + QTreeView *checksView; + + ClazyChecksWidget() + { + auto checksPage = new QWidget; + + auto label = new QLabel; + label->setOpenExternalLinks(true); + label->setText(tr("See " + "Clazy's homepage for more information.")); + + auto groupBox = new QGroupBox(tr("Filters")); + QSizePolicy sp(QSizePolicy::Maximum, QSizePolicy::Preferred); + sp.setHorizontalStretch(1); + groupBox->setSizePolicy(sp); + + filterLineEdit = new FancyLineEdit; + + topicsResetButton = new QPushButton(tr("Reset Topic Filter")); + topicsView = new QListView; + + checksGroupBox = new QGroupBox(tr("Checks")); + sp.setHorizontalPolicy(QSizePolicy::MinimumExpanding); + sp.setHorizontalStretch(100); + checksGroupBox->setSizePolicy(sp); + + enableLowerLevelsCheckBox = new QCheckBox(tr("Enable lower levels automatically")); + enableLowerLevelsCheckBox->setToolTip(tr("When enabling a level explicitly, " + "also enable lower levels (Clazy semantic).")); + + checksView = new QTreeView; + + auto invalidExecutablePage = new QWidget; + + auto invalidExecutableLabel = new InfoLabel; + invalidExecutableLabel->setType(InfoLabel::Warning); + invalidExecutableLabel->setElideMode(Qt::ElideNone); + invalidExecutableLabel->setAlignment(Qt::AlignLeft|Qt::AlignTop); + invalidExecutableLabel->setText(tr("Could not query the supported checks from the " + "clazy-standalone executable.\nSet a valid executable first.")); + + stackedWidget = new QStackedWidget; + stackedWidget->addWidget(checksPage); + stackedWidget->addWidget(invalidExecutablePage); + + using namespace Layouting; + + Column { + filterLineEdit, + topicsResetButton, + topicsView + }.attachTo(groupBox); + + Column { + label, + Row { groupBox, checksGroupBox } + }.attachTo(checksPage, WithoutMargins); + + Column { + invalidExecutableLabel, + st + }.attachTo(invalidExecutablePage, WithoutMargins); + + Column { + enableLowerLevelsCheckBox, + checksView, + }.attachTo(checksGroupBox); + + Column { + stackedWidget + }.attachTo(this); + } +}; class TidyOptionsDialog : public QDialog { @@ -49,9 +205,7 @@ public: { setWindowTitle(tr("Options for %1").arg(check)); resize(600, 300); - const auto mainLayout = new QVBoxLayout(this); - const auto widgetLayout = new QHBoxLayout; - mainLayout->addLayout(widgetLayout); + m_optionsWidget.setColumnCount(2); m_optionsWidget.setHeaderLabels({tr("Option"), tr("Value")}); const auto addItem = [this](const QString &option, const QString &value) { @@ -62,33 +216,42 @@ public: for (auto it = options.begin(); it != options.end(); ++it) addItem(it.key(), it.value()); m_optionsWidget.resizeColumnToContents(0); - widgetLayout->addWidget(&m_optionsWidget); - const auto buttonLayout = new QVBoxLayout; - widgetLayout->addLayout(buttonLayout); + const auto addButton = new QPushButton(tr("Add Option")); + const auto removeButton = new QPushButton(tr("Remove Option")); + const auto buttonBox = new QDialogButtonBox(QDialogButtonBox::Ok + | QDialogButtonBox::Cancel); + + using namespace Layouting; + Column { + Row { + &m_optionsWidget, + Column { + addButton, + removeButton, + st + } + }, + buttonBox + }.attachTo(this); + connect(addButton, &QPushButton::clicked, this, [this, addItem] { const auto item = addItem(tr(""), {}); m_optionsWidget.editItem(item); }); - buttonLayout->addWidget(addButton); - const auto removeButton = new QPushButton(tr("Remove Option")); connect(removeButton, &QPushButton::clicked, this, [this] { qDeleteAll(m_optionsWidget.selectedItems()); }); + const auto toggleRemoveButtonEnabled = [this, removeButton] { removeButton->setEnabled(!m_optionsWidget.selectionModel()->selectedRows().isEmpty()); }; connect(&m_optionsWidget, &QTreeWidget::itemSelectionChanged, this, [toggleRemoveButtonEnabled] { toggleRemoveButtonEnabled(); }); toggleRemoveButtonEnabled(); - buttonLayout->addWidget(removeButton); - buttonLayout->addStretch(1); - const auto buttonBox = new QDialogButtonBox(QDialogButtonBox::Ok - | QDialogButtonBox::Cancel); connect(buttonBox, &QDialogButtonBox::accepted, this, &QDialog::accept); connect(buttonBox, &QDialogButtonBox::rejected, this, &QDialog::reject); - mainLayout->addWidget(buttonBox); } ClangDiagnosticConfig::TidyCheckOptions options() const @@ -802,18 +965,13 @@ DiagnosticConfigsWidget::DiagnosticConfigsWidget(const ClangDiagnosticConfigs &c , m_clazyTreeModel(new ClazyChecksTreeModel(clazyInfo.supportedChecks)) , m_clazyInfo(clazyInfo) { - m_clazyChecks = std::make_unique(); - m_clazyChecksWidget = new QWidget(); - m_clazyChecks->setupUi(m_clazyChecksWidget); - m_clazyChecks->invalidExecutableLabel->setType(Utils::InfoLabel::Warning); - m_clazyChecks->invalidExecutableLabel->setElideMode(Qt::ElideNone); + m_clazyChecks = new ClazyChecksWidget; m_clazySortFilterProxyModel = new ClazyChecksSortFilterModel(this); m_clazySortFilterProxyModel->setSourceModel(m_clazyTreeModel.get()); m_clazySortFilterProxyModel->setRecursiveFilteringEnabled(true); m_clazySortFilterProxyModel->setAutoAcceptChildRows(true); setupTreeView(m_clazyChecks->checksView, m_clazySortFilterProxyModel, 2); m_clazyChecks->filterLineEdit->setFiltering(true); - m_clazyChecks->filterLineEdit->setPlaceholderText(tr("Filter by name")); connect(m_clazyChecks->filterLineEdit, &Utils::FancyLineEdit::filterChanged, m_clazySortFilterProxyModel, qOverload(&QSortFilterProxyModel::setFilterRegularExpression)); @@ -846,25 +1004,19 @@ DiagnosticConfigsWidget::DiagnosticConfigsWidget(const ClangDiagnosticConfigs &c connect(m_clazyChecks->enableLowerLevelsCheckBox, &QCheckBox::stateChanged, [this](int) { const bool enable = m_clazyChecks->enableLowerLevelsCheckBox->isChecked(); m_clazyTreeModel->setEnableLowerLevels(enable); - codeModelSettings()->setEnableLowerClazyLevels( - m_clazyChecks->enableLowerLevelsCheckBox->isChecked()); + codeModelSettings()->setEnableLowerClazyLevels(enable); }); const Qt::CheckState checkEnableLowerClazyLevels = codeModelSettings()->enableLowerClazyLevels() ? Qt::Checked : Qt::Unchecked; m_clazyChecks->enableLowerLevelsCheckBox->setCheckState(checkEnableLowerClazyLevels); - m_tidyChecks = std::make_unique(); - m_tidyChecksWidget = new QWidget(); - m_tidyChecks->setupUi(m_tidyChecksWidget); - m_tidyChecks->invalidExecutableLabel->setType(Utils::InfoLabel::Warning); - m_tidyChecks->invalidExecutableLabel->setElideMode(Qt::ElideNone); + m_tidyChecks = new TidyChecksWidget; const auto tidyFilterModel = new QSortFilterProxyModel(this); tidyFilterModel->setRecursiveFilteringEnabled(true); tidyFilterModel->setAutoAcceptChildRows(true); tidyFilterModel->setSourceModel(m_tidyTreeModel.get()); setupTreeView(m_tidyChecks->checksPrefixesTree, tidyFilterModel); m_tidyChecks->filterLineEdit->setFiltering(true); - m_tidyChecks->filterLineEdit->setPlaceholderText(tr("Filter by name")); connect(m_tidyChecks->filterLineEdit, &Utils::FancyLineEdit::filterChanged, tidyFilterModel, qOverload(&QSortFilterProxyModel::setFilterRegularExpression)); @@ -900,18 +1052,23 @@ DiagnosticConfigsWidget::DiagnosticConfigsWidget(const ClangDiagnosticConfigs &c QDialog dialog; dialog.setWindowTitle(tr("Checks")); - dialog.setLayout(new QVBoxLayout); - auto *textEdit = new QTextEdit(&dialog); + + const QString initialChecks = m_tidyTreeModel->selectedChecks(); + + auto textEdit = new QTextEdit(&dialog); textEdit->setReadOnly(readOnly); - dialog.layout()->addWidget(textEdit); - auto *buttonsBox = new QDialogButtonBox(QDialogButtonBox::Ok + textEdit->setPlainText(initialChecks); + + auto buttonsBox = new QDialogButtonBox(QDialogButtonBox::Ok | (readOnly ? QDialogButtonBox::NoButton : QDialogButtonBox::Cancel)); - dialog.layout()->addWidget(buttonsBox); - QObject::connect(buttonsBox, &QDialogButtonBox::accepted, &dialog, &QDialog::accept); - QObject::connect(buttonsBox, &QDialogButtonBox::rejected, &dialog, &QDialog::reject); - const QString initialChecks = m_tidyTreeModel->selectedChecks(); - textEdit->setPlainText(initialChecks); + + using namespace Layouting; + + Column { + textEdit, + buttonsBox + }.attachTo(&dialog); QObject::connect(&dialog, &QDialog::accepted, [=, &initialChecks]() { const QString updatedChecks = textEdit->toPlainText(); @@ -926,17 +1083,25 @@ DiagnosticConfigsWidget::DiagnosticConfigsWidget(const ClangDiagnosticConfigs &c connectClangTidyItemChanged(); }); + + QObject::connect(buttonsBox, &QDialogButtonBox::accepted, &dialog, &QDialog::accept); + QObject::connect(buttonsBox, &QDialogButtonBox::rejected, &dialog, &QDialog::reject); + dialog.exec(); }); connectClangTidyItemChanged(); connectClazyItemChanged(); - tabWidget()->addTab(m_tidyChecksWidget, tr("Clang-Tidy Checks")); - tabWidget()->addTab(m_clazyChecksWidget, tr("Clazy Checks")); + tabWidget()->addTab(m_tidyChecks, tr("Clang-Tidy Checks")); + tabWidget()->addTab(m_clazyChecks, tr("Clazy Checks")); } -DiagnosticConfigsWidget::~DiagnosticConfigsWidget() = default; +DiagnosticConfigsWidget::~DiagnosticConfigsWidget() +{ + delete m_tidyChecks; + delete m_clazyChecks; +} void DiagnosticConfigsWidget::syncClangTidyWidgets(const ClangDiagnosticConfig &config) { @@ -1192,7 +1357,6 @@ void disableChecks(const QList &diagnostics) settings->writeSettings(); } -} // namespace Internal -} // namespace ClangTools +} // ClangTools::Internal #include "diagnosticconfigswidget.moc" diff --git a/src/plugins/clangtools/diagnosticconfigswidget.h b/src/plugins/clangtools/diagnosticconfigswidget.h index bca3ec6203a..8a1171f9134 100644 --- a/src/plugins/clangtools/diagnosticconfigswidget.h +++ b/src/plugins/clangtools/diagnosticconfigswidget.h @@ -9,23 +9,16 @@ #include -namespace ClangTools { -namespace Internal { -class Diagnostic; +namespace ClangTools::Internal { -// Not UI-related, but requires the tree model (or else a huge refactoring or code duplication). -QString removeClangTidyCheck(const QString &checks, const QString &check); -QString removeClazyCheck(const QString &checks, const QString &check); -void disableChecks(const QList &diagnostics); - -namespace Ui { -class ClazyChecks; -class TidyChecks; -} - -class TidyChecksTreeModel; -class ClazyChecksTreeModel; class ClazyChecksSortFilterModel; +class ClazyChecksTreeModel; +class ClazyChecksWidget; +class Diagnostic; +class TidyChecksTreeModel; +class TidyChecksWidget; + +void disableChecks(const QList &diagnostics); // Like CppEditor::ClangDiagnosticConfigsWidget, but with tabs/widgets for clang-tidy and clazy class DiagnosticConfigsWidget : public CppEditor::ClangDiagnosticConfigsWidget @@ -60,18 +53,15 @@ private: private: // Clang-Tidy - std::unique_ptr m_tidyChecks; - QWidget *m_tidyChecksWidget = nullptr; + TidyChecksWidget *m_tidyChecks = nullptr; std::unique_ptr m_tidyTreeModel; ClangTidyInfo m_tidyInfo; // Clazy - std::unique_ptr m_clazyChecks; - QWidget *m_clazyChecksWidget = nullptr; - std::unique_ptr m_clazyTreeModel; + ClazyChecksWidget *m_clazyChecks = nullptr; ClazyChecksSortFilterModel *m_clazySortFilterProxyModel = nullptr; + std::unique_ptr m_clazyTreeModel; ClazyStandaloneInfo m_clazyInfo; }; -} // namespace Internal -} // namespace ClangTools +} // ClangTools::Internal diff --git a/src/plugins/clangtools/filterdialog.cpp b/src/plugins/clangtools/filterdialog.cpp index 4ebca5f58fd..34c40bd618b 100644 --- a/src/plugins/clangtools/filterdialog.cpp +++ b/src/plugins/clangtools/filterdialog.cpp @@ -2,15 +2,20 @@ // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0+ OR GPL-3.0 WITH Qt-GPL-exception-1.0 #include "filterdialog.h" -#include "ui_filterdialog.h" #include +#include #include +#include +#include +#include +#include #include +#include +#include -namespace ClangTools { -namespace Internal { +namespace ClangTools::Internal { enum Columns { CheckName, Count }; @@ -59,61 +64,76 @@ public: FilterDialog::FilterDialog(const Checks &checks, QWidget *parent) : QDialog(parent) - , m_ui(new Ui::FilterDialog) { - m_ui->setupUi(this); + resize(400, 400); + setWindowTitle(tr("Filter Diagnostics")); + + auto selectAll = new QPushButton(tr("Select All")); + auto selectWithFixits = new QPushButton(tr("Select All with Fixits")); + auto selectNone = new QPushButton(tr("Clear Selection")); + + auto buttonBox = new QDialogButtonBox(QDialogButtonBox::Cancel|QDialogButtonBox::Ok); m_model = new FilterChecksModel(checks); - // View - m_ui->view->setModel(m_model); - m_ui->view->header()->setStretchLastSection(false); - m_ui->view->header()->setSectionResizeMode(Columns::CheckName, QHeaderView::Stretch); - m_ui->view->header()->setSectionResizeMode(Columns::Count, QHeaderView::ResizeToContents); - m_ui->view->setSelectionMode(QAbstractItemView::MultiSelection); - m_ui->view->setSelectionBehavior(QAbstractItemView::SelectRows); - m_ui->view->setIndentation(0); - connect(m_ui->view->selectionModel(), &QItemSelectionModel::selectionChanged, this, [&](){ - const bool hasSelection = !m_ui->view->selectionModel()->selectedRows().isEmpty(); - m_ui->buttonBox->button(QDialogButtonBox::Ok)->setEnabled(hasSelection); + m_view = new QTreeView(this); + m_view->setModel(m_model); + m_view->header()->setStretchLastSection(false); + m_view->header()->setSectionResizeMode(Columns::CheckName, QHeaderView::Stretch); + m_view->header()->setSectionResizeMode(Columns::Count, QHeaderView::ResizeToContents); + m_view->setSelectionMode(QAbstractItemView::MultiSelection); + m_view->setSelectionBehavior(QAbstractItemView::SelectRows); + m_view->setIndentation(0); + + using namespace Utils::Layouting; + + Column { + tr("Select the diagnostics to display."), + Row { selectAll, selectWithFixits, selectNone, st }, + m_view, + buttonBox, + }.attachTo(this); + + connect(m_view->selectionModel(), &QItemSelectionModel::selectionChanged, this, [&] { + const bool hasSelection = !m_view->selectionModel()->selectedRows().isEmpty(); + buttonBox->button(QDialogButtonBox::Ok)->setEnabled(hasSelection); }); + connect(buttonBox, &QDialogButtonBox::accepted, this, &QDialog::accept); + connect(buttonBox, &QDialogButtonBox::rejected, this, &QDialog::reject); + // Buttons - connect(m_ui->selectNone, &QPushButton::clicked, m_ui->view, &QTreeView::clearSelection); - connect(m_ui->selectAll, &QPushButton::clicked, m_ui->view, &QTreeView::selectAll); - connect(m_ui->selectWithFixits, &QPushButton::clicked, m_ui->view, [this] { - m_ui->view->clearSelection(); + connect(selectNone, &QPushButton::clicked, m_view, &QTreeView::clearSelection); + connect(selectAll, &QPushButton::clicked, m_view, &QTreeView::selectAll); + connect(selectWithFixits, &QPushButton::clicked, m_view, [this] { + m_view->clearSelection(); m_model->forItemsAtLevel<1>([&](CheckItem *item) { if (item->check.hasFixit) - m_ui->view->selectionModel()->select(item->index(), selectionFlags()); + m_view->selectionModel()->select(item->index(), selectionFlags()); }); }); - m_ui->selectWithFixits->setEnabled( + selectWithFixits->setEnabled( Utils::anyOf(checks, [](const Check &c) { return c.hasFixit; })); // Select checks that are not filtered out m_model->forItemsAtLevel<1>([this](CheckItem *item) { if (item->check.isShown) - m_ui->view->selectionModel()->select(item->index(), selectionFlags()); + m_view->selectionModel()->select(item->index(), selectionFlags()); }); } -FilterDialog::~FilterDialog() -{ - delete m_ui; -} +FilterDialog::~FilterDialog() = default; QSet FilterDialog::selectedChecks() const { QSet checks; m_model->forItemsAtLevel<1>([&](CheckItem *item) { - if (m_ui->view->selectionModel()->isSelected(item->index())) + if (m_view->selectionModel()->isSelected(item->index())) checks << item->check.name; }); return checks; } -} // namespace Internal -} // namespace ClangTools +} // ClangTools::Internal #include "filterdialog.moc" diff --git a/src/plugins/clangtools/filterdialog.h b/src/plugins/clangtools/filterdialog.h index 8ac12ab88d9..cbfa29f100a 100644 --- a/src/plugins/clangtools/filterdialog.h +++ b/src/plugins/clangtools/filterdialog.h @@ -5,14 +5,16 @@ #include -namespace ClangTools { -namespace Internal { +QT_BEGIN_NAMESPACE +class QTreeView; +QT_END_NAMESPACE -namespace Ui { class FilterDialog; } +namespace ClangTools::Internal { class FilterChecksModel; -class Check { +class Check +{ public: QString name; QString displayName; @@ -33,9 +35,8 @@ public: QSet selectedChecks() const; private: - Ui::FilterDialog *m_ui; FilterChecksModel *m_model; + QTreeView *m_view; }; -} // namespace Internal -} // namespace ClangTools +} // ClangTools::Internal diff --git a/src/plugins/clangtools/filterdialog.ui b/src/plugins/clangtools/filterdialog.ui deleted file mode 100644 index 897b0e72d15..00000000000 --- a/src/plugins/clangtools/filterdialog.ui +++ /dev/null @@ -1,99 +0,0 @@ - - - ClangTools::Internal::FilterDialog - - - - 0 - 0 - 400 - 400 - - - - Filter Diagnostics - - - - - - Select the diagnostics to display. - - - - - - - - - Select All - - - - - - - Select All with Fixits - - - - - - - Clear Selection - - - - - - - - - - - - Qt::Horizontal - - - QDialogButtonBox::Cancel|QDialogButtonBox::Ok - - - - - - - - - buttonBox - accepted() - ClangTools::Internal::FilterDialog - accept() - - - 248 - 254 - - - 157 - 274 - - - - - buttonBox - rejected() - ClangTools::Internal::FilterDialog - reject() - - - 316 - 260 - - - 286 - 274 - - - - - diff --git a/src/plugins/clangtools/runsettingswidget.cpp b/src/plugins/clangtools/runsettingswidget.cpp index 4edd5456cfd..4f46c4bb66e 100644 --- a/src/plugins/clangtools/runsettingswidget.cpp +++ b/src/plugins/clangtools/runsettingswidget.cpp @@ -2,7 +2,6 @@ // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0+ OR GPL-3.0 WITH Qt-GPL-exception-1.0 #include "runsettingswidget.h" -#include "ui_runsettingswidget.h" #include "clangtoolssettings.h" #include "clangtoolsutils.h" @@ -11,33 +10,58 @@ #include "settingswidget.h" #include +#include +#include + +#include +#include +#include #include using namespace Utils; -namespace ClangTools { -namespace Internal { +namespace ClangTools::Internal { RunSettingsWidget::RunSettingsWidget(QWidget *parent) : QWidget(parent) - , m_ui(new Ui::RunSettingsWidget) { - m_ui->setupUi(this); + resize(383, 125); + + m_diagnosticWidget = new CppEditor::ClangDiagnosticConfigsSelectionWidget; + + m_buildBeforeAnalysis = new QCheckBox(tr("Build the project before analysis")); + + m_analyzeOpenFiles = new QCheckBox(tr("Analyze open files")); + + m_parallelJobsSpinBox = new QSpinBox; + m_parallelJobsSpinBox->setRange(1, 32); + + using namespace Layouting; + + // FIXME: Let RunSettingsWidget inherit from QGroupBox? + Column { + Group { + title(tr("Run Options")), + Column { + m_diagnosticWidget, + m_buildBeforeAnalysis, + m_analyzeOpenFiles, + Row { tr("Parallel jobs:"), m_parallelJobsSpinBox, st }, + } + } + }.attachTo(this, WithoutMargins); } -RunSettingsWidget::~RunSettingsWidget() -{ - delete m_ui; -} +RunSettingsWidget::~RunSettingsWidget() = default; CppEditor::ClangDiagnosticConfigsSelectionWidget *RunSettingsWidget::diagnosticSelectionWidget() { - return m_ui->diagnosticWidget; + return m_diagnosticWidget; } static CppEditor::ClangDiagnosticConfigsWidget *createEditWidget( - const CppEditor::ClangDiagnosticConfigs &configs, const Utils::Id &configToSelect) + const CppEditor::ClangDiagnosticConfigs &configs, const Id &configToSelect) { // Determine executable paths FilePath clangTidyPath; @@ -65,44 +89,43 @@ static CppEditor::ClangDiagnosticConfigsWidget *createEditWidget( void RunSettingsWidget::fromSettings(const RunSettings &s) { - disconnect(m_ui->diagnosticWidget, 0, 0, 0); - m_ui->diagnosticWidget->refresh(diagnosticConfigsModel(), - s.diagnosticConfigId(), - createEditWidget); - connect(m_ui->diagnosticWidget, + disconnect(m_diagnosticWidget, 0, 0, 0); + m_diagnosticWidget->refresh(diagnosticConfigsModel(), + s.diagnosticConfigId(), + createEditWidget); + connect(m_diagnosticWidget, &CppEditor::ClangDiagnosticConfigsSelectionWidget::changed, this, &RunSettingsWidget::changed); - disconnect(m_ui->buildBeforeAnalysis, 0, 0, 0); - m_ui->buildBeforeAnalysis->setToolTip(hintAboutBuildBeforeAnalysis()); - m_ui->buildBeforeAnalysis->setCheckState(s.buildBeforeAnalysis() ? Qt::Checked : Qt::Unchecked); - connect(m_ui->buildBeforeAnalysis, &QCheckBox::toggled, [this](bool checked) { + disconnect(m_buildBeforeAnalysis, 0, 0, 0); + m_buildBeforeAnalysis->setToolTip(hintAboutBuildBeforeAnalysis()); + m_buildBeforeAnalysis->setCheckState(s.buildBeforeAnalysis() ? Qt::Checked : Qt::Unchecked); + connect(m_buildBeforeAnalysis, &QCheckBox::toggled, [this](bool checked) { if (!checked) showHintAboutBuildBeforeAnalysis(); emit changed(); }); - disconnect(m_ui->parallelJobsSpinBox, 0, 0, 0); - m_ui->parallelJobsSpinBox->setValue(s.parallelJobs()); - m_ui->parallelJobsSpinBox->setMinimum(1); - m_ui->parallelJobsSpinBox->setMaximum(QThread::idealThreadCount()); - connect(m_ui->parallelJobsSpinBox, &QSpinBox::valueChanged, this, &RunSettingsWidget::changed); - m_ui->analyzeOpenFiles->setChecked(s.analyzeOpenFiles()); - connect(m_ui->analyzeOpenFiles, &QCheckBox::toggled, this, &RunSettingsWidget::changed); + disconnect(m_parallelJobsSpinBox, 0, 0, 0); + m_parallelJobsSpinBox->setValue(s.parallelJobs()); + m_parallelJobsSpinBox->setMinimum(1); + m_parallelJobsSpinBox->setMaximum(QThread::idealThreadCount()); + connect(m_parallelJobsSpinBox, &QSpinBox::valueChanged, this, &RunSettingsWidget::changed); + m_analyzeOpenFiles->setChecked(s.analyzeOpenFiles()); + connect(m_analyzeOpenFiles, &QCheckBox::toggled, this, &RunSettingsWidget::changed); } RunSettings RunSettingsWidget::toSettings() const { RunSettings s; - s.setDiagnosticConfigId(m_ui->diagnosticWidget->currentConfigId()); - s.setBuildBeforeAnalysis(m_ui->buildBeforeAnalysis->checkState() == Qt::CheckState::Checked); - s.setParallelJobs(m_ui->parallelJobsSpinBox->value()); - s.setAnalyzeOpenFiles(m_ui->analyzeOpenFiles->checkState() == Qt::CheckState::Checked); + s.setDiagnosticConfigId(m_diagnosticWidget->currentConfigId()); + s.setBuildBeforeAnalysis(m_buildBeforeAnalysis->checkState() == Qt::CheckState::Checked); + s.setParallelJobs(m_parallelJobsSpinBox->value()); + s.setAnalyzeOpenFiles(m_analyzeOpenFiles->checkState() == Qt::CheckState::Checked); return s; } -} // namespace Internal -} // namespace ClangTools +} // ClangTools::Internal diff --git a/src/plugins/clangtools/runsettingswidget.h b/src/plugins/clangtools/runsettingswidget.h index 8a42a327932..4cca522ba82 100644 --- a/src/plugins/clangtools/runsettingswidget.h +++ b/src/plugins/clangtools/runsettingswidget.h @@ -7,19 +7,18 @@ #include -namespace CppEditor { -class ClangDiagnosticConfigsSelectionWidget; -} +QT_BEGIN_NAMESPACE +class QCheckBox; +class QSpinBox; +QT_END_NAMESPACE -namespace ClangTools { -namespace Internal { + +namespace CppEditor { class ClangDiagnosticConfigsSelectionWidget; } + +namespace ClangTools::Internal { class RunSettings; -namespace Ui { -class RunSettingsWidget; -} - class RunSettingsWidget : public QWidget { Q_OBJECT @@ -37,8 +36,10 @@ signals: void changed(); private: - Ui::RunSettingsWidget *m_ui; + CppEditor::ClangDiagnosticConfigsSelectionWidget *m_diagnosticWidget; + QCheckBox *m_buildBeforeAnalysis; + QCheckBox *m_analyzeOpenFiles; + QSpinBox *m_parallelJobsSpinBox; }; -} // namespace Internal -} // namespace ClangTools +} // ClangTools::Internal diff --git a/src/plugins/clangtools/runsettingswidget.ui b/src/plugins/clangtools/runsettingswidget.ui deleted file mode 100644 index d608d9ab2d5..00000000000 --- a/src/plugins/clangtools/runsettingswidget.ui +++ /dev/null @@ -1,97 +0,0 @@ - - - ClangTools::Internal::RunSettingsWidget - - - - 0 - 0 - 383 - 125 - - - - - 0 - - - 0 - - - 0 - - - 0 - - - - - Run Options - - - - - - - - - Build the project before analysis - - - - - - - Analyze open files - - - - - - - - - Parallel jobs: - - - - - - - 1 - - - 32 - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - - - - - - - CppEditor::ClangDiagnosticConfigsSelectionWidget - QWidget -
cppeditor/clangdiagnosticconfigsselectionwidget.h
-
-
- - -
diff --git a/src/plugins/clangtools/settingswidget.cpp b/src/plugins/clangtools/settingswidget.cpp index 7c667d6ee66..e0f815ea3a5 100644 --- a/src/plugins/clangtools/settingswidget.cpp +++ b/src/plugins/clangtools/settingswidget.cpp @@ -3,79 +3,76 @@ #include "settingswidget.h" -#include "ui_settingswidget.h" - #include "clangtoolsconstants.h" #include "clangtoolsutils.h" +#include "runsettingswidget.h" #include #include #include -#include +#include +#include + +#include using namespace Utils; -namespace ClangTools { -namespace Internal { +namespace ClangTools::Internal { static SettingsWidget *m_instance = nullptr; -static void setupPathChooser(PathChooser *const chooser, - const QString &promptDiaglogTitle, - const QString &placeHolderText, - const FilePath &pathFromSettings, - const QString &historyCompleterId) -{ - chooser->setPromptDialogTitle(promptDiaglogTitle); - chooser->setDefaultValue(placeHolderText); - chooser->setFilePath(pathFromSettings); - chooser->setExpectedKind(Utils::PathChooser::ExistingCommand); - chooser->setHistoryCompleter(historyCompleterId); -} - SettingsWidget *SettingsWidget::instance() { return m_instance; } SettingsWidget::SettingsWidget() - : m_ui(new Ui::SettingsWidget) - , m_settings(ClangToolsSettings::instance()) + : m_settings(ClangToolsSettings::instance()) { m_instance = this; - m_ui->setupUi(this); - // - // Group box "Executables" - // + resize(400, 300); QString placeHolderText = shippedClangTidyExecutable().toUserOutput(); FilePath path = m_settings->clangTidyExecutable(); if (path.isEmpty() && placeHolderText.isEmpty()) path = Constants::CLANG_TIDY_EXECUTABLE_NAME; - setupPathChooser(m_ui->clangTidyPathChooser, - tr("Clang-Tidy Executable"), - placeHolderText, - path, - "ClangTools.ClangTidyExecutable.History"); + m_clangTidyPathChooser = new PathChooser; + m_clangTidyPathChooser->setExpectedKind(PathChooser::ExistingCommand); + m_clangTidyPathChooser->setPromptDialogTitle(tr("Clang-Tidy Executable")); + m_clangTidyPathChooser->setDefaultValue(placeHolderText); + m_clangTidyPathChooser->setFilePath(path); + m_clangTidyPathChooser->setHistoryCompleter("ClangTools.ClangTidyExecutable.History"); placeHolderText = shippedClazyStandaloneExecutable().toUserOutput(); path = m_settings->clazyStandaloneExecutable(); if (path.isEmpty() && placeHolderText.isEmpty()) path = Constants::CLAZY_STANDALONE_EXECUTABLE_NAME; - setupPathChooser(m_ui->clazyStandalonePathChooser, - tr("Clazy Executable"), - placeHolderText, - path, - "ClangTools.ClazyStandaloneExecutable.History"); + m_clazyStandalonePathChooser = new PathChooser; + m_clazyStandalonePathChooser->setExpectedKind(PathChooser::ExistingCommand); + m_clazyStandalonePathChooser->setPromptDialogTitle(tr("Clazy Executable")); + m_clazyStandalonePathChooser->setDefaultValue(placeHolderText); + m_clazyStandalonePathChooser->setFilePath(path); + m_clazyStandalonePathChooser->setHistoryCompleter("ClangTools.ClazyStandaloneExecutable.History"); - // - // Group box "Run Options" - // + m_runSettingsWidget = new RunSettingsWidget; + m_runSettingsWidget->fromSettings(m_settings->runSettings()); - m_ui->runSettingsWidget->fromSettings(m_settings->runSettings()); + using namespace Layouting; + + Column { + Group { + title(tr("Executables")), + Form { + tr("Clang-Tidy:"), m_clangTidyPathChooser, br, + tr("Clazy-Standalone:"), m_clazyStandalonePathChooser + } + }, + m_runSettingsWidget, + st + }.attachTo(this); } void SettingsWidget::apply() @@ -85,11 +82,11 @@ void SettingsWidget::apply() m_settings->setClazyStandaloneExecutable(clazyStandalonePath()); // Run options - m_settings->setRunSettings(m_ui->runSettingsWidget->toSettings()); + m_settings->setRunSettings(m_runSettingsWidget->toSettings()); // Custom configs const CppEditor::ClangDiagnosticConfigs customConfigs - = m_ui->runSettingsWidget->diagnosticSelectionWidget()->customConfigs(); + = m_runSettingsWidget->diagnosticSelectionWidget()->customConfigs(); m_settings->setDiagnosticConfigs(customConfigs); m_settings->writeSettings(); @@ -102,12 +99,12 @@ SettingsWidget::~SettingsWidget() FilePath SettingsWidget::clangTidyPath() const { - return m_ui->clangTidyPathChooser->rawFilePath(); + return m_clangTidyPathChooser->rawFilePath(); } FilePath SettingsWidget::clazyStandalonePath() const { - return m_ui->clazyStandalonePathChooser->rawFilePath(); + return m_clazyStandalonePathChooser->rawFilePath(); } // ClangToolsOptionsPage @@ -124,5 +121,4 @@ ClangToolsOptionsPage::ClangToolsOptionsPage() setWidgetCreator([] { return new SettingsWidget; }); } -} // namespace Internal -} // namespace ClangTools +} // ClangTools::Internal diff --git a/src/plugins/clangtools/settingswidget.h b/src/plugins/clangtools/settingswidget.h index b88745f4ed5..a3ebe999ccd 100644 --- a/src/plugins/clangtools/settingswidget.h +++ b/src/plugins/clangtools/settingswidget.h @@ -9,12 +9,14 @@ #include -namespace Utils { class FilePath; } +namespace Utils { +class FilePath; +class PathChooser; +} // Utils -namespace ClangTools { -namespace Internal { +namespace ClangTools::Internal { -namespace Ui { class SettingsWidget; } +class RunSettingsWidget; class SettingsWidget : public Core::IOptionsPageWidget { @@ -32,8 +34,11 @@ public: private: void apply() final; - std::unique_ptr m_ui; ClangToolsSettings *m_settings; + + Utils::PathChooser *m_clangTidyPathChooser; + Utils::PathChooser *m_clazyStandalonePathChooser; + RunSettingsWidget *m_runSettingsWidget; }; class ClangToolsOptionsPage final : public Core::IOptionsPage @@ -42,5 +47,4 @@ public: ClangToolsOptionsPage(); }; -} // namespace Internal -} // namespace ClangTools +} // ClangTools::Internal diff --git a/src/plugins/clangtools/settingswidget.ui b/src/plugins/clangtools/settingswidget.ui deleted file mode 100644 index 6ef3d092971..00000000000 --- a/src/plugins/clangtools/settingswidget.ui +++ /dev/null @@ -1,80 +0,0 @@ - - - ClangTools::Internal::SettingsWidget - - - - 0 - 0 - 400 - 300 - - - - - - - - - - Executables - - - - - - Clang-Tidy: - - - - - - - - - - Clazy-Standalone: - - - - - - - - - - - - - - - - Qt::Vertical - - - - 20 - 183 - - - - - - - - - Utils::PathChooser - QWidget -
utils/pathchooser.h
- 1 -
- - ClangTools::Internal::RunSettingsWidget - QWidget -
clangtools/runsettingswidget.h
- 1 -
-
- - -
diff --git a/src/plugins/clangtools/tidychecks.ui b/src/plugins/clangtools/tidychecks.ui deleted file mode 100644 index 907b9c5a400..00000000000 --- a/src/plugins/clangtools/tidychecks.ui +++ /dev/null @@ -1,178 +0,0 @@ - - - ClangTools::Internal::TidyChecks - - - - 0 - 0 - 800 - 500 - - - - - - - - 9 - - - 9 - - - 9 - - - 9 - - - - - - - - Select Checks - - - - - Use .clang-tidy config file - - - - - - - - Edit Checks as String... - - - - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - - - 0 - - - - - 0 - - - 0 - - - 0 - - - 0 - - - - - - 0 - 300 - - - - false - - - - - - - - - 0 - - - 0 - - - 0 - - - 0 - - - - - - - 0 - - - 6 - - - 0 - - - 0 - - - - - Could not query the supported checks from the clang-tidy executable. -Set a valid executable first. - - - Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop - - - - - - - Qt::Vertical - - - - 20 - 239 - - - - - - - - - - - - - Utils::InfoLabel - QLabel -
utils/infolabel.h
-
- - Utils::FancyLineEdit - QLineEdit -
utils/fancylineedit.h
-
-
- - -
diff --git a/src/plugins/clearcase/CMakeLists.txt b/src/plugins/clearcase/CMakeLists.txt index 25d2eb63367..12697375361 100644 --- a/src/plugins/clearcase/CMakeLists.txt +++ b/src/plugins/clearcase/CMakeLists.txt @@ -3,7 +3,7 @@ add_qtc_plugin(ClearCase SOURCES activityselector.cpp activityselector.h annotationhighlighter.cpp annotationhighlighter.h - checkoutdialog.cpp checkoutdialog.h checkoutdialog.ui + checkoutdialog.cpp checkoutdialog.h clearcaseconstants.h clearcaseeditor.cpp clearcaseeditor.h clearcaseplugin.cpp clearcaseplugin.h @@ -11,7 +11,6 @@ add_qtc_plugin(ClearCase clearcasesubmiteditor.cpp clearcasesubmiteditor.h clearcasesubmiteditorwidget.cpp clearcasesubmiteditorwidget.h clearcasesync.cpp clearcasesync.h - settingspage.cpp settingspage.h settingspage.ui - undocheckout.ui - versionselector.cpp versionselector.h versionselector.ui + settingspage.cpp settingspage.h + versionselector.cpp versionselector.h ) diff --git a/src/plugins/clearcase/activityselector.cpp b/src/plugins/clearcase/activityselector.cpp index 822e7c1a01c..3572ccfae2d 100644 --- a/src/plugins/clearcase/activityselector.cpp +++ b/src/plugins/clearcase/activityselector.cpp @@ -6,6 +6,7 @@ #include "clearcaseconstants.h" #include "clearcaseplugin.h" #include "clearcasesettings.h" +#include "clearcasetr.h" #include @@ -14,8 +15,7 @@ #include #include -using namespace ClearCase; -using namespace ClearCase::Internal; +namespace ClearCase::Internal { ActivitySelector::ActivitySelector(QWidget *parent) : QWidget(parent) { @@ -24,7 +24,7 @@ ActivitySelector::ActivitySelector(QWidget *parent) : QWidget(parent) auto hboxLayout = new QHBoxLayout(this); hboxLayout->setContentsMargins(0, 0, 0, 0); - auto lblActivity = new QLabel(tr("Select &activity:")); + auto lblActivity = new QLabel(Tr::tr("Select &activity:")); lblActivity->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Preferred); hboxLayout->addWidget(lblActivity); @@ -32,7 +32,7 @@ ActivitySelector::ActivitySelector(QWidget *parent) : QWidget(parent) m_cmbActivity->setMinimumSize(QSize(350, 0)); hboxLayout->addWidget(m_cmbActivity); - QString addText = tr("Add"); + QString addText = Tr::tr("Add"); if (!ClearCasePlugin::settings().autoAssignActivityName) addText.append(QLatin1String("...")); auto btnAdd = new QToolButton; @@ -67,7 +67,7 @@ bool ActivitySelector::refresh() void ActivitySelector::addKeep() { - m_cmbActivity->insertItem(0, tr("Keep item activity"), QLatin1String(Constants::KEEP_ACTIVITY)); + m_cmbActivity->insertItem(0, Tr::tr("Keep item activity"), QLatin1String(Constants::KEEP_ACTIVITY)); setActivity(QLatin1String(Constants::KEEP_ACTIVITY)); } @@ -93,3 +93,5 @@ void ActivitySelector::newActivity() if (ClearCasePlugin::newActivity()) refresh(); } + +} // ClearCase::Internal diff --git a/src/plugins/clearcase/activityselector.h b/src/plugins/clearcase/activityselector.h index 3a851931716..4883b48c3a3 100644 --- a/src/plugins/clearcase/activityselector.h +++ b/src/plugins/clearcase/activityselector.h @@ -9,8 +9,7 @@ QT_BEGIN_NAMESPACE class QComboBox; QT_END_NAMESPACE -namespace ClearCase { -namespace Internal { +namespace ClearCase::Internal { class ActivitySelector : public QWidget { @@ -33,5 +32,4 @@ private: QComboBox *m_cmbActivity = nullptr; }; -} // namespace Internal -} // namespace ClearCase +} // ClearCase::Internal diff --git a/src/plugins/clearcase/annotationhighlighter.cpp b/src/plugins/clearcase/annotationhighlighter.cpp index f619f558c4c..1e6b59e6799 100644 --- a/src/plugins/clearcase/annotationhighlighter.cpp +++ b/src/plugins/clearcase/annotationhighlighter.cpp @@ -3,8 +3,7 @@ #include "annotationhighlighter.h" -using namespace ClearCase; -using namespace ClearCase::Internal; +namespace ClearCase::Internal { ClearCaseAnnotationHighlighter::ClearCaseAnnotationHighlighter(const ChangeNumbers &changeNumbers, QTextDocument *document) : @@ -16,3 +15,5 @@ QString ClearCaseAnnotationHighlighter::changeNumber(const QString &block) const const int pos = block.indexOf(m_separator); return pos > 1 ? block.left(pos) : QString(); } + +} // ClearCase::Internal diff --git a/src/plugins/clearcase/annotationhighlighter.h b/src/plugins/clearcase/annotationhighlighter.h index 76a1e08623e..05f46f8c5ba 100644 --- a/src/plugins/clearcase/annotationhighlighter.h +++ b/src/plugins/clearcase/annotationhighlighter.h @@ -5,8 +5,7 @@ #include -namespace ClearCase { -namespace Internal { +namespace ClearCase::Internal { // Annotation highlighter for clearcase triggering on 'changenumber ' class ClearCaseAnnotationHighlighter : public VcsBase::BaseAnnotationHighlighter @@ -22,5 +21,4 @@ private: const QChar m_separator = QLatin1Char('|'); }; -} // namespace Internal -} // namespace ClearCase +} // ClearCase::Internal diff --git a/src/plugins/clearcase/checkoutdialog.cpp b/src/plugins/clearcase/checkoutdialog.cpp index 857e55dc591..2798bee5bf0 100644 --- a/src/plugins/clearcase/checkoutdialog.cpp +++ b/src/plugins/clearcase/checkoutdialog.cpp @@ -4,45 +4,90 @@ #include "checkoutdialog.h" #include "activityselector.h" -#include "ui_checkoutdialog.h" +#include "clearcasetr.h" #include +#include +#include +#include +#include +#include +#include +#include +#include #include +#include -namespace ClearCase { -namespace Internal { +namespace ClearCase::Internal { CheckOutDialog::CheckOutDialog(const QString &fileName, bool isUcm, bool showComment, QWidget *parent) : - QDialog(parent), ui(new Ui::CheckOutDialog) + QDialog(parent) { - ui->setupUi(this); - ui->lblFileName->setText(fileName); + resize(352, 317); + setWindowTitle(Tr::tr("Check Out")); + + auto lblFileName = new QLabel(fileName); + lblFileName->setTextInteractionFlags(Qt::LinksAccessibleByMouse|Qt::TextSelectableByMouse); + + m_txtComment = new QPlainTextEdit(this); + m_txtComment->setTabChangesFocus(true); + + m_lblComment = new QLabel(Tr::tr("&Checkout comment:")); + m_lblComment->setBuddy(m_txtComment); + + m_chkReserved = new QCheckBox(Tr::tr("&Reserved")); + m_chkReserved->setChecked(true); + + m_chkUnreserved = new QCheckBox(Tr::tr("&Unreserved if already reserved")); + + m_chkPTime = new QCheckBox(Tr::tr("&Preserve file modification time")); + + m_hijackedCheckBox = new QCheckBox(Tr::tr("Use &Hijacked file")); + m_hijackedCheckBox->setChecked(true); + + auto buttonBox = new QDialogButtonBox(QDialogButtonBox::Cancel|QDialogButtonBox::Ok); + + using namespace Utils::Layouting; + + Column { + lblFileName, + m_lblComment, + m_txtComment, + m_chkReserved, + Row { Space(16), m_chkUnreserved }, + m_chkPTime, + m_hijackedCheckBox, + buttonBox + }.attachTo(this); + + m_verticalLayout = static_cast(layout()); if (isUcm) { m_actSelector = new ActivitySelector(this); - ui->verticalLayout->insertWidget(0, m_actSelector); - ui->verticalLayout->insertWidget(1, Utils::Layouting::createHr()); + m_verticalLayout->insertWidget(0, m_actSelector); + m_verticalLayout->insertWidget(1, Utils::Layouting::createHr()); } if (!showComment) hideComment(); - ui->buttonBox->button(QDialogButtonBox::Ok)->setFocus(); + buttonBox->button(QDialogButtonBox::Ok)->setFocus(); + + connect(buttonBox, &QDialogButtonBox::accepted, this, &QDialog::accept); + connect(buttonBox, &QDialogButtonBox::rejected, this, &QDialog::reject); + connect(m_chkReserved, &QAbstractButton::toggled, this, &CheckOutDialog::toggleUnreserved); } -CheckOutDialog::~CheckOutDialog() -{ - delete ui; -} +CheckOutDialog::~CheckOutDialog() = default; void CheckOutDialog::hideComment() { - ui->lblComment->hide(); - ui->txtComment->hide(); - ui->verticalLayout->invalidate(); + m_lblComment->hide(); + m_txtComment->hide(); + m_verticalLayout->invalidate(); adjustSize(); } @@ -53,41 +98,40 @@ QString CheckOutDialog::activity() const QString CheckOutDialog::comment() const { - return ui->txtComment->toPlainText(); + return m_txtComment->toPlainText(); } bool CheckOutDialog::isReserved() const { - return ui->chkReserved->isChecked(); + return m_chkReserved->isChecked(); } bool CheckOutDialog::isUnreserved() const { - return ui->chkUnreserved->isChecked(); + return m_chkUnreserved->isChecked(); } bool CheckOutDialog::isPreserveTime() const { - return ui->chkPTime->isChecked(); + return m_chkPTime->isChecked(); } bool CheckOutDialog::isUseHijacked() const { - return ui->hijackedCheckBox->isChecked(); + return m_hijackedCheckBox->isChecked(); } void CheckOutDialog::hideHijack() { - ui->hijackedCheckBox->setVisible(false); - ui->hijackedCheckBox->setChecked(false); + m_hijackedCheckBox->setVisible(false); + m_hijackedCheckBox->setChecked(false); } void CheckOutDialog::toggleUnreserved(bool checked) { - ui->chkUnreserved->setEnabled(checked); + m_chkUnreserved->setEnabled(checked); if (!checked) - ui->chkUnreserved->setChecked(false); + m_chkUnreserved->setChecked(false); } -} // namespace Internal -} // namespace ClearCase +} // ClearCase::Internal diff --git a/src/plugins/clearcase/checkoutdialog.h b/src/plugins/clearcase/checkoutdialog.h index 0f862837654..4be1166c703 100644 --- a/src/plugins/clearcase/checkoutdialog.h +++ b/src/plugins/clearcase/checkoutdialog.h @@ -5,10 +5,14 @@ #include -namespace ClearCase { -namespace Internal { +QT_BEGIN_NAMESPACE +class QCheckBox; +class QLabel; +class QPlainTextEdit; +class QVBoxLayout; +QT_END_NAMESPACE -namespace Ui { class CheckOutDialog; } +namespace ClearCase::Internal { class ActivitySelector; @@ -34,9 +38,15 @@ public: private: void toggleUnreserved(bool checked); - Ui::CheckOutDialog *ui; ActivitySelector *m_actSelector = nullptr; + + QVBoxLayout *m_verticalLayout; + QLabel *m_lblComment; + QPlainTextEdit *m_txtComment; + QCheckBox *m_chkReserved; + QCheckBox *m_chkUnreserved; + QCheckBox *m_chkPTime; + QCheckBox *m_hijackedCheckBox; }; -} // namespace Internal -} // namespace ClearCase +} // ClearCase::Internal diff --git a/src/plugins/clearcase/checkoutdialog.ui b/src/plugins/clearcase/checkoutdialog.ui deleted file mode 100644 index ecbe69cff56..00000000000 --- a/src/plugins/clearcase/checkoutdialog.ui +++ /dev/null @@ -1,162 +0,0 @@ - - - ClearCase::Internal::CheckOutDialog - - - - 0 - 0 - 352 - 317 - - - - Check Out - - - - - - Qt::LinksAccessibleByMouse|Qt::TextSelectableByMouse - - - - - - - &Checkout comment: - - - txtComment - - - - - - - true - - - - - - - &Reserved - - - true - - - - - - - - - Qt::Horizontal - - - QSizePolicy::Fixed - - - - 16 - 20 - - - - - - - - &Unreserved if already reserved - - - - - - - - - &Preserve file modification time - - - - - - - Use &Hijacked file - - - true - - - - - - - Qt::Horizontal - - - QDialogButtonBox::Cancel|QDialogButtonBox::Ok - - - - - - - - - buttonBox - accepted() - ClearCase::Internal::CheckOutDialog - accept() - - - 248 - 254 - - - 157 - 274 - - - - - buttonBox - rejected() - ClearCase::Internal::CheckOutDialog - reject() - - - 316 - 260 - - - 286 - 274 - - - - - chkReserved - toggled(bool) - ClearCase::Internal::CheckOutDialog - toggleUnreserved(bool) - - - 50 - 173 - - - 6 - 186 - - - - - - toggleUnreserved(bool) - newActivity() - - diff --git a/src/plugins/clearcase/clearcase.qbs b/src/plugins/clearcase/clearcase.qbs index 355912ce5d8..55c9a821b8b 100644 --- a/src/plugins/clearcase/clearcase.qbs +++ b/src/plugins/clearcase/clearcase.qbs @@ -20,7 +20,6 @@ QtcPlugin { "annotationhighlighter.h", "checkoutdialog.cpp", "checkoutdialog.h", - "checkoutdialog.ui", "clearcaseconstants.h", "clearcaseeditor.cpp", "clearcaseeditor.h", @@ -36,11 +35,8 @@ QtcPlugin { "clearcasesync.h", "settingspage.cpp", "settingspage.h", - "settingspage.ui", - "undocheckout.ui", "versionselector.cpp", "versionselector.h", - "versionselector.ui", ] } diff --git a/src/plugins/clearcase/clearcaseeditor.cpp b/src/plugins/clearcase/clearcaseeditor.cpp index bfcd7558c1a..41c921105fa 100644 --- a/src/plugins/clearcase/clearcaseeditor.cpp +++ b/src/plugins/clearcase/clearcaseeditor.cpp @@ -2,6 +2,7 @@ // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0+ OR GPL-3.0 WITH Qt-GPL-exception-1.0 #include "clearcaseeditor.h" +#include "clearcasetr.h" #include "annotationhighlighter.h" @@ -9,8 +10,7 @@ #include -using namespace ClearCase; -using namespace ClearCase::Internal; +namespace ClearCase::Internal { ClearCaseEditorWidget::ClearCaseEditorWidget() : m_versionNumberPattern(QLatin1String("[\\\\/]main[\\\\/][^ \t\n\"]*")) @@ -21,7 +21,7 @@ ClearCaseEditorWidget::ClearCaseEditorWidget() : // "+++ D:\depot\...\mainwindow.cpp[TAB]Sun May 01 14:22:37 2011" (local) setDiffFilePattern("^[-+]{3} ([^\\t]+?)(?:@@|\\t)"); setLogEntryPattern("version \"([^\"]+)\""); - setAnnotateRevisionTextFormat(tr("Annotate version \"%1\"")); + setAnnotateRevisionTextFormat(Tr::tr("Annotate version \"%1\"")); setAnnotationEntryPattern("([^|]*)\\|[^\\n]*\\n"); setAnnotationSeparatorPattern("\\n-{30}"); } @@ -46,3 +46,5 @@ VcsBase::BaseAnnotationHighlighter *ClearCaseEditorWidget::createAnnotationHighl { return new ClearCaseAnnotationHighlighter(changes); } + +} // ClearCase::Internal diff --git a/src/plugins/clearcase/clearcaseeditor.h b/src/plugins/clearcase/clearcaseeditor.h index 0c0dbd635c7..584b0f6f459 100644 --- a/src/plugins/clearcase/clearcaseeditor.h +++ b/src/plugins/clearcase/clearcaseeditor.h @@ -7,8 +7,7 @@ #include -namespace ClearCase { -namespace Internal { +namespace ClearCase::Internal { class ClearCaseEditorWidget : public VcsBase::VcsBaseEditorWidget { @@ -25,5 +24,4 @@ private: const QRegularExpression m_versionNumberPattern; }; -} // namespace Internal -} // namespace ClearCase +} // ClearCase::Internal diff --git a/src/plugins/clearcase/clearcaseplugin.cpp b/src/plugins/clearcase/clearcaseplugin.cpp index 236b2bb50b6..3de8dcca259 100644 --- a/src/plugins/clearcase/clearcaseplugin.cpp +++ b/src/plugins/clearcase/clearcaseplugin.cpp @@ -11,9 +11,9 @@ #include "clearcasesubmiteditor.h" #include "clearcasesubmiteditorwidget.h" #include "clearcasesync.h" +#include "clearcasetr.h" #include "settingspage.h" #include "versionselector.h" -#include "ui_undocheckout.h" #include #include @@ -32,6 +32,7 @@ #include #include #include +#include #include #include #include @@ -47,7 +48,10 @@ #include #include +#include #include +#include +#include #include #include #include @@ -56,6 +60,7 @@ #include #include #include +#include #include #include #include @@ -66,6 +71,7 @@ #include #include #include + #ifdef WITH_TESTS #include #include @@ -80,22 +86,22 @@ using namespace std::placeholders; namespace ClearCase { namespace Internal { -static const char CLEARCASE_CONTEXT[] = "ClearCase Context"; -static const char CMD_ID_CLEARCASE_MENU[] = "ClearCase.Menu"; -static const char CMD_ID_CHECKOUT[] = "ClearCase.CheckOut"; -static const char CMD_ID_CHECKIN[] = "ClearCase.CheckInCurrent"; -static const char CMD_ID_UNDOCHECKOUT[] = "ClearCase.UndoCheckOut"; -static const char CMD_ID_UNDOHIJACK[] = "ClearCase.UndoHijack"; -static const char CMD_ID_DIFF_CURRENT[] = "ClearCase.DiffCurrent"; -static const char CMD_ID_HISTORY_CURRENT[] = "ClearCase.HistoryCurrent"; -static const char CMD_ID_ANNOTATE[] = "ClearCase.Annotate"; -static const char CMD_ID_ADD_FILE[] = "ClearCase.AddFile"; -static const char CMD_ID_DIFF_ACTIVITY[] = "ClearCase.DiffActivity"; -static const char CMD_ID_CHECKIN_ACTIVITY[] = "ClearCase.CheckInActivity"; -static const char CMD_ID_UPDATEINDEX[] = "ClearCase.UpdateIndex"; -static const char CMD_ID_UPDATE_VIEW[] = "ClearCase.UpdateView"; -static const char CMD_ID_CHECKIN_ALL[] = "ClearCase.CheckInAll"; -static const char CMD_ID_STATUS[] = "ClearCase.Status"; +const char CLEARCASE_CONTEXT[] = "ClearCase Context"; +const char CMD_ID_CLEARCASE_MENU[] = "ClearCase.Menu"; +const char CMD_ID_CHECKOUT[] = "ClearCase.CheckOut"; +const char CMD_ID_CHECKIN[] = "ClearCase.CheckInCurrent"; +const char CMD_ID_UNDOCHECKOUT[] = "ClearCase.UndoCheckOut"; +const char CMD_ID_UNDOHIJACK[] = "ClearCase.UndoHijack"; +const char CMD_ID_DIFF_CURRENT[] = "ClearCase.DiffCurrent"; +const char CMD_ID_HISTORY_CURRENT[] = "ClearCase.HistoryCurrent"; +const char CMD_ID_ANNOTATE[] = "ClearCase.Annotate"; +const char CMD_ID_ADD_FILE[] = "ClearCase.AddFile"; +const char CMD_ID_DIFF_ACTIVITY[] = "ClearCase.DiffActivity"; +const char CMD_ID_CHECKIN_ACTIVITY[] = "ClearCase.CheckInActivity"; +const char CMD_ID_UPDATEINDEX[] = "ClearCase.UpdateIndex"; +const char CMD_ID_UPDATE_VIEW[] = "ClearCase.UpdateView"; +const char CMD_ID_CHECKIN_ALL[] = "ClearCase.CheckInAll"; +const char CMD_ID_STATUS[] = "ClearCase.Status"; const int s_silentRun = VcsCommand::NoOutput | VcsCommand::FullySynchronously; const int s_verboseRun = VcsCommand::ShowStdOut | VcsCommand::FullySynchronously; @@ -416,7 +422,7 @@ void ClearCasePluginPrivate::updateEditDerivedObjectWarning(const QString &fileN return; infoBar->addInfo(InfoBarEntry(derivedObjectWarning, - tr("Editing Derived Object: %1").arg(fileName))); + Tr::tr("Editing Derived Object: %1").arg(fileName))); } else { infoBar->removeInfo(derivedObjectWarning); } @@ -615,82 +621,82 @@ ClearCasePluginPrivate::ClearCasePluginPrivate() const QString prefix = QLatin1String("cc"); // register cc prefix in Locator m_commandLocator = new CommandLocator("cc", description, prefix, this); - m_commandLocator->setDescription(tr("Triggers a ClearCase version control operation.")); + m_commandLocator->setDescription(Tr::tr("Triggers a ClearCase version control operation.")); //register actions ActionContainer *toolsContainer = ActionManager::actionContainer(M_TOOLS); ActionContainer *clearcaseMenu = ActionManager::createMenu(CMD_ID_CLEARCASE_MENU); - clearcaseMenu->menu()->setTitle(tr("C&learCase")); + clearcaseMenu->menu()->setTitle(Tr::tr("C&learCase")); toolsContainer->addMenu(clearcaseMenu); m_menuAction = clearcaseMenu->menu()->menuAction(); Command *command; - m_checkOutAction = new ParameterAction(tr("Check Out..."), tr("Check &Out \"%1\"..."), ParameterAction::AlwaysEnabled, this); + m_checkOutAction = new ParameterAction(Tr::tr("Check Out..."), Tr::tr("Check &Out \"%1\"..."), ParameterAction::AlwaysEnabled, this); command = ActionManager::registerAction(m_checkOutAction, CMD_ID_CHECKOUT, context); command->setAttribute(Command::CA_UpdateText); - command->setDefaultKeySequence(QKeySequence(useMacShortcuts ? tr("Meta+L,Meta+O") : tr("Alt+L,Alt+O"))); + command->setDefaultKeySequence(QKeySequence(useMacShortcuts ? Tr::tr("Meta+L,Meta+O") : Tr::tr("Alt+L,Alt+O"))); connect(m_checkOutAction, &QAction::triggered, this, &ClearCasePluginPrivate::checkOutCurrentFile); clearcaseMenu->addAction(command); m_commandLocator->appendCommand(command); - m_checkInCurrentAction = new ParameterAction(tr("Check &In..."), tr("Check &In \"%1\"..."), ParameterAction::AlwaysEnabled, this); + m_checkInCurrentAction = new ParameterAction(Tr::tr("Check &In..."), Tr::tr("Check &In \"%1\"..."), ParameterAction::AlwaysEnabled, this); command = ActionManager::registerAction(m_checkInCurrentAction, CMD_ID_CHECKIN, context); command->setAttribute(Command::CA_UpdateText); - command->setDefaultKeySequence(QKeySequence(useMacShortcuts ? tr("Meta+L,Meta+I") : tr("Alt+L,Alt+I"))); + command->setDefaultKeySequence(QKeySequence(useMacShortcuts ? Tr::tr("Meta+L,Meta+I") : Tr::tr("Alt+L,Alt+I"))); connect(m_checkInCurrentAction, &QAction::triggered, this, &ClearCasePluginPrivate::startCheckInCurrentFile); clearcaseMenu->addAction(command); m_commandLocator->appendCommand(command); - m_undoCheckOutAction = new ParameterAction(tr("Undo Check Out"), tr("&Undo Check Out \"%1\""), ParameterAction::AlwaysEnabled, this); + m_undoCheckOutAction = new ParameterAction(Tr::tr("Undo Check Out"), Tr::tr("&Undo Check Out \"%1\""), ParameterAction::AlwaysEnabled, this); command = ActionManager::registerAction(m_undoCheckOutAction, CMD_ID_UNDOCHECKOUT, context); command->setAttribute(Command::CA_UpdateText); - command->setDefaultKeySequence(QKeySequence(useMacShortcuts ? tr("Meta+L,Meta+U") : tr("Alt+L,Alt+U"))); + command->setDefaultKeySequence(QKeySequence(useMacShortcuts ? Tr::tr("Meta+L,Meta+U") : Tr::tr("Alt+L,Alt+U"))); connect(m_undoCheckOutAction, &QAction::triggered, this, &ClearCasePluginPrivate::undoCheckOutCurrent); clearcaseMenu->addAction(command); m_commandLocator->appendCommand(command); - m_undoHijackAction = new ParameterAction(tr("Undo Hijack"), tr("Undo Hi&jack \"%1\""), ParameterAction::AlwaysEnabled, this); + m_undoHijackAction = new ParameterAction(Tr::tr("Undo Hijack"), Tr::tr("Undo Hi&jack \"%1\""), ParameterAction::AlwaysEnabled, this); command = ActionManager::registerAction(m_undoHijackAction, CMD_ID_UNDOHIJACK, context); command->setAttribute(Command::CA_UpdateText); - command->setDefaultKeySequence(QKeySequence(useMacShortcuts ? tr("Meta+L,Meta+R") : tr("Alt+L,Alt+R"))); + command->setDefaultKeySequence(QKeySequence(useMacShortcuts ? Tr::tr("Meta+L,Meta+R") : Tr::tr("Alt+L,Alt+R"))); connect(m_undoHijackAction, &QAction::triggered, this, &ClearCasePluginPrivate::undoHijackCurrent); clearcaseMenu->addAction(command); m_commandLocator->appendCommand(command); clearcaseMenu->addSeparator(context); - m_diffCurrentAction = new ParameterAction(tr("Diff Current File"), tr("&Diff \"%1\""), ParameterAction::EnabledWithParameter, this); + m_diffCurrentAction = new ParameterAction(Tr::tr("Diff Current File"), Tr::tr("&Diff \"%1\""), ParameterAction::EnabledWithParameter, this); command = ActionManager::registerAction(m_diffCurrentAction, CMD_ID_DIFF_CURRENT, context); command->setAttribute(Command::CA_UpdateText); - command->setDefaultKeySequence(QKeySequence(useMacShortcuts ? tr("Meta+L,Meta+D") : tr("Alt+L,Alt+D"))); + command->setDefaultKeySequence(QKeySequence(useMacShortcuts ? Tr::tr("Meta+L,Meta+D") : Tr::tr("Alt+L,Alt+D"))); connect(m_diffCurrentAction, &QAction::triggered, this, &ClearCasePluginPrivate::diffCurrentFile); clearcaseMenu->addAction(command); m_commandLocator->appendCommand(command); - m_historyCurrentAction = new ParameterAction(tr("History Current File"), tr("&History \"%1\""), ParameterAction::EnabledWithParameter, this); + m_historyCurrentAction = new ParameterAction(Tr::tr("History Current File"), Tr::tr("&History \"%1\""), ParameterAction::EnabledWithParameter, this); command = ActionManager::registerAction(m_historyCurrentAction, CMD_ID_HISTORY_CURRENT, context); command->setAttribute(Command::CA_UpdateText); - command->setDefaultKeySequence(QKeySequence(useMacShortcuts ? tr("Meta+L,Meta+H") : tr("Alt+L,Alt+H"))); + command->setDefaultKeySequence(QKeySequence(useMacShortcuts ? Tr::tr("Meta+L,Meta+H") : Tr::tr("Alt+L,Alt+H"))); connect(m_historyCurrentAction, &QAction::triggered, this, &ClearCasePluginPrivate::historyCurrentFile); clearcaseMenu->addAction(command); m_commandLocator->appendCommand(command); - m_annotateCurrentAction = new ParameterAction(tr("Annotate Current File"), tr("&Annotate \"%1\""), ParameterAction::EnabledWithParameter, this); + m_annotateCurrentAction = new ParameterAction(Tr::tr("Annotate Current File"), Tr::tr("&Annotate \"%1\""), ParameterAction::EnabledWithParameter, this); command = ActionManager::registerAction(m_annotateCurrentAction, CMD_ID_ANNOTATE, context); command->setAttribute(Command::CA_UpdateText); - command->setDefaultKeySequence(QKeySequence(useMacShortcuts ? tr("Meta+L,Meta+A") : tr("Alt+L,Alt+A"))); + command->setDefaultKeySequence(QKeySequence(useMacShortcuts ? Tr::tr("Meta+L,Meta+A") : Tr::tr("Alt+L,Alt+A"))); connect(m_annotateCurrentAction, &QAction::triggered, this, &ClearCasePluginPrivate::annotateCurrentFile); clearcaseMenu->addAction(command); m_commandLocator->appendCommand(command); - m_addFileAction = new ParameterAction(tr("Add File..."), tr("Add File \"%1\""), ParameterAction::EnabledWithParameter, this); + m_addFileAction = new ParameterAction(Tr::tr("Add File..."), Tr::tr("Add File \"%1\""), ParameterAction::EnabledWithParameter, this); command = ActionManager::registerAction(m_addFileAction, CMD_ID_ADD_FILE, context); command->setAttribute(Command::CA_UpdateText); connect(m_addFileAction, &QAction::triggered, this, &ClearCasePluginPrivate::addCurrentFile); @@ -698,14 +704,14 @@ ClearCasePluginPrivate::ClearCasePluginPrivate() clearcaseMenu->addSeparator(context); - m_diffActivityAction = new QAction(tr("Diff A&ctivity..."), this); + m_diffActivityAction = new QAction(Tr::tr("Diff A&ctivity..."), this); m_diffActivityAction->setEnabled(false); command = ActionManager::registerAction(m_diffActivityAction, CMD_ID_DIFF_ACTIVITY, context); connect(m_diffActivityAction, &QAction::triggered, this, &ClearCasePluginPrivate::diffActivity); clearcaseMenu->addAction(command); m_commandLocator->appendCommand(command); - m_checkInActivityAction = new ParameterAction(tr("Ch&eck In Activity"), tr("Chec&k In Activity \"%1\"..."), ParameterAction::EnabledWithParameter, this); + m_checkInActivityAction = new ParameterAction(Tr::tr("Ch&eck In Activity"), Tr::tr("Chec&k In Activity \"%1\"..."), ParameterAction::EnabledWithParameter, this); m_checkInActivityAction->setEnabled(false); command = ActionManager::registerAction(m_checkInActivityAction, CMD_ID_CHECKIN_ACTIVITY, context); connect(m_checkInActivityAction, &QAction::triggered, this, &ClearCasePluginPrivate::startCheckInActivity); @@ -715,12 +721,12 @@ ClearCasePluginPrivate::ClearCasePluginPrivate() clearcaseMenu->addSeparator(context); - m_updateIndexAction = new QAction(tr("Update Index"), this); + m_updateIndexAction = new QAction(Tr::tr("Update Index"), this); command = ActionManager::registerAction(m_updateIndexAction, CMD_ID_UPDATEINDEX, context); connect(m_updateIndexAction, &QAction::triggered, this, &ClearCasePluginPrivate::updateIndex); clearcaseMenu->addAction(command); - m_updateViewAction = new ParameterAction(tr("Update View"), tr("U&pdate View \"%1\""), ParameterAction::EnabledWithParameter, this); + m_updateViewAction = new ParameterAction(Tr::tr("Update View"), Tr::tr("U&pdate View \"%1\""), ParameterAction::EnabledWithParameter, this); command = ActionManager::registerAction(m_updateViewAction, CMD_ID_UPDATE_VIEW, context); connect(m_updateViewAction, &QAction::triggered, this, &ClearCasePluginPrivate::updateView); command->setAttribute(Command::CA_UpdateText); @@ -728,16 +734,16 @@ ClearCasePluginPrivate::ClearCasePluginPrivate() clearcaseMenu->addSeparator(context); - m_checkInAllAction = new QAction(tr("Check In All &Files..."), this); + m_checkInAllAction = new QAction(Tr::tr("Check In All &Files..."), this); command = ActionManager::registerAction(m_checkInAllAction, CMD_ID_CHECKIN_ALL, context); - command->setDefaultKeySequence(QKeySequence(useMacShortcuts ? tr("Meta+L,Meta+F") : tr("Alt+L,Alt+F"))); + command->setDefaultKeySequence(QKeySequence(useMacShortcuts ? Tr::tr("Meta+L,Meta+F") : Tr::tr("Alt+L,Alt+F"))); connect(m_checkInAllAction, &QAction::triggered, this, &ClearCasePluginPrivate::startCheckInAll); clearcaseMenu->addAction(command); m_commandLocator->appendCommand(command); - m_statusAction = new QAction(tr("View &Status"), this); + m_statusAction = new QAction(Tr::tr("View &Status"), this); command = ActionManager::registerAction(m_statusAction, CMD_ID_STATUS, context); - command->setDefaultKeySequence(QKeySequence(useMacShortcuts ? tr("Meta+L,Meta+S") : tr("Alt+L,Alt+S"))); + command->setDefaultKeySequence(QKeySequence(useMacShortcuts ? Tr::tr("Meta+L,Meta+S") : Tr::tr("Alt+L,Alt+S"))); connect(m_statusAction, &QAction::triggered, this, &ClearCasePluginPrivate::viewStatus); clearcaseMenu->addAction(command); m_commandLocator->appendCommand(command); @@ -990,7 +996,7 @@ void ClearCasePluginPrivate::updateActions(VcsBasePluginPrivate::ActionState as) QString ClearCasePluginPrivate::commitDisplayName() const { - return tr("Check In"); + return Tr::tr("Check In"); } void ClearCasePluginPrivate::checkOutCurrentFile() @@ -1017,6 +1023,51 @@ void ClearCasePluginPrivate::setStatus(const QString &file, FileStatus::Status s QMetaObject::invokeMethod(this, &ClearCasePluginPrivate::updateStatusActions); } +class UndoCheckOutDialog : public QDialog +{ +public: + UndoCheckOutDialog() + { + resize(323, 105); + setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Preferred); + setWindowTitle(Tr::tr("Dialog")); + + lblMessage = new QLabel(this); + + QPalette palette; + QBrush brush(QColor(255, 0, 0, 255)); + brush.setStyle(Qt::SolidPattern); + palette.setBrush(QPalette::Active, QPalette::WindowText, brush); + palette.setBrush(QPalette::Inactive, QPalette::WindowText, brush); + QBrush brush1(QColor(68, 96, 92, 255)); + brush1.setStyle(Qt::SolidPattern); + palette.setBrush(QPalette::Disabled, QPalette::WindowText, brush1); + + auto lblModified = new QLabel(Tr::tr("The file was changed.")); + lblModified->setPalette(palette); + + chkKeep = new QCheckBox(Tr::tr("&Save copy of the file with a '.keep' extension")); + chkKeep->setChecked(true); + + auto buttonBox = new QDialogButtonBox(QDialogButtonBox::No|QDialogButtonBox::Yes); + + using namespace Layouting; + + Column { + lblMessage, + lblModified, + chkKeep, + buttonBox + }.attachTo(this); + + connect(buttonBox, &QDialogButtonBox::accepted, this, &QDialog::accept); + connect(buttonBox, &QDialogButtonBox::rejected, this, &QDialog::reject); + } + + QLabel *lblMessage; + QCheckBox *chkKeep; +}; + void ClearCasePluginPrivate::undoCheckOutCurrent() { const VcsBasePluginState state = currentState(); @@ -1033,14 +1084,12 @@ void ClearCasePluginPrivate::undoCheckOutCurrent() bool keep = false; if (result.exitCode()) { // return value is 1 if there is any difference - Ui::UndoCheckOut uncoUi; - QDialog uncoDlg; - uncoUi.setupUi(&uncoDlg); - uncoUi.lblMessage->setText(tr("Do you want to undo the check out of \"%1\"?").arg(fileName)); - uncoUi.chkKeep->setChecked(m_settings.keepFileUndoCheckout); - if (uncoDlg.exec() != QDialog::Accepted) + UndoCheckOutDialog dialog; + dialog.lblMessage->setText(Tr::tr("Do you want to undo the check out of \"%1\"?").arg(fileName)); + dialog.chkKeep->setChecked(m_settings.keepFileUndoCheckout); + if (dialog.exec() != QDialog::Accepted) return; - keep = uncoUi.chkKeep->isChecked(); + keep = dialog.chkKeep->isChecked(); if (keep != m_settings.keepFileUndoCheckout) { m_settings.keepFileUndoCheckout = keep; m_settings.toSettings(ICore::settings()); @@ -1117,15 +1166,13 @@ void ClearCasePluginPrivate::undoHijackCurrent() askKeep = false; } if (askKeep) { - Ui::UndoCheckOut unhijackUi; - QDialog unhijackDlg; - unhijackUi.setupUi(&unhijackDlg); - unhijackDlg.setWindowTitle(tr("Undo Hijack File")); - unhijackUi.lblMessage->setText(tr("Do you want to undo hijack of \"%1\"?") + UndoCheckOutDialog unhijackDlg; + unhijackDlg.setWindowTitle(Tr::tr("Undo Hijack File")); + unhijackDlg.lblMessage->setText(Tr::tr("Do you want to undo hijack of \"%1\"?") .arg(QDir::toNativeSeparators(fileName))); if (unhijackDlg.exec() != QDialog::Accepted) return; - keep = unhijackUi.chkKeep->isChecked(); + keep = unhijackDlg.chkKeep->isChecked(); } FileChangeBlocker fcb(FilePath::fromString(state.currentFile())); @@ -1160,7 +1207,7 @@ void ClearCasePluginPrivate::ccDiffWithPred(const FilePath &workingDir, const QS return; // done here, diff is opened in a new window } if (!m_settings.extDiffAvailable) { - VcsOutputWindow::appendError(tr("External diff is required to compare multiple files.")); + VcsOutputWindow::appendError(Tr::tr("External diff is required to compare multiple files.")); return; } QString result; @@ -1232,12 +1279,12 @@ void ClearCasePluginPrivate::diffActivity() if (Constants::debug) qDebug() << Q_FUNC_INFO; if (!m_settings.extDiffAvailable) { - VcsOutputWindow::appendError(tr("External diff is required to compare multiple files.")); + VcsOutputWindow::appendError(Tr::tr("External diff is required to compare multiple files.")); return; } FilePath topLevel = state.topLevel(); - QString activity = QInputDialog::getText(ICore::dialogParent(), tr("Enter Activity"), - tr("Activity Name"), QLineEdit::Normal, m_activity); + QString activity = QInputDialog::getText(ICore::dialogParent(), Tr::tr("Enter Activity"), + Tr::tr("Activity Name"), QLineEdit::Normal, m_activity); if (activity.isEmpty()) return; const QStringList versions = ccGetActivityVersions(topLevel, activity); @@ -1335,7 +1382,7 @@ void ClearCasePluginPrivate::startCheckInActivity() connect(buttonBox, &QDialogButtonBox::rejected, &dlg, &QDialog::reject); layout->addWidget(actSelector); layout->addWidget(buttonBox); - dlg.setWindowTitle(tr("Check In Activity")); + dlg.setWindowTitle(Tr::tr("Check In Activity")); if (!dlg.exec()) return; @@ -1369,13 +1416,13 @@ void ClearCasePluginPrivate::startCheckIn(const FilePath &workingDir, const QStr return; if (isCheckInEditorOpen()) { - VcsOutputWindow::appendWarning(tr("Another check in is currently being executed.")); + VcsOutputWindow::appendWarning(Tr::tr("Another check in is currently being executed.")); return; } // Get list of added/modified/deleted files if (files.empty()) { - VcsOutputWindow::appendWarning(tr("There are no modified files.")); + VcsOutputWindow::appendWarning(Tr::tr("There are no modified files.")); return; } // Create a new submit change file containing the submit template @@ -1611,7 +1658,7 @@ CommandResult ClearCasePluginPrivate::runCleartool(const FilePath &workingDir, QTextCodec *outputCodec) const { if (m_settings.ccBinaryPath.isEmpty()) - return CommandResult(ProcessResult::StartFailed, tr("No ClearCase executable specified.")); + return CommandResult(ProcessResult::StartFailed, Tr::tr("No ClearCase executable specified.")); std::unique_ptr command; command.reset(VcsBaseClient::createVcsCommand(workingDir, Environment::systemEnvironment())); @@ -1679,8 +1726,8 @@ bool ClearCasePluginPrivate::vcsOpen(const FilePath &workingDir, const QString & (fi.isWritable() || vcsStatus(absPath).status == FileStatus::Unknown)) runAsync(sync, QStringList(absPath)).waitForFinished(); if (vcsStatus(absPath).status == FileStatus::CheckedOut) { - QMessageBox::information(ICore::dialogParent(), tr("ClearCase Checkout"), - tr("File is already checked out.")); + QMessageBox::information(ICore::dialogParent(), Tr::tr("ClearCase Checkout"), + Tr::tr("File is already checked out.")); return true; } @@ -1775,7 +1822,7 @@ bool ClearCasePluginPrivate::vcsSetActivity(const FilePath &workingDir, const QS const CommandResult result = runCleartool(workingDir, args, m_settings.timeOutS, VcsCommand::ShowStdOut); if (result.result() != ProcessResult::FinishedWithSuccess) { - QMessageBox::warning(ICore::dialogParent(), title, tr("Set current activity failed: %1") + QMessageBox::warning(ICore::dialogParent(), title, Tr::tr("Set current activity failed: %1") .arg(result.exitMessage()), QMessageBox::Ok); return false; } @@ -1855,7 +1902,7 @@ bool ClearCasePluginPrivate::ccFileOp(const FilePath &workingDir, const QString verticalLayout->addWidget(actSelector); } - auto commentLabel = new QLabel(tr("Enter &comment:")); + auto commentLabel = new QLabel(Tr::tr("Enter &comment:")); verticalLayout->addWidget(commentLabel); auto commentEdit = new QTextEdit; @@ -1928,24 +1975,24 @@ static QString baseName(const QString &fileName) bool ClearCasePluginPrivate::vcsAdd(const FilePath &workingDir, const QString &fileName) { - return ccFileOp(workingDir, tr("ClearCase Add File %1").arg(baseName(fileName)), + return ccFileOp(workingDir, Tr::tr("ClearCase Add File %1").arg(baseName(fileName)), QStringList({"mkelem", "-ci"}), fileName); } bool ClearCasePluginPrivate::vcsDelete(const FilePath &workingDir, const QString &fileName) { - const QString title(tr("ClearCase Remove Element %1").arg(baseName(fileName))); - if (QMessageBox::warning(ICore::dialogParent(), title, tr("This operation is irreversible. Are you sure?"), + const QString title(Tr::tr("ClearCase Remove Element %1").arg(baseName(fileName))); + if (QMessageBox::warning(ICore::dialogParent(), title, Tr::tr("This operation is irreversible. Are you sure?"), QMessageBox::Yes | QMessageBox::No) == QMessageBox::No) return true; - return ccFileOp(workingDir, tr("ClearCase Remove File %1").arg(baseName(fileName)), + return ccFileOp(workingDir, Tr::tr("ClearCase Remove File %1").arg(baseName(fileName)), QStringList({"rmname", "-force"}), fileName); } bool ClearCasePluginPrivate::vcsMove(const FilePath &workingDir, const QString &from, const QString &to) { - return ccFileOp(workingDir, tr("ClearCase Rename File %1 -> %2") + return ccFileOp(workingDir, Tr::tr("ClearCase Rename File %1 -> %2") .arg(baseName(from)).arg(baseName(to)), QStringList("move"), from, to); } @@ -2046,8 +2093,8 @@ bool ClearCasePluginPrivate::newActivity() QStringList args; args << QLatin1String("mkactivity") << QLatin1String("-f"); if (!m_settings.autoAssignActivityName) { - QString headline = QInputDialog::getText(ICore::dialogParent(), tr("Activity Headline"), - tr("Enter activity headline")); + QString headline = QInputDialog::getText(ICore::dialogParent(), Tr::tr("Activity Headline"), + Tr::tr("Enter activity headline")); if (headline.isEmpty()) return false; args << QLatin1String("-headline") << headline; @@ -2165,7 +2212,7 @@ void ClearCasePluginPrivate::updateIndex() m_statusMap->clear(); QFuture result = runAsync(sync, transform(project->files(Project::SourceFiles), &FilePath::toString)); if (!m_settings.disableIndexer) - ProgressManager::addTask(result, tr("Updating ClearCase Index"), ClearCase::Constants::TASK_INDEX); + ProgressManager::addTask(result, Tr::tr("Updating ClearCase Index"), ClearCase::Constants::TASK_INDEX); } /*! retrieve a \a file (usually of the form path\to\filename.cpp@@\main\ver) @@ -2413,14 +2460,14 @@ void ClearCasePluginPrivate::vcsAnnotate(const FilePath &filePath, int line) QString ClearCasePluginPrivate::vcsOpenText() const { - return tr("Check &Out"); + return Tr::tr("Check &Out"); } QString ClearCasePluginPrivate::vcsMakeWritableText() const { if (isDynamic()) return {}; - return tr("&Hijack"); + return Tr::tr("&Hijack"); } QString ClearCasePluginPrivate::vcsTopic(const FilePath &directory) diff --git a/src/plugins/clearcase/clearcaseplugin.h b/src/plugins/clearcase/clearcaseplugin.h index 8fa6dbc2f02..dec889af9bf 100644 --- a/src/plugins/clearcase/clearcaseplugin.h +++ b/src/plugins/clearcase/clearcaseplugin.h @@ -10,8 +10,7 @@ #include #include -namespace ClearCase { -namespace Internal { +namespace ClearCase::Internal { class ClearCaseSettings; @@ -91,5 +90,4 @@ private slots: #endif }; -} // namespace Internal -} // namespace ClearCase +} // ClearCase::Internal diff --git a/src/plugins/clearcase/clearcasesettings.cpp b/src/plugins/clearcase/clearcasesettings.cpp index 47e1779bfd1..78f12b2c40a 100644 --- a/src/plugins/clearcase/clearcasesettings.cpp +++ b/src/plugins/clearcase/clearcasesettings.cpp @@ -7,23 +7,25 @@ #include -static const char groupC[] = "ClearCase"; -static const char commandKeyC[] = "Command"; +namespace ClearCase::Internal { -static const char historyCountKeyC[] = "HistoryCount"; -static const char timeOutKeyC[] = "TimeOut"; -static const char autoCheckOutKeyC[] = "AutoCheckOut"; -static const char noCommentKeyC[] = "NoComment"; -static const char keepFileUndoCheckoutKeyC[] = "KeepFileUnDoCheckout"; -static const char diffTypeKeyC[] = "DiffType"; -static const char diffArgsKeyC[] = "DiffArgs"; -static const char autoAssignActivityKeyC[] = "AutoAssignActivityName"; -static const char promptToCheckInKeyC[] = "PromptToCheckIn"; -static const char disableIndexerKeyC[] = "DisableIndexer"; -static const char totalFilesKeyC[] = "TotalFiles"; -static const char indexOnlyVOBsC[] = "IndexOnlyVOBs"; +const char groupC[] = "ClearCase"; +const char commandKeyC[] = "Command"; -static const char defaultDiffArgs[] = "-ubp"; +const char historyCountKeyC[] = "HistoryCount"; +const char timeOutKeyC[] = "TimeOut"; +const char autoCheckOutKeyC[] = "AutoCheckOut"; +const char noCommentKeyC[] = "NoComment"; +const char keepFileUndoCheckoutKeyC[] = "KeepFileUnDoCheckout"; +const char diffTypeKeyC[] = "DiffType"; +const char diffArgsKeyC[] = "DiffArgs"; +const char autoAssignActivityKeyC[] = "AutoAssignActivityName"; +const char promptToCheckInKeyC[] = "PromptToCheckIn"; +const char disableIndexerKeyC[] = "DisableIndexer"; +const char totalFilesKeyC[] = "TotalFiles"; +const char indexOnlyVOBsC[] = "IndexOnlyVOBs"; + +const char defaultDiffArgs[] = "-ubp"; enum { defaultTimeOutS = 30, defaultHistoryCount = 50 }; @@ -32,8 +34,6 @@ static QString defaultCommand() return QLatin1String("cleartool" QTC_HOST_EXE_SUFFIX); } -using namespace ClearCase::Internal; - ClearCaseSettings::ClearCaseSettings() : ccCommand(defaultCommand()), diffArgs(QLatin1String(defaultDiffArgs)), @@ -118,3 +118,5 @@ bool ClearCaseSettings::equals(const ClearCaseSettings &s) const && indexOnlyVOBs == s.indexOnlyVOBs && totalFiles == s.totalFiles; } + +} // ClearCase::Internal diff --git a/src/plugins/clearcase/clearcasesettings.h b/src/plugins/clearcase/clearcasesettings.h index 912c758f5d7..b8a050b25ca 100644 --- a/src/plugins/clearcase/clearcasesettings.h +++ b/src/plugins/clearcase/clearcasesettings.h @@ -12,8 +12,7 @@ QT_BEGIN_NAMESPACE class QSettings; QT_END_NAMESPACE -namespace ClearCase { -namespace Internal { +namespace ClearCase::Internal { enum DiffType { @@ -55,5 +54,4 @@ public: int timeOutS; }; -} // namespace Internal -} // namespace ClearCase +} // ClearCase::Internal diff --git a/src/plugins/clearcase/clearcasesubmiteditor.cpp b/src/plugins/clearcase/clearcasesubmiteditor.cpp index 8e74a67f5f5..676e16a686a 100644 --- a/src/plugins/clearcase/clearcasesubmiteditor.cpp +++ b/src/plugins/clearcase/clearcasesubmiteditor.cpp @@ -4,17 +4,18 @@ #include "clearcasesubmiteditor.h" #include "clearcasesubmiteditorwidget.h" +#include "clearcasetr.h" #include #include -using namespace ClearCase::Internal; +namespace ClearCase::Internal { ClearCaseSubmitEditor::ClearCaseSubmitEditor() : VcsBase::VcsBaseSubmitEditor(new ClearCaseSubmitEditorWidget) { - document()->setPreferredDisplayName(tr("ClearCase Check In")); + document()->setPreferredDisplayName(Tr::tr("ClearCase Check In")); } ClearCaseSubmitEditorWidget *ClearCaseSubmitEditor::submitEditorWidget() @@ -45,3 +46,5 @@ QByteArray ClearCaseSubmitEditor::fileContents() const { return VcsBase::VcsBaseSubmitEditor::fileContents().trimmed(); } + +} // ClearCase::Internal diff --git a/src/plugins/clearcase/clearcasesubmiteditor.h b/src/plugins/clearcase/clearcasesubmiteditor.h index 7f7de4eb151..af2fdc56d7c 100644 --- a/src/plugins/clearcase/clearcasesubmiteditor.h +++ b/src/plugins/clearcase/clearcasesubmiteditor.h @@ -5,8 +5,7 @@ #include -namespace ClearCase { -namespace Internal { +namespace ClearCase::Internal { class ClearCaseSubmitEditorWidget; @@ -28,5 +27,4 @@ protected: QByteArray fileContents() const override; }; -} // namespace Internal -} // namespace ClearCase +} // ClearCase::Internal diff --git a/src/plugins/clearcase/clearcasesubmiteditorwidget.cpp b/src/plugins/clearcase/clearcasesubmiteditorwidget.cpp index b089c7b83b2..e1273815876 100644 --- a/src/plugins/clearcase/clearcasesubmiteditorwidget.cpp +++ b/src/plugins/clearcase/clearcasesubmiteditorwidget.cpp @@ -4,13 +4,14 @@ #include "clearcasesubmiteditorwidget.h" #include "activityselector.h" +#include "clearcasetr.h" #include #include #include -using namespace ClearCase::Internal; +namespace ClearCase::Internal { ClearCaseSubmitEditorWidget::ClearCaseSubmitEditorWidget() { @@ -19,10 +20,10 @@ ClearCaseSubmitEditorWidget::ClearCaseSubmitEditorWidget() m_verticalLayout = new QVBoxLayout(checkInWidget); - m_chkIdentical = new QCheckBox(tr("Chec&k in even if identical to previous version")); + m_chkIdentical = new QCheckBox(Tr::tr("Chec&k in even if identical to previous version")); m_verticalLayout->addWidget(m_chkIdentical); - m_chkPTime = new QCheckBox(tr("&Preserve file modification time")); + m_chkPTime = new QCheckBox(Tr::tr("&Preserve file modification time")); m_verticalLayout->addWidget(m_chkPTime); insertTopWidget(checkInWidget); @@ -73,5 +74,7 @@ void ClearCaseSubmitEditorWidget::addActivitySelector(bool isUcm) QString ClearCaseSubmitEditorWidget::commitName() const { - return tr("&Check In"); + return Tr::tr("&Check In"); } + +} // ClearCase::Internal diff --git a/src/plugins/clearcase/clearcasesubmiteditorwidget.h b/src/plugins/clearcase/clearcasesubmiteditorwidget.h index f22a10b6c9c..a608f6b82ef 100644 --- a/src/plugins/clearcase/clearcasesubmiteditorwidget.h +++ b/src/plugins/clearcase/clearcasesubmiteditorwidget.h @@ -10,8 +10,7 @@ class QCheckBox; class QVBoxLayout; QT_END_NAMESPACE -namespace ClearCase { -namespace Internal { +namespace ClearCase::Internal { class ActivitySelector; @@ -40,5 +39,4 @@ private: QVBoxLayout *m_verticalLayout; }; -} // namespace Internal -} // namespace ClearCase +} // ClearCase::Internal diff --git a/src/plugins/clearcase/clearcasesync.cpp b/src/plugins/clearcase/clearcasesync.cpp index f9221fe1555..d1e0dccc7de 100644 --- a/src/plugins/clearcase/clearcasesync.cpp +++ b/src/plugins/clearcase/clearcasesync.cpp @@ -20,8 +20,7 @@ using namespace Utils; -namespace ClearCase { -namespace Internal { +namespace ClearCase::Internal { static void runProcess(QFutureInterface &future, const ClearCaseSettings &settings, @@ -333,6 +332,4 @@ void ClearCaseSync::verifyFileNotManagedDynamicView() #endif - -} // namespace Internal -} // namespace ClearCase +} // ClearCase::Internal diff --git a/src/plugins/clearcase/clearcasesync.h b/src/plugins/clearcase/clearcasesync.h index d87007029be..60ca445d5df 100644 --- a/src/plugins/clearcase/clearcasesync.h +++ b/src/plugins/clearcase/clearcasesync.h @@ -11,8 +11,7 @@ template class QFutureInterface; QT_END_NAMESPACE -namespace ClearCase { -namespace Internal { +namespace ClearCase::Internal { class ClearCaseSync : public QObject { @@ -53,5 +52,4 @@ public slots: #endif }; -} // namespace Internal -} // namespace ClearCase +} // ClearCase::Internal diff --git a/src/plugins/clearcase/settingspage.cpp b/src/plugins/clearcase/settingspage.cpp index bf804bbc2be..6b13f4bd092 100644 --- a/src/plugins/clearcase/settingspage.cpp +++ b/src/plugins/clearcase/settingspage.cpp @@ -6,92 +6,198 @@ #include "clearcaseconstants.h" #include "clearcaseplugin.h" #include "clearcasesettings.h" -#include "ui_settingspage.h" +#include "clearcasetr.h" #include #include #include +#include #include +#include #include +#include +#include +#include +#include using namespace Utils; -namespace ClearCase { -namespace Internal { +namespace ClearCase::Internal { class SettingsPageWidget final : public Core::IOptionsPageWidget { - Q_DECLARE_TR_FUNCTIONS(ClearCase::Internal::SettingsPageWidget) - public: SettingsPageWidget(); private: void apply() final; - Ui::SettingsPage m_ui; + Utils::PathChooser *commandPathChooser; + QRadioButton *graphicalDiffRadioButton; + QRadioButton *externalDiffRadioButton; + QLineEdit *diffArgsEdit; + QSpinBox *historyCountSpinBox; + QSpinBox *timeOutSpinBox; + QCheckBox *autoCheckOutCheckBox; + QCheckBox *promptCheckBox; + QCheckBox *disableIndexerCheckBox; + QLineEdit *indexOnlyVOBsEdit; + QCheckBox *autoAssignActivityCheckBox; + QCheckBox *noCommentCheckBox; }; SettingsPageWidget::SettingsPageWidget() { - m_ui.setupUi(this); - m_ui.commandPathChooser->setPromptDialogTitle(tr("ClearCase Command")); - m_ui.commandPathChooser->setExpectedKind(PathChooser::ExistingCommand); - m_ui.commandPathChooser->setHistoryCompleter(QLatin1String("ClearCase.Command.History")); + resize(512, 589); + + commandPathChooser = new PathChooser; + commandPathChooser->setPromptDialogTitle(Tr::Tr::tr("ClearCase Command")); + commandPathChooser->setExpectedKind(PathChooser::ExistingCommand); + commandPathChooser->setHistoryCompleter("ClearCase.Command.History"); + + graphicalDiffRadioButton = new QRadioButton(Tr::tr("&Graphical (single file only)")); + graphicalDiffRadioButton->setChecked(true); + + auto diffWidget = new QWidget; + diffWidget->setEnabled(false); + + externalDiffRadioButton = new QRadioButton(Tr::tr("&External")); + QObject::connect(externalDiffRadioButton, &QRadioButton::toggled, diffWidget, &QWidget::setEnabled); + + diffArgsEdit = new QLineEdit(diffWidget); + + QPalette palette; + QBrush brush(QColor(255, 0, 0, 255)); + brush.setStyle(Qt::SolidPattern); + palette.setBrush(QPalette::Active, QPalette::WindowText, brush); + palette.setBrush(QPalette::Inactive, QPalette::WindowText, brush); + QBrush brush1(QColor(68, 96, 92, 255)); + brush1.setStyle(Qt::SolidPattern); + palette.setBrush(QPalette::Disabled, QPalette::WindowText, brush1); + + auto diffWarningLabel = new QLabel; + diffWarningLabel->setPalette(palette); + diffWarningLabel->setWordWrap(true); + + historyCountSpinBox = new QSpinBox; + historyCountSpinBox->setMaximum(10000); + + timeOutSpinBox = new QSpinBox; + timeOutSpinBox->setSuffix(Tr::tr("s", nullptr)); + timeOutSpinBox->setRange(1, 360); + timeOutSpinBox->setValue(30); + + autoCheckOutCheckBox = new QCheckBox(Tr::tr("&Automatically check out files on edit")); + + promptCheckBox = new QCheckBox(Tr::tr("&Prompt on check-in")); + + disableIndexerCheckBox = new QCheckBox(Tr::tr("Di&sable indexer")); + + indexOnlyVOBsEdit = new QLineEdit; + indexOnlyVOBsEdit->setToolTip(Tr::tr("VOBs list, separated by comma. Indexer will only traverse " + "the specified VOBs. If left blank, all active VOBs will be indexed.")); + + autoAssignActivityCheckBox = new QCheckBox(Tr::tr("Aut&o assign activity names")); + autoAssignActivityCheckBox->setToolTip(Tr::tr("Check this if you have a trigger that renames " + "the activity automatically. You will not be prompted for activity name.")); + + noCommentCheckBox = new QCheckBox(Tr::tr("Do ¬ prompt for comment during checkout or check-in")); + noCommentCheckBox->setToolTip(Tr::tr("Check out or check in files with no comment (-nc/omment).")); + + using namespace Layouting; + + Row { + Tr::tr("Arg&uments:"), + diffArgsEdit + }.attachTo(diffWidget, WithoutMargins); + + Column { + Group { + title(Tr::tr("Configuration")), + Form { + Tr::tr("&Command:"), commandPathChooser + } + }, + + Group { + title(Tr::tr("Diff")), + Form { + graphicalDiffRadioButton, br, + externalDiffRadioButton, diffWidget, br, + Span(2, diffWarningLabel) + } + }, + + Group { + title(Tr::tr("Miscellaneous")), + Form { + Tr::tr("&History count:"), historyCountSpinBox, br, + Tr::tr("&Timeout:"), timeOutSpinBox, br, + autoCheckOutCheckBox, br, + autoAssignActivityCheckBox, br, + noCommentCheckBox, br, + promptCheckBox, br, + disableIndexerCheckBox, br, + Tr::tr("&Index only VOBs:"), indexOnlyVOBsEdit, + } + }, + st + }.attachTo(this); + const ClearCaseSettings &s = ClearCasePlugin::settings(); - m_ui.commandPathChooser->setFilePath(FilePath::fromString(s.ccCommand)); - m_ui.timeOutSpinBox->setValue(s.timeOutS); - m_ui.autoCheckOutCheckBox->setChecked(s.autoCheckOut); - m_ui.noCommentCheckBox->setChecked(s.noComment); + commandPathChooser->setFilePath(FilePath::fromString(s.ccCommand)); + timeOutSpinBox->setValue(s.timeOutS); + autoCheckOutCheckBox->setChecked(s.autoCheckOut); + noCommentCheckBox->setChecked(s.noComment); bool extDiffAvailable = !Environment::systemEnvironment().searchInPath(QLatin1String("diff")).isEmpty(); if (extDiffAvailable) { - m_ui.diffWarningLabel->setVisible(false); + diffWarningLabel->setVisible(false); } else { - QString diffWarning = tr("In order to use External diff, \"diff\" command needs to be accessible."); + QString diffWarning = Tr::tr("In order to use External diff, \"diff\" command needs to be accessible."); if (HostOsInfo::isWindowsHost()) { diffWarning += QLatin1Char(' '); - diffWarning.append(tr("DiffUtils is available for free download at " - "http://gnuwin32.sourceforge.net/packages/diffutils.htm. " - "Extract it to a directory in your PATH.")); + diffWarning.append(Tr::tr("DiffUtils is available for free download at " + "http://gnuwin32.sourceforge.net/packages/diffutils.htm. " + "Extract it to a directory in your PATH.")); } - m_ui.diffWarningLabel->setText(diffWarning); - m_ui.externalDiffRadioButton->setEnabled(false); + diffWarningLabel->setText(diffWarning); + externalDiffRadioButton->setEnabled(false); } if (extDiffAvailable && s.diffType == ExternalDiff) - m_ui.externalDiffRadioButton->setChecked(true); + externalDiffRadioButton->setChecked(true); else - m_ui.graphicalDiffRadioButton->setChecked(true); - m_ui.autoAssignActivityCheckBox->setChecked(s.autoAssignActivityName); - m_ui.historyCountSpinBox->setValue(s.historyCount); - m_ui.promptCheckBox->setChecked(s.promptToCheckIn); - m_ui.disableIndexerCheckBox->setChecked(s.disableIndexer); - m_ui.diffArgsEdit->setText(s.diffArgs); - m_ui.indexOnlyVOBsEdit->setText(s.indexOnlyVOBs); + graphicalDiffRadioButton->setChecked(true); + autoAssignActivityCheckBox->setChecked(s.autoAssignActivityName); + historyCountSpinBox->setValue(s.historyCount); + promptCheckBox->setChecked(s.promptToCheckIn); + disableIndexerCheckBox->setChecked(s.disableIndexer); + diffArgsEdit->setText(s.diffArgs); + indexOnlyVOBsEdit->setText(s.indexOnlyVOBs); } void SettingsPageWidget::apply() { ClearCaseSettings rc; - rc.ccCommand = m_ui.commandPathChooser->rawFilePath().toString(); - rc.ccBinaryPath = m_ui.commandPathChooser->filePath(); - rc.timeOutS = m_ui.timeOutSpinBox->value(); - rc.autoCheckOut = m_ui.autoCheckOutCheckBox->isChecked(); - rc.noComment = m_ui.noCommentCheckBox->isChecked(); - if (m_ui.graphicalDiffRadioButton->isChecked()) + rc.ccCommand = commandPathChooser->rawFilePath().toString(); + rc.ccBinaryPath = commandPathChooser->filePath(); + rc.timeOutS = timeOutSpinBox->value(); + rc.autoCheckOut = autoCheckOutCheckBox->isChecked(); + rc.noComment = noCommentCheckBox->isChecked(); + if (graphicalDiffRadioButton->isChecked()) rc.diffType = GraphicalDiff; - else if (m_ui.externalDiffRadioButton->isChecked()) + else if (externalDiffRadioButton->isChecked()) rc.diffType = ExternalDiff; - rc.autoAssignActivityName = m_ui.autoAssignActivityCheckBox->isChecked(); - rc.historyCount = m_ui.historyCountSpinBox->value(); - rc.promptToCheckIn = m_ui.promptCheckBox->isChecked(); - rc.disableIndexer = m_ui.disableIndexerCheckBox->isChecked(); - rc.diffArgs = m_ui.diffArgsEdit->text(); - rc.indexOnlyVOBs = m_ui.indexOnlyVOBsEdit->text(); - rc.extDiffAvailable = m_ui.externalDiffRadioButton->isEnabled(); + rc.autoAssignActivityName = autoAssignActivityCheckBox->isChecked(); + rc.historyCount = historyCountSpinBox->value(); + rc.promptToCheckIn = promptCheckBox->isChecked(); + rc.disableIndexer = disableIndexerCheckBox->isChecked(); + rc.diffArgs = diffArgsEdit->text(); + rc.indexOnlyVOBs = indexOnlyVOBsEdit->text(); + rc.extDiffAvailable = externalDiffRadioButton->isEnabled(); ClearCasePlugin::setSettings(rc); } @@ -99,10 +205,9 @@ void SettingsPageWidget::apply() ClearCaseSettingsPage::ClearCaseSettingsPage() { setId(ClearCase::Constants::VCS_ID_CLEARCASE); - setDisplayName(SettingsPageWidget::tr("ClearCase")); + setDisplayName(Tr::tr("ClearCase")); setCategory(VcsBase::Constants::VCS_SETTINGS_CATEGORY); setWidgetCreator([] { return new SettingsPageWidget; }); } -} // Internal -} // ClearCase +} // ClearCase::Internal diff --git a/src/plugins/clearcase/settingspage.h b/src/plugins/clearcase/settingspage.h index 4f122e677ad..80a317bf286 100644 --- a/src/plugins/clearcase/settingspage.h +++ b/src/plugins/clearcase/settingspage.h @@ -5,8 +5,7 @@ #include -namespace ClearCase { -namespace Internal { +namespace ClearCase::Internal { class ClearCaseSettingsPage final : public Core::IOptionsPage { @@ -14,5 +13,4 @@ public: ClearCaseSettingsPage(); }; -} // namespace ClearCase -} // namespace Internal +} // ClearCase::Internal diff --git a/src/plugins/clearcase/settingspage.ui b/src/plugins/clearcase/settingspage.ui deleted file mode 100644 index ce07cdd053a..00000000000 --- a/src/plugins/clearcase/settingspage.ui +++ /dev/null @@ -1,318 +0,0 @@ - - - ClearCase::Internal::SettingsPage - - - - 0 - 0 - 512 - 589 - - - - - - - Configuration - - - - - - &Command: - - - commandPathChooser - - - - - - - - - - - - - Diff - - - - QFormLayout::AllNonFixedFieldsGrow - - - - - &Graphical (single file only) - - - true - - - - - - - &External - - - - - - - false - - - - 0 - - - 0 - - - 0 - - - 0 - - - - - Arg&uments: - - - diffArgsEdit - - - - - - - - - - - - - - - - - - 255 - 0 - 0 - - - - - - - - - 255 - 0 - 0 - - - - - - - - - 68 - 96 - 92 - - - - - - - - - - - true - - - - - - - - - - Miscellaneous - - - - QFormLayout::ExpandingFieldsGrow - - - - - &History count: - - - historyCountSpinBox - - - - - - - 10000 - - - - - - - &Timeout: - - - timeOutSpinBox - - - - - - - s - - - 1 - - - 360 - - - 30 - - - - - - - &Automatically check out files on edit - - - - - - - &Prompt on check-in - - - - - - - Di&sable indexer - - - - - - - &Index only VOBs: - - - indexOnlyVOBsEdit - - - - - - - VOBs list, separated by comma. Indexer will only traverse the specified VOBs. If left blank, all active VOBs will be indexed. - - - - - - - Check this if you have a trigger that renames the activity automatically. You will not be prompted for activity name. - - - Aut&o assign activity names - - - - - - - Check out or check in files with no comment (-nc/omment). - - - Do &not prompt for comment during checkout or check-in - - - - - - - - - - Qt::Vertical - - - - 20 - 40 - - - - - - - - - Utils::PathChooser - QWidget -
utils/pathchooser.h
- 1 - - editingFinished() - browsingFinished() - -
-
- - graphicalDiffRadioButton - externalDiffRadioButton - diffArgsEdit - historyCountSpinBox - timeOutSpinBox - autoCheckOutCheckBox - autoAssignActivityCheckBox - noCommentCheckBox - promptCheckBox - disableIndexerCheckBox - indexOnlyVOBsEdit - - - - - externalDiffRadioButton - toggled(bool) - diffWidget - setEnabled(bool) - - - 83 - 122 - - - 203 - 140 - - - - -
diff --git a/src/plugins/clearcase/undocheckout.ui b/src/plugins/clearcase/undocheckout.ui deleted file mode 100644 index af28f7ed0a6..00000000000 --- a/src/plugins/clearcase/undocheckout.ui +++ /dev/null @@ -1,127 +0,0 @@ - - - ClearCase::Internal::UndoCheckOut - - - - 0 - 0 - 323 - 105 - - - - - 0 - 0 - - - - Dialog - - - - - - - - - - - - - - 255 - 0 - 0 - - - - - - - - - 255 - 0 - 0 - - - - - - - - - 68 - 96 - 92 - - - - - - - - The file was changed. - - - - - - - &Save copy of the file with a '.keep' extension - - - true - - - - - - - Qt::Horizontal - - - QDialogButtonBox::No|QDialogButtonBox::Yes - - - - - - - - - buttonBox - accepted() - ClearCase::Internal::UndoCheckOut - accept() - - - 248 - 254 - - - 157 - 274 - - - - - buttonBox - rejected() - ClearCase::Internal::UndoCheckOut - reject() - - - 316 - 260 - - - 286 - 274 - - - - - diff --git a/src/plugins/clearcase/versionselector.cpp b/src/plugins/clearcase/versionselector.cpp index e68160a0b9a..1116ced6a05 100644 --- a/src/plugins/clearcase/versionselector.cpp +++ b/src/plugins/clearcase/versionselector.cpp @@ -3,22 +3,52 @@ #include "versionselector.h" -#include "ui_versionselector.h" +#include "clearcasetr.h" +#include + +#include +#include +#include +#include #include +#include #include +#include -namespace ClearCase { -namespace Internal { +namespace ClearCase::Internal { VersionSelector::VersionSelector(const QString &fileName, const QString &message, QWidget *parent) : - QDialog(parent), - ui(new Ui::VersionSelector) + QDialog(parent) { - ui->setupUi(this); - ui->headerLabel->setText(ui->headerLabel->text().arg(fileName)); - ui->loadedText->setHtml("

" - + tr("Note: You will not be able to check in this file without merging " + resize(413, 435); + setWindowTitle(Tr::tr("Confirm Version to Check Out")); + + auto headerLabel = new QLabel(Tr::tr("Multiple versions of \"%1\" can be checked out. " + "Select the version to check out:").arg(fileName)); + headerLabel->setWordWrap(true); + headerLabel->setTextInteractionFlags(Qt::LinksAccessibleByMouse|Qt::TextSelectableByMouse); + + auto loadedRadioButton = new QRadioButton(Tr::tr("&Loaded version")); + loadedRadioButton->setChecked(true); + + auto loadedLabel = new QLabel; + auto loadedCreatedByLabel = new QLabel; + auto loadedCreatedOnLabel = new QLabel; + auto updatedLabel = new QLabel; + auto updatedCreatedByLabel = new QLabel; + auto updatedCreatedOnLabel = new QLabel; + + auto updatedText = new QPlainTextEdit; + updatedText->setReadOnly(true); + + m_updatedRadioButton = new QRadioButton(Tr::tr("Version after &update")); + + auto buttonBox = new QDialogButtonBox(QDialogButtonBox::Cancel|QDialogButtonBox::Ok); + + auto loadedText = new QTextEdit; + loadedText->setHtml("

" + + Tr::tr("Note: You will not be able to check in this file without merging " "the changes (not supported by the plugin)") + "

"); m_stream = new QTextStream(message.toLocal8Bit(), QIODevice::ReadOnly | QIODevice::Text); @@ -27,24 +57,45 @@ VersionSelector::VersionSelector(const QString &fileName, const QString &message line = m_stream->readLine(); if (!readValues()) return; - ui->loadedLabel->setText(m_versionID); - ui->loadedCreatedByLabel->setText(m_createdBy); - ui->loadedCreatedOnLabel->setText(m_createdOn); - ui->loadedText->insertPlainText(m_message + QLatin1Char(' ')); + loadedLabel->setText(m_versionID); + loadedCreatedByLabel->setText(m_createdBy); + loadedCreatedOnLabel->setText(m_createdOn); + loadedText->insertPlainText(m_message + QLatin1Char(' ')); line = m_stream->readLine(); // 2) Version after update if (!readValues()) return; - ui->updatedLabel->setText(m_versionID); - ui->updatedCreatedByLabel->setText(m_createdBy); - ui->updatedCreatedOnLabel->setText(m_createdOn); - ui->updatedText->setPlainText(m_message); + updatedLabel->setText(m_versionID); + updatedCreatedByLabel->setText(m_createdBy); + updatedCreatedOnLabel->setText(m_createdOn); + updatedText->setPlainText(m_message); + + using namespace Utils::Layouting; + + Column { + headerLabel, + Form { + loadedRadioButton, loadedLabel, br, + Tr::tr("Created by:"), loadedCreatedByLabel, br, + Tr::tr("Created on:"), loadedCreatedOnLabel, br, + Span(2, loadedText), + }, + Form { + m_updatedRadioButton, updatedLabel, br, + Tr::tr("Created by:"), updatedCreatedByLabel, br, + Tr::tr("Created on:"), updatedCreatedOnLabel, br, + Span(2, updatedText) + }, + buttonBox, + }.attachTo(this); + + connect(buttonBox, &QDialogButtonBox::accepted, this, &QDialog::accept); + connect(buttonBox, &QDialogButtonBox::rejected, this, &QDialog::reject); } VersionSelector::~VersionSelector() { delete m_stream; - delete ui; } bool VersionSelector::readValues() @@ -85,8 +136,7 @@ bool VersionSelector::readValues() bool VersionSelector::isUpdate() const { - return (ui->updatedRadioButton->isChecked()); + return m_updatedRadioButton->isChecked(); } -} // namespace Internal -} // namespace ClearCase +} // ClearCase::Internal diff --git a/src/plugins/clearcase/versionselector.h b/src/plugins/clearcase/versionselector.h index d70785ef176..9f3dd45190f 100644 --- a/src/plugins/clearcase/versionselector.h +++ b/src/plugins/clearcase/versionselector.h @@ -6,13 +6,11 @@ #include QT_BEGIN_NAMESPACE +class QRadioButton; class QTextStream; QT_END_NAMESPACE -namespace ClearCase { -namespace Internal { - -namespace Ui { class VersionSelector; } +namespace ClearCase::Internal { class VersionSelector : public QDialog { @@ -27,10 +25,10 @@ public: private: bool readValues(); - Ui::VersionSelector *ui; QTextStream *m_stream; QString m_versionID, m_createdBy, m_createdOn, m_message; + + QRadioButton *m_updatedRadioButton; }; -} // namespace Internal -} // namespace ClearCase +} // ClearCase::Internal diff --git a/src/plugins/clearcase/versionselector.ui b/src/plugins/clearcase/versionselector.ui deleted file mode 100644 index 7e1c9b620bc..00000000000 --- a/src/plugins/clearcase/versionselector.ui +++ /dev/null @@ -1,188 +0,0 @@ - - - ClearCase::Internal::VersionSelector - - - - 0 - 0 - 413 - 435 - - - - Confirm Version to Check Out - - - - - - Multiple versions of "%1" can be checked out. Select the version to check out: - - - true - - - Qt::LinksAccessibleByMouse|Qt::TextSelectableByMouse - - - - - - - - - &Loaded version - - - true - - - - - - - - - - - - - - Created by: - - - - - - - - - - - - - - Created on: - - - - - - - - - - - - - - - - - - - - - - - - - - - - Created by: - - - - - - - - - - - - - - Created on: - - - - - - - - - - - - - - true - - - - - - - Version after &update - - - - - - - - - Qt::Horizontal - - - QDialogButtonBox::Cancel|QDialogButtonBox::Ok - - - - - - - loadedRadioButton - loadedText - updatedRadioButton - updatedText - - - - - buttonBox - accepted() - ClearCase::Internal::VersionSelector - accept() - - - 248 - 254 - - - 157 - 274 - - - - - buttonBox - rejected() - ClearCase::Internal::VersionSelector - reject() - - - 316 - 260 - - - 286 - 274 - - - - - diff --git a/src/plugins/cmakeprojectmanager/builddirparameters.cpp b/src/plugins/cmakeprojectmanager/builddirparameters.cpp index a7aabf49fef..7ac614e06cd 100644 --- a/src/plugins/cmakeprojectmanager/builddirparameters.cpp +++ b/src/plugins/cmakeprojectmanager/builddirparameters.cpp @@ -18,8 +18,7 @@ using namespace ProjectExplorer; -namespace CMakeProjectManager { -namespace Internal { +namespace CMakeProjectManager::Internal { BuildDirParameters::BuildDirParameters() = default; @@ -78,5 +77,4 @@ CMakeTool *BuildDirParameters::cmakeTool() const return CMakeToolManager::findById(cmakeToolId); } -} // namespace Internal -} // namespace CMakeProjectManager +} // CMakeProjectManager::Internal diff --git a/src/plugins/cmakeprojectmanager/builddirparameters.h b/src/plugins/cmakeprojectmanager/builddirparameters.h index e32ec714c87..2326ee81f73 100644 --- a/src/plugins/cmakeprojectmanager/builddirparameters.h +++ b/src/plugins/cmakeprojectmanager/builddirparameters.h @@ -8,8 +8,7 @@ #include #include -namespace CMakeProjectManager { -namespace Internal { +namespace CMakeProjectManager::Internal { class CMakeBuildSystem; @@ -37,5 +36,4 @@ public: QStringList additionalCMakeArguments; }; -} // namespace Internal -} // namespace CMakeProjectManager +} // CMakeProjectManager::Internal diff --git a/src/plugins/cmakeprojectmanager/cmakeautocompleter.cpp b/src/plugins/cmakeprojectmanager/cmakeautocompleter.cpp index bc61fca405b..1b3d673b521 100644 --- a/src/plugins/cmakeprojectmanager/cmakeautocompleter.cpp +++ b/src/plugins/cmakeprojectmanager/cmakeautocompleter.cpp @@ -5,8 +5,7 @@ #include -namespace CMakeProjectManager { -namespace Internal { +namespace CMakeProjectManager::Internal { CMakeAutoCompleter::CMakeAutoCompleter() { @@ -123,5 +122,4 @@ bool CMakeAutoCompleter::contextAllowsElectricCharacters(const QTextCursor &curs return !isInComment(cursor) && !isInString(cursor); } -} // namespace Internal -} // namespace CMakeProjectManager +} // CMakeProjectManager::Internal diff --git a/src/plugins/cmakeprojectmanager/cmakeautocompleter.h b/src/plugins/cmakeprojectmanager/cmakeautocompleter.h index 75a1e517565..bbe4a91020a 100644 --- a/src/plugins/cmakeprojectmanager/cmakeautocompleter.h +++ b/src/plugins/cmakeprojectmanager/cmakeautocompleter.h @@ -7,8 +7,7 @@ #include -namespace CMakeProjectManager { -namespace Internal { +namespace CMakeProjectManager::Internal { class CMAKE_EXPORT CMakeAutoCompleter : public TextEditor::AutoCompleter { @@ -27,5 +26,4 @@ public: bool contextAllowsElectricCharacters(const QTextCursor &cursor) const override; }; -} // namespace Internal -} // namespace CMakeProjectManager +} // CMakeProjectManager::Internal diff --git a/src/plugins/cmakeprojectmanager/cmakebuildconfiguration.cpp b/src/plugins/cmakeprojectmanager/cmakebuildconfiguration.cpp index e746f2374f2..119a5c1d3f8 100644 --- a/src/plugins/cmakeprojectmanager/cmakebuildconfiguration.cpp +++ b/src/plugins/cmakeprojectmanager/cmakebuildconfiguration.cpp @@ -10,6 +10,7 @@ #include "cmakekitinformation.h" #include "cmakeproject.h" #include "cmakeprojectconstants.h" +#include "cmakeprojectmanagertr.h" #include "cmakeprojectplugin.h" #include "cmakespecificsettings.h" #include "configmodel.h" @@ -75,8 +76,8 @@ using namespace ProjectExplorer; using namespace Utils; -using namespace CMakeProjectManager::Internal; +using namespace CMakeProjectManager::Internal; namespace CMakeProjectManager { static Q_LOGGING_CATEGORY(cmakeBuildConfigurationLog, "qtc.cmake.bc", QtWarningMsg); @@ -96,8 +97,6 @@ namespace Internal { class CMakeBuildSettingsWidget : public NamedWidget { - Q_DECLARE_TR_FUNCTIONS(CMakeProjectManager::Internal::CMakeBuildSettingsWidget) - public: CMakeBuildSettingsWidget(CMakeBuildSystem *bc); @@ -165,7 +164,7 @@ static QModelIndex mapToSource(const QAbstractItemView *view, const QModelIndex } CMakeBuildSettingsWidget::CMakeBuildSettingsWidget(CMakeBuildSystem *bs) : - NamedWidget(tr("CMake")), + NamedWidget(Tr::tr("CMake")), m_buildSystem(bs), m_configModel(new ConfigModel(this)), m_configFilterModel(new CategorySortFilterModel(this)), @@ -211,19 +210,19 @@ CMakeBuildSettingsWidget::CMakeBuildSettingsWidget(CMakeBuildSystem *bs) : m_warningMessageLabel->setVisible(false); m_configurationStates = new QTabBar(this); - m_configurationStates->addTab(tr("Initial Configuration")); - m_configurationStates->addTab(tr("Current Configuration")); + m_configurationStates->addTab(Tr::tr("Initial Configuration")); + m_configurationStates->addTab(Tr::tr("Current Configuration")); connect(m_configurationStates, &QTabBar::currentChanged, this, [this](int index) { updateConfigurationStateIndex(index); }); - m_kitConfiguration = new QPushButton(tr("Kit Configuration")); - m_kitConfiguration->setToolTip(tr("Edit the current kit's CMake configuration.")); + m_kitConfiguration = new QPushButton(Tr::tr("Kit Configuration")); + m_kitConfiguration->setToolTip(Tr::tr("Edit the current kit's CMake configuration.")); m_kitConfiguration->setFixedWidth(m_kitConfiguration->sizeHint().width()); connect(m_kitConfiguration, &QPushButton::clicked, this, [this]() { kitCMakeConfiguration(); }); m_filterEdit = new FancyLineEdit; - m_filterEdit->setPlaceholderText(tr("Filter")); + m_filterEdit->setPlaceholderText(Tr::tr("Filter")); m_filterEdit->setFiltering(true); auto tree = new TreeView; connect(tree, &TreeView::activated, @@ -271,46 +270,46 @@ CMakeBuildSettingsWidget::CMakeBuildSettingsWidget(CMakeBuildSystem *bs) : m_showProgressTimer.setInterval(50); // don't show progress for < 50ms tasks connect(&m_showProgressTimer, &QTimer::timeout, [this]() { m_progressIndicator->show(); }); - m_addButton = new QPushButton(tr("&Add")); - m_addButton->setToolTip(tr("Add a new configuration value.")); + m_addButton = new QPushButton(Tr::tr("&Add")); + m_addButton->setToolTip(Tr::tr("Add a new configuration value.")); auto addButtonMenu = new QMenu(this); - addButtonMenu->addAction(tr("&Boolean"))->setData( + addButtonMenu->addAction(Tr::tr("&Boolean"))->setData( QVariant::fromValue(static_cast(ConfigModel::DataItem::BOOLEAN))); - addButtonMenu->addAction(tr("&String"))->setData( + addButtonMenu->addAction(Tr::tr("&String"))->setData( QVariant::fromValue(static_cast(ConfigModel::DataItem::STRING))); - addButtonMenu->addAction(tr("&Directory"))->setData( + addButtonMenu->addAction(Tr::tr("&Directory"))->setData( QVariant::fromValue(static_cast(ConfigModel::DataItem::DIRECTORY))); - addButtonMenu->addAction(tr("&File"))->setData( + addButtonMenu->addAction(Tr::tr("&File"))->setData( QVariant::fromValue(static_cast(ConfigModel::DataItem::FILE))); m_addButton->setMenu(addButtonMenu); - m_editButton = new QPushButton(tr("&Edit")); - m_editButton->setToolTip(tr("Edit the current CMake configuration value.")); + m_editButton = new QPushButton(Tr::tr("&Edit")); + m_editButton->setToolTip(Tr::tr("Edit the current CMake configuration value.")); - m_setButton = new QPushButton(tr("&Set")); - m_setButton->setToolTip(tr("Set a value in the CMake configuration.")); + m_setButton = new QPushButton(Tr::tr("&Set")); + m_setButton->setToolTip(Tr::tr("Set a value in the CMake configuration.")); - m_unsetButton = new QPushButton(tr("&Unset")); - m_unsetButton->setToolTip(tr("Unset a value in the CMake configuration.")); + m_unsetButton = new QPushButton(Tr::tr("&Unset")); + m_unsetButton->setToolTip(Tr::tr("Unset a value in the CMake configuration.")); - m_resetButton = new QPushButton(tr("&Reset")); - m_resetButton->setToolTip(tr("Reset all unapplied changes.")); + m_resetButton = new QPushButton(Tr::tr("&Reset")); + m_resetButton->setToolTip(Tr::tr("Reset all unapplied changes.")); m_resetButton->setEnabled(false); - m_batchEditButton = new QPushButton(tr("Batch Edit...")); - m_batchEditButton->setToolTip(tr("Set or reset multiple values in the CMake configuration.")); + m_batchEditButton = new QPushButton(Tr::tr("Batch Edit...")); + m_batchEditButton->setToolTip(Tr::tr("Set or reset multiple values in the CMake configuration.")); - m_showAdvancedCheckBox = new QCheckBox(tr("Advanced")); + m_showAdvancedCheckBox = new QCheckBox(Tr::tr("Advanced")); connect(m_configView->selectionModel(), &QItemSelectionModel::selectionChanged, this, [this](const QItemSelection &, const QItemSelection &) { updateSelection(); }); - m_reconfigureButton = new QPushButton(tr("Run CMake")); + m_reconfigureButton = new QPushButton(Tr::tr("Run CMake")); m_reconfigureButton->setEnabled(false); - auto clearBox = new QCheckBox(tr("Clear system environment"), this); + auto clearBox = new QCheckBox(Tr::tr("Clear system environment"), this); clearBox->setChecked(cbc->useClearConfigureEnvironment()); auto envWidget = new EnvironmentWidget(this, EnvironmentWidget::TypeLocal, clearBox); @@ -479,14 +478,14 @@ CMakeBuildSettingsWidget::CMakeBuildSettingsWidget(CMakeBuildSystem *bs) : connect(addButtonMenu, &QMenu::triggered, this, [this](QAction *action) { ConfigModel::DataItem::Type type = static_cast(action->data().value()); - QString value = tr(""); + QString value = Tr::tr(""); if (type == ConfigModel::DataItem::BOOLEAN) value = QString::fromLatin1("OFF"); - m_configModel->appendConfiguration(tr(""), value, type, isInitialConfiguration()); + m_configModel->appendConfiguration(Tr::tr(""), value, type, isInitialConfiguration()); const TreeItem *item = m_configModel->findNonRootItem([&value, type](TreeItem *item) { ConfigModel::DataItem dataItem = ConfigModel::dataItemFromIndex(item->index()); - return dataItem.key == tr("") && dataItem.type == type && dataItem.value == value; + return dataItem.key == Tr::tr("") && dataItem.type == type && dataItem.value == value; }); QModelIndex idx = m_configModel->indexForItem(item); idx = m_configTextFilterModel->mapFromSource(m_configFilterModel->mapFromSource(idx)); @@ -537,14 +536,14 @@ CMakeBuildSettingsWidget::CMakeBuildSettingsWidget(CMakeBuildSystem *bs) : void CMakeBuildSettingsWidget::batchEditConfiguration() { auto dialog = new QDialog(this); - dialog->setWindowTitle(tr("Edit CMake Configuration")); + dialog->setWindowTitle(Tr::tr("Edit CMake Configuration")); dialog->setAttribute(Qt::WA_DeleteOnClose); dialog->setModal(true); auto layout = new QVBoxLayout(dialog); auto editor = new QPlainTextEdit(dialog); auto label = new QLabel(dialog); - label->setText(tr("Enter one CMake variable per line.
" + label->setText(Tr::tr("Enter one CMake variable per line.
" "To set or change a variable, use -D<variable>:<type>=<value>.
" "<type> can have one of the following values: FILEPATH, PATH, BOOL, INTERNAL, or STRING.
" "To unset a variable, use -U<variable>.
")); @@ -598,9 +597,9 @@ void CMakeBuildSettingsWidget::reconfigureWithInitialParameters() if (!doNotAsk) { QDialogButtonBox::StandardButton reply = Utils::CheckableMessageBox::question( Core::ICore::dialogParent(), - tr("Re-configure with Initial Parameters"), - tr("Clear CMake configuration and configure with initial parameters?"), - tr("Do not ask again"), + Tr::tr("Re-configure with Initial Parameters"), + Tr::tr("Clear CMake configuration and configure with initial parameters?"), + Tr::tr("Do not ask again"), &doNotAsk, QDialogButtonBox::Yes | QDialogButtonBox::No, QDialogButtonBox::Yes); @@ -657,7 +656,7 @@ void CMakeBuildSettingsWidget::kitCMakeConfiguration() m_buildSystem->kit()->blockNotification(); auto dialog = new QDialog(this); - dialog->setWindowTitle(tr("Kit CMake Configuration")); + dialog->setWindowTitle(Tr::tr("Kit CMake Configuration")); dialog->setAttribute(Qt::WA_DeleteOnClose); dialog->setModal(true); dialog->setSizeGripEnabled(true); @@ -708,7 +707,7 @@ void CMakeBuildSettingsWidget::updateConfigureDetailsWidgetsSummary( cmd.addArgs(configurationArguments); params.setCommandLine(cmd); - m_configureDetailsWidget->setSummaryText(params.summary(tr("Configure"))); + m_configureDetailsWidget->setSummaryText(params.summary(Tr::tr("Configure"))); m_configureDetailsWidget->setState(DetailsWidget::Expanded); } @@ -777,14 +776,14 @@ void CMakeBuildSettingsWidget::updateButtonState() // Update label and text boldness of the reconfigure button QFont reconfigureButtonFont = m_reconfigureButton->font(); if (isParsing) { - m_reconfigureButton->setText(tr("Stop CMake")); + m_reconfigureButton->setText(Tr::tr("Stop CMake")); reconfigureButtonFont.setBold(false); } else { m_reconfigureButton->setEnabled(true); if (isInitial) { - m_reconfigureButton->setText(tr("Re-configure with Initial Parameters")); + m_reconfigureButton->setText(Tr::tr("Re-configure with Initial Parameters")); } else { - m_reconfigureButton->setText(tr("Run CMake")); + m_reconfigureButton->setText(Tr::tr("Run CMake")); } reconfigureButtonFont.setBold(isInitial ? m_configModel->hasChanges(isInitial) : !configChanges.isEmpty()); @@ -998,21 +997,21 @@ QAction *CMakeBuildSettingsWidget::createForceAction(int type, const QModelIndex QString typeString; switch (type) { case ConfigModel::DataItem::BOOLEAN: - typeString = tr("bool", "display string for cmake type BOOLEAN"); + typeString = Tr::tr("bool", "display string for cmake type BOOLEAN"); break; case ConfigModel::DataItem::FILE: - typeString = tr("file", "display string for cmake type FILE"); + typeString = Tr::tr("file", "display string for cmake type FILE"); break; case ConfigModel::DataItem::DIRECTORY: - typeString = tr("directory", "display string for cmake type DIRECTORY"); + typeString = Tr::tr("directory", "display string for cmake type DIRECTORY"); break; case ConfigModel::DataItem::STRING: - typeString = tr("string", "display string for cmake type STRING"); + typeString = Tr::tr("string", "display string for cmake type STRING"); break; case ConfigModel::DataItem::UNKNOWN: return nullptr; } - QAction *forceAction = new QAction(tr("Force to %1").arg(typeString), nullptr); + QAction *forceAction = new QAction(Tr::tr("Force to %1").arg(typeString), nullptr); forceAction->setEnabled(m_configModel->canForceTo(idx, t)); connect(forceAction, &QAction::triggered, this, [this, idx, t]() { m_configModel->forceTo(idx, t); }); @@ -1033,7 +1032,7 @@ bool CMakeBuildSettingsWidget::eventFilter(QObject *target, QEvent *event) auto menu = new QMenu(this); connect(menu, &QMenu::triggered, menu, &QMenu::deleteLater); - auto help = new QAction(tr("Help"), this); + auto help = new QAction(Tr::tr("Help"), this); menu->addAction(help); connect(help, &QAction::triggered, this, [=] { const CMakeConfigItem item = ConfigModel::dataItemFromIndex(idx).toCMakeConfigItem(); @@ -1058,8 +1057,8 @@ bool CMakeBuildSettingsWidget::eventFilter(QObject *target, QEvent *event) menu->addSeparator(); auto applyKitOrInitialValue = new QAction(isInitialConfiguration() - ? tr("Apply Kit Value") - : tr("Apply Initial Configuration Value"), + ? Tr::tr("Apply Kit Value") + : Tr::tr("Apply Initial Configuration Value"), this); menu->addAction(applyKitOrInitialValue); connect(applyKitOrInitialValue, &QAction::triggered, this, [this] { @@ -1079,7 +1078,7 @@ bool CMakeBuildSettingsWidget::eventFilter(QObject *target, QEvent *event) menu->addSeparator(); - auto copy = new QAction(tr("Copy"), this); + auto copy = new QAction(Tr::tr("Copy"), this); menu->addAction(copy); connect(copy, &QAction::triggered, this, [this] { const QModelIndexList selectedIndexes = m_configView->selectionModel()->selectedIndexes(); @@ -1377,8 +1376,8 @@ CMakeBuildConfiguration::CMakeBuildConfiguration(Target *target, Id id) if (QDir(oldDir).exists("CMakeCache.txt") && !QDir(newDir).exists("CMakeCache.txt")) { if (QMessageBox::information( Core::ICore::dialogParent(), - tr("Changing Build Directory"), - tr("Change the build directory to \"%1\" and start with a " + Tr::tr("Changing Build Directory"), + Tr::tr("Change the build directory to \"%1\" and start with a " "basic CMake configuration?") .arg(newDir), QMessageBox::Ok, @@ -1398,7 +1397,7 @@ CMakeBuildConfiguration::CMakeBuildConfiguration(Target *target, Id id) additionalCMakeArgumentsAspect->setMacroExpanderProvider([this] { return macroExpander(); }); macroExpander()->registerVariable(DEVELOPMENT_TEAM_FLAG, - tr("The CMake flag for the development team"), + Tr::tr("The CMake flag for the development team"), [this] { const CMakeConfig flags = signingFlags(); if (!flags.isEmpty()) @@ -1406,7 +1405,7 @@ CMakeBuildConfiguration::CMakeBuildConfiguration(Target *target, Id id) return QString(); }); macroExpander()->registerVariable(PROVISIONING_PROFILE_FLAG, - tr("The CMake flag for the provisioning profile"), + Tr::tr("The CMake flag for the provisioning profile"), [this] { const CMakeConfig flags = signingFlags(); if (flags.size() > 1 && !flags.at(1).isUnset) { @@ -1416,7 +1415,7 @@ CMakeBuildConfiguration::CMakeBuildConfiguration(Target *target, Id id) }); macroExpander()->registerVariable(CMAKE_OSX_ARCHITECTURES_FLAG, - tr("The CMake flag for the architecture on macOS"), + Tr::tr("The CMake flag for the architecture on macOS"), [target] { if (HostOsInfo::isRunningUnderRosetta()) { if (auto *qt = QtSupport::QtKitAspect::qtVersion(target->kit())) { @@ -1430,7 +1429,7 @@ CMakeBuildConfiguration::CMakeBuildConfiguration(Target *target, Id id) return QLatin1String(); }); macroExpander()->registerVariable(QT_QML_DEBUG_FLAG, - tr("The CMake flag for QML debugging, if enabled"), + Tr::tr("The CMake flag for QML debugging, if enabled"), [this] { if (aspect()->value() == TriState::Enabled) { @@ -1997,17 +1996,17 @@ BuildInfo CMakeBuildConfigurationFactory::createBuildInfo(BuildType buildType) break; case BuildTypeMinSizeRel: info.typeName = "MinSizeRel"; - info.displayName = CMakeBuildConfiguration::tr("Minimum Size Release"); + info.displayName = Tr::tr("Minimum Size Release"); info.buildType = BuildConfiguration::Release; break; case BuildTypeRelWithDebInfo: info.typeName = "RelWithDebInfo"; - info.displayName = CMakeBuildConfiguration::tr("Release with Debug Information"); + info.displayName = Tr::tr("Release with Debug Information"); info.buildType = BuildConfiguration::Profile; break; case BuildTypeProfile: { info.typeName = "Profile"; - info.displayName = CMakeBuildConfiguration::tr("Profile"); + info.displayName = Tr::tr("Profile"); info.buildType = BuildConfiguration::Profile; QVariantMap extraInfo; // override CMake build type, which defaults to info.typeName @@ -2125,9 +2124,9 @@ Environment CMakeBuildConfiguration::baseConfigureEnvironment() const QString CMakeBuildConfiguration::baseConfigureEnvironmentText() const { if (useClearConfigureEnvironment()) - return tr("Clean Environment"); + return Tr::tr("Clean Environment"); else - return tr("System Environment"); + return Tr::tr("System Environment"); } QString CMakeBuildSystem::cmakeBuildType() const @@ -2262,7 +2261,7 @@ void InitialCMakeArgumentsAspect::toMap(QVariantMap &map) const InitialCMakeArgumentsAspect::InitialCMakeArgumentsAspect() { setSettingsKey("CMake.Initial.Parameters"); - setLabelText(tr("Additional CMake options:")); + setLabelText(Tr::tr("Additional CMake options:")); setDisplayStyle(LineEditDisplay); } @@ -2273,7 +2272,7 @@ InitialCMakeArgumentsAspect::InitialCMakeArgumentsAspect() AdditionalCMakeOptionsAspect::AdditionalCMakeOptionsAspect() { setSettingsKey("CMake.Additional.Options"); - setLabelText(tr("Additional CMake options:")); + setLabelText(Tr::tr("Additional CMake options:")); setDisplayStyle(LineEditDisplay); } @@ -2292,7 +2291,7 @@ SourceDirectoryAspect::SourceDirectoryAspect() BuildTypeAspect::BuildTypeAspect() { setSettingsKey(CMAKE_BUILD_TYPE); - setLabelText(tr("Build type:")); + setLabelText(Tr::tr("Build type:")); setDisplayStyle(LineEditDisplay); setDefaultValue("Unknown"); } diff --git a/src/plugins/cmakeprojectmanager/cmakebuildstep.cpp b/src/plugins/cmakeprojectmanager/cmakebuildstep.cpp index c9fcf2acf7c..1608a454d60 100644 --- a/src/plugins/cmakeprojectmanager/cmakebuildstep.cpp +++ b/src/plugins/cmakeprojectmanager/cmakebuildstep.cpp @@ -9,6 +9,7 @@ #include "cmakeparser.h" #include "cmakeproject.h" #include "cmakeprojectconstants.h" +#include "cmakeprojectmanagertr.h" #include "cmaketool.h" #include @@ -38,8 +39,7 @@ using namespace Core; using namespace ProjectExplorer; using namespace Utils; -namespace CMakeProjectManager { -namespace Internal { +namespace CMakeProjectManager::Internal { const char BUILD_TARGETS_KEY[] = "CMakeProjectManager.MakeStep.BuildTargets"; const char CMAKE_ARGUMENTS_KEY[] = "CMakeProjectManager.MakeStep.CMakeArguments"; @@ -112,17 +112,17 @@ QVariant CMakeTargetItem::data(int column, int role) const if (column == 0) { if (role == Qt::DisplayRole) { if (m_target.isEmpty()) - return CMakeBuildStep::tr("Current executable"); + return Tr::tr("Current executable"); return m_target; } if (role == Qt::ToolTipRole) { if (m_target.isEmpty()) { - return CMakeBuildStep::tr("Build the executable used in the active run " + return Tr::tr("Build the executable used in the active run " "configuration. Currently: %1") .arg(m_step->activeRunConfigTarget()); } - return CMakeBuildStep::tr("Target: %1").arg(m_target); + return Tr::tr("Target: %1").arg(m_target); } if (role == Qt::CheckStateRole) @@ -161,12 +161,12 @@ CMakeBuildStep::CMakeBuildStep(BuildStepList *bsl, Utils::Id id) : { m_cmakeArguments = addAspect(); m_cmakeArguments->setSettingsKey(CMAKE_ARGUMENTS_KEY); - m_cmakeArguments->setLabelText(tr("CMake arguments:")); + m_cmakeArguments->setLabelText(Tr::tr("CMake arguments:")); m_cmakeArguments->setDisplayStyle(StringAspect::LineEditDisplay); m_toolArguments = addAspect(); m_toolArguments->setSettingsKey(TOOL_ARGUMENTS_KEY); - m_toolArguments->setLabelText(tr("Tool arguments:")); + m_toolArguments->setLabelText(Tr::tr("Tool arguments:")); m_toolArguments->setDisplayStyle(StringAspect::LineEditDisplay); Kit *kit = buildConfiguration()->kit(); @@ -176,13 +176,13 @@ CMakeBuildStep::CMakeBuildStep(BuildStepList *bsl, Utils::Id id) : m_useiOSAutomaticProvisioningUpdates->setSettingsKey( IOS_AUTOMATIC_PROVISIONG_UPDATES_ARGUMENTS_KEY); m_useiOSAutomaticProvisioningUpdates->setLabel( - tr("Enable automatic provisioning updates:")); + Tr::tr("Enable automatic provisioning updates:")); m_useiOSAutomaticProvisioningUpdates->setToolTip( - tr("Tells xcodebuild to create and download a provisioning profile " + Tr::tr("Tells xcodebuild to create and download a provisioning profile " "if a valid one does not exist.")); } - m_buildTargetModel.setHeader({tr("Target")}); + m_buildTargetModel.setHeader({Tr::tr("Target")}); setBuildTargets({defaultBuildTarget()}); auto *bs = qobject_cast(buildSystem()); @@ -248,7 +248,7 @@ bool CMakeBuildStep::init() if (!bc->isEnabled()) { emit addTask(BuildSystemTask(Task::Error, - tr("The build configuration is currently disabled."))); + Tr::tr("The build configuration is currently disabled."))); emitFaultyConfigurationMessage(); return false; } @@ -256,7 +256,7 @@ bool CMakeBuildStep::init() CMakeTool *tool = CMakeKitAspect::cmakeTool(kit()); if (!tool || !tool->isValid()) { emit addTask(BuildSystemTask(Task::Error, - tr("A CMake tool must be set up for building. " + Tr::tr("A CMake tool must be set up for building. " "Configure a CMake tool in the kit options."))); emitFaultyConfigurationMessage(); return false; @@ -280,7 +280,7 @@ bool CMakeBuildStep::init() if (bc->buildDirectory() != projectDirectory) { if (projectDirectory.pathAppended("CMakeCache.txt").exists()) { emit addTask(BuildSystemTask(Task::Warning, - tr("There is a CMakeCache.txt file in \"%1\", which suggest an " + Tr::tr("There is a CMakeCache.txt file in \"%1\", which suggest an " "in-source build was done before. You are now building in \"%2\", " "and the CMakeCache.txt file might confuse CMake.") .arg(projectDirectory.toUserOutput(), bc->buildDirectory().toUserOutput()))); @@ -323,10 +323,10 @@ void CMakeBuildStep::doRun() m_waiting = false; auto bs = static_cast(buildSystem()); if (bs->persistCMakeState()) { - emit addOutput(tr("Persisting CMake state..."), BuildStep::OutputFormat::NormalMessage); + emit addOutput(Tr::tr("Persisting CMake state..."), BuildStep::OutputFormat::NormalMessage); m_waiting = true; } else if (buildSystem()->isWaitingForParse()) { - emit addOutput(tr("Running CMake in preparation to build..."), BuildStep::OutputFormat::NormalMessage); + emit addOutput(Tr::tr("Running CMake in preparation to build..."), BuildStep::OutputFormat::NormalMessage); m_waiting = true; } @@ -353,7 +353,7 @@ void CMakeBuildStep::handleProjectWasParsed(bool success) } else if (success) { runImpl(); } else { - AbstractProcessStep::stdError(tr("Project did not parse successfully, cannot build.")); + AbstractProcessStep::stdError(Tr::tr("Project did not parse successfully, cannot build.")); emit finished(false); } } @@ -518,7 +518,7 @@ QWidget *CMakeBuildStep::createConfigWidget() setSummaryText(summaryText); }; - setDisplayName(tr("Build", "ConfigWidget display name.")); + setDisplayName(Tr::tr("Build", "ConfigWidget display name.")); auto buildTargetsView = new QTreeView; buildTargetsView->setMinimumHeight(200); @@ -530,7 +530,7 @@ QWidget *CMakeBuildStep::createConfigWidget() ItemViewFind::LightColored); auto createAndAddEnvironmentWidgets = [this](Layouting::Form &builder) { - auto clearBox = new QCheckBox(tr("Clear system environment")); + auto clearBox = new QCheckBox(Tr::tr("Clear system environment")); clearBox->setChecked(useClearEnvironment()); auto envWidget = new EnvironmentWidget(nullptr, EnvironmentWidget::TypeLocal, clearBox); @@ -564,7 +564,7 @@ QWidget *CMakeBuildStep::createConfigWidget() if (m_useiOSAutomaticProvisioningUpdates) builder.addRow(m_useiOSAutomaticProvisioningUpdates); - builder.addRow({new QLabel(tr("Targets:")), frame}); + builder.addRow({new QLabel(Tr::tr("Targets:")), frame}); if (!isCleanStep() && !m_buildPreset.isEmpty()) createAndAddEnvironmentWidgets(builder); @@ -712,9 +712,9 @@ Environment CMakeBuildStep::baseEnvironment() const QString CMakeBuildStep::baseEnvironmentText() const { if (useClearEnvironment()) - return tr("Clean Environment"); + return Tr::tr("Clean Environment"); else - return tr("System Environment"); + return Tr::tr("System Environment"); } void CMakeBuildStep::processFinished(int exitCode, QProcess::ExitStatus status) @@ -728,11 +728,10 @@ void CMakeBuildStep::processFinished(int exitCode, QProcess::ExitStatus status) CMakeBuildStepFactory::CMakeBuildStepFactory() { registerStep(Constants::CMAKE_BUILD_STEP_ID); - setDisplayName(CMakeBuildStep::tr("CMake Build", "Display name for CMakeProjectManager::CMakeBuildStep id.")); + setDisplayName(Tr::tr("CMake Build", "Display name for CMakeProjectManager::CMakeBuildStep id.")); setSupportedProjectType(Constants::CMAKE_PROJECT_ID); } -} // Internal -} // CMakeProjectManager +} // CMakeProjectManager::Internal #include diff --git a/src/plugins/cmakeprojectmanager/cmakebuildstep.h b/src/plugins/cmakeprojectmanager/cmakebuildstep.h index f44474cdaac..b827b533650 100644 --- a/src/plugins/cmakeprojectmanager/cmakebuildstep.h +++ b/src/plugins/cmakeprojectmanager/cmakebuildstep.h @@ -11,8 +11,7 @@ class CommandLine; class StringAspect; } // Utils -namespace CMakeProjectManager { -namespace Internal { +namespace CMakeProjectManager::Internal { class CMakeBuildStep; @@ -123,5 +122,4 @@ public: CMakeBuildStepFactory(); }; -} // namespace Internal -} // namespace CMakeProjectManager +} // CMakeProjectManager::Internal diff --git a/src/plugins/cmakeprojectmanager/cmakebuildsystem.cpp b/src/plugins/cmakeprojectmanager/cmakebuildsystem.cpp index 43e354dbf09..5157f87b6ea 100644 --- a/src/plugins/cmakeprojectmanager/cmakebuildsystem.cpp +++ b/src/plugins/cmakeprojectmanager/cmakebuildsystem.cpp @@ -11,6 +11,7 @@ #include "cmakeproject.h" #include "cmakeprojectconstants.h" #include "cmakeprojectnodes.h" +#include "cmakeprojectmanagertr.h" #include "cmakeprojectplugin.h" #include "cmakespecificsettings.h" #include "projecttreehelper.h" @@ -59,8 +60,7 @@ using namespace ProjectExplorer; using namespace Utils; -namespace CMakeProjectManager { -namespace Internal { +namespace CMakeProjectManager::Internal { static void copySourcePathsToClipboard(const FilePaths &srcPaths, const ProjectNode *node) { @@ -92,8 +92,8 @@ static void noAutoAdditionNotify(const FilePaths &filePaths, const ProjectNode * bool checkValue{false}; QDialogButtonBox::StandardButton reply = CheckableMessageBox::question( Core::ICore::dialogParent(), - QMessageBox::tr("Copy to Clipboard?"), - QMessageBox::tr("Files are not automatically added to the " + Tr::tr("Copy to Clipboard?"), + Tr::tr("Files are not automatically added to the " "CMakeLists.txt file of the CMake project." "\nCopy the path to the source files to the clipboard?"), "Remember My Choice", @@ -359,7 +359,7 @@ void CMakeBuildSystem::setParametersAndRequestParse(const BuildDirParameters &pa if (!tool || !tool->isValid()) { TaskHub::addTask( BuildSystemTask(Task::Error, - tr("The kit needs to define a CMake tool to parse this project."))); + Tr::tr("The kit needs to define a CMake tool to parse this project."))); return; } if (!tool->hasFileApi()) { @@ -391,8 +391,8 @@ bool CMakeBuildSystem::mustApplyConfigurationChangesArguments(const BuildDirPara return false; int answer = QMessageBox::question(Core::ICore::dialogParent(), - tr("Apply configuration changes?"), - "

" + tr("Run CMake with configuration changes?") + Tr::tr("Apply configuration changes?"), + "

" + Tr::tr("Run CMake with configuration changes?") + "

"
                                        + parameters.configurationChangesArguments.join("\n")
                                        + "
", @@ -498,7 +498,7 @@ void CMakeBuildSystem::combineScanAndParse(bool restoredFromBackup) if (restoredFromBackup) project()->addIssue( CMakeProject::IssueType::Warning, - tr("CMake configuration failed" + Tr::tr("CMake configuration failed" "

The backup of the previous configuration has been restored.

" "

Issues and \"Projects > Build\" settings " "show more information about the failure.addIssue( CMakeProject::IssueType::Warning, - tr("Failed to load project" + Tr::tr("Failed to load project" "

Issues and \"Projects > Build\" settings " "show more information about the failure.displayName()), "CMake.Scan.Tree"); } @@ -853,13 +853,13 @@ void CMakeBuildSystem::ensureBuildDirectory(const BuildDirParameters ¶meters const FilePath bdir = parameters.buildDirectory; if (!buildConfiguration()->createBuildDirectory()) { - handleParsingFailed(tr("Failed to create build directory \"%1\".").arg(bdir.toUserOutput())); + handleParsingFailed(Tr::tr("Failed to create build directory \"%1\".").arg(bdir.toUserOutput())); return; } const CMakeTool *tool = parameters.cmakeTool(); if (!tool) { - handleParsingFailed(tr("No CMake tool set up in kit.")); + handleParsingFailed(Tr::tr("No CMake tool set up in kit.")); return; } @@ -867,7 +867,7 @@ void CMakeBuildSystem::ensureBuildDirectory(const BuildDirParameters ¶meters if (!tool->cmakeExecutable().ensureReachable(bdir)) { // Make sure that the build directory is available on the device. handleParsingFailed( - tr("The remote CMake executable cannot write to the local build directory.")); + Tr::tr("The remote CMake executable cannot write to the local build directory.")); } } } @@ -1337,5 +1337,4 @@ MakeInstallCommand CMakeBuildSystem::makeInstallCommand(const FilePath &installR return cmd; } -} // namespace Internal -} // namespace CMakeProjectManager +} // CMakeProjectManager::Internal diff --git a/src/plugins/cmakeprojectmanager/cmakeconfigitem.cpp b/src/plugins/cmakeprojectmanager/cmakeconfigitem.cpp index 28dadbcd999..f3865a81f6e 100644 --- a/src/plugins/cmakeprojectmanager/cmakeconfigitem.cpp +++ b/src/plugins/cmakeprojectmanager/cmakeconfigitem.cpp @@ -3,6 +3,8 @@ #include "cmakeconfigitem.h" +#include "cmakeprojectmanagertr.h" + #include #include @@ -337,8 +339,7 @@ CMakeConfig CMakeConfig::fromFile(const Utils::FilePath &cacheFile, QString *err QFile cache(cacheFile.toString()); if (!cache.open(QIODevice::ReadOnly | QIODevice::Text)) { if (errorMessage) - *errorMessage = QCoreApplication::translate("CMakeProjectManager::CMakeConfigItem", "Failed to open %1 for reading.") - .arg(cacheFile.toUserOutput()); + *errorMessage = Tr::tr("Failed to open %1 for reading.").arg(cacheFile.toUserOutput()); return CMakeConfig(); } diff --git a/src/plugins/cmakeprojectmanager/cmakeconfigitem.h b/src/plugins/cmakeprojectmanager/cmakeconfigitem.h index afec217cd1a..c5e771b1a3e 100644 --- a/src/plugins/cmakeprojectmanager/cmakeconfigitem.h +++ b/src/plugins/cmakeprojectmanager/cmakeconfigitem.h @@ -5,7 +5,6 @@ #include "cmake_global.h" - #include #include diff --git a/src/plugins/cmakeprojectmanager/cmakeeditor.cpp b/src/plugins/cmakeprojectmanager/cmakeeditor.cpp index 53dc1f30c60..e7463c40eae 100644 --- a/src/plugins/cmakeprojectmanager/cmakeeditor.cpp +++ b/src/plugins/cmakeprojectmanager/cmakeeditor.cpp @@ -21,13 +21,18 @@ using namespace Core; using namespace TextEditor; -namespace CMakeProjectManager { -namespace Internal { +namespace CMakeProjectManager::Internal { // // CMakeEditor // +class CMakeEditor : public TextEditor::BaseTextEditor +{ +public: + void contextHelp(const HelpCallback &callback) const final; +}; + void CMakeEditor::contextHelp(const HelpCallback &callback) const { int pos = position(); @@ -239,5 +244,4 @@ CMakeEditorFactory::CMakeEditorFactory() contextMenu->addAction(ActionManager::command(TextEditor::Constants::UN_COMMENT_SELECTION)); } -} // namespace Internal -} // namespace CMakeProjectManager +} // CMakeProjectManager::Internal diff --git a/src/plugins/cmakeprojectmanager/cmakeeditor.h b/src/plugins/cmakeprojectmanager/cmakeeditor.h index fba93488b57..57e2e606877 100644 --- a/src/plugins/cmakeprojectmanager/cmakeeditor.h +++ b/src/plugins/cmakeprojectmanager/cmakeeditor.h @@ -5,20 +5,7 @@ #include -namespace CMakeProjectManager { -namespace Internal { - -class CMakeEditorWidget; - -class CMakeEditor : public TextEditor::BaseTextEditor -{ - Q_OBJECT - -public: - void contextHelp(const HelpCallback &callback) const override; - - friend class CMakeEditorWidget; -}; +namespace CMakeProjectManager::Internal { class CMakeEditorFactory : public TextEditor::TextEditorFactory { @@ -26,5 +13,4 @@ public: CMakeEditorFactory(); }; -} // namespace Internal -} // namespace CMakeProjectManager +} // CMakeProjectManager::Internal diff --git a/src/plugins/cmakeprojectmanager/cmakefilecompletionassist.cpp b/src/plugins/cmakeprojectmanager/cmakefilecompletionassist.cpp index 44ee335b8e8..a06aae70d38 100644 --- a/src/plugins/cmakeprojectmanager/cmakefilecompletionassist.cpp +++ b/src/plugins/cmakeprojectmanager/cmakefilecompletionassist.cpp @@ -14,18 +14,18 @@ #include -using namespace CMakeProjectManager::Internal; using namespace TextEditor; using namespace ProjectExplorer; -// ------------------------------- -// CMakeFileCompletionAssistProvider -// ------------------------------- +namespace CMakeProjectManager::Internal { -IAssistProcessor *CMakeFileCompletionAssistProvider::createProcessor(const AssistInterface *) const +class CMakeFileCompletionAssist : public TextEditor::KeywordsCompletionAssistProcessor { - return new CMakeFileCompletionAssist; -} +public: + CMakeFileCompletionAssist(); + + TextEditor::IAssistProposal *perform(const TextEditor::AssistInterface *interface) final; +}; CMakeFileCompletionAssist::CMakeFileCompletionAssist() : KeywordsCompletionAssistProcessor(Keywords()) @@ -50,3 +50,10 @@ IAssistProposal *CMakeFileCompletionAssist::perform(const AssistInterface *inter setKeywords(kw); return KeywordsCompletionAssistProcessor::perform(interface); } + +IAssistProcessor *CMakeFileCompletionAssistProvider::createProcessor(const AssistInterface *) const +{ + return new CMakeFileCompletionAssist; +} + +} // CMakeProjectManager::Internal diff --git a/src/plugins/cmakeprojectmanager/cmakefilecompletionassist.h b/src/plugins/cmakeprojectmanager/cmakefilecompletionassist.h index 9ca0af0c756..026b29acd18 100644 --- a/src/plugins/cmakeprojectmanager/cmakefilecompletionassist.h +++ b/src/plugins/cmakeprojectmanager/cmakefilecompletionassist.h @@ -5,25 +5,12 @@ #include -namespace CMakeProjectManager { -namespace Internal { - -class CMakeFileCompletionAssist : public TextEditor::KeywordsCompletionAssistProcessor -{ -public: - CMakeFileCompletionAssist(); - - // IAssistProcessor interface - TextEditor::IAssistProposal *perform(const TextEditor::AssistInterface *interface) override; -}; +namespace CMakeProjectManager::Internal { class CMakeFileCompletionAssistProvider : public TextEditor::CompletionAssistProvider { - Q_OBJECT - public: - TextEditor::IAssistProcessor *createProcessor(const TextEditor::AssistInterface *) const override; + TextEditor::IAssistProcessor *createProcessor(const TextEditor::AssistInterface *) const final; }; -} // Internal -} // CMakeProjectManager +} // CMakeProjectManager::Internal diff --git a/src/plugins/cmakeprojectmanager/cmakeindenter.cpp b/src/plugins/cmakeprojectmanager/cmakeindenter.cpp index 49eff068f13..a9a2aeaaafb 100644 --- a/src/plugins/cmakeprojectmanager/cmakeindenter.cpp +++ b/src/plugins/cmakeprojectmanager/cmakeindenter.cpp @@ -3,8 +3,7 @@ #include "cmakeindenter.h" -namespace CMakeProjectManager { -namespace Internal { +namespace CMakeProjectManager::Internal { CMakeIndenter::CMakeIndenter(QTextDocument *doc) : TextEditor::TextIndenter(doc) @@ -111,7 +110,4 @@ int CMakeIndenter::indentFor(const QTextBlock &block, return qMax(0, indentation); } -} // namespace Internal -} // namespace CMakeProjectManager - - +} // CMakeProjectManager::Internal diff --git a/src/plugins/cmakeprojectmanager/cmakeindenter.h b/src/plugins/cmakeprojectmanager/cmakeindenter.h index ce30b220d6f..ad85f8a26cc 100644 --- a/src/plugins/cmakeprojectmanager/cmakeindenter.h +++ b/src/plugins/cmakeprojectmanager/cmakeindenter.h @@ -7,8 +7,7 @@ #include -namespace CMakeProjectManager { -namespace Internal { +namespace CMakeProjectManager::Internal { class CMAKE_EXPORT CMakeIndenter : public TextEditor::TextIndenter { @@ -21,5 +20,4 @@ public: int cursorPositionInEditor = -1) override; }; -} // namespace Internal -} // namespace CMakeProjectManager +} // CMakeProjectManager::Internal diff --git a/src/plugins/cmakeprojectmanager/cmakekitinformation.cpp b/src/plugins/cmakeprojectmanager/cmakekitinformation.cpp index 1fa255809e2..22e963a1be4 100644 --- a/src/plugins/cmakeprojectmanager/cmakekitinformation.cpp +++ b/src/plugins/cmakeprojectmanager/cmakekitinformation.cpp @@ -1,10 +1,11 @@ // Copyright (C) 2016 Canonical Ltd. // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0+ OR GPL-3.0 WITH Qt-GPL-exception-1.0 -#include "cmakeconfigitem.h" #include "cmakekitinformation.h" +#include "cmakeconfigitem.h" #include "cmakeprojectconstants.h" +#include "cmakeprojectmanagertr.h" #include "cmakeprojectplugin.h" #include "cmakespecificsettings.h" #include "cmaketool.h" @@ -50,9 +51,6 @@ using namespace ProjectExplorer; using namespace Utils; namespace CMakeProjectManager { -// -------------------------------------------------------------------- -// CMakeKitAspect: -// -------------------------------------------------------------------- static bool isIos(const Kit *k) { @@ -69,7 +67,6 @@ static Id defaultCMakeToolId() class CMakeKitAspectWidget final : public KitAspectWidget { - Q_DECLARE_TR_FUNCTIONS(CMakeProjectManager::Internal::CMakeKitAspect) public: CMakeKitAspectWidget(Kit *kit, const KitAspect *ki) : KitAspectWidget(kit, ki), m_comboBox(createSubWidget()), @@ -137,7 +134,7 @@ private: m_comboBox->removeItem(pos); if (m_comboBox->count() == 0) { - m_comboBox->addItem(tr(""), Id().toSetting()); + m_comboBox->addItem(Tr::tr(""), Id().toSetting()); m_comboBox->setEnabled(false); } else { m_comboBox->setEnabled(true); @@ -199,8 +196,8 @@ CMakeKitAspect::CMakeKitAspect() { setObjectName(QLatin1String("CMakeKitAspect")); setId(Constants::TOOL_ID); - setDisplayName(tr("CMake Tool")); - setDescription(tr("The CMake Tool to use when building a project with CMake.
" + setDisplayName(Tr::tr("CMake Tool")); + setDescription(Tr::tr("The CMake Tool to use when building a project with CMake.
" "This setting is ignored when using other build systems.")); setPriority(20000); @@ -278,7 +275,7 @@ void CMakeKitAspect::fix(Kit *k) KitAspect::ItemList CMakeKitAspect::toUserOutput(const Kit *k) const { const CMakeTool *const tool = cmakeTool(k); - return {{tr("CMake"), tool ? tool->displayName() : tr("Unconfigured")}}; + return {{Tr::tr("CMake"), tool ? tool->displayName() : Tr::tr("Unconfigured")}}; } KitAspectWidget *CMakeKitAspect::createConfigWidget(Kit *k) const @@ -290,7 +287,7 @@ KitAspectWidget *CMakeKitAspect::createConfigWidget(Kit *k) const void CMakeKitAspect::addToMacroExpander(Kit *k, MacroExpander *expander) const { QTC_ASSERT(k, return); - expander->registerFileVariables("CMake:Executable", tr("Path to the cmake executable"), + expander->registerFileVariables("CMake:Executable", Tr::tr("Path to the cmake executable"), [k] { CMakeTool *tool = CMakeKitAspect::cmakeTool(k); return tool ? tool->cmakeExecutable() : FilePath(); @@ -306,7 +303,7 @@ QSet CMakeKitAspect::availableFeatures(const Kit *k) const QString CMakeKitAspect::msgUnsupportedVersion(const QByteArray &versionString) { - return tr("CMake version %1 is unsupported. Update to " + return Tr::tr("CMake version %1 is unsupported. Update to " "version 3.14 (with file-api) or later.") .arg(QString::fromUtf8(versionString)); } @@ -324,8 +321,6 @@ const char TOOLSET_KEY[] = "Toolset"; class CMakeGeneratorKitAspectWidget final : public KitAspectWidget { - Q_DECLARE_TR_FUNCTIONS(CMakeProjectManager::Internal::CMakeGeneratorKitAspect) - public: CMakeGeneratorKitAspectWidget(Kit *kit, const KitAspect *ki) : KitAspectWidget(kit, ki), @@ -338,7 +333,7 @@ public: }); m_label->setToolTip(ki->description()); - m_changeButton->setText(tr("Change...")); + m_changeButton->setText(Tr::tr("Change...")); refresh(); connect(m_changeButton, &QPushButton::clicked, this, &CMakeGeneratorKitAspectWidget::changeGenerator); @@ -380,9 +375,9 @@ private: messageLabel << generator; if (!platform.isEmpty()) - messageLabel << ", " << tr("Platform") << ": " << platform; + messageLabel << ", " << Tr::tr("Platform") << ": " << platform; if (!toolset.isEmpty()) - messageLabel << ", " << tr("Toolset") << ": " << toolset; + messageLabel << ", " << Tr::tr("Toolset") << ": " << toolset; m_label->setText(messageLabel.join("")); } @@ -396,7 +391,7 @@ private: flags |= Qt::MSWindowsFixedSizeDialogHint; changeDialog->setWindowFlags(flags); - changeDialog->setWindowTitle(tr("CMake Generator")); + changeDialog->setWindowTitle(Tr::tr("CMake Generator")); auto layout = new QGridLayout(changeDialog); layout->setSizeConstraint(QLayout::SetFixedSize); @@ -414,19 +409,19 @@ private: layout->addWidget(cmakeLabel, row, 1); ++row; - layout->addWidget(new QLabel(tr("Generator:")), row, 0); + layout->addWidget(new QLabel(Tr::tr("Generator:")), row, 0); layout->addWidget(generatorCombo, row, 1); ++row; - layout->addWidget(new QLabel(tr("Extra generator:")), row, 0); + layout->addWidget(new QLabel(Tr::tr("Extra generator:")), row, 0); layout->addWidget(extraGeneratorCombo, row, 1); ++row; - layout->addWidget(new QLabel(tr("Platform:")), row, 0); + layout->addWidget(new QLabel(Tr::tr("Platform:")), row, 0); layout->addWidget(platformEdit, row, 1); ++row; - layout->addWidget(new QLabel(tr("Toolset:")), row, 0); + layout->addWidget(new QLabel(Tr::tr("Toolset:")), row, 0); layout->addWidget(toolsetEdit, row, 1); ++row; @@ -452,7 +447,7 @@ private: generatorCombo->setCurrentText(name); extraGeneratorCombo->clear(); - extraGeneratorCombo->addItem(tr(""), QString()); + extraGeneratorCombo->addItem(Tr::tr(""), QString()); for (const QString &eg : qAsConst(it->extraGenerators)) extraGeneratorCombo->addItem(eg, eg); extraGeneratorCombo->setEnabled(extraGeneratorCombo->count() > 1); @@ -550,8 +545,8 @@ CMakeGeneratorKitAspect::CMakeGeneratorKitAspect() { setObjectName(QLatin1String("CMakeGeneratorKitAspect")); setId(GENERATOR_ID); - setDisplayName(tr("CMake generator")); - setDescription(tr("CMake generator defines how a project is built when using CMake.
" + setDisplayName(Tr::tr("CMake generator")); + setDescription(Tr::tr("CMake generator defines how a project is built when using CMake.
" "This setting is ignored when using other build systems.")); setPriority(19000); } @@ -755,7 +750,7 @@ Tasks CMakeGeneratorKitAspect::validate(const Kit *k) const }; if (!tool->isValid()) { - addWarning(tr("CMake Tool is unconfigured, CMake generator will be ignored.")); + addWarning(Tr::tr("CMake Tool is unconfigured, CMake generator will be ignored.")); } else { const GeneratorInfo info = generatorInfo(k); QList known = tool->supportedGenerators(); @@ -763,15 +758,15 @@ Tasks CMakeGeneratorKitAspect::validate(const Kit *k) const return g.matches(info.generator, info.extraGenerator); }); if (it == known.constEnd()) { - addWarning(tr("CMake Tool does not support the configured generator.")); + addWarning(Tr::tr("CMake Tool does not support the configured generator.")); } else { if (!it->supportsPlatform && !info.platform.isEmpty()) - addWarning(tr("Platform is not supported by the selected CMake generator.")); + addWarning(Tr::tr("Platform is not supported by the selected CMake generator.")); if (!it->supportsToolset && !info.toolset.isEmpty()) - addWarning(tr("Toolset is not supported by the selected CMake generator.")); + addWarning(Tr::tr("Toolset is not supported by the selected CMake generator.")); } if (!tool->hasFileApi()) { - addWarning(tr("The selected CMake binary does not support file-api. " + addWarning(Tr::tr("The selected CMake binary does not support file-api. " "%1 will not be able to parse CMake projects.") .arg(Core::Constants::IDE_DISPLAY_NAME)); } @@ -838,15 +833,15 @@ KitAspect::ItemList CMakeGeneratorKitAspect::toUserOutput(const Kit *k) const const GeneratorInfo info = generatorInfo(k); QString message; if (info.generator.isEmpty()) { - message = tr(""); + message = Tr::tr(""); } else { - message = tr("Generator: %1
Extra generator: %2").arg(info.generator).arg(info.extraGenerator); + message = Tr::tr("Generator: %1
Extra generator: %2").arg(info.generator).arg(info.extraGenerator); if (!info.platform.isEmpty()) - message += "
" + tr("Platform: %1").arg(info.platform); + message += "
" + Tr::tr("Platform: %1").arg(info.platform); if (!info.toolset.isEmpty()) - message += "
" + tr("Toolset: %1").arg(info.toolset); + message += "
" + Tr::tr("Toolset: %1").arg(info.toolset); } - return {{tr("CMake Generator"), message}}; + return {{Tr::tr("CMake Generator"), message}}; } KitAspectWidget *CMakeGeneratorKitAspect::createConfigWidget(Kit *k) const @@ -880,8 +875,6 @@ const char QTC_CMAKE_PRESET_KEY[] = "QTC_CMAKE_PRESET"; class CMakeConfigurationKitAspectWidget final : public KitAspectWidget { - Q_DECLARE_TR_FUNCTIONS(CMakeProjectManager::Internal::CMakeConfigurationKitAspect) - public: CMakeConfigurationKitAspectWidget(Kit *kit, const KitAspect *ki) : KitAspectWidget(kit, ki), @@ -889,7 +882,7 @@ public: m_manageButton(createSubWidget()) { refresh(); - m_manageButton->setText(tr("Change...")); + m_manageButton->setText(Tr::tr("Change...")); connect(m_manageButton, &QAbstractButton::clicked, this, &CMakeConfigurationKitAspectWidget::editConfigurationChanges); } @@ -940,11 +933,11 @@ private: const CMakeTool *tool = CMakeKitAspect::cmakeTool(kit()); m_dialog = new QDialog(m_summaryLabel->window()); - m_dialog->setWindowTitle(tr("Edit CMake Configuration")); + m_dialog->setWindowTitle(Tr::tr("Edit CMake Configuration")); auto layout = new QVBoxLayout(m_dialog); m_editor = new QPlainTextEdit; auto editorLabel = new QLabel(m_dialog); - editorLabel->setText(tr("Enter one CMake variable per line.
" + editorLabel->setText(Tr::tr("Enter one CMake variable per line.
" "To set a variable, use -D<variable>:<type>=<value>.
" "<type> can have one of the following values: FILEPATH, PATH, " "BOOL, INTERNAL, or STRING.")); @@ -959,7 +952,7 @@ private: m_additionalEditor = new QLineEdit; auto additionalLabel = new QLabel(m_dialog); - additionalLabel->setText(tr("Additional CMake options:")); + additionalLabel->setText(Tr::tr("Additional CMake options:")); connect(additionalLabel, &QLabel::linkActivated, this, [=](const QString &) { CMakeTool::openCMakeHelpUrl(tool, "%1/manual/cmake.1.html#options"); }); @@ -1042,8 +1035,8 @@ CMakeConfigurationKitAspect::CMakeConfigurationKitAspect() { setObjectName(QLatin1String("CMakeConfigurationKitAspect")); setId(CONFIGURATION_ID); - setDisplayName(tr("CMake Configuration")); - setDescription(tr("Default configuration passed to CMake when setting up a project.")); + setDisplayName(Tr::tr("CMake Configuration")); + setDescription(Tr::tr("Default configuration passed to CMake when setting up a project.")); setPriority(18000); } @@ -1156,6 +1149,7 @@ Tasks CMakeConfigurationKitAspect::validate(const Kit *k) const const ToolChain *const tcC = ToolChainKitAspect::cToolChain(k); const ToolChain *const tcCxx = ToolChainKitAspect::cxxToolChain(k); const CMakeConfig config = configuration(k); + const CMakeTool *const cmake = CMakeKitAspect::cmakeTool(k); const bool isQt4 = version && version->qtVersion() < QVersionNumber(5, 0, 0); FilePath qmakePath; // This is relative to the cmake used for building. @@ -1167,11 +1161,11 @@ Tasks CMakeConfigurationKitAspect::validate(const Kit *k) const const FilePath expandedValue = FilePath::fromString(k->macroExpander()->expand(QString::fromUtf8(i.value))); if (i.key == CMAKE_QMAKE_KEY) - qmakePath = expandedValue; + qmakePath = expandedValue.onDevice(cmake->cmakeExecutable()); else if (i.key == CMAKE_C_TOOLCHAIN_KEY) - tcCPath = expandedValue; + tcCPath = expandedValue.onDevice(cmake->cmakeExecutable()); else if (i.key == CMAKE_CXX_TOOLCHAIN_KEY) - tcCxxPath = expandedValue; + tcCxxPath = expandedValue.onDevice(cmake->cmakeExecutable()); else if (i.key == CMAKE_PREFIX_PATH_KEY) qtInstallDirs = CMakeConfigItem::cmakeSplitValue(expandedValue.path()); } @@ -1184,22 +1178,22 @@ Tasks CMakeConfigurationKitAspect::validate(const Kit *k) const // Validate Qt: if (qmakePath.isEmpty()) { if (version && version->isValid() && isQt4) { - addWarning(tr("CMake configuration has no path to qmake binary set, " + addWarning(Tr::tr("CMake configuration has no path to qmake binary set, " "even though the kit has a valid Qt version.")); } } else { if (!version || !version->isValid()) { - addWarning(tr("CMake configuration has a path to a qmake binary set, " + addWarning(Tr::tr("CMake configuration has a path to a qmake binary set, " "even though the kit has no valid Qt version.")); } else if (qmakePath != version->qmakeFilePath() && isQt4) { - addWarning(tr("CMake configuration has a path to a qmake binary set " + addWarning(Tr::tr("CMake configuration has a path to a qmake binary set " "that does not match the qmake binary path " "configured in the Qt version.")); } } if (version && !qtInstallDirs.contains(version->prefix().path()) && !isQt4) { if (version->isValid()) { - addWarning(tr("CMake configuration has no CMAKE_PREFIX_PATH set " + addWarning(Tr::tr("CMake configuration has no CMAKE_PREFIX_PATH set " "that points to the kit Qt version.")); } } @@ -1207,15 +1201,15 @@ Tasks CMakeConfigurationKitAspect::validate(const Kit *k) const // Validate Toolchains: if (tcCPath.isEmpty()) { if (tcC && tcC->isValid()) { - addWarning(tr("CMake configuration has no path to a C compiler set, " + addWarning(Tr::tr("CMake configuration has no path to a C compiler set, " "even though the kit has a valid tool chain.")); } } else { if (!tcC || !tcC->isValid()) { - addWarning(tr("CMake configuration has a path to a C compiler set, " + addWarning(Tr::tr("CMake configuration has a path to a C compiler set, " "even though the kit has no valid tool chain.")); } else if (tcCPath != tcC->compilerCommand() && tcCPath != tcC->compilerCommand().onDevice(tcCPath)) { - addWarning(tr("CMake configuration has a path to a C compiler set " + addWarning(Tr::tr("CMake configuration has a path to a C compiler set " "that does not match the compiler path " "configured in the tool chain of the kit.")); } @@ -1223,15 +1217,15 @@ Tasks CMakeConfigurationKitAspect::validate(const Kit *k) const if (tcCxxPath.isEmpty()) { if (tcCxx && tcCxx->isValid()) { - addWarning(tr("CMake configuration has no path to a C++ compiler set, " + addWarning(Tr::tr("CMake configuration has no path to a C++ compiler set, " "even though the kit has a valid tool chain.")); } } else { if (!tcCxx || !tcCxx->isValid()) { - addWarning(tr("CMake configuration has a path to a C++ compiler set, " + addWarning(Tr::tr("CMake configuration has a path to a C++ compiler set, " "even though the kit has no valid tool chain.")); } else if (tcCxxPath != tcCxx->compilerCommand() && tcCxxPath != tcCxx->compilerCommand().onDevice(tcCxxPath)) { - addWarning(tr("CMake configuration has a path to a C++ compiler set " + addWarning(Tr::tr("CMake configuration has a path to a C++ compiler set " "that does not match the compiler path " "configured in the tool chain of the kit.")); } @@ -1253,7 +1247,7 @@ void CMakeConfigurationKitAspect::fix(Kit *k) KitAspect::ItemList CMakeConfigurationKitAspect::toUserOutput(const Kit *k) const { - return {{tr("CMake Configuration"), toStringList(k).join("
")}}; + return {{Tr::tr("CMake Configuration"), toStringList(k).join("
")}}; } KitAspectWidget *CMakeConfigurationKitAspect::createConfigWidget(Kit *k) const diff --git a/src/plugins/cmakeprojectmanager/cmakekitinformation.h b/src/plugins/cmakeprojectmanager/cmakekitinformation.h index 302b5c7c1d6..da2435664b3 100644 --- a/src/plugins/cmakeprojectmanager/cmakekitinformation.h +++ b/src/plugins/cmakeprojectmanager/cmakekitinformation.h @@ -10,11 +10,11 @@ #include namespace CMakeProjectManager { + class CMakeTool; class CMAKE_EXPORT CMakeKitAspect : public ProjectExplorer::KitAspect { - Q_OBJECT public: CMakeKitAspect(); @@ -40,7 +40,6 @@ public: class CMAKE_EXPORT CMakeGeneratorKitAspect : public ProjectExplorer::KitAspect { - Q_OBJECT public: CMakeGeneratorKitAspect(); @@ -73,7 +72,6 @@ private: class CMAKE_EXPORT CMakeConfigurationKitAspect : public ProjectExplorer::KitAspect { - Q_OBJECT public: CMakeConfigurationKitAspect(); @@ -104,4 +102,4 @@ private: QVariant defaultValue(const ProjectExplorer::Kit *k) const; }; -} // namespace CMakeProjectManager +} // CMakeProjectManager diff --git a/src/plugins/cmakeprojectmanager/cmakelocatorfilter.cpp b/src/plugins/cmakeprojectmanager/cmakelocatorfilter.cpp index 8df144de4c3..835822acdc0 100644 --- a/src/plugins/cmakeprojectmanager/cmakelocatorfilter.cpp +++ b/src/plugins/cmakeprojectmanager/cmakelocatorfilter.cpp @@ -6,8 +6,10 @@ #include "cmakebuildstep.h" #include "cmakebuildsystem.h" #include "cmakeproject.h" +#include "cmakeprojectmanagertr.h" #include + #include #include #include @@ -15,11 +17,11 @@ #include -using namespace CMakeProjectManager; -using namespace CMakeProjectManager::Internal; using namespace ProjectExplorer; using namespace Utils; +namespace CMakeProjectManager::Internal { + // -------------------------------------------------------------------- // CMakeTargetLocatorFilter: // -------------------------------------------------------------------- @@ -93,8 +95,8 @@ void CMakeTargetLocatorFilter::projectListUpdated() BuildCMakeTargetLocatorFilter::BuildCMakeTargetLocatorFilter() { setId("Build CMake target"); - setDisplayName(tr("Build CMake target")); - setDescription(tr("Builds a target of any open CMake project.")); + setDisplayName(Tr::tr("Build CMake target")); + setDescription(Tr::tr("Builds a target of any open CMake project.")); setDefaultShortcutString("cm"); setPriority(High); } @@ -143,8 +145,8 @@ void BuildCMakeTargetLocatorFilter::accept(const Core::LocatorFilterEntry &selec OpenCMakeTargetLocatorFilter::OpenCMakeTargetLocatorFilter() { setId("Open CMake target definition"); - setDisplayName(tr("Open CMake target")); - setDescription(tr("Jumps to the definition of a target of any open CMake project.")); + setDisplayName(Tr::tr("Open CMake target")); + setDescription(Tr::tr("Jumps to the definition of a target of any open CMake project.")); setDefaultShortcutString("cmo"); setPriority(Medium); } @@ -169,3 +171,5 @@ void OpenCMakeTargetLocatorFilter::accept(const Core::LocatorFilterEntry &select else Core::EditorManager::openEditor(file, {}, Core::EditorManager::AllowExternalEditor); } + +} // CMakeProjectManager::Internal diff --git a/src/plugins/cmakeprojectmanager/cmakelocatorfilter.h b/src/plugins/cmakeprojectmanager/cmakelocatorfilter.h index 3385892cbd8..688f6899c79 100644 --- a/src/plugins/cmakeprojectmanager/cmakelocatorfilter.h +++ b/src/plugins/cmakeprojectmanager/cmakelocatorfilter.h @@ -5,13 +5,10 @@ #include -namespace CMakeProjectManager { -namespace Internal { +namespace CMakeProjectManager::Internal { class CMakeTargetLocatorFilter : public Core::ILocatorFilter { - Q_OBJECT - public: CMakeTargetLocatorFilter(); @@ -27,8 +24,6 @@ private: class BuildCMakeTargetLocatorFilter : CMakeTargetLocatorFilter { - Q_OBJECT - public: BuildCMakeTargetLocatorFilter(); @@ -40,8 +35,6 @@ public: class OpenCMakeTargetLocatorFilter : CMakeTargetLocatorFilter { - Q_OBJECT - public: OpenCMakeTargetLocatorFilter(); @@ -51,5 +44,4 @@ public: int *selectionLength) const final; }; -} // namespace Internal -} // namespace CMakeProjectManager +} // CMakeProjectManager::Internal diff --git a/src/plugins/cmakeprojectmanager/cmakeprocess.cpp b/src/plugins/cmakeprojectmanager/cmakeprocess.cpp index fd158ac61e5..00a958b5496 100644 --- a/src/plugins/cmakeprojectmanager/cmakeprocess.cpp +++ b/src/plugins/cmakeprojectmanager/cmakeprocess.cpp @@ -5,6 +5,7 @@ #include "builddirparameters.h" #include "cmakeparser.h" +#include "cmakeprojectmanagertr.h" #include #include @@ -17,12 +18,11 @@ #include +using namespace ProjectExplorer; using namespace Utils; -namespace CMakeProjectManager { -namespace Internal { +namespace CMakeProjectManager::Internal { -using namespace ProjectExplorer; const int USER_STOP_EXIT_CODE = 15; static QString stripTrailingNewline(QString str) @@ -57,7 +57,7 @@ void CMakeProcess::run(const BuildDirParameters ¶meters, const QStringList & if (!cmakeExecutable.ensureReachable(parameters.sourceDirectory) || !cmakeExecutable.ensureReachable(parameters.buildDirectory)) { - QString msg = ::CMakeProjectManager::Internal::CMakeProcess::tr( + QString msg = ::CMakeProjectManager::Tr::tr( "The source or build directory is not reachable by the CMake executable."); BuildSystem::appendBuildSystemOutput(msg + '\n'); emit finished(); @@ -68,8 +68,7 @@ void CMakeProcess::run(const BuildDirParameters ¶meters, const QStringList & const FilePath buildDirectory = parameters.buildDirectory.onDevice(cmakeExecutable); if (!buildDirectory.exists()) { - QString msg = ::CMakeProjectManager::Internal::CMakeProcess::tr( - "The build directory \"%1\" does not exist") + QString msg = ::CMakeProjectManager::Tr::tr( "The build directory \"%1\" does not exist") .arg(buildDirectory.toUserOutput()); BuildSystem::appendBuildSystemOutput(msg + '\n'); emit finished(); @@ -78,9 +77,8 @@ void CMakeProcess::run(const BuildDirParameters ¶meters, const QStringList & if (buildDirectory.needsDevice()) { if (cmake->cmakeExecutable().host() != buildDirectory.host()) { - QString msg = ::CMakeProjectManager::Internal::CMakeProcess::tr( - "CMake executable \"%1\" and build directory " - "\"%2\" must be on the same device.") + QString msg = ::CMakeProjectManager::Tr::tr("CMake executable \"%1\" and build directory " + "\"%2\" must be on the same device.") .arg(cmake->cmakeExecutable().toUserOutput(), buildDirectory.toUserOutput()); BuildSystem::appendBuildSystemOutput(msg + '\n'); @@ -120,15 +118,13 @@ void CMakeProcess::run(const BuildDirParameters ¶meters, const QStringList & TaskHub::clearTasks(ProjectExplorer::Constants::TASK_CATEGORY_BUILDSYSTEM); - BuildSystem::startNewBuildSystemOutput( - ::CMakeProjectManager::Internal::CMakeProcess::tr("Running %1 in %2.") + BuildSystem::startNewBuildSystemOutput(::CMakeProjectManager::Tr::tr("Running %1 in %2.") .arg(commandLine.toUserOutput(), buildDirectory.toUserOutput())); m_futureInterface = QFutureInterface(); m_futureInterface.setProgressRange(0, 1); Core::ProgressManager::addTimedTask(m_futureInterface, - ::CMakeProjectManager::Internal::CMakeProcess::tr( - "Configuring \"%1\"") + ::CMakeProjectManager::Tr::tr("Configuring \"%1\"") .arg(parameters.projectName), "CMake.Configure", 10); @@ -160,17 +156,14 @@ void CMakeProcess::handleProcessDone(const Utils::ProcessResultData &resultData) QString msg; if (resultData.m_error == QProcess::FailedToStart) { - msg = ::CMakeProjectManager::Internal::CMakeProcess::tr("CMake process failed to start."); + msg = ::CMakeProjectManager::Tr::tr("CMake process failed to start."); } else if (resultData.m_exitStatus != QProcess::NormalExit) { if (m_futureInterface.isCanceled() || code == USER_STOP_EXIT_CODE) - msg = ::CMakeProjectManager::Internal::CMakeProcess::tr( - "CMake process was canceled by the user."); + msg = ::CMakeProjectManager::Tr::tr("CMake process was canceled by the user."); else - msg = ::CMakeProjectManager::Internal::CMakeProcess::tr("CMake process crashed."); + msg = ::CMakeProjectManager::Tr::tr("CMake process crashed."); } else if (code != 0) { - msg = ::CMakeProjectManager::Internal::CMakeProcess::tr( - "CMake process exited with exit code %1.") - .arg(code); + msg = ::CMakeProjectManager::Tr::tr("CMake process exited with exit code %1.") .arg(code); } m_lastExitCode = code; @@ -190,5 +183,4 @@ void CMakeProcess::handleProcessDone(const Utils::ProcessResultData &resultData) BuildSystem::appendBuildSystemOutput(elapsedTime + '\n'); } -} // namespace Internal -} // namespace CMakeProjectManager +} // CMakeProjectManager::Internal diff --git a/src/plugins/cmakeprojectmanager/cmakeprocess.h b/src/plugins/cmakeprojectmanager/cmakeprocess.h index cf816c27d0c..31ff1d37c5d 100644 --- a/src/plugins/cmakeprojectmanager/cmakeprocess.h +++ b/src/plugins/cmakeprojectmanager/cmakeprocess.h @@ -22,8 +22,7 @@ class ProcessResultData; class QtcProcess; } -namespace CMakeProjectManager { -namespace Internal { +namespace CMakeProjectManager::Internal { class BuildDirParameters; @@ -55,5 +54,4 @@ private: int m_lastExitCode = 0; }; -} // namespace Internal -} // namespace CMakeProjectManager +} // CMakeProjectManager::Internal diff --git a/src/plugins/cmakeprojectmanager/cmakeproject.cpp b/src/plugins/cmakeprojectmanager/cmakeproject.cpp index e3873d35df5..8be9be049e9 100644 --- a/src/plugins/cmakeprojectmanager/cmakeproject.cpp +++ b/src/plugins/cmakeprojectmanager/cmakeproject.cpp @@ -6,6 +6,7 @@ #include "cmakekitinformation.h" #include "cmakeprojectconstants.h" #include "cmakeprojectimporter.h" +#include "cmakeprojectmanagertr.h" #include "cmaketool.h" #include @@ -19,11 +20,10 @@ using namespace ProjectExplorer; using namespace Utils; +using namespace CMakeProjectManager::Internal; namespace CMakeProjectManager { -using namespace Internal; - /*! \class CMakeProject */ @@ -49,9 +49,9 @@ Tasks CMakeProject::projectIssues(const Kit *k) const Tasks result = Project::projectIssues(k); if (!CMakeKitAspect::cmakeTool(k)) - result.append(createProjectTask(Task::TaskType::Error, tr("No cmake tool set."))); + result.append(createProjectTask(Task::TaskType::Error, Tr::tr("No cmake tool set."))); if (ToolChainKitAspect::toolChains(k).isEmpty()) - result.append(createProjectTask(Task::TaskType::Warning, tr("No compilers set in kit."))); + result.append(createProjectTask(Task::TaskType::Warning, Tr::tr("No compilers set in kit."))); result.append(m_issues); @@ -115,7 +115,7 @@ Internal::PresetsData CMakeProject::combinePresets(Internal::PresetsData &cmakeP if (presetsHash.contains(p.name)) { TaskHub::addTask( BuildSystemTask(Task::TaskType::Error, - tr("CMakeUserPresets.json cannot re-define the %1 preset: %2") + Tr::tr("CMakeUserPresets.json cannot re-define the %1 preset: %2") .arg(presetType) .arg(p.name), "CMakeUserPresets.json")); @@ -158,7 +158,7 @@ void CMakeProject::setupBuildPresets(Internal::PresetsData &presetsData) if (!buildPreset.configurePreset) { TaskHub::addTask(BuildSystemTask( Task::TaskType::Error, - tr("Build preset %1 is missing a corresponding configure preset.") + Tr::tr("Build preset %1 is missing a corresponding configure preset.") .arg(buildPreset.name))); TaskHub::requestPopup(); } @@ -189,7 +189,7 @@ void CMakeProject::readPresets() data = parser.presetsData(); } else { TaskHub::addTask(BuildSystemTask(Task::TaskType::Error, - tr("Failed to load %1: %2") + Tr::tr("Failed to load %1: %2") .arg(presetFile.fileName()) .arg(errorMessage), presetFile, diff --git a/src/plugins/cmakeprojectmanager/cmakeprojectimporter.cpp b/src/plugins/cmakeprojectmanager/cmakeprojectimporter.cpp index 7eab725f955..be51a7d47cb 100644 --- a/src/plugins/cmakeprojectmanager/cmakeprojectimporter.cpp +++ b/src/plugins/cmakeprojectmanager/cmakeprojectimporter.cpp @@ -6,6 +6,7 @@ #include "cmakebuildconfiguration.h" #include "cmakekitinformation.h" #include "cmakeprojectconstants.h" +#include "cmakeprojectmanagertr.h" #include "cmaketoolmanager.h" #include "presetsmacros.h" @@ -488,7 +489,7 @@ QList CMakeProjectImporter::examineDirectory(const FilePath &importPath, .canonicalPath(); const FilePath canonicalProjectDirectory = projectDirectory().canonicalPath(); if (data->cmakeHomeDirectory != canonicalProjectDirectory) { - *warningMessage = tr("Unexpected source directory \"%1\", expected \"%2\". " + *warningMessage = Tr::tr("Unexpected source directory \"%1\", expected \"%2\". " "This can be correct in some situations, for example when " "importing a standalone Qt test, but usually this is an error. " "Import the build anyway?") diff --git a/src/plugins/cmakeprojectmanager/cmakeprojectimporter.h b/src/plugins/cmakeprojectmanager/cmakeprojectimporter.h index 52f3c1dc0df..f4f66d47faa 100644 --- a/src/plugins/cmakeprojectmanager/cmakeprojectimporter.h +++ b/src/plugins/cmakeprojectmanager/cmakeprojectimporter.h @@ -16,8 +16,6 @@ namespace Internal { class CMakeProjectImporter : public QtSupport::QtProjectImporter { - Q_DECLARE_TR_FUNCTIONS(CMakeProjectManager::Internal::CMakeProjectImporter) - public: CMakeProjectImporter(const Utils::FilePath &path, const Internal::PresetsData &presetsData); diff --git a/src/plugins/cmakeprojectmanager/cmakeprojectmanager.cpp b/src/plugins/cmakeprojectmanager/cmakeprojectmanager.cpp index fd7e1de31b8..33d9684acbc 100644 --- a/src/plugins/cmakeprojectmanager/cmakeprojectmanager.cpp +++ b/src/plugins/cmakeprojectmanager/cmakeprojectmanager.cpp @@ -7,6 +7,7 @@ #include "cmakekitinformation.h" #include "cmakeproject.h" #include "cmakeprojectconstants.h" +#include "cmakeprojectmanagertr.h" #include "cmakeprojectnodes.h" #include @@ -32,10 +33,10 @@ using namespace ProjectExplorer; using namespace CMakeProjectManager::Internal; CMakeManager::CMakeManager() - : m_runCMakeAction(new QAction(QIcon(), tr("Run CMake"), this)) - , m_clearCMakeCacheAction(new QAction(QIcon(), tr("Clear CMake Configuration"), this)) - , m_runCMakeActionContextMenu(new QAction(QIcon(), tr("Run CMake"), this)) - , m_rescanProjectAction(new QAction(QIcon(), tr("Rescan Project"), this)) + : m_runCMakeAction(new QAction(QIcon(), Tr::tr("Run CMake"), this)) + , m_clearCMakeCacheAction(new QAction(QIcon(), Tr::tr("Clear CMake Configuration"), this)) + , m_runCMakeActionContextMenu(new QAction(QIcon(), Tr::tr("Run CMake"), this)) + , m_rescanProjectAction(new QAction(QIcon(), Tr::tr("Rescan Project"), this)) { Core::ActionContainer *mbuild = Core::ActionManager::actionContainer(ProjectExplorer::Constants::M_BUILDPROJECT); @@ -77,7 +78,7 @@ CMakeManager::CMakeManager() runCMake(ProjectTree::currentBuildSystem()); }); - m_buildFileContextMenu = new QAction(tr("Build"), this); + m_buildFileContextMenu = new QAction(Tr::tr("Build"), this); command = Core::ActionManager::registerAction(m_buildFileContextMenu, Constants::BUILD_FILE_CONTEXT_MENU, projectContext); @@ -95,15 +96,15 @@ CMakeManager::CMakeManager() rescanProject(ProjectTree::currentBuildSystem()); }); - m_buildFileAction = new Utils::ParameterAction(tr("Build File"), - tr("Build File \"%1\""), + m_buildFileAction = new Utils::ParameterAction(Tr::tr("Build File"), + Tr::tr("Build File \"%1\""), Utils::ParameterAction::AlwaysEnabled, this); command = Core::ActionManager::registerAction(m_buildFileAction, Constants::BUILD_FILE); command->setAttribute(Core::Command::CA_Hide); command->setAttribute(Core::Command::CA_UpdateText); command->setDescription(m_buildFileAction->text()); - command->setDefaultKeySequence(QKeySequence(tr("Ctrl+Alt+B"))); + command->setDefaultKeySequence(QKeySequence(Tr::tr("Ctrl+Alt+B"))); mbuild->addAction(command, ProjectExplorer::Constants::G_BUILD_BUILD); connect(m_buildFileAction, &QAction::triggered, this, [this] { buildFile(); }); @@ -230,7 +231,7 @@ void CMakeManager::buildFile(Node *node) targetBase = relativeBuildDir / "CMakeFiles" / (targetNode->displayName() + ".dir"); } else if (!generator.contains("Makefiles")) { Core::MessageManager::writeFlashing( - tr("Build File is not supported for generator \"%1\"").arg(generator)); + Tr::tr("Build File is not supported for generator \"%1\"").arg(generator)); return; } diff --git a/src/plugins/cmakeprojectmanager/cmakeprojectnodes.cpp b/src/plugins/cmakeprojectmanager/cmakeprojectnodes.cpp index 3cb364a08ad..fb634398224 100644 --- a/src/plugins/cmakeprojectmanager/cmakeprojectnodes.cpp +++ b/src/plugins/cmakeprojectmanager/cmakeprojectnodes.cpp @@ -5,29 +5,32 @@ #include "cmakebuildsystem.h" #include "cmakeprojectconstants.h" +#include "cmakeprojectmanagertr.h" #include + #include + #include #include #include using namespace ProjectExplorer; +using namespace Utils; -namespace CMakeProjectManager { -namespace Internal { +namespace CMakeProjectManager::Internal { -CMakeInputsNode::CMakeInputsNode(const Utils::FilePath &cmakeLists) : +CMakeInputsNode::CMakeInputsNode(const FilePath &cmakeLists) : ProjectExplorer::ProjectNode(cmakeLists) { setPriority(Node::DefaultPriority - 10); // Bottom most! - setDisplayName(QCoreApplication::translate("CMakeFilesProjectNode", "CMake Modules")); + setDisplayName(Tr::tr("CMake Modules")); setIcon(DirectoryIcon(ProjectExplorer::Constants::FILEOVERLAY_MODULES)); setListInProject(false); } -CMakeListsNode::CMakeListsNode(const Utils::FilePath &cmakeListPath) : +CMakeListsNode::CMakeListsNode(const FilePath &cmakeListPath) : ProjectExplorer::ProjectNode(cmakeListPath) { setIcon(DirectoryIcon(Constants::Icons::FILE_OVERLAY)); @@ -39,12 +42,12 @@ bool CMakeListsNode::showInSimpleTree() const return false; } -std::optional CMakeListsNode::visibleAfterAddFileAction() const +std::optional CMakeListsNode::visibleAfterAddFileAction() const { return filePath().pathAppended("CMakeLists.txt"); } -CMakeProjectNode::CMakeProjectNode(const Utils::FilePath &directory) : +CMakeProjectNode::CMakeProjectNode(const FilePath &directory) : ProjectExplorer::ProjectNode(directory) { setPriority(Node::DefaultProjectPriority + 1000); @@ -57,7 +60,7 @@ QString CMakeProjectNode::tooltip() const return QString(); } -CMakeTargetNode::CMakeTargetNode(const Utils::FilePath &directory, const QString &target) : +CMakeTargetNode::CMakeTargetNode(const FilePath &directory, const QString &target) : ProjectExplorer::ProjectNode(directory) { m_target = target; @@ -77,17 +80,17 @@ QString CMakeTargetNode::buildKey() const return m_target; } -Utils::FilePath CMakeTargetNode::buildDirectory() const +FilePath CMakeTargetNode::buildDirectory() const { return m_buildDirectory; } -void CMakeTargetNode::setBuildDirectory(const Utils::FilePath &directory) +void CMakeTargetNode::setBuildDirectory(const FilePath &directory) { m_buildDirectory = directory; } -QVariant CMakeTargetNode::data(Utils::Id role) const +QVariant CMakeTargetNode::data(Id role) const { auto value = [this](const QByteArray &key) -> QVariant { for (const CMakeConfigItem &configItem : m_config) { @@ -169,7 +172,7 @@ void CMakeTargetNode::setConfig(const CMakeConfig &config) m_config = config; } -std::optional CMakeTargetNode::visibleAfterAddFileAction() const +std::optional CMakeTargetNode::visibleAfterAddFileAction() const { return filePath().pathAppended("CMakeLists.txt"); } @@ -182,19 +185,16 @@ void CMakeTargetNode::build() static_cast(t->buildSystem())->buildCMakeTarget(displayName()); } -void CMakeTargetNode::setTargetInformation(const QList &artifacts, - const QString &type) +void CMakeTargetNode::setTargetInformation(const QList &artifacts, const QString &type) { - m_tooltip = QCoreApplication::translate("CMakeTargetNode", "Target type: ") + type + "
"; + m_tooltip = Tr::tr("Target type: ") + type + "
"; if (artifacts.isEmpty()) { - m_tooltip += QCoreApplication::translate("CMakeTargetNode", "No build artifacts"); + m_tooltip += Tr::tr("No build artifacts"); } else { - const QStringList tmp = Utils::transform(artifacts, &Utils::FilePath::toUserOutput); - m_tooltip += QCoreApplication::translate("CMakeTargetNode", "Build artifacts:") + "
" - + tmp.join("
"); + const QStringList tmp = Utils::transform(artifacts, &FilePath::toUserOutput); + m_tooltip += Tr::tr("Build artifacts:") + "
" + tmp.join("
"); m_artifact = artifacts.first(); } } -} // Internal -} // CMakeBuildSystem +} // CMakeProjectManager::Internal diff --git a/src/plugins/cmakeprojectmanager/cmakeprojectnodes.h b/src/plugins/cmakeprojectmanager/cmakeprojectnodes.h index 05f081bf994..2de51c592bd 100644 --- a/src/plugins/cmakeprojectmanager/cmakeprojectnodes.h +++ b/src/plugins/cmakeprojectmanager/cmakeprojectnodes.h @@ -7,8 +7,7 @@ #include -namespace CMakeProjectManager { -namespace Internal { +namespace CMakeProjectManager::Internal { class CMakeInputsNode : public ProjectExplorer::ProjectNode { @@ -59,5 +58,4 @@ private: CMakeConfig m_config; }; -} // namespace Internal -} // namespace CMakeProjectManager +} // CMakeProjectManager::Internal diff --git a/src/plugins/cmakeprojectmanager/cmakeprojectplugin.cpp b/src/plugins/cmakeprojectmanager/cmakeprojectplugin.cpp index e543f02f866..0178164b39c 100644 --- a/src/plugins/cmakeprojectmanager/cmakeprojectplugin.cpp +++ b/src/plugins/cmakeprojectmanager/cmakeprojectplugin.cpp @@ -12,6 +12,7 @@ #include "cmakeproject.h" #include "cmakeprojectconstants.h" #include "cmakeprojectmanager.h" +#include "cmakeprojectmanagertr.h" #include "cmakeprojectnodes.h" #include "cmakesettingspage.h" #include "cmakespecificsettings.h" @@ -20,9 +21,11 @@ #include #include #include + #include #include #include + #include #include @@ -32,8 +35,7 @@ using namespace Core; using namespace ProjectExplorer; using namespace Utils; -namespace CMakeProjectManager { -namespace Internal { +namespace CMakeProjectManager::Internal { class CMakeProjectPluginPrivate { @@ -41,8 +43,8 @@ public: CMakeToolManager cmakeToolManager; // have that before the first CMakeKitAspect ParameterAction buildTargetContextAction{ - CMakeProjectPlugin::tr("Build"), - CMakeProjectPlugin:: tr("Build \"%1\""), + Tr::tr("Build"), + Tr::tr("Build \"%1\""), ParameterAction::AlwaysEnabled/*handled manually*/ }; @@ -86,7 +88,7 @@ bool CMakeProjectPlugin::initialize(const QStringList & /*arguments*/, QString * "CMakeLists.txt"); TextEditor::SnippetProvider::registerGroup(Constants::CMAKE_SNIPPETS_GROUP_ID, - tr("CMake", "SnippetProvider")); + Tr::tr("CMake", "SnippetProvider")); ProjectManager::registerProjectType(Constants::CMAKE_PROJECT_MIMETYPE); //register actions @@ -131,6 +133,5 @@ void CMakeProjectPlugin::updateContextActions(Node *node) d->buildTargetContextAction.setVisible(targetNode); } -} // Internal -} // CMakeProjectManager +} // CMakeProjectManager::Internal diff --git a/src/plugins/cmakeprojectmanager/cmakeprojectplugin.h b/src/plugins/cmakeprojectmanager/cmakeprojectplugin.h index 288500fc82b..9ff1ae68bdf 100644 --- a/src/plugins/cmakeprojectmanager/cmakeprojectplugin.h +++ b/src/plugins/cmakeprojectmanager/cmakeprojectplugin.h @@ -7,8 +7,7 @@ namespace ProjectExplorer { class Node; } -namespace CMakeProjectManager { -namespace Internal { +namespace CMakeProjectManager::Internal { class CMakeSpecificSettings; @@ -45,5 +44,4 @@ private: class CMakeProjectPluginPrivate *d = nullptr; }; -} // namespace Internal -} // namespace CMakeProjectManager +} // CMakeProjectManager::Internal diff --git a/src/plugins/cmakeprojectmanager/cmakesettingspage.cpp b/src/plugins/cmakeprojectmanager/cmakesettingspage.cpp index 2afaa5c81af..319e35b6858 100644 --- a/src/plugins/cmakeprojectmanager/cmakesettingspage.cpp +++ b/src/plugins/cmakeprojectmanager/cmakesettingspage.cpp @@ -4,6 +4,7 @@ #include "cmakesettingspage.h" #include "cmakeprojectconstants.h" +#include "cmakeprojectmanagertr.h" #include "cmaketool.h" #include "cmaketoolmanager.h" @@ -21,32 +22,26 @@ #include #include -#include -#include #include #include #include #include #include -#include #include #include using namespace Utils; -namespace CMakeProjectManager { -namespace Internal { +namespace CMakeProjectManager::Internal { class CMakeToolTreeItem; -// -------------------------------------------------------------------------- +// // CMakeToolItemModel -// -------------------------------------------------------------------------- +// class CMakeToolItemModel : public TreeModel { - Q_DECLARE_TR_FUNCTIONS(CMakeProjectManager::CMakeSettingsPage) - public: CMakeToolItemModel(); @@ -80,8 +75,6 @@ private: class CMakeToolTreeItem : public TreeItem { - Q_DECLARE_TR_FUNCTIONS(CMakeProjectManager::CMakeSettingsPage) - public: CMakeToolTreeItem(const CMakeTool *item, bool changed) : m_id(item->id()) @@ -103,7 +96,7 @@ public: const FilePath &qchFile, bool autoRun, bool autodetected) - : m_id(Utils::Id::fromString(QUuid::createUuid().toString())) + : m_id(Id::fromString(QUuid::createUuid().toString())) , m_name(name) , m_executable(executable) , m_qchFile(qchFile) @@ -125,9 +118,9 @@ public: cmake.setFilePath(m_executable); m_isSupported = cmake.hasFileApi(); - m_tooltip = tr("Version: %1").arg(cmake.versionDisplay()); - m_tooltip += "
" + tr("Supports fileApi: %1").arg(m_isSupported ? tr("yes") : tr("no")); - m_tooltip += "
" + tr("Detection source: \"%1\"").arg(m_detectionSource); + m_tooltip = Tr::tr("Version: %1").arg(cmake.versionDisplay()); + m_tooltip += "
" + Tr::tr("Supports fileApi: %1").arg(m_isSupported ? Tr::tr("yes") : Tr::tr("no")); + m_tooltip += "
" + Tr::tr("Detection source: \"%1\"").arg(m_detectionSource); m_versionDisplay = cmake.versionDisplay(); } @@ -144,7 +137,7 @@ public: case 0: { QString name = m_name; if (model()->defaultItemId() == m_id) - name += tr(" (Default)"); + name += Tr::tr(" (Default)"); return name; } case 1: { @@ -163,20 +156,13 @@ public: QString result = m_tooltip; QString error; if (!m_pathExists) { - error = QCoreApplication::translate( - "CMakeProjectManager::Internal::CMakeToolTreeItem", - "CMake executable path does not exist."); + error = Tr::tr("CMake executable path does not exist."); } else if (!m_pathIsFile) { - error = QCoreApplication::translate( - "CMakeProjectManager::Internal::CMakeToolTreeItem", - "CMake executable path is not a file."); + error = Tr::tr("CMake executable path is not a file."); } else if (!m_pathIsExecutable) { - error = QCoreApplication::translate( - "CMakeProjectManager::Internal::CMakeToolTreeItem", - "CMake executable path is not executable."); + error = Tr::tr("CMake executable path is not executable."); } else if (!m_isSupported) { - error = QCoreApplication::translate( - "CMakeProjectManager::Internal::CMakeToolTreeItem", + error = Tr::tr( "CMake executable does not provide required IDE integration features."); } if (result.isEmpty() || error.isEmpty()) @@ -191,14 +177,14 @@ public: const bool hasError = !m_isSupported || !m_pathExists || !m_pathIsFile || !m_pathIsExecutable; if (hasError) - return Utils::Icons::CRITICAL.icon(); + return Icons::CRITICAL.icon(); return QVariant(); } } return QVariant(); } - Utils::Id m_id; + Id m_id; QString m_name; QString m_tooltip; FilePath m_executable; @@ -216,22 +202,22 @@ public: CMakeToolItemModel::CMakeToolItemModel() { - setHeader({tr("Name"), tr("Path")}); + setHeader({Tr::tr("Name"), Tr::tr("Path")}); rootItem()->appendChild( new StaticTreeItem({ProjectExplorer::Constants::msgAutoDetected()}, {ProjectExplorer::Constants::msgAutoDetectedToolTip()})); - rootItem()->appendChild(new StaticTreeItem(tr("Manual"))); + rootItem()->appendChild(new StaticTreeItem(Tr::tr("Manual"))); const QList items = CMakeToolManager::cmakeTools(); for (const CMakeTool *item : items) addCMakeTool(item, false); CMakeTool *defTool = CMakeToolManager::defaultCMakeTool(); - m_defaultItemId = defTool ? defTool->id() : Utils::Id(); + m_defaultItemId = defTool ? defTool->id() : Id(); connect(CMakeToolManager::instance(), &CMakeToolManager::cmakeRemoved, this, &CMakeToolItemModel::removeCMakeTool); connect(CMakeToolManager::instance(), &CMakeToolManager::cmakeAdded, - this, [this](const Utils::Id &id) { addCMakeTool(CMakeToolManager::findById(id), false); }); + this, [this](const Id &id) { addCMakeTool(CMakeToolManager::findById(id), false); }); } @@ -283,7 +269,7 @@ void CMakeToolItemModel::reevaluateChangedFlag(CMakeToolTreeItem *item) const //make sure the item is marked as changed when the default cmake was changed CMakeTool *origDefTool = CMakeToolManager::defaultCMakeTool(); - Utils::Id origDefault = origDefTool ? origDefTool->id() : Utils::Id(); + Id origDefault = origDefTool ? origDefTool->id() : Id(); if (origDefault != m_defaultItemId) { if (item->m_id == origDefault || item->m_id == m_defaultItemId) item->m_changed = true; @@ -292,7 +278,7 @@ void CMakeToolItemModel::reevaluateChangedFlag(CMakeToolTreeItem *item) const item->update(); // Notify views. } -void CMakeToolItemModel::updateCMakeTool(const Utils::Id &id, +void CMakeToolItemModel::updateCMakeTool(const Id &id, const QString &displayName, const FilePath &executable, const FilePath &qchFile, @@ -311,7 +297,7 @@ void CMakeToolItemModel::updateCMakeTool(const Utils::Id &id, reevaluateChangedFlag(treeItem); } -CMakeToolTreeItem *CMakeToolItemModel::cmakeToolItem(const Utils::Id &id) const +CMakeToolTreeItem *CMakeToolItemModel::cmakeToolItem(const Id &id) const { return findItemAtLevel<2>([id](CMakeToolTreeItem *n) { return n->m_id == id; }); } @@ -321,7 +307,7 @@ CMakeToolTreeItem *CMakeToolItemModel::cmakeToolItem(const QModelIndex &index) c return itemForIndexAtLevel<2>(index); } -void CMakeToolItemModel::removeCMakeTool(const Utils::Id &id) +void CMakeToolItemModel::removeCMakeTool(const Id &id) { if (m_removedItems.contains(id)) return; // Item has already been removed in the model! @@ -335,7 +321,7 @@ void CMakeToolItemModel::removeCMakeTool(const Utils::Id &id) void CMakeToolItemModel::apply() { - for (const Utils::Id &id : qAsConst(m_removedItems)) + for (const Id &id : qAsConst(m_removedItems)) CMakeToolManager::deregisterCMakeTool(id); QList toRegister; @@ -367,17 +353,17 @@ void CMakeToolItemModel::apply() CMakeToolManager::setDefaultCMakeTool(defaultItemId()); } -Utils::Id CMakeToolItemModel::defaultItemId() const +Id CMakeToolItemModel::defaultItemId() const { return m_defaultItemId; } -void CMakeToolItemModel::setDefaultItemId(const Utils::Id &id) +void CMakeToolItemModel::setDefaultItemId(const Id &id) { if (m_defaultItemId == id) return; - Utils::Id oldDefaultId = m_defaultItemId; + Id oldDefaultId = m_defaultItemId; m_defaultItemId = id; CMakeToolTreeItem *newDefault = cmakeToolItem(id); @@ -397,14 +383,12 @@ QString CMakeToolItemModel::uniqueDisplayName(const QString &base) const return Utils::makeUniquelyNumbered(base, names); } -// ----------------------------------------------------------------------- +// // CMakeToolItemConfigWidget -// ----------------------------------------------------------------------- +// class CMakeToolItemConfigWidget : public QWidget { - Q_DECLARE_TR_FUNCTIONS(CMakeProjectManager::CMakeSettingsPage) - public: explicit CMakeToolItemConfigWidget(CMakeToolItemModel *model); void load(const CMakeToolTreeItem *item); @@ -420,7 +404,7 @@ private: PathChooser *m_binaryChooser; PathChooser *m_qchFileChooser; QLabel *m_versionLabel; - Utils::Id m_id; + Id m_id; bool m_loadingItem; }; @@ -440,20 +424,20 @@ CMakeToolItemConfigWidget::CMakeToolItemConfigWidget(CMakeToolItemModel *model) m_qchFileChooser->setMinimumWidth(400); m_qchFileChooser->setHistoryCompleter(QLatin1String("Cmake.qchFile.History")); m_qchFileChooser->setPromptDialogFilter("*.qch"); - m_qchFileChooser->setPromptDialogTitle(tr("CMake .qch File")); + m_qchFileChooser->setPromptDialogTitle(Tr::tr("CMake .qch File")); m_versionLabel = new QLabel(this); m_autoRunCheckBox = new QCheckBox; - m_autoRunCheckBox->setText(tr("Autorun CMake")); - m_autoRunCheckBox->setToolTip(tr("Automatically run CMake after changes to CMake project files.")); + m_autoRunCheckBox->setText(Tr::tr("Autorun CMake")); + m_autoRunCheckBox->setToolTip(Tr::tr("Automatically run CMake after changes to CMake project files.")); auto formLayout = new QFormLayout(this); formLayout->setFieldGrowthPolicy(QFormLayout::AllNonFixedFieldsGrow); - formLayout->addRow(new QLabel(tr("Name:")), m_displayNameLineEdit); - formLayout->addRow(new QLabel(tr("Path:")), m_binaryChooser); - formLayout->addRow(new QLabel(tr("Version:")), m_versionLabel); - formLayout->addRow(new QLabel(tr("Help file:")), m_qchFileChooser); + formLayout->addRow(new QLabel(Tr::tr("Name:")), m_displayNameLineEdit); + formLayout->addRow(new QLabel(Tr::tr("Path:")), m_binaryChooser); + formLayout->addRow(new QLabel(Tr::tr("Version:")), m_versionLabel); + formLayout->addRow(new QLabel(Tr::tr("Help file:")), m_qchFileChooser); formLayout->addRow(m_autoRunCheckBox); connect(m_binaryChooser, &PathChooser::browsingFinished, this, &CMakeToolItemConfigWidget::onBinaryPathEditingFinished); @@ -489,7 +473,7 @@ void CMakeToolItemConfigWidget::updateQchFilePath() void CMakeToolItemConfigWidget::load(const CMakeToolTreeItem *item) { m_loadingItem = true; // avoid intermediate signal handling - m_id = Utils::Id(); + m_id = Id(); if (!item) { m_loadingItem = false; return; @@ -514,28 +498,26 @@ void CMakeToolItemConfigWidget::load(const CMakeToolTreeItem *item) m_loadingItem = false; } -// -------------------------------------------------------------------------- +// // CMakeToolConfigWidget -// -------------------------------------------------------------------------- +// class CMakeToolConfigWidget : public Core::IOptionsPageWidget { - Q_DECLARE_TR_FUNCTIONS(CMakeProjectManager::Internal::CMakeToolConfigWidget) - public: CMakeToolConfigWidget() { - m_addButton = new QPushButton(tr("Add"), this); + m_addButton = new QPushButton(Tr::tr("Add"), this); - m_cloneButton = new QPushButton(tr("Clone"), this); + m_cloneButton = new QPushButton(Tr::tr("Clone"), this); m_cloneButton->setEnabled(false); - m_delButton = new QPushButton(tr("Remove"), this); + m_delButton = new QPushButton(Tr::tr("Remove"), this); m_delButton->setEnabled(false); - m_makeDefButton = new QPushButton(tr("Make Default"), this); + m_makeDefButton = new QPushButton(Tr::tr("Make Default"), this); m_makeDefButton->setEnabled(false); - m_makeDefButton->setToolTip(tr("Set as the default CMake Tool to use when creating a new kit or when no value is set.")); + m_makeDefButton->setToolTip(Tr::tr("Set as the default CMake Tool to use when creating a new kit or when no value is set.")); m_container = new DetailsWidget(this); m_container->setState(DetailsWidget::NoSummary); @@ -616,7 +598,7 @@ void CMakeToolConfigWidget::cloneCMakeTool() if (!m_currentItem) return; - QModelIndex newItem = m_model.addCMakeTool(tr("Clone of %1").arg(m_currentItem->m_name), + QModelIndex newItem = m_model.addCMakeTool(Tr::tr("Clone of %1").arg(m_currentItem->m_name), m_currentItem->m_executable, m_currentItem->m_qchFile, m_currentItem->m_isAutoRun, @@ -627,7 +609,7 @@ void CMakeToolConfigWidget::cloneCMakeTool() void CMakeToolConfigWidget::addCMakeTool() { - QModelIndex newItem = m_model.addCMakeTool(m_model.uniqueDisplayName(tr("New CMake")), + QModelIndex newItem = m_model.addCMakeTool(m_model.uniqueDisplayName(Tr::tr("New CMake")), FilePath(), FilePath(), true, @@ -677,18 +659,17 @@ void CMakeToolConfigWidget::currentCMakeToolChanged(const QModelIndex &newCurren m_makeDefButton->setEnabled(m_currentItem && (!m_model.defaultItemId().isValid() || m_currentItem->m_id != m_model.defaultItemId())); } -///// +// // CMakeSettingsPage -//// +// CMakeSettingsPage::CMakeSettingsPage() { setId(Constants::Settings::TOOLS_ID); - setDisplayName(tr("Tools")); + setDisplayName(Tr::Tr::tr("Tools")); setDisplayCategory("CMake"); setCategory(Constants::Settings::CATEGORY); setWidgetCreator([] { return new CMakeToolConfigWidget; }); } -} // namespace Internal -} // namespace CMakeProjectManager +} // CMakeProjectManager::Internal diff --git a/src/plugins/cmakeprojectmanager/cmakesettingspage.h b/src/plugins/cmakeprojectmanager/cmakesettingspage.h index 54f86b1a9c9..803a1216e36 100644 --- a/src/plugins/cmakeprojectmanager/cmakesettingspage.h +++ b/src/plugins/cmakeprojectmanager/cmakesettingspage.h @@ -5,8 +5,7 @@ #include -namespace CMakeProjectManager { -namespace Internal { +namespace CMakeProjectManager::Internal { class CMakeSettingsPage final : public Core::IOptionsPage { @@ -14,5 +13,4 @@ public: CMakeSettingsPage(); }; -} // namespace Internal -} // namespace CMakeProjectManager +} // CMakeProjectManager::Internal diff --git a/src/plugins/cmakeprojectmanager/cmakespecificsettings.cpp b/src/plugins/cmakeprojectmanager/cmakespecificsettings.cpp index 00c8ad6fe7f..b87e539b881 100644 --- a/src/plugins/cmakeprojectmanager/cmakespecificsettings.cpp +++ b/src/plugins/cmakeprojectmanager/cmakespecificsettings.cpp @@ -1,9 +1,11 @@ // Copyright (C) 2018 The Qt Company Ltd. // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0+ OR GPL-3.0 WITH Qt-GPL-exception-1.0 -#include "cmakeprojectconstants.h" #include "cmakespecificsettings.h" +#include "cmakeprojectconstants.h" +#include "cmakeprojectmanagertr.h" + #include #include @@ -11,8 +13,7 @@ using namespace Utils; -namespace CMakeProjectManager { -namespace Internal { +namespace CMakeProjectManager::Internal { CMakeSpecificSettings::CMakeSpecificSettings() { @@ -25,10 +26,10 @@ CMakeSpecificSettings::CMakeSpecificSettings() registerAspect(&afterAddFileSetting); afterAddFileSetting.setSettingsKey("ProjectPopupSetting"); afterAddFileSetting.setDefaultValue(AfterAddFileAction::AskUser); - afterAddFileSetting.addOption(tr("Ask about copying file paths")); - afterAddFileSetting.addOption(tr("Do not copy file paths")); - afterAddFileSetting.addOption(tr("Copy file paths")); - afterAddFileSetting.setToolTip(tr("Determines whether file paths are copied " + afterAddFileSetting.addOption(::CMakeProjectManager::Tr::tr("Ask about copying file paths")); + afterAddFileSetting.addOption(::CMakeProjectManager::Tr::tr("Do not copy file paths")); + afterAddFileSetting.addOption(::CMakeProjectManager::Tr::tr("Copy file paths")); + afterAddFileSetting.setToolTip(::CMakeProjectManager::Tr::tr("Determines whether file paths are copied " "to the clipboard for pasting to the CMakeLists.txt file when you " "add new files to CMake projects.")); @@ -41,21 +42,22 @@ CMakeSpecificSettings::CMakeSpecificSettings() registerAspect(&packageManagerAutoSetup); packageManagerAutoSetup.setSettingsKey("PackageManagerAutoSetup"); packageManagerAutoSetup.setDefaultValue(false); - packageManagerAutoSetup.setLabelText(tr("Package manager auto setup")); - packageManagerAutoSetup.setToolTip(tr("Add the CMAKE_PROJECT_INCLUDE_BEFORE variable " + packageManagerAutoSetup.setLabelText(::CMakeProjectManager::Tr::tr("Package manager auto setup")); + packageManagerAutoSetup.setToolTip(::CMakeProjectManager::Tr::tr("Add the CMAKE_PROJECT_INCLUDE_BEFORE variable " "pointing to a CMake script that will install dependencies from the conanfile.txt, " "conanfile.py, or vcpkg.json file from the project source directory.")); registerAspect(&askBeforeReConfigureInitialParams); askBeforeReConfigureInitialParams.setSettingsKey("AskReConfigureInitialParams"); askBeforeReConfigureInitialParams.setDefaultValue(true); - askBeforeReConfigureInitialParams.setLabelText(tr("Ask before re-configuring with " + askBeforeReConfigureInitialParams.setLabelText(::CMakeProjectManager::Tr::tr("Ask before re-configuring with " "initial parameters")); registerAspect(&showSourceSubFolders); showSourceSubFolders.setSettingsKey("ShowSourceSubFolders"); showSourceSubFolders.setDefaultValue(true); - showSourceSubFolders.setLabelText(tr("Show subfolders inside source group folders")); + showSourceSubFolders.setLabelText( + ::CMakeProjectManager::Tr::tr("Show subfolders inside source group folders")); } // CMakeSpecificSettingsPage @@ -63,7 +65,7 @@ CMakeSpecificSettings::CMakeSpecificSettings() CMakeSpecificSettingsPage::CMakeSpecificSettingsPage(CMakeSpecificSettings *settings) { setId(Constants::Settings::GENERAL_ID); - setDisplayName(tr("General")); + setDisplayName(::CMakeProjectManager::Tr::tr("General")); setDisplayCategory("CMake"); setCategory(Constants::Settings::CATEGORY); setCategoryIconPath(Constants::Icons::SETTINGS_CATEGORY); @@ -74,7 +76,7 @@ CMakeSpecificSettingsPage::CMakeSpecificSettingsPage(CMakeSpecificSettings *sett using namespace Layouting; Column { Group { - title(::CMakeProjectManager::Internal::CMakeSpecificSettings::tr("Adding Files")), + title(::CMakeProjectManager::Tr::tr("Adding Files")), Column { s.afterAddFileSetting } }, s.packageManagerAutoSetup, @@ -85,5 +87,4 @@ CMakeSpecificSettingsPage::CMakeSpecificSettingsPage(CMakeSpecificSettings *sett }); } -} // Internal -} // CMakeProjectManager +} // CMakeProjectManager::Internal diff --git a/src/plugins/cmakeprojectmanager/cmakespecificsettings.h b/src/plugins/cmakeprojectmanager/cmakespecificsettings.h index dce62f23140..6fccc790b9e 100644 --- a/src/plugins/cmakeprojectmanager/cmakespecificsettings.h +++ b/src/plugins/cmakeprojectmanager/cmakespecificsettings.h @@ -7,8 +7,7 @@ #include -namespace CMakeProjectManager { -namespace Internal { +namespace CMakeProjectManager::Internal { enum AfterAddFileAction : int { AskUser, @@ -18,8 +17,6 @@ enum AfterAddFileAction : int { class CMakeSpecificSettings final : public Utils::AspectContainer { - Q_DECLARE_TR_FUNCTIONS(CMakeProjectManager::Internal::CMakeSpecificSettings) - public: CMakeSpecificSettings(); @@ -36,5 +33,4 @@ public: explicit CMakeSpecificSettingsPage(CMakeSpecificSettings *settings); }; -} // Internal -} // CMakeProjectManager +} // CMakeProjectManager::Internal diff --git a/src/plugins/cmakeprojectmanager/cmaketool.cpp b/src/plugins/cmakeprojectmanager/cmaketool.cpp index 7b9f699f067..5d82561d68b 100644 --- a/src/plugins/cmakeprojectmanager/cmaketool.cpp +++ b/src/plugins/cmakeprojectmanager/cmaketool.cpp @@ -3,6 +3,7 @@ #include "cmaketool.h" +#include "cmakeprojectmanagertr.h" #include "cmaketoolmanager.h" #include @@ -294,7 +295,7 @@ CMakeTool::Version CMakeTool::version() const QString CMakeTool::versionDisplay() const { if (!isValid()) - return CMakeToolManager::tr("Version not parseable"); + return Tr::tr("Version not parseable"); const Version &version = m_introspection->m_version; if (version.fullVersion.isEmpty()) diff --git a/src/plugins/cmakeprojectmanager/cmaketoolmanager.cpp b/src/plugins/cmakeprojectmanager/cmaketoolmanager.cpp index f6174e6681c..2d017528293 100644 --- a/src/plugins/cmakeprojectmanager/cmaketoolmanager.cpp +++ b/src/plugins/cmakeprojectmanager/cmaketoolmanager.cpp @@ -3,6 +3,7 @@ #include "cmaketoolmanager.h" +#include "cmakeprojectmanagertr.h" #include "cmaketoolsettingsaccessor.h" #include @@ -19,10 +20,6 @@ using namespace Utils; namespace CMakeProjectManager { -// -------------------------------------------------------------------- -// CMakeToolManagerPrivate: -// -------------------------------------------------------------------- - class CMakeToolManagerPrivate { public: @@ -30,12 +27,8 @@ public: std::vector> m_cmakeTools; Internal::CMakeToolSettingsAccessor m_accessor; }; + static CMakeToolManagerPrivate *d = nullptr; - -// -------------------------------------------------------------------- -// CMakeToolManager: -// -------------------------------------------------------------------- - CMakeToolManager *CMakeToolManager::m_instance = nullptr; CMakeToolManager::CMakeToolManager() @@ -163,14 +156,14 @@ QList CMakeToolManager::autoDetectCMakeForDevice(const FilePaths &searchPath QString *logMessage) { QList result; - QStringList messages{tr("Searching CMake binaries...")}; + QStringList messages{Tr::tr("Searching CMake binaries...")}; for (const FilePath &path : searchPaths) { const FilePath cmake = path.pathAppended("cmake").withExecutableSuffix(); if (cmake.isExecutableFile()) { const Id currentId = registerCMakeByPath(cmake, detectionSource); if (currentId.isValid()) result.push_back(currentId); - messages.append(tr("Found \"%1\"").arg(cmake.toUserOutput())); + messages.append(Tr::tr("Found \"%1\"").arg(cmake.toUserOutput())); } } if (logMessage) @@ -200,12 +193,12 @@ Id CMakeToolManager::registerCMakeByPath(const FilePath &cmakePath, const QStrin void CMakeToolManager::removeDetectedCMake(const QString &detectionSource, QString *logMessage) { - QStringList logMessages{tr("Removing CMake entries...")}; + QStringList logMessages{Tr::tr("Removing CMake entries...")}; while (true) { auto toRemove = Utils::take(d->m_cmakeTools, Utils::equal(&CMakeTool::detectionSource, detectionSource)); if (!toRemove.has_value()) break; - logMessages.append(tr("Removed \"%1\"").arg((*toRemove)->displayName())); + logMessages.append(Tr::tr("Removed \"%1\"").arg((*toRemove)->displayName())); emit m_instance->cmakeRemoved((*toRemove)->id()); } @@ -218,7 +211,7 @@ void CMakeToolManager::removeDetectedCMake(const QString &detectionSource, QStri void CMakeToolManager::listDetectedCMake(const QString &detectionSource, QString *logMessage) { QTC_ASSERT(logMessage, return); - QStringList logMessages{tr("CMake:")}; + QStringList logMessages{Tr::tr("CMake:")}; for (const auto &tool : qAsConst(d->m_cmakeTools)) { if (tool->detectionSource() == detectionSource) logMessages.append(tool->displayName()); @@ -257,4 +250,4 @@ void CMakeToolManager::ensureDefaultCMakeToolIsValid() emit m_instance->defaultCMakeChanged(); } -} // namespace CMakeProjectManager +} // CMakeProjectManager diff --git a/src/plugins/cmakeprojectmanager/cmaketoolsettingsaccessor.cpp b/src/plugins/cmakeprojectmanager/cmaketoolsettingsaccessor.cpp index 1731d3bcb3c..176334a57eb 100644 --- a/src/plugins/cmakeprojectmanager/cmaketoolsettingsaccessor.cpp +++ b/src/plugins/cmakeprojectmanager/cmaketoolsettingsaccessor.cpp @@ -3,24 +3,21 @@ #include "cmaketoolsettingsaccessor.h" +#include "cmakeprojectmanagertr.h" #include "cmaketool.h" -#include "cmaketoolmanager.h" #include #include -#include #include +#include #include -#include -#include using namespace Utils; -namespace CMakeProjectManager { -namespace Internal { +namespace CMakeProjectManager::Internal { // -------------------------------------------------------------------- // CMakeToolSettingsUpgraders: @@ -75,11 +72,10 @@ static std::vector> autoDetectCMakeTools() if (base.isEmpty()) continue; - QFileInfo fi; for (const QString &exec : execs) { - fi.setFile(QDir(base.toString()), exec); - if (fi.exists() && fi.isFile() && fi.isExecutable()) - suspects << FilePath::fromString(fi.absoluteFilePath()); + const FilePath suspect = base.resolvePath(exec); + if (suspect.isExecutableFile()) + suspects << suspect; } } @@ -87,8 +83,7 @@ static std::vector> autoDetectCMakeTools() for (const FilePath &command : qAsConst(suspects)) { auto item = std::make_unique(CMakeTool::AutoDetection, CMakeTool::createId()); item->setFilePath(command); - item->setDisplayName(::CMakeProjectManager::CMakeToolManager::tr("System CMake at %1") - .arg(command.toUserOutput())); + item->setDisplayName(Tr::tr("System CMake at %1").arg(command.toUserOutput())); found.emplace_back(std::move(item)); } @@ -149,7 +144,7 @@ mergeTools(std::vector> &sdkTools, CMakeToolSettingsAccessor::CMakeToolSettingsAccessor() : UpgradingSettingsAccessor("QtCreatorCMakeTools", - QCoreApplication::translate("CMakeProjectManager::CMakeToolManager", "CMake"), + Tr::tr("CMake"), Core::Constants::IDE_DISPLAY_NAME) { setBaseFilePath(Core::ICore::userResourcePath(CMAKE_TOOL_FILENAME)); @@ -238,5 +233,4 @@ CMakeToolSettingsAccessor::cmakeTools(const QVariantMap &data, bool fromSdk) con return result; } -} // namespace Internal -} // namespace CMakeProjectManager +} // CMakeProjectManager::Internal diff --git a/src/plugins/cmakeprojectmanager/configmodel.cpp b/src/plugins/cmakeprojectmanager/configmodel.cpp index dd4f82683fa..084d917ffa8 100644 --- a/src/plugins/cmakeprojectmanager/configmodel.cpp +++ b/src/plugins/cmakeprojectmanager/configmodel.cpp @@ -3,6 +3,8 @@ #include "configmodel.h" +#include "cmakeprojectmanagertr.h" + #include #include #include @@ -11,8 +13,7 @@ #include #include -namespace CMakeProjectManager { -namespace Internal { +namespace CMakeProjectManager::Internal { // DataItem @@ -104,7 +105,7 @@ CMakeConfigItem ConfigModel::DataItem::toCMakeConfigItem() const ConfigModel::ConfigModel(QObject *parent) : Utils::TreeModel<>(parent) { - setHeader({tr("Key"), tr("Value")}); + setHeader({Tr::tr("Key"), Tr::tr("Value")}); } ConfigModel::~ConfigModel() = default; @@ -578,9 +579,7 @@ QVariant ConfigModelTreeItem::data(int column, int role) const : QVariant(); case Qt::DisplayRole: if (column == 0) - return dataItem->key.isEmpty() - ? ConfigModel::tr("") - : dataItem->key; + return dataItem->key.isEmpty() ? Tr::tr("") : dataItem->key; return value; case Qt::EditRole: if (column == 0) @@ -668,23 +667,22 @@ QString ConfigModelTreeItem::toolTip() const const QString pattern = "

%1
%2
"; if (dataItem->isInitial) { if (!dataItem->kitValue.isEmpty()) - tooltip << pattern.arg(ConfigModel::tr("Kit:")).arg(dataItem->kitValue); + tooltip << pattern.arg(Tr::tr("Kit:")).arg(dataItem->kitValue); - tooltip << pattern.arg(ConfigModel::tr("Initial Configuration:")).arg(dataItem->currentValue()); + tooltip << pattern.arg(Tr::tr("Initial Configuration:")).arg(dataItem->currentValue()); } else { if (!dataItem->initialValue.isEmpty()) { - tooltip << pattern.arg(ConfigModel::tr("Initial Configuration:")) + tooltip << pattern.arg(Tr::tr("Initial Configuration:")) .arg(dataItem->initialValue); } if (dataItem->inCMakeCache) { - tooltip << pattern.arg(ConfigModel::tr("Current Configuration:")) - .arg(dataItem->currentValue()); + tooltip << pattern.arg(Tr::tr("Current Configuration:")).arg(dataItem->currentValue()); } else { - tooltip << pattern.arg(ConfigModel::tr("Not in CMakeCache.txt")).arg(QString()); + tooltip << pattern.arg(Tr::tr("Not in CMakeCache.txt")).arg(QString()); } } - tooltip << pattern.arg(ConfigModel::tr("Type:")).arg(dataItem->typeDisplay()); + tooltip << pattern.arg(Tr::tr("Type:")).arg(dataItem->typeDisplay()); return "
" + tooltip.join(QString()) + "
"; } @@ -695,5 +693,4 @@ QString ConfigModelTreeItem::currentValue() const return dataItem->isUserChanged ? dataItem->newValue : dataItem->value; } -} // namespace Internal -} // namespace CMakeProjectManager +} // CMakeProjectManager::Internal diff --git a/src/plugins/cmakeprojectmanager/configmodel.h b/src/plugins/cmakeprojectmanager/configmodel.h index fd556cf0037..2d235a30aa9 100644 --- a/src/plugins/cmakeprojectmanager/configmodel.h +++ b/src/plugins/cmakeprojectmanager/configmodel.h @@ -7,10 +7,7 @@ #include -#include - -namespace CMakeProjectManager { -namespace Internal { +namespace CMakeProjectManager::Internal { class ConfigModelTreeItem; @@ -136,5 +133,4 @@ public: ConfigModel::InternalDataItem *dataItem; }; -} // namespace Internal -} // namespace CMakeProjectManager +} // CMakeProjectManager::Internal diff --git a/src/plugins/cmakeprojectmanager/configmodelitemdelegate.cpp b/src/plugins/cmakeprojectmanager/configmodelitemdelegate.cpp index 93d33b98c30..d12b91438e7 100644 --- a/src/plugins/cmakeprojectmanager/configmodelitemdelegate.cpp +++ b/src/plugins/cmakeprojectmanager/configmodelitemdelegate.cpp @@ -4,15 +4,17 @@ #include "configmodelitemdelegate.h" #include "configmodel.h" +#include "cmakeprojectmanagertr.h" #include #include -namespace CMakeProjectManager { -namespace Internal { +using namespace Utils; -ConfigModelItemDelegate::ConfigModelItemDelegate(const Utils::FilePath &base, QObject* parent) +namespace CMakeProjectManager::Internal { + +ConfigModelItemDelegate::ConfigModelItemDelegate(const FilePath &base, QObject* parent) : QStyledItemDelegate(parent) , m_base(base) { } @@ -24,17 +26,17 @@ QWidget *ConfigModelItemDelegate::createEditor(QWidget *parent, const QStyleOpti if (index.column() == 1) { ConfigModel::DataItem data = ConfigModel::dataItemFromIndex(index); if (data.type == ConfigModel::DataItem::FILE || data.type == ConfigModel::DataItem::DIRECTORY) { - auto edit = new Utils::PathChooser(parent); + auto edit = new PathChooser(parent); edit->setAttribute(Qt::WA_MacSmallSize); edit->setFocusPolicy(Qt::StrongFocus); edit->setBaseDirectory(m_base); edit->setAutoFillBackground(true); if (data.type == ConfigModel::DataItem::FILE) { - edit->setExpectedKind(Utils::PathChooser::File); - edit->setPromptDialogTitle(tr("Select a file for %1").arg(data.key)); + edit->setExpectedKind(PathChooser::File); + edit->setPromptDialogTitle(Tr::tr("Select a file for %1").arg(data.key)); } else { - edit->setExpectedKind(Utils::PathChooser::Directory); - edit->setPromptDialogTitle(tr("Select a directory for %1").arg(data.key)); + edit->setExpectedKind(PathChooser::Directory); + edit->setPromptDialogTitle(Tr::tr("Select a directory for %1").arg(data.key)); } return edit; } else if (!data.values.isEmpty()) { @@ -64,8 +66,8 @@ void ConfigModelItemDelegate::setEditorData(QWidget *editor, const QModelIndex & if (index.column() == 1) { ConfigModel::DataItem data = ConfigModel::dataItemFromIndex(index); if (data.type == ConfigModel::DataItem::FILE || data.type == ConfigModel::DataItem::DIRECTORY) { - auto edit = static_cast(editor); - edit->setFilePath(Utils::FilePath::fromUserInput(data.value)); + auto edit = static_cast(editor); + edit->setFilePath(FilePath::fromUserInput(data.value)); return; } else if (!data.values.isEmpty()) { auto edit = static_cast(editor); @@ -91,7 +93,7 @@ void ConfigModelItemDelegate::setModelData(QWidget *editor, QAbstractItemModel * if (index.column() == 1) { ConfigModel::DataItem data = ConfigModel::dataItemFromIndex(index); if (data.type == ConfigModel::DataItem::FILE || data.type == ConfigModel::DataItem::DIRECTORY) { - auto edit = static_cast(editor); + auto edit = static_cast(editor); if (edit->rawFilePath().toString() != data.value) model->setData(index, edit->filePath().toString(), Qt::EditRole); return; @@ -133,6 +135,4 @@ QSize ConfigModelItemDelegate::sizeHint(const QStyleOptionViewItem &option, return QSize(100, height); } -} // namespace Internal -} // namespace CMakeProjectManager - +} // CMakeProjectManager::Internal diff --git a/src/plugins/cmakeprojectmanager/configmodelitemdelegate.h b/src/plugins/cmakeprojectmanager/configmodelitemdelegate.h index a8668456448..d8584f10ea5 100644 --- a/src/plugins/cmakeprojectmanager/configmodelitemdelegate.h +++ b/src/plugins/cmakeprojectmanager/configmodelitemdelegate.h @@ -3,13 +3,12 @@ #pragma once -#include +#include #include #include -namespace CMakeProjectManager { -namespace Internal { +namespace CMakeProjectManager::Internal { class ConfigModelItemDelegate : public QStyledItemDelegate { @@ -29,5 +28,4 @@ private: Utils::FilePath m_base; }; -} // namespace Internal -} // namespace CMakeProjectManager +} // CMakeProjectManager::Internal diff --git a/src/plugins/cmakeprojectmanager/fileapidataextractor.cpp b/src/plugins/cmakeprojectmanager/fileapidataextractor.cpp index 3069e7631ed..804f6a0841b 100644 --- a/src/plugins/cmakeprojectmanager/fileapidataextractor.cpp +++ b/src/plugins/cmakeprojectmanager/fileapidataextractor.cpp @@ -3,6 +3,7 @@ #include "fileapidataextractor.h" +#include "cmakeprojectmanagertr.h" #include "cmakeprojectplugin.h" #include "cmakespecificsettings.h" #include "fileapiparser.h" @@ -22,13 +23,10 @@ using namespace ProjectExplorer; using namespace Utils; - -namespace { - -using namespace CMakeProjectManager; -using namespace CMakeProjectManager::Internal; using namespace CMakeProjectManager::Internal::FileApiDetails; +namespace CMakeProjectManager::Internal { + // -------------------------------------------------------------------- // Helpers: // -------------------------------------------------------------------- @@ -601,14 +599,12 @@ void addCompileGroups(ProjectNode *targetRoot, addCMakeVFolder(targetRoot, buildDirectory, 100, - QCoreApplication::translate("CMakeProjectManager::Internal::FileApi", - ""), + Tr::tr(""), std::move(buildFileNodes)); addCMakeVFolder(targetRoot, Utils::FilePath(), 10, - QCoreApplication::translate("CMakeProjectManager::Internal::FileApi", - ""), + Tr::tr(""), std::move(otherFileNodes)); } @@ -730,11 +726,6 @@ void setupLocationInfoForTargets(CMakeProjectNode *rootNode, const QList -#include +#include #include #include @@ -17,8 +17,7 @@ #include #include -namespace CMakeProjectManager { -namespace Internal { +namespace CMakeProjectManager::Internal { class FileApiData; @@ -53,5 +52,4 @@ FileApiQtcData extractData(FileApiData &data, const Utils::FilePath &sourceDirectory, const Utils::FilePath &buildDirectory); -} // namespace Internal -} // namespace CMakeProjectManager +} // CMakeProjectManager::Internal diff --git a/src/plugins/cmakeprojectmanager/fileapiparser.cpp b/src/plugins/cmakeprojectmanager/fileapiparser.cpp index a5e4216b874..ea323931559 100644 --- a/src/plugins/cmakeprojectmanager/fileapiparser.cpp +++ b/src/plugins/cmakeprojectmanager/fileapiparser.cpp @@ -3,6 +3,8 @@ #include "fileapiparser.h" +#include "cmakeprojectmanagertr.h" + #include #include #include @@ -15,11 +17,11 @@ #include #include -namespace CMakeProjectManager { -namespace Internal { +using namespace Utils; + +namespace CMakeProjectManager::Internal { using namespace FileApiDetails; -using namespace Utils; const char CMAKE_RELATIVE_REPLY_PATH[] = ".cmake/api/v1/reply"; const char CMAKE_RELATIVE_QUERY_PATH[] = ".cmake/api/v1/query"; @@ -40,9 +42,8 @@ static FilePath cmakeReplyDirectory(const FilePath &buildDirectory) static void reportFileApiSetupFailure() { Core::MessageManager::writeFlashing( - QCoreApplication::translate("CMakeProjectManager::Internal", - "Failed to set up CMake file API support. %1 cannot " - "extract project information.") + Tr::tr("Failed to set up CMake file API support. %1 cannot " + "extract project information.") .arg(Core::Constants::IDE_DISPLAY_NAME)); } @@ -99,8 +100,7 @@ std::vector indexList(const QJsonValue &v) static ReplyFileContents readReplyFile(const FilePath &filePath, QString &errorMessage) { const QJsonDocument document = readJsonFile(filePath); - static const QString msg = QCoreApplication::translate("CMakeProjectManager::Internal", - "Invalid reply file created by CMake."); + static const QString msg = Tr::tr("Invalid reply file created by CMake."); ReplyFileContents result; if (document.isNull() || document.isEmpty() || !document.isObject()) { @@ -171,8 +171,7 @@ static CMakeConfig readCacheFile(const FilePath &cacheFile, QString &errorMessag const QJsonObject root = doc.object(); if (!checkJsonObject(root, "cache", 2)) { - errorMessage = QCoreApplication::translate("CMakeProjectManager::Internal", - "Invalid cache file generated by CMake."); + errorMessage = Tr::tr("Invalid cache file generated by CMake."); return {}; } @@ -217,8 +216,7 @@ static std::vector readCMakeFilesFile(const FilePath &cmakeFilesF const QJsonObject root = doc.object(); if (!checkJsonObject(root, "cmakeFiles", 1)) { - errorMessage = QCoreApplication::translate("CMakeProjectManager::Internal", - "Invalid cmakeFiles file generated by CMake."); + errorMessage = Tr::tr( "Invalid cmakeFiles file generated by CMake."); return {}; } @@ -247,8 +245,7 @@ static std::vector readCMakeFilesFile(const FilePath &cmakeFilesF std::vector extractDirectories(const QJsonArray &directories, QString &errorMessage) { if (directories.isEmpty()) { - errorMessage = QCoreApplication::translate( - "CMakeProjectManager::Internal", + errorMessage = Tr::tr( "Invalid codemodel file generated by CMake: No directories."); return {}; } @@ -257,8 +254,7 @@ std::vector extractDirectories(const QJsonArray &directories, QString for (const QJsonValue &v : directories) { const QJsonObject obj = v.toObject(); if (obj.isEmpty()) { - errorMessage = QCoreApplication::translate( - "CMakeProjectManager::Internal", + errorMessage = Tr::tr( "Invalid codemodel file generated by CMake: Empty directory object."); continue; } @@ -279,8 +275,7 @@ std::vector extractDirectories(const QJsonArray &directories, QString static std::vector extractProjects(const QJsonArray &projects, QString &errorMessage) { if (projects.isEmpty()) { - errorMessage = QCoreApplication::translate( - "CMakeProjectManager::Internal", + errorMessage = Tr::tr( "Invalid codemodel file generated by CMake: No projects."); return {}; } @@ -290,8 +285,7 @@ static std::vector extractProjects(const QJsonArray &projects, QString const QJsonObject obj = v.toObject(); if (obj.isEmpty()) { qCDebug(cmakeFileApi) << "Empty project skipped!"; - errorMessage = QCoreApplication::translate( - "CMakeProjectManager::Internal", + errorMessage = Tr::tr( "Invalid codemodel file generated by CMake: Empty project object."); continue; } @@ -304,8 +298,7 @@ static std::vector extractProjects(const QJsonArray &projects, QString if (project.directories.empty()) { qCDebug(cmakeFileApi) << "Invalid project skipped!"; - errorMessage = QCoreApplication::translate( - "CMakeProjectManager::Internal", + errorMessage = Tr::tr( "Invalid codemodel file generated by CMake: Broken project data."); continue; } @@ -322,8 +315,7 @@ static std::vector extractTargets(const QJsonArray &targets, QString &er for (const QJsonValue &v : targets) { const QJsonObject obj = v.toObject(); if (obj.isEmpty()) { - errorMessage = QCoreApplication::translate( - "CMakeProjectManager::Internal", + errorMessage = Tr::tr( "Invalid codemodel file generated by CMake: Empty target object."); continue; } @@ -336,8 +328,7 @@ static std::vector extractTargets(const QJsonArray &targets, QString &er if (target.name.isEmpty() || target.id.isEmpty() || target.jsonFile.isEmpty() || target.directory == -1 || target.project == -1) { - errorMessage = QCoreApplication::translate( - "CMakeProjectManager::Internal", + errorMessage = Tr::tr( "Invalid codemodel file generated by CMake: Broken target data."); continue; } @@ -437,8 +428,7 @@ static std::vector extractConfigurations(const QJsonArray &config QString &errorMessage) { if (configs.isEmpty()) { - errorMessage = QCoreApplication::translate( - "CMakeProjectManager::Internal", + errorMessage = Tr::tr( "Invalid codemodel file generated by CMake: No configurations."); return {}; } @@ -447,8 +437,7 @@ static std::vector extractConfigurations(const QJsonArray &config for (const QJsonValue &v : configs) { const QJsonObject obj = v.toObject(); if (obj.isEmpty()) { - errorMessage = QCoreApplication::translate( - "CMakeProjectManager::Internal", + errorMessage = Tr::tr( "Invalid codemodel file generated by CMake: Empty configuration object."); continue; } @@ -460,10 +449,8 @@ static std::vector extractConfigurations(const QJsonArray &config config.targets = extractTargets(obj.value("targets").toArray(), errorMessage); if (!validateIndexes(config)) { - errorMessage - = QCoreApplication::translate("CMakeProjectManager::Internal", - "Invalid codemodel file generated by CMake: Broken " - "indexes in directories, projects, or targets."); + errorMessage = Tr::tr("Invalid codemodel file generated by CMake: Broken " + "indexes in directories, projects, or targets."); return {}; } @@ -479,8 +466,7 @@ static std::vector readCodemodelFile(const FilePath &codemodelFil const QJsonObject root = doc.object(); if (!checkJsonObject(root, "codemodel", 2)) { - errorMessage = QCoreApplication::translate("CMakeProjectManager::Internal", - "Invalid codemodel file generated by CMake."); + errorMessage = Tr::tr("Invalid codemodel file generated by CMake."); return {}; } @@ -507,8 +493,7 @@ static TargetDetails extractTargetDetails(const QJsonObject &root, QString &erro t.type = root.value("type").toString(); if (t.name.isEmpty() || t.id.isEmpty() || t.type.isEmpty()) { - errorMessage = QCoreApplication::translate("CMakeProjectManager::Internal", - "Invalid target file: Information is missing."); + errorMessage = Tr::tr("Invalid target file: Information is missing."); return {}; } @@ -776,8 +761,7 @@ static TargetDetails readTargetFile(const FilePath &targetFile, QString &errorMe TargetDetails result = extractTargetDetails(root, errorMessage); if (errorMessage.isEmpty() && !validateTargetDetails(result)) { - errorMessage = QCoreApplication::translate( - "CMakeProjectManager::Internal", + errorMessage = Tr::tr( "Invalid target file generated by CMake: Broken indexes in target details."); } return result; @@ -854,7 +838,7 @@ FileApiData FileApiParser::parseData(QFutureInterface bool { if (fi.isCanceled()) { - errorMessage = FileApiParser::tr("CMake parsing was cancelled."); + errorMessage = Tr::tr("CMake parsing was cancelled."); return true; } return false; @@ -888,12 +872,12 @@ FileApiData FileApiParser::parseData(QFutureInterface -namespace CMakeProjectManager { -namespace Internal { +namespace CMakeProjectManager::Internal { namespace FileApiDetails { @@ -218,7 +217,6 @@ public: class FileApiParser { - Q_DECLARE_TR_FUNCTIONS(FileApiParser) public: static FileApiData parseData(QFutureInterface> &fi, const Utils::FilePath &replyFilePath, @@ -233,5 +231,4 @@ public: static Utils::FilePath scanForCMakeReplyFile(const Utils::FilePath &buildDirectory); }; -} // namespace Internal -} // namespace CMakeProjectManager +} // CMakeProjectManager::Internal diff --git a/src/plugins/cmakeprojectmanager/fileapireader.cpp b/src/plugins/cmakeprojectmanager/fileapireader.cpp index a0e5630fe9b..debc22d4dff 100644 --- a/src/plugins/cmakeprojectmanager/fileapireader.cpp +++ b/src/plugins/cmakeprojectmanager/fileapireader.cpp @@ -4,6 +4,7 @@ #include "fileapireader.h" #include "cmakeprocess.h" +#include "cmakeprojectmanagertr.h" #include "fileapidataextractor.h" #include "fileapiparser.h" @@ -20,8 +21,7 @@ using namespace ProjectExplorer; using namespace Utils; -namespace CMakeProjectManager { -namespace Internal { +namespace CMakeProjectManager::Internal { static Q_LOGGING_CATEGORY(cmakeFileApiMode, "qtc.cmake.fileApiMode", QtWarningMsg); @@ -180,7 +180,7 @@ QList FileApiReader::takeBuildTargets(QString &errorMessage){ CMakeConfig FileApiReader::takeParsedConfiguration(QString &errorMessage) { if (m_lastCMakeExitCode != 0) - errorMessage = tr("CMake returned error code: %1").arg(m_lastCMakeExitCode); + errorMessage = Tr::tr("CMake returned error code: %1").arg(m_lastCMakeExitCode); return std::exchange(m_cache, {}); } @@ -283,7 +283,7 @@ void FileApiReader::makeBackupConfiguration(bool store) replyPrev.removeRecursively(); QTC_CHECK(!replyPrev.exists()); if (!reply.renameFile(replyPrev)) - Core::MessageManager::writeFlashing(tr("Failed to rename %1 to %2.") + Core::MessageManager::writeFlashing(Tr::tr("Failed to rename %1 to %2.") .arg(reply.toString(), replyPrev.toString())); } @@ -294,7 +294,7 @@ void FileApiReader::makeBackupConfiguration(bool store) if (cmakeCacheTxt.exists()) if (!FileUtils::copyIfDifferent(cmakeCacheTxt, cmakeCacheTxtPrev)) - Core::MessageManager::writeFlashing(tr("Failed to copy %1 to %2.") + Core::MessageManager::writeFlashing(Tr::tr("Failed to copy %1 to %2.") .arg(cmakeCacheTxt.toString(), cmakeCacheTxtPrev.toString())); } @@ -383,5 +383,4 @@ void FileApiReader::replyDirectoryHasChanged(const QString &directory) const emit dirty(); } -} // namespace Internal -} // namespace CMakeProjectManager +} // CMakeProjectManager::Internal diff --git a/src/plugins/cmakeprojectmanager/fileapireader.h b/src/plugins/cmakeprojectmanager/fileapireader.h index 6f59a17ddda..f8eeceab7ce 100644 --- a/src/plugins/cmakeprojectmanager/fileapireader.h +++ b/src/plugins/cmakeprojectmanager/fileapireader.h @@ -20,12 +20,9 @@ #include #include -namespace ProjectExplorer { -class ProjectNode; -} +namespace ProjectExplorer { class ProjectNode; } -namespace CMakeProjectManager { -namespace Internal { +namespace CMakeProjectManager::Internal { class CMakeProcess; class FileApiQtcData; @@ -103,5 +100,4 @@ private: QDateTime m_lastReplyTimestamp; }; -} // namespace Internal -} // namespace CMakeProjectManager +} // CMakeProjectManager::Internal diff --git a/src/plugins/cmakeprojectmanager/presetsparser.cpp b/src/plugins/cmakeprojectmanager/presetsparser.cpp index 47e46cb0137..970b05921a5 100644 --- a/src/plugins/cmakeprojectmanager/presetsparser.cpp +++ b/src/plugins/cmakeprojectmanager/presetsparser.cpp @@ -3,13 +3,13 @@ #include "presetsparser.h" -#include +#include "cmakeprojectmanagertr.h" + #include #include #include -namespace CMakeProjectManager { -namespace Internal { +namespace CMakeProjectManager::Internal { bool parseVersion(const QJsonValue &jsonValue, int &version) { @@ -35,7 +35,7 @@ bool parseCMakeMinimumRequired(const QJsonValue &jsonValue, QVersionNumber &vers } bool parseConfigurePresets(const QJsonValue &jsonValue, - std::vector &configurePresets) + QList &configurePresets) { // The whole section is optional if (jsonValue.isUndefined()) @@ -185,7 +185,7 @@ bool parseConfigurePresets(const QJsonValue &jsonValue, } bool parseBuildPresets(const QJsonValue &jsonValue, - std::vector &buildPresets) + QList &buildPresets) { // The whole section is optional if (jsonValue.isUndefined()) @@ -284,9 +284,7 @@ bool PresetsParser::parse(const Utils::FilePath &jsonFile, QString &errorMessage { const std::optional jsonContents = jsonFile.fileContents(); if (!jsonContents) { - errorMessage = QCoreApplication::translate("CMakeProjectManager::Internal", - "Failed to read %1 file") - .arg(jsonFile.fileName()); + errorMessage = Tr::tr("Failed to read %1 file").arg(jsonFile.fileName()); return false; } @@ -302,18 +300,14 @@ bool PresetsParser::parse(const Utils::FilePath &jsonFile, QString &errorMessage } if (!jsonDoc.isObject()) { - errorMessage = QCoreApplication::translate("CMakeProjectManager::Internal", - "Invalid %1 file") - .arg(jsonFile.fileName()); + errorMessage = Tr::tr( "Invalid %1 file").arg(jsonFile.fileName()); return false; } QJsonObject root = jsonDoc.object(); if (!parseVersion(root.value("version"), m_presetsData.version)) { - errorMessage = QCoreApplication::translate("CMakeProjectManager::Internal", - "Invalid \"version\" in %1 file") - .arg(jsonFile.fileName()); + errorMessage = Tr::tr("Invalid \"version\" in %1 file").arg(jsonFile.fileName()); return false; } @@ -324,18 +318,14 @@ bool PresetsParser::parse(const Utils::FilePath &jsonFile, QString &errorMessage // optional if (!parseConfigurePresets(root.value("configurePresets"), m_presetsData.configurePresets)) { errorMessage - = QCoreApplication::translate("CMakeProjectManager::Internal", - "Invalid \"configurePresets\" section in %1 file") - .arg(jsonFile.fileName()); + = Tr::tr("Invalid \"configurePresets\" section in %1 file").arg(jsonFile.fileName()); return false; } // optional if (!parseBuildPresets(root.value("buildPresets"), m_presetsData.buildPresets)) { errorMessage - = QCoreApplication::translate("CMakeProjectManager::Internal", - "Invalid \"buildPresets\" section in %1 file") - .arg(jsonFile.fileName()); + = Tr::tr("Invalid \"buildPresets\" section in %1 file").arg(jsonFile.fileName()); return false; } @@ -411,5 +401,4 @@ void PresetsDetails::BuildPreset::inheritFrom(const BuildPreset &other) nativeToolOptions = other.nativeToolOptions; } -} // namespace Internal -} // namespace CMakeProjectManager +} // CMakeProjectManager::Internal diff --git a/src/plugins/cmakeprojectmanager/presetsparser.h b/src/plugins/cmakeprojectmanager/presetsparser.h index c067507a2a2..0dd65be7caa 100644 --- a/src/plugins/cmakeprojectmanager/presetsparser.h +++ b/src/plugins/cmakeprojectmanager/presetsparser.h @@ -3,16 +3,14 @@ #pragma once -#include - #include "cmakeconfigitem.h" +#include + #include -#include #include -namespace CMakeProjectManager { -namespace Internal { +namespace CMakeProjectManager::Internal { namespace PresetsDetails { @@ -96,8 +94,8 @@ public: int version = 0; QVersionNumber cmakeMinimimRequired; QHash vendor; - std::vector configurePresets; - std::vector buildPresets; + QList configurePresets; + QList buildPresets; }; class PresetsParser @@ -109,5 +107,4 @@ public: const PresetsData &presetsData() const; }; -} // namespace Internal -} // namespace CMakeProjectManager +} // CMakeProjectManager::Internal diff --git a/src/plugins/cmakeprojectmanager/projecttreehelper.cpp b/src/plugins/cmakeprojectmanager/projecttreehelper.cpp index d922648856e..ae0ee65966e 100644 --- a/src/plugins/cmakeprojectmanager/projecttreehelper.cpp +++ b/src/plugins/cmakeprojectmanager/projecttreehelper.cpp @@ -3,6 +3,8 @@ #include "projecttreehelper.h" +#include "cmakeprojectmanagertr.h" + #include #include @@ -11,8 +13,7 @@ using namespace ProjectExplorer; -namespace CMakeProjectManager { -namespace Internal { +namespace CMakeProjectManager::Internal { std::unique_ptr createCMakeVFolder(const Utils::FilePath &basePath, int priority, @@ -77,18 +78,17 @@ void addCMakeInputs(FolderNode *root, addCMakeVFolder(cmakeVFolder.get(), buildDir, 100, - QCoreApplication::translate("CMakeProjectManager::Internal::ProjectTreeHelper", - ""), + Tr::tr(""), removeKnownNodes(knownFiles, std::move(buildInputs))); addCMakeVFolder(cmakeVFolder.get(), Utils::FilePath(), 10, - QCoreApplication::translate("CMakeProjectManager::Internal::ProjectTreeHelper", - ""), + Tr::tr(""), removeKnownNodes(knownFiles, std::move(rootInputs))); root->addNode(std::move(cmakeVFolder)); } + QHash addCMakeLists( CMakeProjectNode *root, std::vector> &&cmakeLists) { @@ -177,9 +177,7 @@ void addFileSystemNodes(ProjectNode *root, const std::shared_ptr &fo auto fileSystemNode = cloneFolderNode(folderNode.get()); // just before special nodes like "CMake Modules" fileSystemNode->setPriority(Node::DefaultPriority - 6); - fileSystemNode->setDisplayName( - QCoreApplication::translate("CMakeProjectManager::Internal::ProjectTreeHelper", - "")); + fileSystemNode->setDisplayName(Tr::tr("")); fileSystemNode->setIcon(DirectoryIcon(ProjectExplorer::Constants::FILEOVERLAY_UNKNOWN)); if (!fileSystemNode->isEmpty()) { @@ -192,5 +190,4 @@ void addFileSystemNodes(ProjectNode *root, const std::shared_ptr &fo } } -} // namespace Internal -} // namespace CMakeProjectManager +} // CMakeProjectManager::Internal diff --git a/src/plugins/cmakeprojectmanager/projecttreehelper.h b/src/plugins/cmakeprojectmanager/projecttreehelper.h index f211c6c25c6..4870d279b98 100644 --- a/src/plugins/cmakeprojectmanager/projecttreehelper.h +++ b/src/plugins/cmakeprojectmanager/projecttreehelper.h @@ -3,12 +3,11 @@ #include "cmakeprojectnodes.h" -#include +#include #include -namespace CMakeProjectManager { -namespace Internal { +namespace CMakeProjectManager::Internal { std::unique_ptr createCMakeVFolder(const Utils::FilePath &basePath, int priority, @@ -44,5 +43,5 @@ CMakeTargetNode *createTargetNode( void addFileSystemNodes(ProjectExplorer::ProjectNode *root, const std::shared_ptr &folderNode); -} // namespace Internal -} // namespace CMakeProjectManager + +} // CMakeProjectManager::Internal diff --git a/src/plugins/coreplugin/CMakeLists.txt b/src/plugins/coreplugin/CMakeLists.txt index 9a0a937b8bf..feade344647 100644 --- a/src/plugins/coreplugin/CMakeLists.txt +++ b/src/plugins/coreplugin/CMakeLists.txt @@ -67,7 +67,6 @@ add_qtc_plugin(Core find/findplugin.cpp find/findplugin.h find/findtoolbar.cpp find/findtoolbar.h find/findtoolwindow.cpp find/findtoolwindow.h - find/findwidget.ui find/highlightscrollbarcontroller.cpp find/highlightscrollbarcontroller.h find/ifindfilter.cpp find/ifindfilter.h find/ifindsupport.cpp find/ifindsupport.h @@ -127,9 +126,8 @@ add_qtc_plugin(Core messagebox.cpp messagebox.h messagemanager.cpp messagemanager.h messageoutputwindow.cpp messageoutputwindow.h - mimetypemagicdialog.cpp mimetypemagicdialog.h mimetypemagicdialog.ui + mimetypemagicdialog.cpp mimetypemagicdialog.h mimetypesettings.cpp mimetypesettings.h - mimetypesettingspage.ui minisplitter.cpp minisplitter.h modemanager.cpp modemanager.h navigationsubwidget.cpp navigationsubwidget.h diff --git a/src/plugins/coreplugin/actionsfilter.cpp b/src/plugins/coreplugin/actionsfilter.cpp index fd27fefdf20..68a48c6fdfa 100644 --- a/src/plugins/coreplugin/actionsfilter.cpp +++ b/src/plugins/coreplugin/actionsfilter.cpp @@ -15,11 +15,15 @@ #include #include +#include +#include #include #include #include #include +static const char lastTriggeredC[] = "LastTriggeredActions"; + QT_BEGIN_NAMESPACE size_t qHash(const QPointer &p, size_t seed) { @@ -30,13 +34,6 @@ QT_END_NAMESPACE using namespace Core::Internal; using namespace Core; -class ActionFilterEntryData -{ -public: - QPointer action; - QStringList path; -}; - ActionsFilter::ActionsFilter() { setId("Actions from the menu"); @@ -174,50 +171,60 @@ QList ActionsFilter::matchesFor(QFutureInterface action = selection.internalData.value().action) { - QMetaObject::invokeMethod(action, [action] { + auto data = selection.internalData.value(); + if (data.action) { + m_lastTriggered.removeAll(data); + m_lastTriggered.prepend(data); + QMetaObject::invokeMethod(data.action, [action = data.action] { if (action && action->isEnabled()) action->trigger(); }, Qt::QueuedConnection); + if (m_lastTriggered.size() > maxHistorySize) + m_lastTriggered.resize(maxHistorySize); } } -QList ActionsFilter::entriesForAction(QAction *action, - const QStringList &path, - QList &processedMenus) +static QString actionText(QAction *action) +{ + const QString whatsThis = action->whatsThis(); + return Utils::stripAccelerator(action->text()) + + (whatsThis.isEmpty() ? QString() : QString(" (" + whatsThis + ")")); +} + +void ActionsFilter::collectEntriesForAction(QAction *action, + const QStringList &path, + QList &processedMenus) { QList entries; if (!m_enabledActions.contains(action)) - return entries; + return; const QString whatsThis = action->whatsThis(); - const QString text = Utils::stripAccelerator(action->text()) - + (whatsThis.isEmpty() ? QString() : QString(" (" + whatsThis + ")")); + const QString text = actionText(action); if (QMenu *menu = action->menu()) { if (processedMenus.contains(menu)) - return entries; + return; processedMenus.append(menu); if (menu->isEnabled()) { const QList &actions = menu->actions(); QStringList menuPath(path); menuPath << text; for (QAction *menuAction : actions) - entries << entriesForAction(menuAction, menuPath, processedMenus); + collectEntriesForAction(menuAction, menuPath, processedMenus); } } else if (!text.isEmpty()) { - const ActionFilterEntryData data{action, path}; + const ActionFilterEntryData data{action, {}}; LocatorFilterEntry filterEntry(this, text, QVariant::fromValue(data), action->icon()); filterEntry.extraInfo = path.join(" > "); - entries << filterEntry; + updateEntry(action, filterEntry); } - return entries; } -QList ActionsFilter::entriesForCommands() +void ActionsFilter::collectEntriesForCommands() { - QList entries; const QList commands = Core::ActionManager::commands(); for (const Command *command : commands) { QAction *action = command->action(); @@ -236,13 +243,38 @@ QList ActionsFilter::entriesForCommands() const QString identifier = command->id().toString(); const QStringList path = identifier.split(QLatin1Char('.')); - const ActionFilterEntryData data{action, path}; + const ActionFilterEntryData data{action, command->id()}; LocatorFilterEntry filterEntry(this, text, QVariant::fromValue(data), action->icon()); if (path.size() >= 2) filterEntry.extraInfo = path.mid(0, path.size() - 1).join(" > "); - entries << filterEntry; + updateEntry(action, filterEntry); + } +} + +void ActionsFilter::collectEntriesForLastTriggered() +{ + for (ActionFilterEntryData &data : m_lastTriggered) { + if (!data.action) { + if (Command *command = Core::ActionManager::command(data.commandId)) + data.action = command->action(); + } + if (!data.action || !m_enabledActions.contains(data.action)) + continue; + const QString text = actionText(data.action); + LocatorFilterEntry filterEntry(this, text, QVariant::fromValue(data), data.action->icon()); + updateEntry(data.action, filterEntry); + } +} + +void ActionsFilter::updateEntry(const QPointer action, const LocatorFilterEntry &entry) +{ + auto index = m_indexes.value(action, -1); + if (index < 0) { + m_indexes[action] = m_entries.size(); + m_entries << entry; + } else { + m_entries[index] = entry; } - return entries; } static void requestMenuUpdate(const QAction* action) @@ -284,8 +316,29 @@ void Core::Internal::ActionsFilter::prepareSearch(const QString &entry) { Q_UNUSED(entry) m_entries.clear(); + m_indexes.clear(); QList processedMenus; + collectEntriesForLastTriggered(); for (QAction* action : menuBarActions()) - m_entries << entriesForAction(action, QStringList(), processedMenus); - m_entries << entriesForCommands(); + collectEntriesForAction(action, QStringList(), processedMenus); + collectEntriesForCommands(); +} + +void ActionsFilter::saveState(QJsonObject &object) const +{ + QJsonArray commands; + for (const ActionFilterEntryData &data : m_lastTriggered) { + if (data.commandId.isValid()) + commands.append(data.commandId.toString()); + } + object.insert(lastTriggeredC, commands); +} + +void ActionsFilter::restoreState(const QJsonObject &object) +{ + m_lastTriggered.clear(); + for (const QJsonValue &command : object.value(lastTriggeredC).toArray()) { + if (command.isString()) + m_lastTriggered.append({nullptr, Utils::Id::fromString(command.toString())}); + } } diff --git a/src/plugins/coreplugin/actionsfilter.h b/src/plugins/coreplugin/actionsfilter.h index 836ed55645a..be00508afd7 100644 --- a/src/plugins/coreplugin/actionsfilter.h +++ b/src/plugins/coreplugin/actionsfilter.h @@ -17,6 +17,17 @@ QT_END_NAMESPACE namespace Core { namespace Internal { +class ActionFilterEntryData +{ +public: + QPointer action; + Utils::Id commandId; + friend bool operator==(const ActionFilterEntryData &a, const ActionFilterEntryData &b) + { + return a.action == b.action && a.commandId == b.commandId; + } +}; + class ActionsFilter : public ILocatorFilter { Q_OBJECT @@ -30,14 +41,20 @@ public: void prepareSearch(const QString &entry) override; private: - QList entriesForAction(QAction *action, - const QStringList &path, - QList &processedMenus); - QList entriesForCommands(); + void saveState(QJsonObject &object) const override; + void restoreState(const QJsonObject &object) override; + void collectEntriesForAction(QAction *action, + const QStringList &path, + QList &processedMenus); + void collectEntriesForCommands(); + void collectEntriesForLastTriggered(); + void updateEntry(const QPointer action, const LocatorFilterEntry &entry); void updateEnabledActionCache(); QList m_entries; + QMap, int> m_indexes; QSet> m_enabledActions; + mutable QList m_lastTriggered; }; } // namespace Internal diff --git a/src/plugins/coreplugin/coreplugin.qbs b/src/plugins/coreplugin/coreplugin.qbs index b0447ab16a0..3b2e9e8dc5a 100644 --- a/src/plugins/coreplugin/coreplugin.qbs +++ b/src/plugins/coreplugin/coreplugin.qbs @@ -123,10 +123,8 @@ Project { "messageoutputwindow.h", "mimetypemagicdialog.cpp", "mimetypemagicdialog.h", - "mimetypemagicdialog.ui", "mimetypesettings.cpp", "mimetypesettings.h", - "mimetypesettingspage.ui", "minisplitter.cpp", "minisplitter.h", "modemanager.cpp", @@ -300,7 +298,6 @@ Project { "findtoolbar.h", "findtoolwindow.cpp", "findtoolwindow.h", - "findwidget.ui", "highlightscrollbarcontroller.cpp", "highlightscrollbarcontroller.h", "ifindfilter.cpp", diff --git a/src/plugins/coreplugin/find/findplugin.cpp b/src/plugins/coreplugin/find/findplugin.cpp index 254c879dad2..2d844455593 100644 --- a/src/plugins/coreplugin/find/findplugin.cpp +++ b/src/plugins/coreplugin/find/findplugin.cpp @@ -23,6 +23,7 @@ #include #include +#include #include #include #include diff --git a/src/plugins/coreplugin/find/findtoolbar.cpp b/src/plugins/coreplugin/find/findtoolbar.cpp index 4a093bc8d44..bd4f9e91f5e 100644 --- a/src/plugins/coreplugin/find/findtoolbar.cpp +++ b/src/plugins/coreplugin/find/findtoolbar.cpp @@ -2,6 +2,7 @@ // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0+ OR GPL-3.0 WITH Qt-GPL-exception-1.0 #include "findtoolbar.h" + #include "ifindfilter.h" #include "findplugin.h" #include "optionspopup.h" @@ -16,31 +17,40 @@ #include #include +#include +#include #include #include #include #include -#include -#include - #include +#include #include #include #include +#include +#include +#include #include +#include #include #include +#include +#include #include +#include +#include Q_DECLARE_METATYPE(QStringList) Q_DECLARE_METATYPE(Core::IFindFilter*) -static const int MINIMUM_WIDTH_FOR_COMPLEX_LAYOUT = 150; -static const int FINDBUTTON_SPACER_WIDTH = 20; +using namespace Utils; -namespace Core { -namespace Internal { +namespace Core::Internal { + +const int MINIMUM_WIDTH_FOR_COMPLEX_LAYOUT = 150; +const int FINDBUTTON_SPACER_WIDTH = 20; FindToolBar::FindToolBar(CurrentDocumentFind *currentDocumentFind) : m_currentDocumentFind(currentDocumentFind), @@ -49,80 +59,176 @@ FindToolBar::FindToolBar(CurrentDocumentFind *currentDocumentFind) m_findIncrementalTimer(this), m_findStepTimer(this) { - //setup ui - m_ui.setupUi(this); - // compensate for a vertically expanding spacer below the label - m_ui.replaceLabel->setMinimumHeight(m_ui.replaceEdit->sizeHint().height()); - m_ui.mainLayout->setColumnStretch(1, 10); + setWindowTitle(QCoreApplication::translate("Core::Internal::FindWidget", "Find", nullptr)); - setFocusProxy(m_ui.findEdit); + m_findLabel = new QLabel; + m_findLabel->setText(QCoreApplication::translate("Core::Internal::FindWidget", "Find:", nullptr)); + + m_findEdit = new FancyLineEdit; + m_findEdit->setMinimumWidth(100); + m_findEdit->setAttribute(Qt::WA_MacShowFocusRect, false); + + m_findPreviousButton = new QToolButton; + + m_findNextButton = new QToolButton; + + m_selectAllButton = new QToolButton; + + m_horizontalSpacer = new QSpacerItem(40, 0, QSizePolicy::Expanding, QSizePolicy::Minimum); + + m_close = new QToolButton; + + auto findButtonsWidget = new QWidget; + + m_findButtonLayout = new QHBoxLayout(findButtonsWidget); + m_findButtonLayout->setSpacing(3); + m_findButtonLayout->setContentsMargins(0, 0, 0, 0); + m_findButtonLayout->addWidget(m_findPreviousButton); + m_findButtonLayout->addWidget(m_findNextButton); + m_findButtonLayout->addWidget(m_selectAllButton); + m_findButtonLayout->addItem(m_horizontalSpacer); + m_findButtonLayout->addWidget(m_close); + + m_replaceEdit = new FancyLineEdit(this); + m_replaceEdit->setMinimumWidth(100); + m_replaceEdit->setAttribute(Qt::WA_MacShowFocusRect, false); + m_replaceEdit->setFiltering(true); + + m_replaceLabel = new QLabel; + m_replaceLabel->setText(QCoreApplication::translate("Core::Internal::FindWidget", "Replace with:")); + // compensate for a vertically expanding spacer below the label + m_replaceLabel->setMinimumHeight(m_replaceEdit->sizeHint().height()); + + m_replaceButtonsWidget = new QWidget; + m_replaceButtonsWidget->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Preferred); + + m_replaceButton = new QToolButton; + m_replaceButton->setText(QCoreApplication::translate("Core::Internal::FindWidget", "Replace")); + m_replaceButton->setToolButtonStyle(Qt::ToolButtonTextOnly); + m_replaceButton->setArrowType(Qt::LeftArrow); + + m_replaceNextButton = new QToolButton; + m_replaceNextButton->setText(QCoreApplication::translate("Core::Internal::FindWidget", "Replace && Find")); + m_replaceNextButton->setToolButtonStyle(Qt::ToolButtonTextOnly); + m_replaceNextButton->setArrowType(Qt::RightArrow); + + m_replaceAllButton = new QToolButton; + m_replaceAllButton->setText(QCoreApplication::translate("Core::Internal::FindWidget", "Replace All")); + m_replaceAllButton->setToolButtonStyle(Qt::ToolButtonTextOnly); + + m_advancedButton = new QToolButton; + m_advancedButton->setText(QCoreApplication::translate("Core::Internal::FindWidget", "Advanced...")); + m_advancedButton->setToolButtonStyle(Qt::ToolButtonTextOnly); + + QWidget::setTabOrder(m_findEdit, m_replaceEdit); + QWidget::setTabOrder(m_replaceEdit, m_findPreviousButton); + QWidget::setTabOrder(m_findPreviousButton, m_findNextButton); + QWidget::setTabOrder(m_findNextButton, m_replaceButton); + QWidget::setTabOrder(m_replaceButton, m_replaceNextButton); + QWidget::setTabOrder(m_replaceNextButton, m_replaceAllButton); + QWidget::setTabOrder(m_replaceAllButton, m_advancedButton); + QWidget::setTabOrder(m_advancedButton, m_close); + + auto replaceButtonsLayout = new QHBoxLayout(m_replaceButtonsWidget); + replaceButtonsLayout->setSpacing(3); + replaceButtonsLayout->setContentsMargins(0, 0, 0, 0); + replaceButtonsLayout->addWidget(m_replaceButton); + replaceButtonsLayout->addWidget(m_replaceNextButton); + replaceButtonsLayout->addWidget(m_replaceAllButton); + + auto verticalLayout_3 = new QVBoxLayout(); + verticalLayout_3->setSpacing(0); + verticalLayout_3->addWidget(m_advancedButton); + verticalLayout_3->addItem(new QSpacerItem(0, 0, QSizePolicy::Minimum, QSizePolicy::Expanding)); + + auto gridLayout = new QGridLayout(); + gridLayout->setHorizontalSpacing(3); + gridLayout->setVerticalSpacing(0); + gridLayout->addWidget(m_replaceButtonsWidget, 0, 0, 1, 1); + gridLayout->addLayout(verticalLayout_3, 0, 1, 1, 1); + + using namespace Layouting; + Grid { + m_findLabel, + m_findEdit, + findButtonsWidget, + br, + Column { m_replaceLabel, st }.setSpacing(0), + Column { m_replaceEdit, st }.setSpacing(0), + gridLayout, + }.attachTo(this); + + auto mainLayout = static_cast(layout()); + mainLayout->setHorizontalSpacing(3); + mainLayout->setVerticalSpacing(1); + mainLayout->setContentsMargins(5, 2, 0, 1); + mainLayout->setColumnStretch(1, 10); + + setFocusProxy(m_findEdit); setProperty("topBorder", true); setSingleRow(false); - m_ui.findEdit->setAttribute(Qt::WA_MacShowFocusRect, false); - m_ui.replaceEdit->setAttribute(Qt::WA_MacShowFocusRect, false); - m_ui.replaceEdit->setFiltering(true); - connect(m_ui.findEdit, &Utils::FancyLineEdit::editingFinished, + connect(m_findEdit, &Utils::FancyLineEdit::editingFinished, this, &FindToolBar::invokeResetIncrementalSearch); - connect(m_ui.findEdit, &Utils::FancyLineEdit::textChanged, + connect(m_findEdit, &Utils::FancyLineEdit::textChanged, this, &FindToolBar::updateFindReplaceEnabled); - connect(m_ui.close, &QToolButton::clicked, + connect(m_close, &QToolButton::clicked, this, &FindToolBar::hideAndResetFocus); m_findCompleter->setModel(Find::findCompletionModel()); m_replaceCompleter->setModel(Find::replaceCompletionModel()); - m_ui.findEdit->setSpecialCompleter(m_findCompleter); - m_ui.replaceEdit->setSpecialCompleter(m_replaceCompleter); + m_findEdit->setSpecialCompleter(m_findCompleter); + m_replaceEdit->setSpecialCompleter(m_replaceCompleter); - m_ui.findEdit->setButtonVisible(Utils::FancyLineEdit::Left, true); - m_ui.findEdit->setFiltering(true); - m_ui.findEdit->setPlaceholderText(QString()); - m_ui.findEdit->button(Utils::FancyLineEdit::Left)->setFocusPolicy(Qt::TabFocus); - m_ui.findEdit->setValidationFunction([this](Utils::FancyLineEdit *, QString *) { + m_findEdit->setButtonVisible(Utils::FancyLineEdit::Left, true); + m_findEdit->setFiltering(true); + m_findEdit->setPlaceholderText(QString()); + m_findEdit->button(Utils::FancyLineEdit::Left)->setFocusPolicy(Qt::TabFocus); + m_findEdit->setValidationFunction([this](Utils::FancyLineEdit *, QString *) { return m_lastResult != IFindSupport::NotFound; }); - m_ui.replaceEdit->setPlaceholderText(QString()); + m_replaceEdit->setPlaceholderText(QString()); - connect(m_ui.findEdit, &Utils::FancyLineEdit::textChanged, + connect(m_findEdit, &Utils::FancyLineEdit::textChanged, this, &FindToolBar::invokeFindIncremental); - connect(m_ui.findEdit, &Utils::FancyLineEdit::leftButtonClicked, + connect(m_findEdit, &Utils::FancyLineEdit::leftButtonClicked, this, &FindToolBar::findEditButtonClicked); // invoke{Find,Replace}Helper change the completion model. QueuedConnection is used to perform these // changes only after the completer's activated() signal is handled (QTCREATORBUG-8408) - connect(m_ui.findEdit, &Utils::FancyLineEdit::returnPressed, + connect(m_findEdit, &Utils::FancyLineEdit::returnPressed, this, &FindToolBar::invokeFindEnter, Qt::QueuedConnection); - connect(m_ui.replaceEdit, &Utils::FancyLineEdit::returnPressed, + connect(m_replaceEdit, &Utils::FancyLineEdit::returnPressed, this, &FindToolBar::invokeReplaceEnter, Qt::QueuedConnection); connect(m_findCompleter, QOverload::of(&QCompleter::activated), this, &FindToolBar::findCompleterActivated); - auto shiftEnterAction = new QAction(m_ui.findEdit); + auto shiftEnterAction = new QAction(m_findEdit); shiftEnterAction->setShortcut(QKeySequence(tr("Shift+Enter"))); shiftEnterAction->setShortcutContext(Qt::WidgetShortcut); connect(shiftEnterAction, &QAction::triggered, this, &FindToolBar::invokeFindPrevious); - m_ui.findEdit->addAction(shiftEnterAction); - auto shiftReturnAction = new QAction(m_ui.findEdit); + m_findEdit->addAction(shiftEnterAction); + auto shiftReturnAction = new QAction(m_findEdit); shiftReturnAction->setShortcut(QKeySequence(tr("Shift+Return"))); shiftReturnAction->setShortcutContext(Qt::WidgetShortcut); connect(shiftReturnAction, &QAction::triggered, this, &FindToolBar::invokeFindPrevious); - m_ui.findEdit->addAction(shiftReturnAction); + m_findEdit->addAction(shiftReturnAction); - auto shiftEnterReplaceAction = new QAction(m_ui.replaceEdit); + auto shiftEnterReplaceAction = new QAction(m_replaceEdit); shiftEnterReplaceAction->setShortcut(QKeySequence(tr("Shift+Enter"))); shiftEnterReplaceAction->setShortcutContext(Qt::WidgetShortcut); connect(shiftEnterReplaceAction, &QAction::triggered, this, &FindToolBar::invokeReplacePrevious); - m_ui.replaceEdit->addAction(shiftEnterReplaceAction); - auto shiftReturnReplaceAction = new QAction(m_ui.replaceEdit); + m_replaceEdit->addAction(shiftEnterReplaceAction); + auto shiftReturnReplaceAction = new QAction(m_replaceEdit); shiftReturnReplaceAction->setShortcut(QKeySequence(tr("Shift+Return"))); shiftReturnReplaceAction->setShortcutContext(Qt::WidgetShortcut); connect(shiftReturnReplaceAction, &QAction::triggered, this, &FindToolBar::invokeReplacePrevious); - m_ui.replaceEdit->addAction(shiftReturnReplaceAction); + m_replaceEdit->addAction(shiftReturnReplaceAction); // need to make sure QStringList is registered as metatype QMetaTypeId::qt_metatype_id(); @@ -137,9 +243,9 @@ FindToolBar::FindToolBar(CurrentDocumentFind *currentDocumentFind) Command *advancedCmd = ActionManager::command(Constants::ADVANCED_FIND); if (advancedCmd) advancedCmd->augmentActionWithShortcutToolTip(advancedAction); - m_ui.advancedButton->setDefaultAction(advancedAction); + m_advancedButton->setDefaultAction(advancedAction); connect(advancedAction, &QAction::triggered, this, [this] { - Find::openFindDialog(nullptr, m_ui.findEdit->text()); + Find::openFindDialog(nullptr, m_findEdit->text()); }); m_goToCurrentFindAction = new QAction(this); @@ -182,7 +288,7 @@ FindToolBar::FindToolBar(CurrentDocumentFind *currentDocumentFind) cmd = ActionManager::registerAction(m_localFindNextAction, Constants::FIND_NEXT, findcontext); cmd->augmentActionWithShortcutToolTip(m_localFindNextAction); connect(m_localFindNextAction, &QAction::triggered, this, &FindToolBar::invokeFindNext); - m_ui.findNextButton->setDefaultAction(m_localFindNextAction); + m_findNextButton->setDefaultAction(m_localFindNextAction); m_findPreviousAction = new QAction(tr("Find Previous"), this); cmd = ActionManager::registerAction(m_findPreviousAction, Constants::FIND_PREVIOUS); @@ -193,7 +299,7 @@ FindToolBar::FindToolBar(CurrentDocumentFind *currentDocumentFind) cmd = ActionManager::registerAction(m_localFindPreviousAction, Constants::FIND_PREVIOUS, findcontext); cmd->augmentActionWithShortcutToolTip(m_localFindPreviousAction); connect(m_localFindPreviousAction, &QAction::triggered, this, &FindToolBar::invokeFindPrevious); - m_ui.findPreviousButton->setDefaultAction(m_localFindPreviousAction); + m_findPreviousButton->setDefaultAction(m_localFindPreviousAction); m_findNextSelectedAction = new QAction(tr("Find Next (Selected)"), this); cmd = ActionManager::registerAction(m_findNextSelectedAction, Constants::FIND_NEXT_SELECTED); @@ -217,7 +323,7 @@ FindToolBar::FindToolBar(CurrentDocumentFind *currentDocumentFind) cmd = ActionManager::registerAction(m_localSelectAllAction, Constants::FIND_SELECT_ALL, findcontext); cmd->augmentActionWithShortcutToolTip(m_localSelectAllAction); connect(m_localSelectAllAction, &QAction::triggered, this, &FindToolBar::selectAll); - m_ui.selectAllButton->setDefaultAction(m_localSelectAllAction); + m_selectAllButton->setDefaultAction(m_localSelectAllAction); m_replaceAction = new QAction(tr("Replace"), this); cmd = ActionManager::registerAction(m_replaceAction, Constants::REPLACE); @@ -228,7 +334,7 @@ FindToolBar::FindToolBar(CurrentDocumentFind *currentDocumentFind) cmd = ActionManager::registerAction(m_localReplaceAction, Constants::REPLACE, findcontext); cmd->augmentActionWithShortcutToolTip(m_localReplaceAction); connect(m_localReplaceAction, &QAction::triggered, this, &FindToolBar::invokeReplace); - m_ui.replaceButton->setDefaultAction(m_localReplaceAction); + m_replaceButton->setDefaultAction(m_localReplaceAction); m_replaceNextAction = new QAction(tr("Replace && Find"), this); cmd = ActionManager::registerAction(m_replaceNextAction, Constants::REPLACE_NEXT); @@ -240,7 +346,7 @@ FindToolBar::FindToolBar(CurrentDocumentFind *currentDocumentFind) cmd = ActionManager::registerAction(m_localReplaceNextAction, Constants::REPLACE_NEXT, findcontext); cmd->augmentActionWithShortcutToolTip(m_localReplaceNextAction); connect(m_localReplaceNextAction, &QAction::triggered, this, &FindToolBar::invokeReplaceNext); - m_ui.replaceNextButton->setDefaultAction(m_localReplaceNextAction); + m_replaceNextButton->setDefaultAction(m_localReplaceNextAction); m_replacePreviousAction = new QAction(tr("Replace && Find Previous"), this); cmd = ActionManager::registerAction(m_replacePreviousAction, Constants::REPLACE_PREVIOUS); @@ -261,7 +367,7 @@ FindToolBar::FindToolBar(CurrentDocumentFind *currentDocumentFind) cmd = ActionManager::registerAction(m_localReplaceAllAction, Constants::REPLACE_ALL, findcontext); cmd->augmentActionWithShortcutToolTip(m_localReplaceAllAction); connect(m_localReplaceAllAction, &QAction::triggered, this, &FindToolBar::invokeReplaceAll); - m_ui.replaceAllButton->setDefaultAction(m_localReplaceAllAction); + m_replaceAllButton->setDefaultAction(m_localReplaceAllAction); m_caseSensitiveAction = new QAction(tr("Case Sensitive"), this); m_caseSensitiveAction->setIcon(Icons::FIND_CASE_INSENSITIVELY.icon()); @@ -328,8 +434,8 @@ void FindToolBar::installEventFilters() { if (!m_eventFiltersInstalled) { m_findCompleter->popup()->installEventFilter(this); - m_ui.findEdit->installEventFilter(this); - m_ui.replaceEdit->installEventFilter(this); + m_findEdit->installEventFilter(this); + m_replaceEdit->installEventFilter(this); this->installEventFilter(this); m_eventFiltersInstalled = true; } @@ -340,19 +446,19 @@ bool FindToolBar::eventFilter(QObject *obj, QEvent *event) if (event->type() == QEvent::KeyPress) { auto ke = static_cast(event); if (ke->key() == Qt::Key_Down) { - if (obj == m_ui.findEdit) { - if (m_ui.findEdit->text().isEmpty()) + if (obj == m_findEdit) { + if (m_findEdit->text().isEmpty()) m_findCompleter->setCompletionPrefix(QString()); m_findCompleter->complete(); - } else if (obj == m_ui.replaceEdit) { - if (m_ui.replaceEdit->text().isEmpty()) + } else if (obj == m_replaceEdit) { + if (m_replaceEdit->text().isEmpty()) m_replaceCompleter->setCompletionPrefix(QString()); m_replaceCompleter->complete(); } } } - if ((obj == m_ui.findEdit || obj == m_findCompleter->popup()) + if ((obj == m_findEdit || obj == m_findCompleter->popup()) && event->type() == QEvent::KeyPress) { auto ke = static_cast(event); if (ke->key() == Qt::Key_Space && (ke->modifiers() & Utils::HostOsInfo::controlModifier())) { @@ -413,34 +519,34 @@ void FindToolBar::updateToolBar() m_wholeWordAction->setEnabled(enabled); m_regularExpressionAction->setEnabled(enabled); m_preserveCaseAction->setEnabled(replaceEnabled && !hasFindFlag(FindRegularExpression)); - bool replaceFocus = m_ui.replaceEdit->hasFocus(); + bool replaceFocus = m_replaceEdit->hasFocus(); - m_ui.findLabel->setEnabled(enabled); - m_ui.findLabel->setVisible(showAllControls); - m_ui.findEdit->setEnabled(enabled); - m_ui.findEdit->setPlaceholderText(showAllControls ? QString() : tr("Search for...")); - m_ui.findPreviousButton->setEnabled(enabled); - m_ui.findPreviousButton->setVisible(showAllControls); - m_ui.findNextButton->setEnabled(enabled); - m_ui.findNextButton->setVisible(showAllControls); - m_ui.selectAllButton->setVisible(style == ControlStyle::Text + m_findLabel->setEnabled(enabled); + m_findLabel->setVisible(showAllControls); + m_findEdit->setEnabled(enabled); + m_findEdit->setPlaceholderText(showAllControls ? QString() : tr("Search for...")); + m_findPreviousButton->setEnabled(enabled); + m_findPreviousButton->setVisible(showAllControls); + m_findNextButton->setEnabled(enabled); + m_findNextButton->setVisible(showAllControls); + m_selectAllButton->setVisible(style == ControlStyle::Text && m_currentDocumentFind->supportsSelectAll()); - m_ui.horizontalSpacer->changeSize((showAllControls ? FINDBUTTON_SPACER_WIDTH : 0), 0, + m_horizontalSpacer->changeSize((showAllControls ? FINDBUTTON_SPACER_WIDTH : 0), 0, QSizePolicy::Expanding, QSizePolicy::Ignored); - m_ui.findButtonLayout->invalidate(); // apply spacer change + m_findButtonLayout->invalidate(); // apply spacer change - m_ui.replaceLabel->setEnabled(replaceEnabled); - m_ui.replaceLabel->setVisible(replaceEnabled && showAllControls); - m_ui.replaceEdit->setEnabled(replaceEnabled); - m_ui.replaceEdit->setPlaceholderText(showAllControls ? QString() : tr("Replace with...")); - m_ui.replaceEdit->setVisible(replaceEnabled); - m_ui.replaceButtonsWidget->setVisible(replaceEnabled && showAllControls); - m_ui.advancedButton->setVisible(replaceEnabled && showAllControls); + m_replaceLabel->setEnabled(replaceEnabled); + m_replaceLabel->setVisible(replaceEnabled && showAllControls); + m_replaceEdit->setEnabled(replaceEnabled); + m_replaceEdit->setPlaceholderText(showAllControls ? QString() : tr("Replace with...")); + m_replaceEdit->setVisible(replaceEnabled); + m_replaceButtonsWidget->setVisible(replaceEnabled && showAllControls); + m_advancedButton->setVisible(replaceEnabled && showAllControls); layout()->invalidate(); if (!replaceEnabled && enabled && replaceFocus) - m_ui.findEdit->setFocus(); + m_findEdit->setFocus(); updateIcons(); updateFlagMenus(); } @@ -502,29 +608,29 @@ void FindToolBar::invokeGlobalFindPrevious() QString FindToolBar::getFindText() { - return m_ui.findEdit->text(); + return m_findEdit->text(); } QString FindToolBar::getReplaceText() { - return m_ui.replaceEdit->text(); + return m_replaceEdit->text(); } void FindToolBar::setFindText(const QString &text) { - disconnect(m_ui.findEdit, &Utils::FancyLineEdit::textChanged, + disconnect(m_findEdit, &Utils::FancyLineEdit::textChanged, this, &FindToolBar::invokeFindIncremental); if (hasFindFlag(FindRegularExpression)) - m_ui.findEdit->setText(QRegularExpression::escape(text)); + m_findEdit->setText(QRegularExpression::escape(text)); else - m_ui.findEdit->setText(text); - connect(m_ui.findEdit, &Utils::FancyLineEdit::textChanged, + m_findEdit->setText(text); + connect(m_findEdit, &Utils::FancyLineEdit::textChanged, this, &FindToolBar::invokeFindIncremental); } void FindToolBar::selectFindText() { - m_ui.findEdit->selectAll(); + m_findEdit->selectAll(); } void FindToolBar::invokeFindStep() @@ -644,7 +750,7 @@ void FindToolBar::putSelectionToFindClipboard() void FindToolBar::updateFromFindClipboard() { if (QApplication::clipboard()->supportsFindBuffer()) { - QSignalBlocker blocker(m_ui.findEdit); + QSignalBlocker blocker(m_findEdit); setFindText(QApplication::clipboard()->text(QClipboard::FindBuffer)); } } @@ -660,7 +766,7 @@ void FindToolBar::findFlagsChanged() void FindToolBar::findEditButtonClicked() { - auto popup = new OptionsPopup(m_ui.findEdit, {Constants::CASE_SENSITIVE, Constants::WHOLE_WORDS, + auto popup = new OptionsPopup(m_findEdit, {Constants::CASE_SENSITIVE, Constants::WHOLE_WORDS, Constants::REGULAR_EXPRESSIONS, Constants::PRESERVE_CASE}); popup->show(); } @@ -674,9 +780,9 @@ void FindToolBar::updateIcons() bool preserveCase = effectiveFlags & FindPreserveCase; if (!casesensitive && !wholewords && !regexp && !preserveCase) { const QIcon icon = Utils::Icons::MAGNIFIER.icon(); - m_ui.findEdit->setButtonIcon(Utils::FancyLineEdit::Left, icon); + m_findEdit->setButtonIcon(Utils::FancyLineEdit::Left, icon); } else { - m_ui.findEdit->setButtonIcon(Utils::FancyLineEdit::Left, + m_findEdit->setButtonIcon(Utils::FancyLineEdit::Left, IFindFilter::pixmapForFindFlags(effectiveFlags)); } } @@ -754,27 +860,27 @@ bool FindToolBar::toolBarHasFocus() const FindToolBar::ControlStyle FindToolBar::controlStyle(bool replaceIsVisible) { - const Qt::ToolButtonStyle currentFindButtonStyle = m_ui.findNextButton->toolButtonStyle(); + const Qt::ToolButtonStyle currentFindButtonStyle = m_findNextButton->toolButtonStyle(); const int fullWidth = width(); if (replaceIsVisible) { // Since the replace buttons do not collapse to icons, they have precedence, here. - const int replaceFixedWidth = m_ui.replaceLabel->sizeHint().width() - + m_ui.replaceButton->sizeHint().width() - + m_ui.replaceNextButton->sizeHint().width() - + m_ui.replaceAllButton->sizeHint().width() - + m_ui.advancedButton->sizeHint().width(); + const int replaceFixedWidth = m_replaceLabel->sizeHint().width() + + m_replaceButton->sizeHint().width() + + m_replaceNextButton->sizeHint().width() + + m_replaceAllButton->sizeHint().width() + + m_advancedButton->sizeHint().width(); return fullWidth - replaceFixedWidth >= MINIMUM_WIDTH_FOR_COMPLEX_LAYOUT ? ControlStyle::Text : ControlStyle::Hidden; } const auto findWidth = [this] { const int selectAllWidth = m_currentDocumentFind->supportsSelectAll() ? - m_ui.selectAllButton->sizeHint().width() : 0; - return m_ui.findLabel->sizeHint().width() + m_ui.findNextButton->sizeHint().width() - + m_ui.findPreviousButton->sizeHint().width() + m_selectAllButton->sizeHint().width() : 0; + return m_findLabel->sizeHint().width() + m_findNextButton->sizeHint().width() + + m_findPreviousButton->sizeHint().width() + selectAllWidth + FINDBUTTON_SPACER_WIDTH - + m_ui.close->sizeHint().width(); + + m_close->sizeHint().width(); }; setFindButtonStyle(Qt::ToolButtonTextOnly); const int findWithTextWidth = findWidth(); @@ -791,8 +897,8 @@ FindToolBar::ControlStyle FindToolBar::controlStyle(bool replaceIsVisible) void FindToolBar::setFindButtonStyle(Qt::ToolButtonStyle style) { - m_ui.findPreviousButton->setToolButtonStyle(style); - m_ui.findNextButton->setToolButtonStyle(style); + m_findPreviousButton->setToolButtonStyle(style); + m_findNextButton->setToolButtonStyle(style); } /*! @@ -819,7 +925,7 @@ void FindToolBar::acceptCandidateAndMoveToolBar() void FindToolBar::indicateSearchState(IFindSupport::Result searchState) { m_lastResult = searchState; - m_ui.findEdit->validate(); + m_findEdit->validate(); } void FindToolBar::openFind(bool focus) @@ -888,15 +994,15 @@ void FindToolBar::selectAll() bool FindToolBar::focusNextPrevChild(bool next) { - QAbstractButton *optionsButton = m_ui.findEdit->button(Utils::FancyLineEdit::Left); + QAbstractButton *optionsButton = m_findEdit->button(Utils::FancyLineEdit::Left); // close tab order - if (next && m_ui.advancedButton->hasFocus()) + if (next && m_advancedButton->hasFocus()) optionsButton->setFocus(Qt::TabFocusReason); else if (next && optionsButton->hasFocus()) - m_ui.findEdit->setFocus(Qt::TabFocusReason); + m_findEdit->setFocus(Qt::TabFocusReason); else if (!next && optionsButton->hasFocus()) - m_ui.advancedButton->setFocus(Qt::TabFocusReason); - else if (!next && m_ui.findEdit->hasFocus()) + m_advancedButton->setFocus(Qt::TabFocusReason); + else if (!next && m_findEdit->hasFocus()) optionsButton->setFocus(Qt::TabFocusReason); else return Utils::StyledBar::focusNextPrevChild(next); @@ -1005,7 +1111,7 @@ void FindToolBar::setLightColoredIcon(bool lightColored) : Utils::Icons::NEXT_TOOLBAR.icon()); m_localFindPreviousAction->setIcon(lightColored ? Utils::Icons::PREV.icon() : Utils::Icons::PREV_TOOLBAR.icon()); - m_ui.close->setIcon(lightColored ? Utils::Icons::CLOSE_FOREGROUND.icon() + m_close->setIcon(lightColored ? Utils::Icons::CLOSE_FOREGROUND.icon() : Utils::Icons::CLOSE_TOOLBAR.icon()); } @@ -1040,5 +1146,4 @@ void FindToolBar::updateReplaceEnabled() m_replacePreviousAction->setEnabled(globalsEnabled); } -} // namespace Internal -} // namespace Core +} // Core::Internal diff --git a/src/plugins/coreplugin/find/findtoolbar.h b/src/plugins/coreplugin/find/findtoolbar.h index ac75d30b2ec..ed4e36fcba8 100644 --- a/src/plugins/coreplugin/find/findtoolbar.h +++ b/src/plugins/coreplugin/find/findtoolbar.h @@ -3,7 +3,6 @@ #pragma once -#include "ui_findwidget.h" #include "currentdocumentfind.h" #include @@ -11,6 +10,16 @@ #include +QT_BEGIN_NAMESPACE +class QCompleter; +class QHBoxLayout; +class QLabel; +class QSpacerItem; +class QToolButton; +QT_END_NAMESPACE + +namespace Utils { class FancyLineEdit; } + namespace Core { class FindToolBarPlaceHolder; @@ -122,7 +131,7 @@ private: void updateReplaceEnabled(); CurrentDocumentFind *m_currentDocumentFind = nullptr; - Ui::FindWidget m_ui; + QCompleter *m_findCompleter = nullptr; QCompleter *m_replaceCompleter = nullptr; QAction *m_goToCurrentFindAction = nullptr; @@ -150,6 +159,21 @@ private: QAction *m_localReplacePreviousAction = nullptr; QAction *m_localReplaceAllAction = nullptr; + QLabel *m_findLabel; + Utils::FancyLineEdit *m_findEdit; + QHBoxLayout *m_findButtonLayout; + QToolButton *m_findPreviousButton; + QToolButton *m_findNextButton; + QToolButton *m_selectAllButton; + QSpacerItem *m_horizontalSpacer; + QToolButton *m_close; + QLabel *m_replaceLabel; + Utils::FancyLineEdit *m_replaceEdit; + QWidget *m_replaceButtonsWidget; + QToolButton *m_replaceButton; + QToolButton *m_replaceNextButton; + QToolButton *m_replaceAllButton; + QToolButton *m_advancedButton; FindFlags m_findFlags; QTimer m_findIncrementalTimer; diff --git a/src/plugins/coreplugin/find/findwidget.ui b/src/plugins/coreplugin/find/findwidget.ui deleted file mode 100644 index 2e50aaa878b..00000000000 --- a/src/plugins/coreplugin/find/findwidget.ui +++ /dev/null @@ -1,290 +0,0 @@ - - - Core::Internal::FindWidget - - - - 0 - 0 - 681 - 88 - - - - Find - - - - 5 - - - 2 - - - 0 - - - 1 - - - 3 - - - 1 - - - - - Find: - - - - - - - - 100 - 0 - - - - - - - - - 3 - - - 0 - - - 0 - - - 0 - - - 0 - - - - - - - - - - - - - - - - - - Qt::Horizontal - - - - 40 - 0 - - - - - - - - - - - - - - 0 - - - - - Replace with: - - - - - - - Qt::Vertical - - - - 0 - 0 - - - - - - - - - - 0 - - - - - - 100 - 0 - - - - - - - - Qt::Vertical - - - - 0 - 0 - - - - - - - - - - 3 - - - 0 - - - - - - 0 - 0 - - - - - 3 - - - 0 - - - 0 - - - 0 - - - 0 - - - - - Replace - - - Qt::ToolButtonTextOnly - - - Qt::LeftArrow - - - - - - - - - - Replace && Find - - - Qt::ToolButtonTextOnly - - - Qt::RightArrow - - - - - - - - - - Replace All - - - Qt::ToolButtonTextOnly - - - - - - - - - - 0 - - - - - Advanced... - - - Qt::ToolButtonTextOnly - - - - - - - Qt::Vertical - - - - 0 - 0 - - - - - - - - - - - - - Utils::FancyLineEdit - QLineEdit -
utils/fancylineedit.h
-
-
- - findEdit - replaceEdit - findPreviousButton - findNextButton - replaceButton - replaceNextButton - replaceAllButton - advancedButton - close - - - -
diff --git a/src/plugins/coreplugin/find/searchresultwidget.cpp b/src/plugins/coreplugin/find/searchresultwidget.cpp index 9009fa5e9c4..f9e2dafb9a9 100644 --- a/src/plugins/coreplugin/find/searchresultwidget.cpp +++ b/src/plugins/coreplugin/find/searchresultwidget.cpp @@ -103,9 +103,9 @@ SearchResultWidget::SearchResultWidget(QWidget *parent) : auto messageLayout = new QHBoxLayout(m_messageWidget); messageLayout->setContentsMargins(2, 2, 2, 2); m_messageWidget->setLayout(messageLayout); - QLabel *messageLabel = new QLabel(tr("Search was canceled.")); - messageLabel->setPalette(pal); - messageLayout->addWidget(messageLabel); + m_messageLabel = new QLabel; + m_messageLabel->setPalette(pal); + messageLayout->addWidget(m_messageLabel); layout->addWidget(m_messageWidget); m_messageWidget->setVisible(false); @@ -435,7 +435,7 @@ void SearchResultWidget::setReplaceEnabled(bool enabled) m_replaceButton->setEnabled(enabled); } -void SearchResultWidget::finishSearch(bool canceled) +void SearchResultWidget::finishSearch(bool canceled, const QString &reason) { Id sizeWarningId(SIZE_WARNING_ID); m_infoBar.removeInfo(sizeWarningId); @@ -444,6 +444,8 @@ void SearchResultWidget::finishSearch(bool canceled) m_replaceButton->setEnabled(m_count > 0); m_preserveCaseCheck->setEnabled(m_count > 0); m_cancelButton->setVisible(false); + if (canceled) + m_messageLabel->setText(reason.isEmpty() ? tr("Search was canceled.") : reason); m_messageWidget->setVisible(canceled); m_searchAgainButton->setVisible(m_searchAgainSupported); m_searching = false; diff --git a/src/plugins/coreplugin/find/searchresultwidget.h b/src/plugins/coreplugin/find/searchresultwidget.h index be3bda36dc9..41b55e3dfe1 100644 --- a/src/plugins/coreplugin/find/searchresultwidget.h +++ b/src/plugins/coreplugin/find/searchresultwidget.h @@ -70,7 +70,7 @@ public: void setReplaceEnabled(bool enabled); public slots: - void finishSearch(bool canceled); + void finishSearch(bool canceled, const QString &reason); void sendRequestPopup(); signals: @@ -118,6 +118,7 @@ private: QWidget *m_descriptionContainer = nullptr; QLabel *m_label = nullptr; QLabel *m_searchTerm = nullptr; + QLabel *m_messageLabel = nullptr; QToolButton *m_cancelButton = nullptr; QLabel *m_matchesFoundLabel = nullptr; bool m_preserveCaseSupported = true; diff --git a/src/plugins/coreplugin/find/searchresultwindow.cpp b/src/plugins/coreplugin/find/searchresultwindow.cpp index d929cf9672f..d4bd1d98f46 100644 --- a/src/plugins/coreplugin/find/searchresultwindow.cpp +++ b/src/plugins/coreplugin/find/searchresultwindow.cpp @@ -838,9 +838,9 @@ void SearchResult::setFilter(SearchResultFilter *filter) Notifies the \uicontrol {Search Results} output pane that the current search has been \a canceled, and the UI should reflect that. */ -void SearchResult::finishSearch(bool canceled) +void SearchResult::finishSearch(bool canceled, const QString &reason) { - m_widget->finishSearch(canceled); + m_widget->finishSearch(canceled, reason); } /*! diff --git a/src/plugins/coreplugin/find/searchresultwindow.h b/src/plugins/coreplugin/find/searchresultwindow.h index 895640db87d..d41340ce75a 100644 --- a/src/plugins/coreplugin/find/searchresultwindow.h +++ b/src/plugins/coreplugin/find/searchresultwindow.h @@ -58,7 +58,7 @@ public slots: void addResult(const SearchResultItem &item); void addResults(const QList &items, AddMode mode); void setFilter(SearchResultFilter *filter); // Takes ownership - void finishSearch(bool canceled); + void finishSearch(bool canceled, const QString &reason = {}); void setTextToReplace(const QString &textToReplace); void restart(); void setReplaceEnabled(bool enabled); diff --git a/src/plugins/coreplugin/iwizardfactory.cpp b/src/plugins/coreplugin/iwizardfactory.cpp index 11ed1577b37..938dc06fced 100644 --- a/src/plugins/coreplugin/iwizardfactory.cpp +++ b/src/plugins/coreplugin/iwizardfactory.cpp @@ -174,33 +174,31 @@ QList IWizardFactory::allWizardFactories() QHash sanityCheck; for (const FactoryCreator &fc : qAsConst(s_factoryCreators)) { - const QList tmp = fc(); - for (IWizardFactory *newFactory : tmp) { - QTC_ASSERT(newFactory, continue); - IWizardFactory *existingFactory = sanityCheck.value(newFactory->id()); + IWizardFactory *newFactory = fc(); + QTC_ASSERT(newFactory, continue); + IWizardFactory *existingFactory = sanityCheck.value(newFactory->id()); - QTC_ASSERT(existingFactory != newFactory, continue); - if (existingFactory) { - qWarning("%s", qPrintable(tr("Factory with id=\"%1\" already registered. Deleting.") - .arg(existingFactory->id().toString()))); - delete newFactory; - continue; - } - - QTC_ASSERT(!newFactory->m_action, continue); - newFactory->m_action = new QAction(newFactory->displayName(), newFactory); - ActionManager::registerAction(newFactory->m_action, actionId(newFactory)); - - connect(newFactory->m_action, &QAction::triggered, newFactory, [newFactory]() { - if (!ICore::isNewItemDialogRunning()) { - FilePath path = newFactory->runPath({}); - newFactory->runWizard(path, ICore::dialogParent(), Id(), QVariantMap()); - } - }); - - sanityCheck.insert(newFactory->id(), newFactory); - s_allFactories << newFactory; + QTC_ASSERT(existingFactory != newFactory, continue); + if (existingFactory) { + qWarning("%s", qPrintable(tr("Factory with id=\"%1\" already registered. Deleting.") + .arg(existingFactory->id().toString()))); + delete newFactory; + continue; } + + QTC_ASSERT(!newFactory->m_action, continue); + newFactory->m_action = new QAction(newFactory->displayName(), newFactory); + ActionManager::registerAction(newFactory->m_action, actionId(newFactory)); + + connect(newFactory->m_action, &QAction::triggered, newFactory, [newFactory]() { + if (!ICore::isNewItemDialogRunning()) { + FilePath path = newFactory->runPath({}); + newFactory->runWizard(path, ICore::dialogParent(), Id(), QVariantMap()); + } + }); + + sanityCheck.insert(newFactory->id(), newFactory); + s_allFactories << newFactory; } } diff --git a/src/plugins/coreplugin/iwizardfactory.h b/src/plugins/coreplugin/iwizardfactory.h index 10dccf3ffd1..20223ac285a 100644 --- a/src/plugins/coreplugin/iwizardfactory.h +++ b/src/plugins/coreplugin/iwizardfactory.h @@ -77,7 +77,7 @@ public: virtual bool isAvailable(Utils::Id platformId) const; QSet supportedPlatforms() const; - using FactoryCreator = std::function()>; + using FactoryCreator = std::function; static void registerFactoryCreator(const FactoryCreator &creator); // Utility to find all registered wizards diff --git a/src/plugins/coreplugin/locator/locatorwidget.cpp b/src/plugins/coreplugin/locator/locatorwidget.cpp index 85051bc7c2b..71c0d5f90ce 100644 --- a/src/plugins/coreplugin/locator/locatorwidget.cpp +++ b/src/plugins/coreplugin/locator/locatorwidget.cpp @@ -718,6 +718,39 @@ bool LocatorWidget::eventFilter(QObject *obj, QEvent *event) QToolTip::hideText(); auto keyEvent = static_cast(event); + + if (keyEvent->matches(QKeySequence::MoveToStartOfBlock) + || keyEvent->matches(QKeySequence::SelectStartOfBlock) + || keyEvent->matches(QKeySequence::MoveToStartOfLine) + || keyEvent->matches(QKeySequence::SelectStartOfLine)) { + const int filterEndIndex = currentText().indexOf(' '); + if (filterEndIndex > 0 && filterEndIndex < currentText().length() - 1) { + const bool startsWithShortcutString + = Utils::anyOf(Locator::filters(), + [shortcutString = currentText().left(filterEndIndex)]( + const ILocatorFilter *filter) { + return filter->isEnabled() && !filter->isHidden() + && filter->shortcutString() == shortcutString; + }); + if (startsWithShortcutString) { + const int cursorPosition = m_fileLineEdit->cursorPosition(); + const int patternStart = filterEndIndex + 1; + const bool mark = keyEvent->matches(QKeySequence::SelectStartOfBlock) + || keyEvent->matches(QKeySequence::SelectStartOfLine); + if (cursorPosition == patternStart) { + m_fileLineEdit->home(mark); + } else { + const int diff = m_fileLineEdit->cursorPosition() - patternStart; + if (diff < 0) + m_fileLineEdit->cursorForward(mark, qAbs(diff)); + else + m_fileLineEdit->cursorBackward(mark, diff); + } + return true; + } + } + } + switch (keyEvent->key()) { case Qt::Key_PageUp: case Qt::Key_PageDown: diff --git a/src/plugins/coreplugin/mimetypemagicdialog.cpp b/src/plugins/coreplugin/mimetypemagicdialog.cpp index 8ebd8b32f2d..a3f432e74d0 100644 --- a/src/plugins/coreplugin/mimetypemagicdialog.cpp +++ b/src/plugins/coreplugin/mimetypemagicdialog.cpp @@ -6,74 +6,152 @@ #include "icore.h" #include +#include #include #include #include #include -using namespace Core; -using namespace Internal; +using namespace Utils; -static Utils::MimeMagicRule::Type typeValue(int i) +namespace Core::Internal { + +static MimeMagicRule::Type typeValue(int i) { - QTC_ASSERT(i < Utils::MimeMagicRule::Byte, - return Utils::MimeMagicRule::Invalid); - return Utils::MimeMagicRule::Type(i + 1/*0==invalid*/); + QTC_ASSERT(i < MimeMagicRule::Byte, return MimeMagicRule::Invalid); + return MimeMagicRule::Type(i + 1/*0==invalid*/); } MimeTypeMagicDialog::MimeTypeMagicDialog(QWidget *parent) : QDialog(parent) { - ui.setupUi(this); + resize(582, 419); setWindowTitle(tr("Add Magic Header")); - connect(ui.useRecommendedGroupBox, &QGroupBox::toggled, + + auto informationLabel = new QLabel; + informationLabel->setText(tr("

MIME magic data is interpreted as defined " + "by the Shared MIME-info Database specification from " + "" + "freedesktop.org.


")); // FIXME: Simplify for translators + informationLabel->setWordWrap(true); + + m_valueLineEdit = new QLineEdit; + + m_typeSelector = new QComboBox; + m_typeSelector->addItem(tr("String")); + m_typeSelector->addItem(tr("RegExp")); + m_typeSelector->addItem(tr("Host16")); + m_typeSelector->addItem(tr("Host32")); + m_typeSelector->addItem(tr("Big16")); + m_typeSelector->addItem(tr("Big32")); + m_typeSelector->addItem(tr("Little16")); + m_typeSelector->addItem(tr("Little32")); + m_typeSelector->addItem(tr("Byte")); + + m_maskLineEdit = new QLineEdit; + + m_useRecommendedGroupBox = new QGroupBox(tr("Use Recommended")); + m_useRecommendedGroupBox->setCheckable(true); + + m_noteLabel = new QLabel(tr("

" + "Note: Wide range values might impact performance when opening " + "files.

")); + m_noteLabel->setTextFormat(Qt::RichText); + + m_startRangeLabel = new QLabel(tr("Range start:")); + + m_endRangeLabel = new QLabel(tr("Range end:")); + + m_priorityLabel = new QLabel(tr("Priority:")); + + m_prioritySpinBox = new QSpinBox(m_useRecommendedGroupBox); + m_prioritySpinBox->setMinimum(1); + m_prioritySpinBox->setValue(50); + + m_startRangeSpinBox = new QSpinBox(m_useRecommendedGroupBox); + m_startRangeSpinBox->setMaximum(9999); + + m_endRangeSpinBox = new QSpinBox(m_useRecommendedGroupBox); + m_endRangeSpinBox->setMaximum(9999); + + auto buttonBox = new QDialogButtonBox(QDialogButtonBox::Cancel|QDialogButtonBox::Ok); + + using namespace Utils::Layouting; + + Column { + Form { + m_startRangeLabel, m_startRangeSpinBox, br, + m_endRangeLabel, m_endRangeSpinBox, br, + m_priorityLabel, m_prioritySpinBox, br, + }, + m_noteLabel + }.attachTo(m_useRecommendedGroupBox); + + Column { + informationLabel, + Form { + tr("Value:"), m_valueLineEdit, br, + tr("Type:"), m_typeSelector, st, br, + tr("Mask:"), m_maskLineEdit, br + }, + m_useRecommendedGroupBox, + st, + buttonBox + }.attachTo(this); + + connect(m_useRecommendedGroupBox, &QGroupBox::toggled, this, &MimeTypeMagicDialog::applyRecommended); - connect(ui.buttonBox, &QDialogButtonBox::accepted, this, &MimeTypeMagicDialog::validateAccept); - connect(ui.informationLabel, &QLabel::linkActivated, this, [](const QString &link) { + connect(buttonBox, &QDialogButtonBox::accepted, + this, &MimeTypeMagicDialog::validateAccept); + connect(buttonBox, &QDialogButtonBox::rejected, + this, &QDialog::reject); + + connect(informationLabel, &QLabel::linkActivated, this, [](const QString &link) { QDesktopServices::openUrl(QUrl(link)); }); - connect(ui.typeSelector, &QComboBox::activated, this, [this] { - if (ui.useRecommendedGroupBox->isChecked()) + connect(m_typeSelector, &QComboBox::activated, this, [this] { + if (m_useRecommendedGroupBox->isChecked()) setToRecommendedValues(); }); - ui.valueLineEdit->setFocus(); + applyRecommended(m_useRecommendedGroupBox->isChecked()); + m_valueLineEdit->setFocus(); } void MimeTypeMagicDialog::setToRecommendedValues() { - ui.startRangeSpinBox->setValue(0); - ui.endRangeSpinBox->setValue(ui.typeSelector->currentIndex() == 1/*regexp*/ ? 200 : 0); - ui.prioritySpinBox->setValue(50); + m_startRangeSpinBox->setValue(0); + m_endRangeSpinBox->setValue(m_typeSelector->currentIndex() == 1/*regexp*/ ? 200 : 0); + m_prioritySpinBox->setValue(50); } void MimeTypeMagicDialog::applyRecommended(bool checked) { if (checked) { // save previous custom values - m_customRangeStart = ui.startRangeSpinBox->value(); - m_customRangeEnd = ui.endRangeSpinBox->value(); - m_customPriority = ui.prioritySpinBox->value(); + m_customRangeStart = m_startRangeSpinBox->value(); + m_customRangeEnd = m_endRangeSpinBox->value(); + m_customPriority = m_prioritySpinBox->value(); setToRecommendedValues(); } else { // restore previous custom values - ui.startRangeSpinBox->setValue(m_customRangeStart); - ui.endRangeSpinBox->setValue(m_customRangeEnd); - ui.prioritySpinBox->setValue(m_customPriority); + m_startRangeSpinBox->setValue(m_customRangeStart); + m_endRangeSpinBox->setValue(m_customRangeEnd); + m_prioritySpinBox->setValue(m_customPriority); } - ui.startRangeLabel->setEnabled(!checked); - ui.startRangeSpinBox->setEnabled(!checked); - ui.endRangeLabel->setEnabled(!checked); - ui.endRangeSpinBox->setEnabled(!checked); - ui.priorityLabel->setEnabled(!checked); - ui.prioritySpinBox->setEnabled(!checked); - ui.noteLabel->setEnabled(!checked); + m_startRangeLabel->setEnabled(!checked); + m_startRangeSpinBox->setEnabled(!checked); + m_endRangeLabel->setEnabled(!checked); + m_endRangeSpinBox->setEnabled(!checked); + m_priorityLabel->setEnabled(!checked); + m_prioritySpinBox->setEnabled(!checked); + m_noteLabel->setEnabled(!checked); } void MimeTypeMagicDialog::validateAccept() { QString errorMessage; - Utils::MimeMagicRule rule = createRule(&errorMessage); + MimeMagicRule rule = createRule(&errorMessage); if (rule.isValid()) accept(); else @@ -82,22 +160,21 @@ void MimeTypeMagicDialog::validateAccept() void MimeTypeMagicDialog::setMagicData(const MagicData &data) { - ui.valueLineEdit->setText(QString::fromUtf8(data.m_rule.value())); - ui.typeSelector->setCurrentIndex(data.m_rule.type() - 1/*0 == invalid*/); - ui.maskLineEdit->setText(QString::fromLatin1(MagicData::normalizedMask(data.m_rule))); - ui.useRecommendedGroupBox->setChecked(false); // resets values - ui.startRangeSpinBox->setValue(data.m_rule.startPos()); - ui.endRangeSpinBox->setValue(data.m_rule.endPos()); - ui.prioritySpinBox->setValue(data.m_priority); + m_valueLineEdit->setText(QString::fromUtf8(data.m_rule.value())); + m_typeSelector->setCurrentIndex(data.m_rule.type() - 1/*0 == invalid*/); + m_maskLineEdit->setText(QString::fromLatin1(MagicData::normalizedMask(data.m_rule))); + m_useRecommendedGroupBox->setChecked(false); // resets values + m_startRangeSpinBox->setValue(data.m_rule.startPos()); + m_endRangeSpinBox->setValue(data.m_rule.endPos()); + m_prioritySpinBox->setValue(data.m_priority); } MagicData MimeTypeMagicDialog::magicData() const { - MagicData data(createRule(), ui.prioritySpinBox->value()); + MagicData data(createRule(), m_prioritySpinBox->value()); return data; } - bool MagicData::operator==(const MagicData &other) const { return m_priority == other.m_priority && m_rule == other.m_rule; @@ -107,12 +184,12 @@ bool MagicData::operator==(const MagicData &other) const Returns the mask, or an empty string if the mask is the default mask which is set by MimeMagicRule when setting an empty mask for string patterns. */ -QByteArray MagicData::normalizedMask(const Utils::MimeMagicRule &rule) +QByteArray MagicData::normalizedMask(const MimeMagicRule &rule) { // convert mask and see if it is the "default" one (which corresponds to "empty" mask) // see MimeMagicRule constructor QByteArray mask = rule.mask(); - if (rule.type() == Utils::MimeMagicRule::String) { + if (rule.type() == MimeMagicRule::String) { QByteArray actualMask = QByteArray::fromHex(QByteArray::fromRawData(mask.constData() + 2, mask.size() - 2)); if (actualMask.count(char(-1)) == actualMask.size()) { @@ -123,18 +200,20 @@ QByteArray MagicData::normalizedMask(const Utils::MimeMagicRule &rule) return mask; } -Utils::MimeMagicRule MimeTypeMagicDialog::createRule(QString *errorMessage) const +MimeMagicRule MimeTypeMagicDialog::createRule(QString *errorMessage) const { - Utils::MimeMagicRule::Type type = typeValue(ui.typeSelector->currentIndex()); - Utils::MimeMagicRule rule(type, - ui.valueLineEdit->text().toUtf8(), - ui.startRangeSpinBox->value(), - ui.endRangeSpinBox->value(), - ui.maskLineEdit->text().toLatin1(), - errorMessage); - if (type == Utils::MimeMagicRule::Invalid) { + MimeMagicRule::Type type = typeValue(m_typeSelector->currentIndex()); + MimeMagicRule rule(type, + m_valueLineEdit->text().toUtf8(), + m_startRangeSpinBox->value(), + m_endRangeSpinBox->value(), + m_maskLineEdit->text().toLatin1(), + errorMessage); + if (type == MimeMagicRule::Invalid) { if (errorMessage) *errorMessage = tr("Internal error: Type is invalid"); } return rule; } + +} // Core::Internal diff --git a/src/plugins/coreplugin/mimetypemagicdialog.h b/src/plugins/coreplugin/mimetypemagicdialog.h index b47b32b9513..023f878a53e 100644 --- a/src/plugins/coreplugin/mimetypemagicdialog.h +++ b/src/plugins/coreplugin/mimetypemagicdialog.h @@ -3,12 +3,24 @@ #pragma once -#include "ui_mimetypemagicdialog.h" - #include -namespace Core { -namespace Internal { +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace Core::Internal { class MagicData { @@ -48,13 +60,24 @@ private: void validateAccept(); Utils::MimeMagicRule createRule(QString *errorMessage = nullptr) const; - Ui::MimeTypeMagicDialog ui; int m_customRangeStart = 0; int m_customRangeEnd = 0; int m_customPriority = 50; + + QLineEdit *m_valueLineEdit; + QComboBox *m_typeSelector; + QLineEdit *m_maskLineEdit; + QGroupBox *m_useRecommendedGroupBox; + QLabel *m_noteLabel; + QLabel *m_startRangeLabel; + QLabel *m_endRangeLabel; + QLabel *m_priorityLabel; + QSpinBox *m_prioritySpinBox; + QSpinBox *m_startRangeSpinBox; + QSpinBox *m_endRangeSpinBox; + QSpacerItem *verticalSpacer; }; -} // Internal -} // Core +} // Core::Internal Q_DECLARE_METATYPE(Core::Internal::MagicData) diff --git a/src/plugins/coreplugin/mimetypemagicdialog.ui b/src/plugins/coreplugin/mimetypemagicdialog.ui deleted file mode 100644 index 6dfcb1caccf..00000000000 --- a/src/plugins/coreplugin/mimetypemagicdialog.ui +++ /dev/null @@ -1,269 +0,0 @@ - - - Core::Internal::MimeTypeMagicDialog - - - - 0 - 0 - 582 - 419 - - - - Dialog - - - - - - <html><head/><body><p>MIME magic data is interpreted as defined by the Shared MIME-info Database specification from <a href="http://standards.freedesktop.org/shared-mime-info-spec/shared-mime-info-spec-latest.html">freedesktop.org</a>.<hr/></p></body></html> - - - true - - - - - - - - - Value: - - - - - - - - - - Type: - - - - - - - - - - String - - - - - RegExp - - - - - Host16 - - - - - Host32 - - - - - Big16 - - - - - Big32 - - - - - Little16 - - - - - Little32 - - - - - Byte - - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - - - Mask: - - - - - - - - - - - - Use Recommended - - - true - - - - - - false - - - <html><head/><body><p><span style=" font-style:italic;">Note: Wide range values might impact performance when opening files.</span></p></body></html> - - - Qt::RichText - - - - - - - - - false - - - Range start: - - - - - - - false - - - Range end: - - - - - - - false - - - Priority: - - - - - - - false - - - 1 - - - 50 - - - - - - - false - - - 9999 - - - - - - - false - - - 9999 - - - - - - - - - - - - Qt::Vertical - - - - 20 - 0 - - - - - - - - Qt::Horizontal - - - QDialogButtonBox::Cancel|QDialogButtonBox::Ok - - - - - - - valueLineEdit - typeSelector - maskLineEdit - useRecommendedGroupBox - startRangeSpinBox - endRangeSpinBox - prioritySpinBox - - - - - buttonBox - rejected() - Core::Internal::MimeTypeMagicDialog - reject() - - - 301 - 356 - - - 286 - 274 - - - - - diff --git a/src/plugins/coreplugin/mimetypesettings.cpp b/src/plugins/coreplugin/mimetypesettings.cpp index 167ad0879cd..79045ae40ab 100644 --- a/src/plugins/coreplugin/mimetypesettings.cpp +++ b/src/plugins/coreplugin/mimetypesettings.cpp @@ -1,18 +1,21 @@ // Copyright (C) 2016 The Qt Company Ltd. // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0+ OR GPL-3.0 WITH Qt-GPL-exception-1.0 +#include "mimetypesettings.h" + #include "coreconstants.h" #include "icore.h" #include "mimetypemagicdialog.h" -#include "mimetypesettings.h" -#include "ui_mimetypesettingspage.h" + #include #include #include #include #include +#include #include +#include #include #include #include @@ -22,32 +25,41 @@ #include #include #include +#include #include +#include +#include +#include #include #include +#include #include #include +#include +#include #include #include -#include +#include +#include #include #include -static const char kModifiedMimeTypesFile[] = "mimetypes/modifiedmimetypes.xml"; +const char kModifiedMimeTypesFile[] = "mimetypes/modifiedmimetypes.xml"; -static const char mimeInfoTagC[] = "mime-info"; -static const char mimeTypeTagC[] = "mime-type"; -static const char mimeTypeAttributeC[] = "type"; -static const char patternAttributeC[] = "pattern"; -static const char matchTagC[] = "match"; -static const char matchValueAttributeC[] = "value"; -static const char matchTypeAttributeC[] = "type"; -static const char matchOffsetAttributeC[] = "offset"; -static const char priorityAttributeC[] = "priority"; -static const char matchMaskAttributeC[] = "mask"; +const char mimeInfoTagC[] = "mime-info"; +const char mimeTypeTagC[] = "mime-type"; +const char mimeTypeAttributeC[] = "type"; +const char patternAttributeC[] = "pattern"; +const char matchTagC[] = "match"; +const char matchValueAttributeC[] = "value"; +const char matchTypeAttributeC[] = "type"; +const char matchOffsetAttributeC[] = "offset"; +const char priorityAttributeC[] = "priority"; +const char matchMaskAttributeC[] = "mask"; -namespace Core { -namespace Internal { +using namespace Utils; + +namespace Core::Internal { class MimeEditorDelegate : public QStyledItemDelegate { @@ -254,9 +266,16 @@ public: QSortFilterProxyModel *m_filterModel; UserMimeTypeHash m_pendingModifiedMimeTypes; // currently edited in the options page QString m_filterPattern; - Ui::MimeTypeSettingsPage m_ui; QPointer m_widget; MimeEditorDelegate m_delegate; + + QTreeView *m_mimeTypesTreeView; + QPushButton *m_resetHandlersButton; + QLineEdit *m_patternsLineEdit; + QTreeWidget *m_magicHeadersTreeWidget; + QPushButton *m_addMagicButton; + QPushButton *m_editMagicButton; + QPushButton *m_removeMagicButton; }; const QChar MimeTypeSettingsPrivate::kSemiColon(QLatin1Char(';')); @@ -277,35 +296,112 @@ MimeTypeSettingsPrivate::~MimeTypeSettingsPrivate() = default; void MimeTypeSettingsPrivate::configureUi(QWidget *w) { - m_ui.setupUi(w); - m_ui.filterLineEdit->setText(m_filterPattern); + auto filterLineEdit = new FancyLineEdit; + filterLineEdit->setFiltering(true); + + m_mimeTypesTreeView = new QTreeView; + m_mimeTypesTreeView->setEditTriggers(QAbstractItemView::DoubleClicked + |QAbstractItemView::EditKeyPressed|QAbstractItemView::SelectedClicked); + m_mimeTypesTreeView->setRootIsDecorated(false); + m_mimeTypesTreeView->setUniformRowHeights(true); + + auto resetButton = new QPushButton; + resetButton->setToolTip(QCoreApplication::translate("Core::Internal::MimeTypeSettingsPage", "Reset all MIME type definitions to their defaults.", nullptr)); + resetButton->setText(QCoreApplication::translate("Core::Internal::MimeTypeSettingsPage", "Reset MIME Types", nullptr)); + + m_resetHandlersButton = new QPushButton; + m_resetHandlersButton->setToolTip(QCoreApplication::translate("Core::Internal::MimeTypeSettingsPage", "Reset the assigned handler for all MIME type definitions to the default.", nullptr)); + m_resetHandlersButton->setText(QCoreApplication::translate("Core::Internal::MimeTypeSettingsPage", "Reset Handlers", nullptr)); + + auto patternsLabel = new QLabel; + patternsLabel->setText(QCoreApplication::translate("Core::Internal::MimeTypeSettingsPage", "Patterns:", nullptr)); + + m_patternsLineEdit = new QLineEdit; + m_patternsLineEdit->setToolTip(QCoreApplication::translate("Core::Internal::MimeTypeSettingsPage", "A semicolon-separated list of wildcarded file names.", nullptr)); + + m_magicHeadersTreeWidget = new QTreeWidget; + m_magicHeadersTreeWidget->setHeaderItem(new QTreeWidgetItem({ + QCoreApplication::translate("Core::Internal::MimeTypeSettingsPage", "Magic Header"), + QCoreApplication::translate("Core::Internal::MimeTypeSettingsPage", "Type"), + QCoreApplication::translate("Core::Internal::MimeTypeSettingsPage", "Range"), + QCoreApplication::translate("Core::Internal::MimeTypeSettingsPage", "Priority") + })); + m_magicHeadersTreeWidget->setRootIsDecorated(false); + m_magicHeadersTreeWidget->setUniformRowHeights(true); + m_magicHeadersTreeWidget->setColumnCount(4); + + m_addMagicButton = new QPushButton; + m_addMagicButton->setText(QCoreApplication::translate("Core::Internal::MimeTypeSettingsPage", "Add...", nullptr)); + + m_editMagicButton = new QPushButton; + m_editMagicButton->setText(QCoreApplication::translate("Core::Internal::MimeTypeSettingsPage", "Edit...", nullptr)); + + m_removeMagicButton = new QPushButton; + m_removeMagicButton->setText(QCoreApplication::translate("Core::Internal::MimeTypeSettingsPage", "Remove", nullptr)); + + auto mimeTypesGroupBox = new QGroupBox; + mimeTypesGroupBox->setTitle(QCoreApplication::translate("Core::Internal::MimeTypeSettingsPage", "Registered MIME Types", nullptr)); + + auto detailsGroupBox = new QGroupBox; + detailsGroupBox->setTitle(QCoreApplication::translate("Core::Internal::MimeTypeSettingsPage", "Details", nullptr)); + + auto splitter = new QSplitter(w); + splitter->setOrientation(Qt::Vertical); + splitter->setChildrenCollapsible(false); + splitter->addWidget(mimeTypesGroupBox); + splitter->addWidget(detailsGroupBox); + + using namespace Layouting; + + Column { + filterLineEdit, + m_mimeTypesTreeView, + Row { resetButton, m_resetHandlersButton, st } + }.attachTo(mimeTypesGroupBox); + + Column { + Form { patternsLabel, m_patternsLineEdit, br, }, + Row { + m_magicHeadersTreeWidget, + Column { + m_addMagicButton, + m_editMagicButton, + m_removeMagicButton, + st + } + } + }.attachTo(detailsGroupBox); + + Column { + splitter + }.attachTo(w); m_model->load(); - connect(m_ui.filterLineEdit, &QLineEdit::textChanged, + connect(filterLineEdit, &FancyLineEdit::textChanged, this, &MimeTypeSettingsPrivate::setFilterPattern); - m_ui.mimeTypesTreeView->setModel(m_filterModel); - m_ui.mimeTypesTreeView->setItemDelegate(&m_delegate); + m_mimeTypesTreeView->setModel(m_filterModel); + m_mimeTypesTreeView->setItemDelegate(&m_delegate); - new Utils::HeaderViewStretcher(m_ui.mimeTypesTreeView->header(), 1); + new Utils::HeaderViewStretcher(m_mimeTypesTreeView->header(), 1); - connect(m_ui.mimeTypesTreeView->selectionModel(), &QItemSelectionModel::currentChanged, + connect(m_mimeTypesTreeView->selectionModel(), &QItemSelectionModel::currentChanged, this, &MimeTypeSettingsPrivate::syncData); - connect(m_ui.mimeTypesTreeView->selectionModel(), &QItemSelectionModel::currentChanged, + connect(m_mimeTypesTreeView->selectionModel(), &QItemSelectionModel::currentChanged, this, &MimeTypeSettingsPrivate::updatePatternEditAndMagicButtons); - connect(m_ui.patternsLineEdit, &QLineEdit::textEdited, + connect(m_patternsLineEdit, &QLineEdit::textEdited, this, &MimeTypeSettingsPrivate::handlePatternEdited); - connect(m_ui.addMagicButton, &QPushButton::clicked, + connect(m_addMagicButton, &QPushButton::clicked, this, &MimeTypeSettingsPrivate::addMagicHeader); // TODO - connect(m_ui.removeMagicButton, &QPushButton::clicked, + connect(m_removeMagicButton, &QPushButton::clicked, this, &MimeTypeSettingsPrivate::removeMagicHeader); - connect(m_ui.editMagicButton, &QPushButton::clicked, + connect(m_editMagicButton, &QPushButton::clicked, this, &MimeTypeSettingsPrivate::editMagicHeader); - connect(m_ui.resetButton, &QPushButton::clicked, + connect(resetButton, &QPushButton::clicked, this, &MimeTypeSettingsPrivate::resetMimeTypes); - connect(m_ui.resetHandlersButton, &QPushButton::clicked, + connect(m_resetHandlersButton, &QPushButton::clicked, m_model, &MimeTypeSettingsModel::resetUserDefaults); - connect(m_ui.magicHeadersTreeWidget, &QTreeWidget::itemSelectionChanged, + connect(m_magicHeadersTreeWidget, &QTreeWidget::itemSelectionChanged, this, &MimeTypeSettingsPrivate::updatePatternEditAndMagicButtons); updatePatternEditAndMagicButtons(); @@ -315,14 +411,14 @@ void MimeTypeSettingsPrivate::syncData(const QModelIndex ¤t, const QModelIndex &previous) { Q_UNUSED(previous) - m_ui.patternsLineEdit->clear(); - m_ui.magicHeadersTreeWidget->clear(); + m_patternsLineEdit->clear(); + m_magicHeadersTreeWidget->clear(); if (current.isValid()) { const Utils::MimeType ¤tMimeType = m_model->m_mimeTypes.at(m_filterModel->mapToSource(current).row()); UserMimeType modifiedType = m_pendingModifiedMimeTypes.value(currentMimeType.name()); - m_ui.patternsLineEdit->setText( + m_patternsLineEdit->setText( modifiedType.isValid() ? modifiedType.globPatterns.join(kSemiColon) : currentMimeType.globPatterns().join(kSemiColon)); @@ -340,33 +436,33 @@ void MimeTypeSettingsPrivate::syncData(const QModelIndex ¤t, void MimeTypeSettingsPrivate::updatePatternEditAndMagicButtons() { - const QModelIndex &mimeTypeIndex = m_ui.mimeTypesTreeView->currentIndex(); + const QModelIndex &mimeTypeIndex = m_mimeTypesTreeView->currentIndex(); const bool mimeTypeValid = mimeTypeIndex.isValid(); - m_ui.patternsLineEdit->setEnabled(mimeTypeValid); - m_ui.addMagicButton->setEnabled(mimeTypeValid); + m_patternsLineEdit->setEnabled(mimeTypeValid); + m_addMagicButton->setEnabled(mimeTypeValid); - const QModelIndex &magicIndex = m_ui.magicHeadersTreeWidget->currentIndex(); + const QModelIndex &magicIndex = m_magicHeadersTreeWidget->currentIndex(); const bool magicValid = magicIndex.isValid(); - m_ui.removeMagicButton->setEnabled(magicValid); - m_ui.editMagicButton->setEnabled(magicValid); + m_removeMagicButton->setEnabled(magicValid); + m_editMagicButton->setEnabled(magicValid); } void MimeTypeSettingsPrivate::handlePatternEdited() { - const QModelIndex &modelIndex = m_ui.mimeTypesTreeView->currentIndex(); + const QModelIndex &modelIndex = m_mimeTypesTreeView->currentIndex(); QTC_ASSERT(modelIndex.isValid(), return); int index = m_filterModel->mapToSource(modelIndex).row(); const Utils::MimeType mt = m_model->m_mimeTypes.at(index); ensurePendingMimeType(mt); m_pendingModifiedMimeTypes[mt.name()].globPatterns - = m_ui.patternsLineEdit->text().split(kSemiColon, Qt::SkipEmptyParts); + = m_patternsLineEdit->text().split(kSemiColon, Qt::SkipEmptyParts); } void MimeTypeSettingsPrivate::addMagicHeaderRow(const MagicData &data) { - const int row = m_ui.magicHeadersTreeWidget->topLevelItemCount(); + const int row = m_magicHeadersTreeWidget->topLevelItemCount(); editMagicHeaderRowData(row, data); } @@ -378,14 +474,14 @@ void MimeTypeSettingsPrivate::editMagicHeaderRowData(const int row, const MagicD item->setText(2, QString::fromLatin1("%1:%2").arg(data.m_rule.startPos()).arg(data.m_rule.endPos())); item->setText(3, QString::number(data.m_priority)); item->setData(0, Qt::UserRole, QVariant::fromValue(data)); - m_ui.magicHeadersTreeWidget->takeTopLevelItem(row); - m_ui.magicHeadersTreeWidget->insertTopLevelItem(row, item); - m_ui.magicHeadersTreeWidget->setCurrentItem(item); + m_magicHeadersTreeWidget->takeTopLevelItem(row); + m_magicHeadersTreeWidget->insertTopLevelItem(row, item); + m_magicHeadersTreeWidget->setCurrentItem(item); } void MimeTypeSettingsPrivate::addMagicHeader() { - const QModelIndex &mimeTypeIndex = m_ui.mimeTypesTreeView->currentIndex(); + const QModelIndex &mimeTypeIndex = m_mimeTypesTreeView->currentIndex(); QTC_ASSERT(mimeTypeIndex.isValid(), return); int index = m_filterModel->mapToSource(mimeTypeIndex).row(); @@ -401,16 +497,16 @@ void MimeTypeSettingsPrivate::addMagicHeader() void MimeTypeSettingsPrivate::removeMagicHeader() { - const QModelIndex &mimeTypeIndex = m_ui.mimeTypesTreeView->currentIndex(); + const QModelIndex &mimeTypeIndex = m_mimeTypesTreeView->currentIndex(); QTC_ASSERT(mimeTypeIndex.isValid(), return); - const QModelIndex &magicIndex = m_ui.magicHeadersTreeWidget->currentIndex(); + const QModelIndex &magicIndex = m_magicHeadersTreeWidget->currentIndex(); QTC_ASSERT(magicIndex.isValid(), return); int index = m_filterModel->mapToSource(mimeTypeIndex).row(); const Utils::MimeType mt = m_model->m_mimeTypes.at(index); - QTreeWidgetItem *item = m_ui.magicHeadersTreeWidget->topLevelItem(magicIndex.row()); + QTreeWidgetItem *item = m_magicHeadersTreeWidget->topLevelItem(magicIndex.row()); QTC_ASSERT(item, return); const MagicData data = item->data(0, Qt::UserRole).value(); @@ -421,16 +517,16 @@ void MimeTypeSettingsPrivate::removeMagicHeader() void MimeTypeSettingsPrivate::editMagicHeader() { - const QModelIndex &mimeTypeIndex = m_ui.mimeTypesTreeView->currentIndex(); + const QModelIndex &mimeTypeIndex = m_mimeTypesTreeView->currentIndex(); QTC_ASSERT(mimeTypeIndex.isValid(), return); - const QModelIndex &magicIndex = m_ui.magicHeadersTreeWidget->currentIndex(); + const QModelIndex &magicIndex = m_magicHeadersTreeWidget->currentIndex(); QTC_ASSERT(magicIndex.isValid(), return); int index = m_filterModel->mapToSource(mimeTypeIndex).row(); const Utils::MimeType mt = m_model->m_mimeTypes.at(index); - QTreeWidgetItem *item = m_ui.magicHeadersTreeWidget->topLevelItem(magicIndex.row()); + QTreeWidgetItem *item = m_magicHeadersTreeWidget->topLevelItem(magicIndex.row()); QTC_ASSERT(item, return); const MagicData oldData = item->data(0, Qt::UserRole).value(); @@ -687,7 +783,6 @@ void MimeEditorDelegate::setModelData(QWidget *editor, int(MimeTypeSettingsModel::Role::DefaultHandler)); } -} // Internal -} // Core +} // Core::Internal #include "mimetypesettings.moc" diff --git a/src/plugins/coreplugin/mimetypesettings.h b/src/plugins/coreplugin/mimetypesettings.h index fa26e1e6932..eb07aed5fe9 100644 --- a/src/plugins/coreplugin/mimetypesettings.h +++ b/src/plugins/coreplugin/mimetypesettings.h @@ -5,8 +5,7 @@ #include -namespace Core { -namespace Internal { +namespace Core::Internal { class MimeTypeSettingsPrivate; @@ -27,5 +26,4 @@ private: MimeTypeSettingsPrivate *d; }; -} // Internal -} // Core +} // Core::Internal diff --git a/src/plugins/coreplugin/mimetypesettingspage.ui b/src/plugins/coreplugin/mimetypesettingspage.ui deleted file mode 100644 index b81547fc521..00000000000 --- a/src/plugins/coreplugin/mimetypesettingspage.ui +++ /dev/null @@ -1,201 +0,0 @@ - - - Core::Internal::MimeTypeSettingsPage - - - - 0 - 0 - 712 - 696 - - - - - - - - - - Qt::Vertical - - - false - - - - Registered MIME Types - - - - - - Qt::Horizontal - - - - 476 - 20 - - - - - - - - Filter - - - - - - - QAbstractItemView::DoubleClicked|QAbstractItemView::EditKeyPressed|QAbstractItemView::SelectedClicked - - - false - - - true - - - - - - - Reset all MIME type definitions to their defaults. - - - Reset MIME Types - - - - - - - Reset the assigned handler for all MIME type definitions to the default. - - - Reset Handlers - - - - - - - - Details - - - - - - - - Patterns: - - - - - - - A semicolon-separated list of wildcarded file names. - - - - - - - - - - - false - - - true - - - 4 - - - - Magic Header - - - - - Type - - - - - Range - - - - - Priority - - - - - - - - - - Add... - - - - - - - Edit... - - - - - - - Remove - - - - - - - Qt::Vertical - - - - 72 - 18 - - - - - - - - - - - - - - - - filterLineEdit - mimeTypesTreeView - resetButton - patternsLineEdit - magicHeadersTreeWidget - addMagicButton - editMagicButton - removeMagicButton - - - - diff --git a/src/plugins/coreplugin/patchtool.cpp b/src/plugins/coreplugin/patchtool.cpp index 6c954af9e82..fa528f83107 100644 --- a/src/plugins/coreplugin/patchtool.cpp +++ b/src/plugins/coreplugin/patchtool.cpp @@ -1,14 +1,15 @@ // Copyright (C) 2016 The Qt Company Ltd. // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0+ OR GPL-3.0 WITH Qt-GPL-exception-1.0 -#include "patchtool.h" -#include "messagemanager.h" +#include "coreplugintr.h" #include "icore.h" +#include "messagemanager.h" +#include "patchtool.h" #include #include -#include +#include using namespace Utils; @@ -37,22 +38,30 @@ void PatchTool::setPatchCommand(const FilePath &newCommand) s->endGroup(); } +bool PatchTool::confirmPatching(QWidget *parent, PatchAction patchAction) +{ + const QString title = patchAction == PatchAction::Apply ? Tr::tr("Apply Chunk") + : Tr::tr("Revert Chunk"); + const QString question = patchAction == PatchAction::Apply + ? Tr::tr("Would you like to apply the chunk?") + : Tr::tr("Would you like to revert the chunk?"); + return QMessageBox::question(parent, title, question, QMessageBox::Yes | QMessageBox::No) + == QMessageBox::Yes; +} + static bool runPatchHelper(const QByteArray &input, const FilePath &workingDirectory, - int strip, bool reverse, bool withCrlf) + int strip, PatchAction patchAction, bool withCrlf) { const FilePath patch = PatchTool::patchCommand(); if (patch.isEmpty()) { - MessageManager::writeDisrupting(QApplication::translate( - "Core::PatchTool", - "There is no patch-command configured in the general \"Environment\" settings.")); + MessageManager::writeDisrupting(Tr::tr("There is no patch-command configured in " + "the general \"Environment\" settings.")); return false; } if (!patch.exists() && !patch.searchInPath().exists()) { - MessageManager::writeDisrupting( - QApplication::translate("Core::PatchTool", - "The patch-command configured in the general \"Environment\" " - "settings does not exist.")); + MessageManager::writeDisrupting(Tr::tr("The patch-command configured in the general " + "\"Environment\" settings does not exist.")); return false; } @@ -70,20 +79,18 @@ static bool runPatchHelper(const QByteArray &input, const FilePath &workingDirec if (strip >= 0) args << ("-p" + QString::number(strip)); - if (reverse) + if (patchAction == PatchAction::Revert) args << "-R"; if (withCrlf) args << "--binary"; - MessageManager::writeDisrupting( - QApplication::translate("Core::PatchTool", "Running in %1: %2 %3") + MessageManager::writeDisrupting(Tr::tr("Running in %1: %2 %3") .arg(workingDirectory.toUserOutput(), patch.toUserOutput(), args.join(' '))); patchProcess.setCommand({patch, args}); patchProcess.setWriteData(input); patchProcess.start(); if (!patchProcess.waitForStarted()) { - MessageManager::writeFlashing( - QApplication::translate("Core::PatchTool", "Unable to launch \"%1\": %2") - .arg(patch.toUserOutput(), patchProcess.errorString())); + MessageManager::writeFlashing(Tr::tr("Unable to launch \"%1\": %2") + .arg(patch.toUserOutput(), patchProcess.errorString())); return false; } @@ -92,9 +99,8 @@ static bool runPatchHelper(const QByteArray &input, const FilePath &workingDirec if (!patchProcess.readDataFromProcess(&stdOut, &stdErr)) { patchProcess.stop(); patchProcess.waitForFinished(); - MessageManager::writeFlashing( - QApplication::translate("Core::PatchTool", "A timeout occurred running \"%1\"") - .arg(patch.toUserOutput())); + MessageManager::writeFlashing(Tr::tr("A timeout occurred running \"%1\"") + .arg(patch.toUserOutput())); return false; } @@ -102,7 +108,7 @@ static bool runPatchHelper(const QByteArray &input, const FilePath &workingDirec if (stdOut.contains("(different line endings)") && !withCrlf) { QByteArray crlfInput = input; crlfInput.replace('\n', "\r\n"); - return runPatchHelper(crlfInput, workingDirectory, strip, reverse, true); + return runPatchHelper(crlfInput, workingDirectory, strip, patchAction, true); } else { MessageManager::writeFlashing(QString::fromLocal8Bit(stdOut)); } @@ -111,24 +117,21 @@ static bool runPatchHelper(const QByteArray &input, const FilePath &workingDirec MessageManager::writeFlashing(QString::fromLocal8Bit(stdErr)); if (patchProcess.exitStatus() != QProcess::NormalExit) { - MessageManager::writeFlashing( - QApplication::translate("Core::PatchTool", "\"%1\" crashed.").arg(patch.toUserOutput())); + MessageManager::writeFlashing(Tr::tr("\"%1\" crashed.").arg(patch.toUserOutput())); return false; } if (patchProcess.exitCode() != 0) { - MessageManager::writeFlashing( - QApplication::translate("Core::PatchTool", "\"%1\" failed (exit code %2).") - .arg(patch.toUserOutput()) - .arg(patchProcess.exitCode())); + MessageManager::writeFlashing(Tr::tr("\"%1\" failed (exit code %2).") + .arg(patch.toUserOutput()).arg(patchProcess.exitCode())); return false; } return true; } bool PatchTool::runPatch(const QByteArray &input, const FilePath &workingDirectory, - int strip, bool reverse) + int strip, PatchAction patchAction) { - return runPatchHelper(input, workingDirectory, strip, reverse, false); + return runPatchHelper(input, workingDirectory, strip, patchAction, false); } } // namespace Core diff --git a/src/plugins/coreplugin/patchtool.h b/src/plugins/coreplugin/patchtool.h index 8f2f198f071..46c82f51345 100644 --- a/src/plugins/coreplugin/patchtool.h +++ b/src/plugins/coreplugin/patchtool.h @@ -1,4 +1,4 @@ -// Copyright (C) 2016 The Qt Company Ltd. +// Copyright (C) 2022 The Qt Company Ltd. // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0+ OR GPL-3.0 WITH Qt-GPL-exception-1.0 #pragma once @@ -9,15 +9,22 @@ namespace Core { +enum class PatchAction { + Apply, + Revert +}; + class CORE_EXPORT PatchTool { public: static Utils::FilePath patchCommand(); static void setPatchCommand(const Utils::FilePath &newCommand); + static bool confirmPatching(QWidget *parent, PatchAction patchAction); + // Utility to run the 'patch' command static bool runPatch(const QByteArray &input, const Utils::FilePath &workingDirectory = {}, - int strip = 0, bool reverse = false); + int strip = 0, PatchAction patchAction = PatchAction::Apply); }; } // namespace Core diff --git a/src/plugins/cppeditor/cppcodemodelsettings.cpp b/src/plugins/cppeditor/cppcodemodelsettings.cpp index 169fcf14059..36f7ae8d850 100644 --- a/src/plugins/cppeditor/cppcodemodelsettings.cpp +++ b/src/plugins/cppeditor/cppcodemodelsettings.cpp @@ -55,6 +55,7 @@ static QString clangdSettingsKey() { return QLatin1String("ClangdSettings"); } static QString useClangdKey() { return QLatin1String("UseClangdV7"); } static QString clangdPathKey() { return QLatin1String("ClangdPath"); } static QString clangdIndexingKey() { return QLatin1String("ClangdIndexing"); } +static QString clangdIndexingPriorityKey() { return QLatin1String("ClangdIndexingPriority"); } static QString clangdHeaderInsertionKey() { return QLatin1String("ClangdHeaderInsertion"); } static QString clangdThreadLimitKey() { return QLatin1String("ClangdThreadLimit"); } static QString clangdDocumentThresholdKey() { return QLatin1String("ClangdDocumentThreshold"); } @@ -168,6 +169,28 @@ void CppCodeModelSettings::setEnableLowerClazyLevels(bool yesno) } +QString ClangdSettings::priorityToString(const IndexingPriority &priority) +{ + switch (priority) { + case IndexingPriority::Background: return "background"; + case IndexingPriority::Normal: return "normal"; + case IndexingPriority::Low: return "low"; + case IndexingPriority::Off: return {}; + } + return {}; +} + +QString ClangdSettings::priorityToDisplayString(const IndexingPriority &priority) +{ + switch (priority) { + case IndexingPriority::Background: return tr("Background Priority"); + case IndexingPriority::Normal: return tr("Normal Priority"); + case IndexingPriority::Low: return tr("Low Priority"); + case IndexingPriority::Off: return tr("Off"); + } + return {}; +} + ClangdSettings &ClangdSettings::instance() { static ClangdSettings settings; @@ -465,7 +488,8 @@ QVariantMap ClangdSettings::Data::toMap() const map.insert(clangdPathKey(), executableFilePath != fallbackClangdFilePath() ? executableFilePath.toString() : QString()); - map.insert(clangdIndexingKey(), enableIndexing); + map.insert(clangdIndexingKey(), indexingPriority != IndexingPriority::Off); + map.insert(clangdIndexingPriorityKey(), int(indexingPriority)); map.insert(clangdHeaderInsertionKey(), autoIncludeHeaders); map.insert(clangdThreadLimitKey(), workerThreadLimit); map.insert(clangdDocumentThresholdKey(), documentUpdateThreshold); @@ -482,7 +506,11 @@ void ClangdSettings::Data::fromMap(const QVariantMap &map) { useClangd = map.value(useClangdKey(), true).toBool(); executableFilePath = FilePath::fromString(map.value(clangdPathKey()).toString()); - enableIndexing = map.value(clangdIndexingKey(), true).toBool(); + indexingPriority = IndexingPriority( + map.value(clangdIndexingPriorityKey(), int(this->indexingPriority)).toInt()); + const auto it = map.find(clangdIndexingKey()); + if (it != map.end() && !it->toBool()) + indexingPriority = IndexingPriority::Off; autoIncludeHeaders = map.value(clangdHeaderInsertionKey(), false).toBool(); workerThreadLimit = map.value(clangdThreadLimitKey(), 0).toInt(); documentUpdateThreshold = map.value(clangdDocumentThresholdKey(), 500).toInt(); diff --git a/src/plugins/cppeditor/cppcodemodelsettings.h b/src/plugins/cppeditor/cppcodemodelsettings.h index 343b344001f..cd010eec995 100644 --- a/src/plugins/cppeditor/cppcodemodelsettings.h +++ b/src/plugins/cppeditor/cppcodemodelsettings.h @@ -75,6 +75,10 @@ class CPPEDITOR_EXPORT ClangdSettings : public QObject { Q_OBJECT public: + enum class IndexingPriority { Off, Background, Normal, Low, }; + + static QString priorityToString(const IndexingPriority &priority); + static QString priorityToDisplayString(const IndexingPriority &priority); class CPPEDITOR_EXPORT Data { @@ -90,7 +94,7 @@ public: && s1.customDiagnosticConfigs == s2.customDiagnosticConfigs && s1.diagnosticConfigId == s2.diagnosticConfigId && s1.workerThreadLimit == s2.workerThreadLimit - && s1.enableIndexing == s2.enableIndexing + && s1.indexingPriority == s2.indexingPriority && s1.autoIncludeHeaders == s2.autoIncludeHeaders && s1.documentUpdateThreshold == s2.documentUpdateThreshold && s1.sizeThresholdEnabled == s2.sizeThresholdEnabled @@ -110,7 +114,7 @@ public: int documentUpdateThreshold = 500; qint64 sizeThresholdInKb = 1024; bool useClangd = true; - bool enableIndexing = true; + IndexingPriority indexingPriority = IndexingPriority::Low; bool autoIncludeHeaders = false; bool sizeThresholdEnabled = false; bool haveCheckedHardwareReqirements = false; @@ -129,7 +133,7 @@ public: static void setDefaultClangdPath(const Utils::FilePath &filePath); static void setCustomDiagnosticConfigs(const ClangDiagnosticConfigs &configs); Utils::FilePath clangdFilePath() const; - bool indexingEnabled() const { return m_data.enableIndexing; } + IndexingPriority indexingPriority() const { return m_data.indexingPriority; } bool autoIncludeHeaders() const { return m_data.autoIncludeHeaders; } int workerThreadLimit() const { return m_data.workerThreadLimit; } int documentUpdateThreshold() const { return m_data.documentUpdateThreshold; } diff --git a/src/plugins/cppeditor/cppcodemodelsettingspage.cpp b/src/plugins/cppeditor/cppcodemodelsettingspage.cpp index c8516dc19af..df3575b9b91 100644 --- a/src/plugins/cppeditor/cppcodemodelsettingspage.cpp +++ b/src/plugins/cppeditor/cppcodemodelsettingspage.cpp @@ -20,6 +20,7 @@ #include #include +#include #include #include #include @@ -164,7 +165,7 @@ class ClangdSettingsWidget::Private { public: QCheckBox useClangdCheckBox; - QCheckBox indexingCheckBox; + QComboBox indexingComboBox; QCheckBox autoIncludeHeadersCheckBox; QCheckBox sizeThresholdCheckBox; QSpinBox threadLimitSpinBox; @@ -190,7 +191,13 @@ ClangdSettingsWidget::ClangdSettingsWidget(const ClangdSettings::Data &settingsD "The indexing result is persisted in the project's build directory.\n" "\n" "If you disable background indexing, a faster, but less accurate,\n" - "built-in indexer is used instead."); + "built-in indexer is used instead.\n" + "\n" + "The thread priority for building the background index can be adjusted since clangd 15.\n" + "Background Priority: Minimum priority, runs on idle CPUs. May leave 'performance' cores " + "unused.\n" + "Normal Priority: Reduced priority compared to interactive work.\n" + "Low Priority: Same priority as other clangd work."); const QString workerThreadsToolTip = tr( "Number of worker threads used by clangd. Background indexing also uses this many " "worker threads."); @@ -211,9 +218,13 @@ ClangdSettingsWidget::ClangdSettingsWidget(const ClangdSettings::Data &settingsD d->clangdChooser.setExpectedKind(Utils::PathChooser::ExistingCommand); d->clangdChooser.setFilePath(settings.clangdFilePath()); d->clangdChooser.setEnabled(d->useClangdCheckBox.isChecked()); - d->indexingCheckBox.setText(tr("Enable background indexing")); - d->indexingCheckBox.setChecked(settings.indexingEnabled()); - d->indexingCheckBox.setToolTip(indexingToolTip); + using Priority = ClangdSettings::IndexingPriority; + for (Priority prio : {Priority::Off, Priority::Background, Priority::Low, Priority::Normal}) { + d->indexingComboBox.addItem(ClangdSettings::priorityToDisplayString(prio), int(prio)); + if (prio == settings.indexingPriority()) + d->indexingComboBox.setCurrentIndex(d->indexingComboBox.count() - 1); + } + d->indexingComboBox.setToolTip(indexingToolTip); d->autoIncludeHeadersCheckBox.setText(tr("Insert header files on completion")); d->autoIncludeHeadersCheckBox.setChecked(settings.autoIncludeHeaders()); d->autoIncludeHeadersCheckBox.setToolTip(autoIncludeToolTip); @@ -251,7 +262,14 @@ ClangdSettingsWidget::ClangdSettingsWidget(const ClangdSettings::Data &settingsD const auto chooserLabel = new QLabel(tr("Path to executable:")); formLayout->addRow(chooserLabel, &d->clangdChooser); formLayout->addRow(QString(), &d->versionWarningLabel); - formLayout->addRow(QString(), &d->indexingCheckBox); + + const auto indexingPriorityLayout = new QHBoxLayout; + indexingPriorityLayout->addWidget(&d->indexingComboBox); + indexingPriorityLayout->addStretch(1); + const auto indexingPriorityLabel = new QLabel(tr("Background indexing:")); + indexingPriorityLabel->setToolTip(indexingToolTip); + formLayout->addRow(indexingPriorityLabel, indexingPriorityLayout); + const auto threadLimitLayout = new QHBoxLayout; threadLimitLayout->addWidget(&d->threadLimitSpinBox); threadLimitLayout->addStretch(1); @@ -413,7 +431,7 @@ ClangdSettingsWidget::ClangdSettingsWidget(const ClangdSettings::Data &settingsD connect(&d->useClangdCheckBox, &QCheckBox::toggled, this, &ClangdSettingsWidget::settingsDataChanged); - connect(&d->indexingCheckBox, &QCheckBox::toggled, + connect(&d->indexingComboBox, &QComboBox::currentIndexChanged, this, &ClangdSettingsWidget::settingsDataChanged); connect(&d->autoIncludeHeadersCheckBox, &QCheckBox::toggled, this, &ClangdSettingsWidget::settingsDataChanged); @@ -443,7 +461,8 @@ ClangdSettings::Data ClangdSettingsWidget::settingsData() const ClangdSettings::Data data; data.useClangd = d->useClangdCheckBox.isChecked(); data.executableFilePath = d->clangdChooser.filePath(); - data.enableIndexing = d->indexingCheckBox.isChecked(); + data.indexingPriority = ClangdSettings::IndexingPriority( + d->indexingComboBox.currentData().toInt()); data.autoIncludeHeaders = d->autoIncludeHeadersCheckBox.isChecked(); data.workerThreadLimit = d->threadLimitSpinBox.value(); data.documentUpdateThreshold = d->documentUpdateThreshold.value(); diff --git a/src/plugins/designer/formeditorplugin.cpp b/src/plugins/designer/formeditorplugin.cpp index e089ebba3d2..6e8dffba5b6 100644 --- a/src/plugins/designer/formeditorplugin.cpp +++ b/src/plugins/designer/formeditorplugin.cpp @@ -64,19 +64,18 @@ bool FormEditorPlugin::initialize(const QStringList &arguments, QString *error) d = new FormEditorPluginPrivate; #ifdef CPP_ENABLED - IWizardFactory::registerFactoryCreator( - []() -> QList { - IWizardFactory *wizard = new FormClassWizard; - wizard->setCategory(Core::Constants::WIZARD_CATEGORY_QT); - wizard->setDisplayCategory(QCoreApplication::translate("Core", Core::Constants::WIZARD_TR_CATEGORY_QT)); - wizard->setDisplayName(Tr::tr("Qt Designer Form Class")); - wizard->setIcon({}, "ui/h"); - wizard->setId("C.FormClass"); - wizard->setDescription(Tr::tr("Creates a Qt Designer form along with a matching class (C++ header and source file) " - "for implementation purposes. You can add the form and class to an existing Qt Widget Project.")); + IWizardFactory::registerFactoryCreator([]() -> IWizardFactory * { + IWizardFactory *wizard = new FormClassWizard; + wizard->setCategory(Core::Constants::WIZARD_CATEGORY_QT); + wizard->setDisplayCategory(QCoreApplication::translate("Core", Core::Constants::WIZARD_TR_CATEGORY_QT)); + wizard->setDisplayName(Tr::tr("Qt Designer Form Class")); + wizard->setIcon({}, "ui/h"); + wizard->setId("C.FormClass"); + wizard->setDescription(Tr::tr("Creates a Qt Designer form along with a matching class (C++ header and source file) " + "for implementation purposes. You can add the form and class to an existing Qt Widget Project.")); - return {wizard}; - }); + return wizard; + }); #endif ProjectExplorer::JsonWizardFactory::registerPageFactory(new Internal::FormPageFactory); diff --git a/src/plugins/diffeditor/CMakeLists.txt b/src/plugins/diffeditor/CMakeLists.txt index aac8d74de85..6ea288f3941 100644 --- a/src/plugins/diffeditor/CMakeLists.txt +++ b/src/plugins/diffeditor/CMakeLists.txt @@ -13,6 +13,7 @@ add_qtc_plugin(DiffEditor diffeditoricons.h diffeditorplugin.cpp diffeditorplugin.h diffeditorwidgetcontroller.cpp diffeditorwidgetcontroller.h + diffenums.h diffutils.cpp diffutils.h diffview.cpp diffview.h selectabletexteditorwidget.cpp selectabletexteditorwidget.h diff --git a/src/plugins/diffeditor/diffeditor.cpp b/src/plugins/diffeditor/diffeditor.cpp index 0619de857c8..bfcf077efd5 100644 --- a/src/plugins/diffeditor/diffeditor.cpp +++ b/src/plugins/diffeditor/diffeditor.cpp @@ -46,7 +46,9 @@ static const char ignoreWhitespaceKeyC[] = "IgnoreWhitespace"; static const char diffViewKeyC[] = "DiffEditorType"; +using namespace Core; using namespace TextEditor; +using namespace Utils; namespace DiffEditor { namespace Internal { @@ -86,10 +88,10 @@ DescriptionEditorWidget::DescriptionEditorWidget(QWidget *parent) setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Preferred); - auto context = new Core::IContext(this); + auto context = new IContext(this); context->setWidget(this); - context->setContext(Core::Context(Constants::C_DIFF_EDITOR_DESCRIPTION)); - Core::ICore::addContextObject(context); + context->setContext(Context(Constants::C_DIFF_EDITOR_DESCRIPTION)); + ICore::addContextObject(context); textDocument()->setSyntaxHighlighter(new SyntaxHighlighter); } @@ -113,7 +115,7 @@ void DescriptionEditorWidget::setDisplaySettings(const DisplaySettings &ds) void DescriptionEditorWidget::setMarginSettings(const MarginSettings &ms) { Q_UNUSED(ms) - TextEditorWidget::setMarginSettings(MarginSettings()); + TextEditorWidget::setMarginSettings({}); } void DescriptionEditorWidget::applyFontSettings() @@ -130,11 +132,11 @@ DiffEditor::DiffEditor() setDuplicateSupported(true); // Widget: - QSplitter *splitter = new Core::MiniSplitter(Qt::Vertical); + QSplitter *splitter = new MiniSplitter(Qt::Vertical); m_descriptionWidget = new DescriptionEditorWidget(splitter); m_descriptionWidget->setReadOnly(true); - connect(m_descriptionWidget, &DescriptionEditorWidget::requestResize, this, [splitter](){ + connect(m_descriptionWidget, &DescriptionEditorWidget::requestResize, this, [splitter] { if (splitter->count() == 0) return; QList sizes = splitter->sizes(); @@ -189,16 +191,16 @@ DiffEditor::DiffEditor() m_whitespaceButtonAction = m_toolBar->addAction(tr("Ignore Whitespace")); m_whitespaceButtonAction->setCheckable(true); - m_toggleDescriptionAction = m_toolBar->addAction(Icons::TOP_BAR.icon(), QString()); + m_toggleDescriptionAction = m_toolBar->addAction(Icons::TOP_BAR.icon(), {}); m_toggleDescriptionAction->setCheckable(true); m_reloadAction = m_toolBar->addAction(Utils::Icons::RELOAD_TOOLBAR.icon(), tr("Reload Diff")); m_reloadAction->setToolTip(tr("Reload Diff")); - m_toggleSyncAction = m_toolBar->addAction(Utils::Icons::LINK_TOOLBAR.icon(), QString()); + m_toggleSyncAction = m_toolBar->addAction(Utils::Icons::LINK_TOOLBAR.icon(), {}); m_toggleSyncAction->setCheckable(true); - m_viewSwitcherAction = m_toolBar->addAction(QIcon(), QString()); + m_viewSwitcherAction = m_toolBar->addAction(QIcon(), {}); connect(m_whitespaceButtonAction, &QAction::toggled, this, &DiffEditor::ignoreWhitespaceHasChanged); @@ -206,7 +208,7 @@ DiffEditor::DiffEditor() this, &DiffEditor::contextLineCountHasChanged); connect(m_toggleSyncAction, &QAction::toggled, this, &DiffEditor::toggleSync); connect(m_toggleDescriptionAction, &QAction::toggled, this, &DiffEditor::toggleDescription); - connect(m_viewSwitcherAction, &QAction::triggered, this, [this]() { showDiffView(nextView()); }); + connect(m_viewSwitcherAction, &QAction::triggered, this, [this] { showDiffView(nextView()); }); } void DiffEditor::setDocument(QSharedPointer doc) @@ -225,7 +227,7 @@ void DiffEditor::setDocument(QSharedPointer doc) connect(m_document.data(), &DiffEditorDocument::reloadFinished, this, &DiffEditor::reloadHasFinished); - connect(m_reloadAction, &QAction::triggered, this, [this]() { m_document->reload(); }); + connect(m_reloadAction, &QAction::triggered, this, [this] { m_document->reload(); }); connect(m_document.data(), &DiffEditorDocument::temporaryStateChanged, this, &DiffEditor::documentStateChanged); @@ -238,7 +240,7 @@ void DiffEditor::setDocument(QSharedPointer doc) DiffEditor::DiffEditor(DiffEditorDocument *doc) : DiffEditor() { - Utils::GuardLocker guard(m_ignoreChanges); + GuardLocker guard(m_ignoreChanges); setDocument(QSharedPointer(doc)); setupView(loadSettings()); } @@ -250,16 +252,16 @@ DiffEditor::~DiffEditor() qDeleteAll(m_views); } -Core::IEditor *DiffEditor::duplicate() +IEditor *DiffEditor::duplicate() { - auto editor = new DiffEditor(); - Utils::GuardLocker guard(editor->m_ignoreChanges); + auto editor = new DiffEditor; + GuardLocker guard(editor->m_ignoreChanges); editor->setDocument(m_document); editor->m_sync = m_sync; editor->m_showDescription = m_showDescription; - Utils::Id id = currentView()->id(); + Id id = currentView()->id(); IDiffView *view = Utils::findOr(editor->m_views, editor->m_views.at(0), Utils::equal(&IDiffView::id, id)); QTC_ASSERT(view, view = editor->currentView()); @@ -270,7 +272,7 @@ Core::IEditor *DiffEditor::duplicate() return editor; } -Core::IDocument *DiffEditor::document() const +IDocument *DiffEditor::document() const { return m_document.data(); } @@ -291,19 +293,15 @@ TextEditorWidget *DiffEditor::unifiedEditorWidget() const return m_unifiedView->textEditorWidget(); } -TextEditorWidget *DiffEditor::leftEditorWidget() const +TextEditorWidget *DiffEditor::sideEditorWidget(DiffSide side) const { - return m_sideBySideView->leftEditorWidget(); + return m_sideBySideView->sideEditorWidget(side); } -TextEditorWidget *DiffEditor::rightEditorWidget() const -{ - return m_sideBySideView->rightEditorWidget(); -} void DiffEditor::documentHasChanged() { - Utils::GuardLocker guard(m_ignoreChanges); + GuardLocker guard(m_ignoreChanges); const QList &diffFileList = m_document->diffFiles(); updateDescription(); @@ -311,10 +309,10 @@ void DiffEditor::documentHasChanged() m_entriesComboBox->clear(); for (const FileData &diffFile : diffFileList) { - const DiffFileInfo &leftEntry = diffFile.leftFileInfo; - const DiffFileInfo &rightEntry = diffFile.rightFileInfo; - const QString leftShortFileName = Utils::FilePath::fromString(leftEntry.fileName).fileName(); - const QString rightShortFileName = Utils::FilePath::fromString(rightEntry.fileName).fileName(); + const DiffFileInfo &leftEntry = diffFile.fileInfo[LeftSide]; + const DiffFileInfo &rightEntry = diffFile.fileInfo[RightSide]; + const QString leftShortFileName = FilePath::fromString(leftEntry.fileName).fileName(); + const QString rightShortFileName = FilePath::fromString(rightEntry.fileName).fileName(); QString itemText; QString itemToolTip; if (leftEntry.fileName == rightEntry.fileName) { @@ -377,7 +375,7 @@ void DiffEditor::updateDescription() m_descriptionWidget->setPlainText(description); m_descriptionWidget->setVisible(m_showDescription && !description.isEmpty()); - Utils::GuardLocker guard(m_ignoreChanges); + GuardLocker guard(m_ignoreChanges); m_toggleDescriptionAction->setChecked(m_showDescription); m_toggleDescriptionAction->setToolTip(m_showDescription ? tr("Hide Change Description") : tr("Show Change Description")); @@ -421,11 +419,11 @@ void DiffEditor::prepareForReload() = qMakePair(m_entriesComboBox->itemData(m_currentDiffFileIndex, Qt::UserRole).toString(), m_entriesComboBox->itemData(m_currentDiffFileIndex, Qt::UserRole + 1).toString()); } else { - m_currentFileChunk = qMakePair(QString(), QString()); + m_currentFileChunk = {}; } { - Utils::GuardLocker guard(m_ignoreChanges); + GuardLocker guard(m_ignoreChanges); m_contextSpinBox->setValue(m_document->contextLineCount()); m_whitespaceButtonAction->setChecked(m_document->ignoreWhitespace()); } @@ -445,8 +443,8 @@ void DiffEditor::reloadHasFinished(bool success) const int count = diffFileList.count(); for (int i = 0; i < count; i++) { const FileData &diffFile = diffFileList.at(i); - const DiffFileInfo &leftEntry = diffFile.leftFileInfo; - const DiffFileInfo &rightEntry = diffFile.rightFileInfo; + const DiffFileInfo &leftEntry = diffFile.fileInfo[LeftSide]; + const DiffFileInfo &rightEntry = diffFile.fileInfo[RightSide]; if ((m_currentFileChunk.first.isEmpty() && m_currentFileChunk.second.isEmpty() && startupFile.endsWith(rightEntry.fileName)) @@ -457,7 +455,7 @@ void DiffEditor::reloadHasFinished(bool success) } } - m_currentFileChunk = qMakePair(QString(), QString()); + m_currentFileChunk = {}; if (index >= 0) setCurrentDiffFileIndex(index); } @@ -476,7 +474,7 @@ void DiffEditor::setCurrentDiffFileIndex(int index) QTC_ASSERT((index < 0) != (m_entriesComboBox->count() > 0), return); - Utils::GuardLocker guard(m_ignoreChanges); + GuardLocker guard(m_ignoreChanges); m_currentDiffFileIndex = index; currentView()->setCurrentDiffFileIndex(index); @@ -519,7 +517,7 @@ void DiffEditor::toggleSync() IDiffView *DiffEditor::loadSettings() { QTC_ASSERT(currentView(), return nullptr); - QSettings *s = Core::ICore::settings(); + QSettings *s = ICore::settings(); // Read current settings: s->beginGroup(settingsGroupC); @@ -527,7 +525,7 @@ IDiffView *DiffEditor::loadSettings() m_sync = s->value(horizontalScrollBarSynchronizationKeyC, true).toBool(); m_document->setIgnoreWhitespace(s->value(ignoreWhitespaceKeyC, false).toBool()); m_document->setContextLineCount(s->value(contextLineCountKeyC, 3).toInt()); - Utils::Id id = Utils::Id::fromSetting(s->value(diffViewKeyC)); + Id id = Id::fromSetting(s->value(diffViewKeyC)); s->endGroup(); IDiffView *view = Utils::findOr(m_views, m_views.at(0), @@ -539,7 +537,7 @@ IDiffView *DiffEditor::loadSettings() void DiffEditor::saveSetting(const QString &key, const QVariant &value) const { - QSettings *s = Core::ICore::settings(); + QSettings *s = ICore::settings(); s->beginGroup(settingsGroupC); s->setValue(key, value); s->endGroup(); @@ -587,7 +585,7 @@ void DiffEditor::setupView(IDiffView *view) saveSetting(diffViewKeyC, currentView()->id().toSetting()); { - Utils::GuardLocker guard(m_ignoreChanges); + GuardLocker guard(m_ignoreChanges); m_toggleSyncAction->setVisible(currentView()->supportsSync()); m_toggleSyncAction->setToolTip(currentView()->syncToolTip()); m_toggleSyncAction->setText(currentView()->syncToolTip()); diff --git a/src/plugins/diffeditor/diffeditor.h b/src/plugins/diffeditor/diffeditor.h index e7eac8fb9c2..c4f852c4fc6 100644 --- a/src/plugins/diffeditor/diffeditor.h +++ b/src/plugins/diffeditor/diffeditor.h @@ -3,6 +3,8 @@ #pragma once +#include "diffenums.h" + #include #include #include @@ -38,8 +40,7 @@ public: QWidget *toolBar() override; TextEditor::TextEditorWidget *descriptionWidget() const; TextEditor::TextEditorWidget *unifiedEditorWidget() const; - TextEditor::TextEditorWidget *leftEditorWidget() const; - TextEditor::TextEditorWidget *rightEditorWidget() const; + TextEditor::TextEditorWidget *sideEditorWidget(DiffSide side) const; private: DiffEditor(); diff --git a/src/plugins/diffeditor/diffeditor.qbs b/src/plugins/diffeditor/diffeditor.qbs index 47c41afd3cf..e1ce4998716 100644 --- a/src/plugins/diffeditor/diffeditor.qbs +++ b/src/plugins/diffeditor/diffeditor.qbs @@ -32,6 +32,7 @@ QtcPlugin { "diffeditorplugin.h", "diffeditorwidgetcontroller.cpp", "diffeditorwidgetcontroller.h", + "diffenums.h", "diffutils.cpp", "diffutils.h", "diffview.cpp", diff --git a/src/plugins/diffeditor/diffeditorcontroller.cpp b/src/plugins/diffeditor/diffeditorcontroller.cpp index 130b938eff5..ad9e0a9c2d1 100644 --- a/src/plugins/diffeditor/diffeditorcontroller.cpp +++ b/src/plugins/diffeditor/diffeditorcontroller.cpp @@ -13,6 +13,7 @@ #include +using namespace Core; using namespace Utils; namespace DiffEditor { @@ -55,7 +56,8 @@ QString DiffEditorController::makePatch(int fileIndex, int chunkIndex, PatchOptions options) const { return m_document->makePatch(fileIndex, chunkIndex, selection, - options & Revert, options & AddPrefix); + (options & Revert) ? PatchAction::Revert : PatchAction::Apply, + options & AddPrefix); } Core::IDocument *DiffEditorController::findOrCreateDocument(const QString &vcsId, @@ -63,7 +65,7 @@ Core::IDocument *DiffEditorController::findOrCreateDocument(const QString &vcsId { QString preferredDisplayName = displayName; Core::IEditor *editor = Core::EditorManager::openEditorWithContents( - Constants::DIFF_EDITOR_ID, &preferredDisplayName, QByteArray(), vcsId); + Constants::DIFF_EDITOR_ID, &preferredDisplayName, {}, vcsId); return editor ? editor->document() : nullptr; } diff --git a/src/plugins/diffeditor/diffeditorcontroller.h b/src/plugins/diffeditor/diffeditorcontroller.h index d89e854d412..efa89824403 100644 --- a/src/plugins/diffeditor/diffeditorcontroller.h +++ b/src/plugins/diffeditor/diffeditorcontroller.h @@ -6,6 +6,8 @@ #include "diffeditor_global.h" #include "diffutils.h" +#include + #include QT_FORWARD_DECLARE_CLASS(QMenu) @@ -63,7 +65,7 @@ protected: void setDiffFiles(const QList &diffFileList, const Utils::FilePath &baseDirectory = {}, - const QString &startupFile = QString()); + const QString &startupFile = {}); void setDescription(const QString &description); QString description() const; void forceContextLineCount(int lines); diff --git a/src/plugins/diffeditor/diffeditordocument.cpp b/src/plugins/diffeditor/diffeditordocument.cpp index ec45e35484d..3bad3e3ad3d 100644 --- a/src/plugins/diffeditor/diffeditordocument.cpp +++ b/src/plugins/diffeditor/diffeditordocument.cpp @@ -4,7 +4,6 @@ #include "diffeditordocument.h" #include "diffeditorconstants.h" #include "diffeditorcontroller.h" -#include "diffutils.h" #include #include @@ -20,6 +19,7 @@ #include #include +using namespace Core; using namespace Utils; namespace DiffEditor { @@ -58,14 +58,14 @@ DiffEditorController *DiffEditorDocument::controller() const static void appendRow(ChunkData *chunk, const RowData &row) { - const bool isSeparator = row.leftLine.textLineType == TextLineData::Separator - && row.rightLine.textLineType == TextLineData::Separator; + const bool isSeparator = row.line[LeftSide].textLineType == TextLineData::Separator + && row.line[RightSide].textLineType == TextLineData::Separator; if (!isSeparator) chunk->rows.append(row); } -ChunkData DiffEditorDocument::filterChunk(const ChunkData &data, - const ChunkSelection &selection, bool revert) +ChunkData DiffEditorDocument::filterChunk(const ChunkData &data, const ChunkSelection &selection, + PatchAction patchAction) { if (selection.isNull()) return data; @@ -74,8 +74,8 @@ ChunkData DiffEditorDocument::filterChunk(const ChunkData &data, chunk.rows.clear(); for (int i = 0; i < data.rows.count(); ++i) { RowData row = data.rows[i]; - const bool isLeftSelected = selection.leftSelection.contains(i); - const bool isRightSelected = selection.rightSelection.contains(i); + const bool isLeftSelected = selection.selection[LeftSide].contains(i); + const bool isRightSelected = selection.selection[RightSide].contains(i); if (isLeftSelected || isRightSelected) { if (row.equal || (isLeftSelected && isRightSelected)) { @@ -83,30 +83,30 @@ ChunkData DiffEditorDocument::filterChunk(const ChunkData &data, } else if (isLeftSelected) { RowData newRow = row; - row.rightLine = TextLineData(TextLineData::Separator); + row.line[RightSide] = TextLineData(TextLineData::Separator); appendRow(&chunk, row); - if (revert) { - newRow.leftLine = newRow.rightLine; + if (patchAction == PatchAction::Revert) { + newRow.line[LeftSide] = newRow.line[RightSide]; newRow.equal = true; appendRow(&chunk, newRow); } } else { // isRightSelected - if (!revert) { + if (patchAction == PatchAction::Apply) { RowData newRow = row; - newRow.rightLine = newRow.leftLine; + newRow.line[RightSide] = newRow.line[LeftSide]; newRow.equal = true; appendRow(&chunk, newRow); } - row.leftLine = TextLineData(TextLineData::Separator); + row.line[LeftSide] = TextLineData(TextLineData::Separator); appendRow(&chunk, row); } } else { - if (revert) - row.leftLine = row.rightLine; + if (patchAction == PatchAction::Apply) + row.line[RightSide] = row.line[LeftSide]; else - row.rightLine = row.leftLine; + row.line[LeftSide] = row.line[RightSide]; row.equal = true; appendRow(&chunk, row); } @@ -116,36 +116,26 @@ ChunkData DiffEditorDocument::filterChunk(const ChunkData &data, } QString DiffEditorDocument::makePatch(int fileIndex, int chunkIndex, - const ChunkSelection &selection, - bool revert, bool addPrefix, - const QString &overriddenFileName) const + const ChunkSelection &selection, PatchAction patchAction, + bool addPrefix, const QString &overriddenFileName) const { - if (fileIndex < 0 || chunkIndex < 0) - return QString(); - - if (fileIndex >= m_diffFiles.count()) - return QString(); + if (fileIndex < 0 || chunkIndex < 0 || fileIndex >= m_diffFiles.count()) + return {}; const FileData &fileData = m_diffFiles.at(fileIndex); if (chunkIndex >= fileData.chunks.count()) - return QString(); + return {}; - const ChunkData chunkData = filterChunk(fileData.chunks.at(chunkIndex), selection, revert); + const ChunkData chunkData = filterChunk(fileData.chunks.at(chunkIndex), selection, patchAction); const bool lastChunk = (chunkIndex == fileData.chunks.count() - 1); const QString fileName = !overriddenFileName.isEmpty() - ? overriddenFileName : revert - ? fileData.rightFileInfo.fileName - : fileData.leftFileInfo.fileName; + ? overriddenFileName : patchAction == PatchAction::Apply + ? fileData.fileInfo[LeftSide].fileName : fileData.fileInfo[RightSide].fileName; - QString leftPrefix, rightPrefix; - if (addPrefix) { - leftPrefix = "a/"; - rightPrefix = "b/"; - } - return DiffUtils::makePatch(chunkData, - leftPrefix + fileName, - rightPrefix + fileName, + const QString leftFileName = addPrefix ? QString("a/") + fileName : fileName; + const QString rightFileName = addPrefix ? QString("b/") + fileName : fileName; + return DiffUtils::makePatch(chunkData, leftFileName, rightFileName, lastChunk && fileData.lastChunkAtTheEndOfFile); } @@ -257,12 +247,12 @@ bool DiffEditorDocument::save(QString *errorString, const FilePath &filePath, bo return false; setController(nullptr); - setDescription(QString()); + setDescription({}); Core::EditorManager::clearUniqueId(this); setTemporary(false); setFilePath(filePath.absoluteFilePath()); - setPreferredDisplayName(QString()); + setPreferredDisplayName({}); emit temporaryStateChanged(); return true; @@ -393,8 +383,8 @@ void DiffEditorDocument::beginReload() m_state = Reloading; emit changed(); QSignalBlocker blocker(this); - setDiffFiles(QList(), {}); - setDescription(QString()); + setDiffFiles({}, {}); + setDescription({}); } void DiffEditorDocument::endReload(bool success) diff --git a/src/plugins/diffeditor/diffeditordocument.h b/src/plugins/diffeditor/diffeditordocument.h index 5a329ea99a0..5238c361c3f 100644 --- a/src/plugins/diffeditor/diffeditordocument.h +++ b/src/plugins/diffeditor/diffeditordocument.h @@ -5,6 +5,7 @@ #include "diffutils.h" +#include #include QT_FORWARD_DECLARE_CLASS(QMenu) @@ -31,14 +32,14 @@ public: LoadFailed }; - static ChunkData filterChunk(const ChunkData &data, - const ChunkSelection &selection, bool revert); + static ChunkData filterChunk(const ChunkData &data, const ChunkSelection &selection, + Core::PatchAction patchAction); QString makePatch(int fileIndex, int chunkIndex, const ChunkSelection &selection, - bool revert, bool addPrefix = false, - const QString &overriddenFileName = QString()) const; + Core::PatchAction patchAction, bool addPrefix = false, + const QString &overriddenFileName = {}) const; void setDiffFiles(const QList &data, const Utils::FilePath &directory, - const QString &startupFile = QString()); + const QString &startupFile = {}); QList diffFiles() const; Utils::FilePath baseDirectory() const; void setBaseDirectory(const Utils::FilePath &directory); diff --git a/src/plugins/diffeditor/diffeditorfactory.cpp b/src/plugins/diffeditor/diffeditorfactory.cpp index 04b50704d67..41d2b20cb6a 100644 --- a/src/plugins/diffeditor/diffeditorfactory.cpp +++ b/src/plugins/diffeditor/diffeditorfactory.cpp @@ -5,7 +5,6 @@ #include "diffeditorconstants.h" #include "diffeditordocument.h" #include "diffeditorfactory.h" -#include "sidebysidediffeditorwidget.h" #include "texteditor/texteditoractionhandler.h" @@ -35,13 +34,13 @@ DiffEditorFactory::DiffEditorFactory() : Constants::DIFF_EDITOR_ID, Id(Constants::SIDE_BY_SIDE_VIEW_ID).withSuffix(1), TextEditorActionHandler::None, - [](IEditor *e) { return static_cast(e)->leftEditorWidget(); } + [](IEditor *e) { return static_cast(e)->sideEditorWidget(LeftSide); } }, rightHandler { Constants::DIFF_EDITOR_ID, Id(Constants::SIDE_BY_SIDE_VIEW_ID).withSuffix(2), TextEditorActionHandler::None, - [](Core::IEditor *e) { return static_cast(e)->rightEditorWidget(); } + [](Core::IEditor *e) { return static_cast(e)->sideEditorWidget(RightSide); } } { setId(Constants::DIFF_EDITOR_ID); diff --git a/src/plugins/diffeditor/diffeditorplugin.cpp b/src/plugins/diffeditor/diffeditorplugin.cpp index 2b22500a2ba..a8b2b1331b9 100644 --- a/src/plugins/diffeditor/diffeditorplugin.cpp +++ b/src/plugins/diffeditor/diffeditorplugin.cpp @@ -2,17 +2,14 @@ // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0+ OR GPL-3.0 WITH Qt-GPL-exception-1.0 #include "diffeditorplugin.h" -#include "diffeditor.h" #include "diffeditorconstants.h" #include "diffeditorcontroller.h" #include "diffeditordocument.h" #include "diffeditorfactory.h" #include -#include #include #include -#include #include #include @@ -24,10 +21,10 @@ #include #include -#include "texteditor/texteditoractionhandler.h" #include #include +#include #include #include @@ -40,10 +37,8 @@ namespace Internal { class ReloadInput { public: - QString leftText; - QString rightText; - DiffFileInfo leftFileInfo; - DiffFileInfo rightFileInfo; + std::array text{}; + DiffFileInfoArray fileInfo{}; FileData::FileOperation fileOperation = FileData::ChangeFile; bool binaryFiles = false; }; @@ -59,7 +54,7 @@ public: void operator()(QFutureInterface &futureInterface, const ReloadInput &reloadInfo) const { - if (reloadInfo.leftText == reloadInfo.rightText) + if (reloadInfo.text[LeftSide] == reloadInfo.text[RightSide]) return; // We show "No difference" in this case, regardless if it's binary or not Differ differ(&futureInterface); @@ -67,7 +62,7 @@ public: FileData fileData; if (!reloadInfo.binaryFiles) { const QList diffList = Differ::cleanupSemantics( - differ.diff(reloadInfo.leftText, reloadInfo.rightText)); + differ.diff(reloadInfo.text[LeftSide], reloadInfo.text[RightSide])); QList leftDiffList; QList rightDiffList; @@ -91,8 +86,7 @@ public: outputLeftDiffList, outputRightDiffList); fileData = DiffUtils::calculateContextData(chunkData, m_contextLineCount, 0); } - fileData.leftFileInfo = reloadInfo.leftFileInfo; - fileData.rightFileInfo = reloadInfo.rightFileInfo; + fileData.fileInfo = reloadInfo.fileInfo; fileData.fileOperation = reloadInfo.fileOperation; fileData.binaryFiles = reloadInfo.binaryFiles; futureInterface.reportResult(fileData); @@ -150,7 +144,7 @@ void DiffFilesController::cancelReload() { if (m_futureWatcher.future().isRunning()) { m_futureWatcher.future().cancel(); - m_futureWatcher.setFuture(QFuture()); + m_futureWatcher.setFuture({}); } } @@ -190,13 +184,10 @@ QList DiffCurrentFileController::reloadInputList() const const QString rightText = textDocument->plainText(); ReloadInput reloadInput; - reloadInput.leftText = leftText; - reloadInput.rightText = rightText; - reloadInput.leftFileInfo.fileName = m_fileName; - reloadInput.rightFileInfo.fileName = m_fileName; - reloadInput.leftFileInfo.typeInfo = tr("Saved"); - reloadInput.rightFileInfo.typeInfo = tr("Modified"); - reloadInput.rightFileInfo.patchBehaviour = DiffFileInfo::PatchEditor; + reloadInput.text = {leftText, rightText}; + reloadInput.fileInfo = {DiffFileInfo(m_fileName, tr("Saved")), + DiffFileInfo(m_fileName, tr("Modified"))}; + reloadInput.fileInfo[RightSide].patchBehaviour = DiffFileInfo::PatchEditor; reloadInput.binaryFiles = (leftResult == TextFileFormat::ReadEncodingError); if (leftResult == TextFileFormat::ReadIOError) @@ -246,13 +237,10 @@ QList DiffOpenFilesController::reloadInputList() const const QString rightText = textDocument->plainText(); ReloadInput reloadInput; - reloadInput.leftText = leftText; - reloadInput.rightText = rightText; - reloadInput.leftFileInfo.fileName = fileName; - reloadInput.rightFileInfo.fileName = fileName; - reloadInput.leftFileInfo.typeInfo = tr("Saved"); - reloadInput.rightFileInfo.typeInfo = tr("Modified"); - reloadInput.rightFileInfo.patchBehaviour = DiffFileInfo::PatchEditor; + reloadInput.text = {leftText, rightText}; + reloadInput.fileInfo = {DiffFileInfo(fileName, tr("Saved")), + DiffFileInfo(fileName, tr("Modified"))}; + reloadInput.fileInfo[RightSide].patchBehaviour = DiffFileInfo::PatchEditor; reloadInput.binaryFiles = (leftResult == TextFileFormat::ReadEncodingError); if (leftResult == TextFileFormat::ReadIOError) @@ -304,13 +292,10 @@ QList DiffModifiedFilesController::reloadInputList() const const QString rightText = textDocument->plainText(); ReloadInput reloadInput; - reloadInput.leftText = leftText; - reloadInput.rightText = rightText; - reloadInput.leftFileInfo.fileName = fileName; - reloadInput.rightFileInfo.fileName = fileName; - reloadInput.leftFileInfo.typeInfo = tr("Saved"); - reloadInput.rightFileInfo.typeInfo = tr("Modified"); - reloadInput.rightFileInfo.patchBehaviour = DiffFileInfo::PatchEditor; + reloadInput.text = {leftText, rightText}; + reloadInput.fileInfo = {DiffFileInfo(fileName, tr("Saved")), + DiffFileInfo(fileName, tr("Modified"))}; + reloadInput.fileInfo[RightSide].patchBehaviour = DiffFileInfo::PatchEditor; reloadInput.binaryFiles = (leftResult == TextFileFormat::ReadEncodingError); if (leftResult == TextFileFormat::ReadIOError) @@ -360,10 +345,9 @@ QList DiffExternalFilesController::reloadInputList() const FilePath::fromString(m_rightFileName), format.codec, &rightText, &format, &errorString); ReloadInput reloadInput; - reloadInput.leftText = leftText; - reloadInput.rightText = rightText; - reloadInput.leftFileInfo.fileName = m_leftFileName; - reloadInput.rightFileInfo.fileName = m_rightFileName; + reloadInput.text = {leftText, rightText}; + reloadInput.fileInfo[LeftSide].fileName = m_leftFileName; + reloadInput.fileInfo[RightSide].fileName = m_rightFileName; reloadInput.binaryFiles = (leftResult == TextFileFormat::ReadEncodingError || rightResult == TextFileFormat::ReadEncodingError); @@ -440,12 +424,14 @@ public: QAction *m_diffCurrentFileAction = nullptr; QAction *m_diffOpenFilesAction = nullptr; - DiffEditorFactory editorFactory; - DiffEditorServiceImpl service; + DiffEditorFactory m_editorFactory; + DiffEditorServiceImpl m_service; + FutureSynchronizer m_futureSynchronizer; }; DiffEditorPluginPrivate::DiffEditorPluginPrivate() { + m_futureSynchronizer.setCancelOnWait(true); //register actions ActionContainer *toolsContainer = ActionManager::actionContainer(Core::Constants::M_TOOLS); @@ -571,9 +557,17 @@ void DiffEditorPluginPrivate::diffExternalFiles() document->reload(); } +static DiffEditorPlugin *s_instance = nullptr; + +DiffEditorPlugin::DiffEditorPlugin() +{ + s_instance = this; +} + DiffEditorPlugin::~DiffEditorPlugin() { delete d; + s_instance = nullptr; } bool DiffEditorPlugin::initialize(const QStringList &arguments, QString *errorMessage) @@ -586,6 +580,13 @@ bool DiffEditorPlugin::initialize(const QStringList &arguments, QString *errorMe return true; } +void DiffEditorPlugin::addFuture(const QFuture &future) +{ + QTC_ASSERT(s_instance, return); + s_instance->d->m_futureSynchronizer.addFuture(future); +} + + } // namespace Internal } // namespace DiffEditor @@ -822,23 +823,23 @@ void DiffEditor::Internal::DiffEditorPlugin::testMakePatch() QCOMPARE(resultList.count(), 1); for (int i = 0; i < resultList.count(); i++) { const FileData &resultFileData = resultList.at(i); - QCOMPARE(resultFileData.leftFileInfo.fileName, fileName); - QCOMPARE(resultFileData.rightFileInfo.fileName, fileName); + QCOMPARE(resultFileData.fileInfo[LeftSide].fileName, fileName); + QCOMPARE(resultFileData.fileInfo[RightSide].fileName, fileName); QCOMPARE(resultFileData.chunks.count(), 1); for (int j = 0; j < resultFileData.chunks.count(); j++) { const ChunkData &resultChunkData = resultFileData.chunks.at(j); - QCOMPARE(resultChunkData.leftStartingLineNumber, sourceChunk.leftStartingLineNumber); - QCOMPARE(resultChunkData.rightStartingLineNumber, sourceChunk.rightStartingLineNumber); + QCOMPARE(resultChunkData.startingLineNumber[LeftSide], sourceChunk.startingLineNumber[LeftSide]); + QCOMPARE(resultChunkData.startingLineNumber[RightSide], sourceChunk.startingLineNumber[RightSide]); QCOMPARE(resultChunkData.contextChunk, sourceChunk.contextChunk); QCOMPARE(resultChunkData.rows.count(), sourceChunk.rows.count()); for (int k = 0; k < sourceChunk.rows.count(); k++) { const RowData &sourceRowData = sourceChunk.rows.at(k); const RowData &resultRowData = resultChunkData.rows.at(k); QCOMPARE(resultRowData.equal, sourceRowData.equal); - QCOMPARE(resultRowData.leftLine.text, sourceRowData.leftLine.text); - QCOMPARE(resultRowData.leftLine.textLineType, sourceRowData.leftLine.textLineType); - QCOMPARE(resultRowData.rightLine.text, sourceRowData.rightLine.text); - QCOMPARE(resultRowData.rightLine.textLineType, sourceRowData.rightLine.textLineType); + QCOMPARE(resultRowData.line[LeftSide].text, sourceRowData.line[LeftSide].text); + QCOMPARE(resultRowData.line[LeftSide].textLineType, sourceRowData.line[LeftSide].textLineType); + QCOMPARE(resultRowData.line[RightSide].text, sourceRowData.line[RightSide].text); + QCOMPARE(resultRowData.line[RightSide].textLineType, sourceRowData.line[RightSide].textLineType); } } } @@ -847,7 +848,7 @@ void DiffEditor::Internal::DiffEditorPlugin::testMakePatch() void DiffEditor::Internal::DiffEditorPlugin::testReadPatch_data() { QTest::addColumn("sourcePatch"); - QTest::addColumn >("fileDataList"); + QTest::addColumn>("fileDataList"); QString patch = "diff --git a/src/plugins/diffeditor/diffeditor.cpp b/src/plugins/diffeditor/diffeditor.cpp\n" "index eab9e9b..082c135 100644\n" @@ -930,11 +931,10 @@ void DiffEditor::Internal::DiffEditorPlugin::testReadPatch_data() ; FileData fileData1; - fileData1.leftFileInfo = DiffFileInfo("src/plugins/diffeditor/diffeditor.cpp", "eab9e9b"); - fileData1.rightFileInfo = DiffFileInfo("src/plugins/diffeditor/diffeditor.cpp", "082c135"); + fileData1.fileInfo = {DiffFileInfo("src/plugins/diffeditor/diffeditor.cpp", "eab9e9b"), + DiffFileInfo("src/plugins/diffeditor/diffeditor.cpp", "082c135")}; ChunkData chunkData1; - chunkData1.leftStartingLineNumber = 186; - chunkData1.rightStartingLineNumber = 186; + chunkData1.startingLineNumber = {186, 186}; QList rows1; rows1 << RowData(_(" m_controller = m_document->controller();")); rows1 << RowData(_(" m_guiController = new DiffEditorGuiController(m_controller, this);")); @@ -949,11 +949,10 @@ void DiffEditor::Internal::DiffEditorPlugin::testReadPatch_data() fileData1.chunks << chunkData1; FileData fileData2; - fileData2.leftFileInfo = DiffFileInfo(_("src/plugins/diffeditor/diffutils.cpp"), _("2f641c9")); - fileData2.rightFileInfo = DiffFileInfo(_("src/plugins/diffeditor/diffutils.cpp"), _("f8ff795")); + fileData2.fileInfo = {DiffFileInfo(_("src/plugins/diffeditor/diffutils.cpp"), _("2f641c9")), + DiffFileInfo(_("src/plugins/diffeditor/diffutils.cpp"), _("f8ff795"))}; ChunkData chunkData2; - chunkData2.leftStartingLineNumber = 463; - chunkData2.rightStartingLineNumber = 463; + chunkData2.startingLineNumber = {463, 463}; QList rows2; rows2 << RowData(_(" return diffText;")); rows2 << RowData(_("}")); @@ -971,12 +970,10 @@ void DiffEditor::Internal::DiffEditorPlugin::testReadPatch_data() fileData2.chunks << chunkData2; FileData fileData3; - fileData3.leftFileInfo = DiffFileInfo("new", "0000000"); - fileData3.rightFileInfo = DiffFileInfo("new", "257cc56"); + fileData3.fileInfo = {DiffFileInfo("new", "0000000"), DiffFileInfo("new", "257cc56")}; fileData3.fileOperation = FileData::NewFile; ChunkData chunkData3; - chunkData3.leftStartingLineNumber = -1; - chunkData3.rightStartingLineNumber = 0; + chunkData3.startingLineNumber = {-1, 0}; QList rows3; rows3 << RowData(TextLineData::Separator, _("foo")); TextLineData textLineData3(TextLineData::TextLine); @@ -985,12 +982,10 @@ void DiffEditor::Internal::DiffEditorPlugin::testReadPatch_data() fileData3.chunks << chunkData3; FileData fileData4; - fileData4.leftFileInfo = DiffFileInfo("deleted", "257cc56"); - fileData4.rightFileInfo = DiffFileInfo("deleted", "0000000"); + fileData4.fileInfo = {DiffFileInfo("deleted", "257cc56"), DiffFileInfo("deleted", "0000000")}; fileData4.fileOperation = FileData::DeleteFile; ChunkData chunkData4; - chunkData4.leftStartingLineNumber = 0; - chunkData4.rightStartingLineNumber = -1; + chunkData4.startingLineNumber = {0, -1}; QList rows4; rows4 << RowData(_("foo"), TextLineData::Separator); TextLineData textLineData4(TextLineData::TextLine); @@ -999,22 +994,19 @@ void DiffEditor::Internal::DiffEditorPlugin::testReadPatch_data() fileData4.chunks << chunkData4; FileData fileData5; - fileData5.leftFileInfo = DiffFileInfo("empty", "0000000"); - fileData5.rightFileInfo = DiffFileInfo("empty", "e69de29"); + fileData5.fileInfo = {DiffFileInfo("empty", "0000000"), DiffFileInfo("empty", "e69de29")}; fileData5.fileOperation = FileData::NewFile; FileData fileData6; - fileData6.leftFileInfo = DiffFileInfo("empty", "e69de29"); - fileData6.rightFileInfo = DiffFileInfo("empty", "0000000"); + fileData6.fileInfo = {DiffFileInfo("empty", "e69de29"), DiffFileInfo("empty", "0000000")}; fileData6.fileOperation = FileData::DeleteFile; FileData fileData7; - fileData7.leftFileInfo = DiffFileInfo("file a.txt", "1234567"); - fileData7.rightFileInfo = DiffFileInfo("file b.txt", "9876543"); + fileData7.fileInfo = {DiffFileInfo("file a.txt", "1234567"), + DiffFileInfo("file b.txt", "9876543")}; fileData7.fileOperation = FileData::CopyFile; ChunkData chunkData7; - chunkData7.leftStartingLineNumber = 19; - chunkData7.rightStartingLineNumber = 19; + chunkData7.startingLineNumber = {19, 19}; QList rows7; rows7 << RowData(_("A")); rows7 << RowData(_("B"), _("C")); @@ -1023,13 +1015,11 @@ void DiffEditor::Internal::DiffEditorPlugin::testReadPatch_data() fileData7.chunks << chunkData7; FileData fileData8; - fileData8.leftFileInfo = DiffFileInfo("file a.txt"); - fileData8.rightFileInfo = DiffFileInfo("file b.txt"); + fileData8.fileInfo = {DiffFileInfo("file a.txt"), DiffFileInfo("file b.txt")}; fileData8.fileOperation = FileData::RenameFile; FileData fileData9; - fileData9.leftFileInfo = DiffFileInfo("file.txt", "1234567"); - fileData9.rightFileInfo = DiffFileInfo("file.txt", "9876543"); + fileData9.fileInfo = {DiffFileInfo("file.txt", "1234567"), DiffFileInfo("file.txt", "9876543")}; fileData9.chunks << chunkData7; QList fileDataList1; fileDataList1 << fileData1 << fileData2 << fileData3 << fileData4 << fileData5 @@ -1050,11 +1040,10 @@ void DiffEditor::Internal::DiffEditorPlugin::testReadPatch_data() " C\n" "+\n"; - fileData1.leftFileInfo = DiffFileInfo("file foo.txt", "1234567"); - fileData1.rightFileInfo = DiffFileInfo("file foo.txt", "9876543"); + fileData1.fileInfo = {DiffFileInfo("file foo.txt", "1234567"), + DiffFileInfo("file foo.txt", "9876543")}; fileData1.fileOperation = FileData::ChangeFile; - chunkData1.leftStartingLineNumber = 49; - chunkData1.rightStartingLineNumber = 49; + chunkData1.startingLineNumber = {49, 49}; rows1.clear(); rows1 << RowData(_("A")); rows1 << RowData(_("B")); @@ -1081,11 +1070,10 @@ void DiffEditor::Internal::DiffEditorPlugin::testReadPatch_data() "\\ No newline at end of file\n" "+ABCD\n"; - fileData1.leftFileInfo = DiffFileInfo("file foo.txt", "1234567"); - fileData1.rightFileInfo = DiffFileInfo("file foo.txt", "9876543"); + fileData1.fileInfo = {DiffFileInfo("file foo.txt", "1234567"), + DiffFileInfo("file foo.txt", "9876543")}; fileData1.fileOperation = FileData::ChangeFile; - chunkData1.leftStartingLineNumber = 0; - chunkData1.rightStartingLineNumber = 0; + chunkData1.startingLineNumber = {0, 0}; rows1.clear(); rows1 << RowData(_("ABCD")); rows1 << RowData(TextLineData::Separator, _("")); @@ -1117,11 +1105,10 @@ void DiffEditor::Internal::DiffEditorPlugin::testReadPatch_data() "+F\n" ; - fileData1.leftFileInfo = DiffFileInfo("difftest.txt", "1234567"); - fileData1.rightFileInfo = DiffFileInfo("difftest.txt", "9876543"); + fileData1.fileInfo = {DiffFileInfo("difftest.txt", "1234567"), + DiffFileInfo("difftest.txt", "9876543")}; fileData1.fileOperation = FileData::ChangeFile; - chunkData1.leftStartingLineNumber = 1; - chunkData1.rightStartingLineNumber = 1; + chunkData1.startingLineNumber = {1, 1}; rows1.clear(); rows1 << RowData(_("A")); rows1 << RowData(_("B")); @@ -1130,8 +1117,7 @@ void DiffEditor::Internal::DiffEditorPlugin::testReadPatch_data() rows1 << RowData(_("")); chunkData1.rows = rows1; - chunkData2.leftStartingLineNumber = 8; - chunkData2.rightStartingLineNumber = 8; + chunkData2.startingLineNumber = {8, 8}; rows2.clear(); rows2 << RowData(_("")); rows2 << RowData(_("D")); @@ -1160,11 +1146,10 @@ void DiffEditor::Internal::DiffEditorPlugin::testReadPatch_data() "+EFGH\n" "\\ No newline at end of file\n"; - fileData1.leftFileInfo = DiffFileInfo("file foo.txt", "1234567"); - fileData1.rightFileInfo = DiffFileInfo("file foo.txt", "9876543"); + fileData1.fileInfo = {DiffFileInfo("file foo.txt", "1234567"), + DiffFileInfo("file foo.txt", "9876543")}; fileData1.fileOperation = FileData::ChangeFile; - chunkData1.leftStartingLineNumber = 0; - chunkData1.rightStartingLineNumber = 0; + chunkData1.startingLineNumber = {0, 0}; rows1.clear(); rows1 << RowData(_("ABCD")); rows1 << RowData(TextLineData::Separator, _("")); @@ -1202,16 +1187,15 @@ void DiffEditor::Internal::DiffEditorPlugin::testReadPatch_data() " \n" ; - fileData1 = FileData(); - fileData1.leftFileInfo = DiffFileInfo("src/plugins/texteditor/basetextdocument.h"); - fileData1.rightFileInfo = DiffFileInfo("src/plugins/texteditor/textdocument.h"); + fileData1 = {}; + fileData1.fileInfo = {DiffFileInfo("src/plugins/texteditor/basetextdocument.h"), + DiffFileInfo("src/plugins/texteditor/textdocument.h")}; fileData1.fileOperation = FileData::RenameFile; - fileData2 = FileData(); - fileData2.leftFileInfo = DiffFileInfo("src/plugins/texteditor/basetextdocumentlayout.cpp", "0121933"); - fileData2.rightFileInfo = DiffFileInfo("src/plugins/texteditor/textdocumentlayout.cpp", "01cc3a0"); + fileData2 = {}; + fileData2.fileInfo = {DiffFileInfo("src/plugins/texteditor/basetextdocumentlayout.cpp", "0121933"), + DiffFileInfo("src/plugins/texteditor/textdocumentlayout.cpp", "01cc3a0")}; fileData2.fileOperation = FileData::RenameFile; - chunkData2.leftStartingLineNumber = 1; - chunkData2.rightStartingLineNumber = 1; + chunkData2.startingLineNumber = {1, 1}; rows2.clear(); rows2 << RowData(_("A")); rows2 << RowData(_("B")); @@ -1238,11 +1222,9 @@ void DiffEditor::Internal::DiffEditorPlugin::testReadPatch_data() "-Subproject commit eda76354077a427d692fee05479910de31040d3f\n" "+Subproject commit eda76354077a427d692fee05479910de31040d3f-dirty\n" ; - fileData1 = FileData(); - fileData1.leftFileInfo = DiffFileInfo("src/shared/qbs"); - fileData1.rightFileInfo = DiffFileInfo("src/shared/qbs"); - chunkData1.leftStartingLineNumber = 0; - chunkData1.rightStartingLineNumber = 0; + fileData1 = {}; + fileData1.fileInfo = {DiffFileInfo("src/shared/qbs"), DiffFileInfo("src/shared/qbs")}; + chunkData1.startingLineNumber = {0, 0}; rows1.clear(); rows1 << RowData(_("Subproject commit eda76354077a427d692fee05479910de31040d3f"), _("Subproject commit eda76354077a427d692fee05479910de31040d3f-dirty")); @@ -1273,26 +1255,25 @@ void DiffEditor::Internal::DiffEditorPlugin::testReadPatch_data() "Binary files /dev/null and b/demos/arthurplugin/flower.jpg differ\n" ; - fileData1 = FileData(); - fileData1.leftFileInfo = DiffFileInfo("demos/arthurplugin/arthurplugin.pro", "0000000"); - fileData1.rightFileInfo = DiffFileInfo("demos/arthurplugin/arthurplugin.pro", "c5132b4"); + fileData1 = {}; + fileData1.fileInfo = {DiffFileInfo("demos/arthurplugin/arthurplugin.pro", "0000000"), + DiffFileInfo("demos/arthurplugin/arthurplugin.pro", "c5132b4")}; fileData1.fileOperation = FileData::NewFile; - chunkData1 = ChunkData(); - chunkData1.leftStartingLineNumber = -1; - chunkData1.rightStartingLineNumber = 0; + chunkData1 = {}; + chunkData1.startingLineNumber = {-1, 0}; rows1.clear(); rows1 << RowData(TextLineData::Separator, _("XXX")); rows1 << RowData(TextLineData::Separator, TextLineData(TextLineData::TextLine)); chunkData1.rows = rows1; fileData1.chunks << chunkData1; - fileData2 = FileData(); - fileData2.leftFileInfo = DiffFileInfo("demos/arthurplugin/bg1.jpg", "0000000"); - fileData2.rightFileInfo = DiffFileInfo("demos/arthurplugin/bg1.jpg", "dfc7cee"); + fileData2 = {}; + fileData2.fileInfo = {DiffFileInfo("demos/arthurplugin/bg1.jpg", "0000000"), + DiffFileInfo("demos/arthurplugin/bg1.jpg", "dfc7cee")}; fileData2.fileOperation = FileData::NewFile; fileData2.binaryFiles = true; - fileData3 = FileData(); - fileData3.leftFileInfo = DiffFileInfo("demos/arthurplugin/flower.jpg", "0000000"); - fileData3.rightFileInfo = DiffFileInfo("demos/arthurplugin/flower.jpg", "f8e022c"); + fileData3 = {}; + fileData3.fileInfo = {DiffFileInfo("demos/arthurplugin/flower.jpg", "0000000"), + DiffFileInfo("demos/arthurplugin/flower.jpg", "f8e022c")}; fileData3.fileOperation = FileData::NewFile; fileData3.binaryFiles = true; @@ -1308,9 +1289,8 @@ void DiffEditor::Internal::DiffEditorPlugin::testReadPatch_data() "new mode 100755\n" ; - fileData1 = FileData(); - fileData1.leftFileInfo = DiffFileInfo("script.sh"); - fileData1.rightFileInfo = DiffFileInfo("script.sh"); + fileData1 = {}; + fileData1.fileInfo = {DiffFileInfo("script.sh"), DiffFileInfo("script.sh")}; fileData1.fileOperation = FileData::ChangeMode; QList fileDataList9; @@ -1328,9 +1308,8 @@ rename to new.sh )" ; - fileData1 = FileData(); - fileData1.leftFileInfo = DiffFileInfo("old.sh"); - fileData1.rightFileInfo = DiffFileInfo("new.sh"); + fileData1 = {}; + fileData1.fileInfo = {DiffFileInfo("old.sh"), DiffFileInfo("new.sh")}; fileData1.fileOperation = FileData::RenameFile; QList fileDataList10; @@ -1346,12 +1325,11 @@ rename to new.sh "--- src/plugins/subversion/subversioneditor.cpp\t(revision 0)\n" "+++ src/plugins/subversion/subversioneditor.cpp\t(revision 0)\n" "@@ -0,0 +125 @@\n\n"; - fileData1 = FileData(); - fileData1.leftFileInfo = DiffFileInfo("src/plugins/subversion/subversioneditor.cpp"); - fileData1.rightFileInfo = DiffFileInfo("src/plugins/subversion/subversioneditor.cpp"); - chunkData1 = ChunkData(); - chunkData1.leftStartingLineNumber = -1; - chunkData1.rightStartingLineNumber = 124; + fileData1 = {}; + fileData1.fileInfo = {DiffFileInfo("src/plugins/subversion/subversioneditor.cpp"), + DiffFileInfo("src/plugins/subversion/subversioneditor.cpp")}; + chunkData1 = {}; + chunkData1.startingLineNumber = {-1, 124}; fileData1.chunks << chunkData1; QList fileDataList21; fileDataList21 << fileData1; @@ -1366,12 +1344,11 @@ rename to new.sh "--- src/plugins/subversion/subversioneditor.cpp\t(revision 42)\n" "+++ src/plugins/subversion/subversioneditor.cpp\t(working copy)\n" "@@ -1,125 +0,0 @@\n\n"; - fileData1 = FileData(); - fileData1.leftFileInfo = DiffFileInfo("src/plugins/subversion/subversioneditor.cpp"); - fileData1.rightFileInfo = DiffFileInfo("src/plugins/subversion/subversioneditor.cpp"); - chunkData1 = ChunkData(); - chunkData1.leftStartingLineNumber = 0; - chunkData1.rightStartingLineNumber = -1; + fileData1 = {}; + fileData1.fileInfo = {DiffFileInfo("src/plugins/subversion/subversioneditor.cpp"), + DiffFileInfo("src/plugins/subversion/subversioneditor.cpp")}; + chunkData1 = {}; + chunkData1.startingLineNumber = {0, -1}; fileData1.chunks << chunkData1; QList fileDataList22; fileDataList22 << fileData1; @@ -1386,12 +1363,11 @@ rename to new.sh "--- src/plugins/subversion/subversioneditor.cpp\t(revision 42)\n" "+++ src/plugins/subversion/subversioneditor.cpp\t(working copy)\n" "@@ -120,7 +120,7 @@\n\n"; - fileData1 = FileData(); - fileData1.leftFileInfo = DiffFileInfo("src/plugins/subversion/subversioneditor.cpp"); - fileData1.rightFileInfo = DiffFileInfo("src/plugins/subversion/subversioneditor.cpp"); - chunkData1 = ChunkData(); - chunkData1.leftStartingLineNumber = 119; - chunkData1.rightStartingLineNumber = 119; + fileData1 = {}; + fileData1.fileInfo = {DiffFileInfo("src/plugins/subversion/subversioneditor.cpp"), + DiffFileInfo("src/plugins/subversion/subversioneditor.cpp")}; + chunkData1 = {}; + chunkData1.startingLineNumber = {119, 119}; fileData1.chunks << chunkData1; QList fileDataList23; fileDataList23 << fileData1; @@ -1412,27 +1388,27 @@ void DiffEditor::Internal::DiffEditorPlugin::testReadPatch() for (int i = 0; i < fileDataList.count(); i++) { const FileData &origFileData = fileDataList.at(i); const FileData &resultFileData = result.at(i); - QCOMPARE(resultFileData.leftFileInfo.fileName, origFileData.leftFileInfo.fileName); - QCOMPARE(resultFileData.leftFileInfo.typeInfo, origFileData.leftFileInfo.typeInfo); - QCOMPARE(resultFileData.rightFileInfo.fileName, origFileData.rightFileInfo.fileName); - QCOMPARE(resultFileData.rightFileInfo.typeInfo, origFileData.rightFileInfo.typeInfo); + QCOMPARE(resultFileData.fileInfo[LeftSide].fileName, origFileData.fileInfo[LeftSide].fileName); + QCOMPARE(resultFileData.fileInfo[LeftSide].typeInfo, origFileData.fileInfo[LeftSide].typeInfo); + QCOMPARE(resultFileData.fileInfo[RightSide].fileName, origFileData.fileInfo[RightSide].fileName); + QCOMPARE(resultFileData.fileInfo[RightSide].typeInfo, origFileData.fileInfo[RightSide].typeInfo); QCOMPARE(resultFileData.chunks.count(), origFileData.chunks.count()); QCOMPARE(resultFileData.fileOperation, origFileData.fileOperation); for (int j = 0; j < origFileData.chunks.count(); j++) { const ChunkData &origChunkData = origFileData.chunks.at(j); const ChunkData &resultChunkData = resultFileData.chunks.at(j); - QCOMPARE(resultChunkData.leftStartingLineNumber, origChunkData.leftStartingLineNumber); - QCOMPARE(resultChunkData.rightStartingLineNumber, origChunkData.rightStartingLineNumber); + QCOMPARE(resultChunkData.startingLineNumber[LeftSide], origChunkData.startingLineNumber[LeftSide]); + QCOMPARE(resultChunkData.startingLineNumber[RightSide], origChunkData.startingLineNumber[RightSide]); QCOMPARE(resultChunkData.contextChunk, origChunkData.contextChunk); QCOMPARE(resultChunkData.rows.count(), origChunkData.rows.count()); for (int k = 0; k < origChunkData.rows.count(); k++) { const RowData &origRowData = origChunkData.rows.at(k); const RowData &resultRowData = resultChunkData.rows.at(k); QCOMPARE(resultRowData.equal, origRowData.equal); - QCOMPARE(resultRowData.leftLine.text, origRowData.leftLine.text); - QCOMPARE(resultRowData.leftLine.textLineType, origRowData.leftLine.textLineType); - QCOMPARE(resultRowData.rightLine.text, origRowData.rightLine.text); - QCOMPARE(resultRowData.rightLine.textLineType, origRowData.rightLine.textLineType); + QCOMPARE(resultRowData.line[LeftSide].text, origRowData.line[LeftSide].text); + QCOMPARE(resultRowData.line[LeftSide].textLineType, origRowData.line[LeftSide].textLineType); + QCOMPARE(resultRowData.line[RightSide].text, origRowData.line[RightSide].text); + QCOMPARE(resultRowData.line[RightSide].textLineType, origRowData.line[RightSide].textLineType); } } } @@ -1445,23 +1421,22 @@ void DiffEditor::Internal::DiffEditorPlugin::testFilterPatch_data() QTest::addColumn("chunk"); QTest::addColumn("rows"); QTest::addColumn("selection"); - QTest::addColumn("revert"); + QTest::addColumn("patchAction"); - auto createChunk = []() { + auto createChunk = [] { ChunkData chunk; chunk.contextInfo = "void DiffEditor::ctor()"; chunk.contextChunk = false; - chunk.leftStartingLineNumber = 49; - chunk.rightStartingLineNumber = 49; + chunk.startingLineNumber = {49, 49}; return chunk; }; auto appendRow = [](ChunkData *chunk, const QString &left, const QString &right) { RowData row; row.equal = (left == right); - row.leftLine.text = left; - row.leftLine.textLineType = left.isEmpty() ? TextLineData::Separator : TextLineData::TextLine; - row.rightLine.text = right; - row.rightLine.textLineType = right.isEmpty() ? TextLineData::Separator : TextLineData::TextLine; + row.line[LeftSide].text = left; + row.line[LeftSide].textLineType = left.isEmpty() ? TextLineData::Separator : TextLineData::TextLine; + row.line[RightSide].text = right; + row.line[RightSide].textLineType = right.isEmpty() ? TextLineData::Separator : TextLineData::TextLine; chunk->rows.append(row); }; ChunkData chunk; @@ -1476,7 +1451,7 @@ void DiffEditor::Internal::DiffEditorPlugin::testFilterPatch_data() {"", "B"}, {"C", "C"} }; - QTest::newRow("one added") << chunk << rows << ChunkSelection() << false; + QTest::newRow("one added") << chunk << rows << ChunkSelection() << PatchAction::Apply; chunk = createChunk(); appendRow(&chunk, "A", "A"); // 50 @@ -1487,7 +1462,7 @@ void DiffEditor::Internal::DiffEditorPlugin::testFilterPatch_data() {"B", ""}, {"C", "C"} }; - QTest::newRow("one removed") << chunk << rows << ChunkSelection() << false; + QTest::newRow("one removed") << chunk << rows << ChunkSelection() << PatchAction::Apply; chunk = createChunk(); appendRow(&chunk, "A", "A"); // 50 @@ -1502,7 +1477,8 @@ void DiffEditor::Internal::DiffEditorPlugin::testFilterPatch_data() {"", "D"}, {"F", "F"} }; - QTest::newRow("stage selected added") << chunk << rows << ChunkSelection({2, 3}, {2, 3}) << false; + QTest::newRow("stage selected added") << chunk << rows << ChunkSelection({2, 3}, {2, 3}) + << PatchAction::Apply; chunk = createChunk(); appendRow(&chunk, "A", "A"); // 50 @@ -1515,7 +1491,8 @@ void DiffEditor::Internal::DiffEditorPlugin::testFilterPatch_data() {"C", "C"}, {"E", "E"} }; - QTest::newRow("stage selected added keep changed") << chunk << rows << ChunkSelection({1}, {1}) << false; + QTest::newRow("stage selected added keep changed") << chunk << rows << ChunkSelection({1}, {1}) + << PatchAction::Apply; chunk = createChunk(); appendRow(&chunk, "A", "A"); // 50 @@ -1532,7 +1509,8 @@ void DiffEditor::Internal::DiffEditorPlugin::testFilterPatch_data() {"E", "E"}, {"F", "F"} }; - QTest::newRow("stage selected removed") << chunk << rows << ChunkSelection({2, 3}, {2, 3}) << false; + QTest::newRow("stage selected removed") << chunk << rows << ChunkSelection({2, 3}, {2, 3}) + << PatchAction::Apply; chunk = createChunk(); appendRow(&chunk, "A", "A"); // 50 @@ -1548,7 +1526,8 @@ void DiffEditor::Internal::DiffEditorPlugin::testFilterPatch_data() {"", "D"}, {"F", "F"} }; - QTest::newRow("stage selected added/removed") << chunk << rows << ChunkSelection({2, 3}, {2, 3}) << false; + QTest::newRow("stage selected added/removed") << chunk << rows << ChunkSelection({2, 3}, {2, 3}) + << PatchAction::Apply; chunk = createChunk(); appendRow(&chunk, "A", "A"); // 50 @@ -1559,7 +1538,8 @@ void DiffEditor::Internal::DiffEditorPlugin::testFilterPatch_data() {"B", "C"}, {"D", "D"} }; - QTest::newRow("stage modified row") << chunk << rows << ChunkSelection({1}, {1}) << false; + QTest::newRow("stage modified row") << chunk << rows << ChunkSelection({1}, {1}) + << PatchAction::Apply; chunk = createChunk(); appendRow(&chunk, "A", "A"); // 50 @@ -1570,7 +1550,8 @@ void DiffEditor::Internal::DiffEditorPlugin::testFilterPatch_data() {"B", "C"}, {"D", "D"} }; - QTest::newRow("stage modified and unmodified rows") << chunk << rows << ChunkSelection({0, 1, 2}, {0, 1, 2}) << false; + QTest::newRow("stage modified and unmodified rows") << chunk << rows + << ChunkSelection({0, 1, 2}, {0, 1, 2}) << PatchAction::Apply; chunk = createChunk(); appendRow(&chunk, "A", "A"); // 50 @@ -1581,7 +1562,8 @@ void DiffEditor::Internal::DiffEditorPlugin::testFilterPatch_data() {"B", "C"}, {"D", "D"} }; - QTest::newRow("stage unmodified left rows") << chunk << rows << ChunkSelection({0, 1, 2}, {1}) << false; + QTest::newRow("stage unmodified left rows") << chunk << rows << ChunkSelection({0, 1, 2}, {1}) + << PatchAction::Apply; chunk = createChunk(); appendRow(&chunk, "A", "A"); // 50 @@ -1592,7 +1574,8 @@ void DiffEditor::Internal::DiffEditorPlugin::testFilterPatch_data() {"B", "C"}, {"D", "D"} }; - QTest::newRow("stage unmodified right rows") << chunk << rows << ChunkSelection({1}, {0, 1, 2}) << false; + QTest::newRow("stage unmodified right rows") << chunk << rows << ChunkSelection({1}, {0, 1, 2}) + << PatchAction::Apply; chunk = createChunk(); appendRow(&chunk, "A", "A"); // 50 @@ -1603,7 +1586,8 @@ void DiffEditor::Internal::DiffEditorPlugin::testFilterPatch_data() {"B", ""}, {"D", "D"} }; - QTest::newRow("stage left only") << chunk << rows << ChunkSelection({1}, {}) << false; + QTest::newRow("stage left only") << chunk << rows << ChunkSelection({1}, {}) + << PatchAction::Apply; chunk = createChunk(); appendRow(&chunk, "A", "A"); // 50 @@ -1615,7 +1599,8 @@ void DiffEditor::Internal::DiffEditorPlugin::testFilterPatch_data() {"", "C"}, {"D", "D"} }; - QTest::newRow("stage right only") << chunk << rows << ChunkSelection({}, {1}) << false; + QTest::newRow("stage right only") << chunk << rows << ChunkSelection({}, {1}) + << PatchAction::Apply; chunk = createChunk(); appendRow(&chunk, "A", "A"); // 50 @@ -1626,7 +1611,8 @@ void DiffEditor::Internal::DiffEditorPlugin::testFilterPatch_data() {"B", "C"}, {"D", "D"} }; - QTest::newRow("stage modified row and revert") << chunk << rows << ChunkSelection({1}, {1}) << true; + QTest::newRow("stage modified row and revert") << chunk << rows << ChunkSelection({1}, {1}) + << PatchAction::Revert; chunk = createChunk(); appendRow(&chunk, "A", "A"); // 50 @@ -1639,7 +1625,8 @@ void DiffEditor::Internal::DiffEditorPlugin::testFilterPatch_data() {"D", "D"} }; // symmetric to: "stage right only" - QTest::newRow("stage left only and revert") << chunk << rows << ChunkSelection({1}, {}) << true; + QTest::newRow("stage left only and revert") << chunk << rows << ChunkSelection({1}, {}) + << PatchAction::Revert; chunk = createChunk(); appendRow(&chunk, "A", "A"); // 50 @@ -1651,8 +1638,8 @@ void DiffEditor::Internal::DiffEditorPlugin::testFilterPatch_data() {"D", "D"} }; // symmetric to: "stage left only" - QTest::newRow("stage right only and revert") << chunk << rows << ChunkSelection({}, {1}) << true; - + QTest::newRow("stage right only and revert") << chunk << rows << ChunkSelection({}, {1}) + << PatchAction::Revert; } void DiffEditor::Internal::DiffEditorPlugin::testFilterPatch() @@ -1660,13 +1647,13 @@ void DiffEditor::Internal::DiffEditorPlugin::testFilterPatch() QFETCH(ChunkData, chunk); QFETCH(ListOfStringPairs, rows); QFETCH(ChunkSelection, selection); - QFETCH(bool, revert); + QFETCH(PatchAction, patchAction); - const ChunkData result = DiffEditorDocument::filterChunk(chunk, selection, revert); + const ChunkData result = DiffEditorDocument::filterChunk(chunk, selection, patchAction); QCOMPARE(result.rows.size(), rows.size()); for (int i = 0; i < rows.size(); ++i) { - QCOMPARE(result.rows.at(i).leftLine.text, rows.at(i).first); - QCOMPARE(result.rows.at(i).rightLine.text, rows.at(i).second); + QCOMPARE(result.rows.at(i).line[LeftSide].text, rows.at(i).first); + QCOMPARE(result.rows.at(i).line[RightSide].text, rows.at(i).second); } } diff --git a/src/plugins/diffeditor/diffeditorplugin.h b/src/plugins/diffeditor/diffeditorplugin.h index 8c33b26c12e..0cf10548bad 100644 --- a/src/plugins/diffeditor/diffeditorplugin.h +++ b/src/plugins/diffeditor/diffeditorplugin.h @@ -8,6 +8,11 @@ #include #include +QT_BEGIN_NAMESPACE +template +class QFuture; +QT_END_NAMESPACE + namespace DiffEditor { namespace Internal { @@ -29,10 +34,15 @@ class DiffEditorPlugin final : public ExtensionSystem::IPlugin Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QtCreatorPlugin" FILE "DiffEditor.json") public: - ~DiffEditorPlugin() final; + DiffEditorPlugin(); + ~DiffEditorPlugin(); bool initialize(const QStringList &arguments, QString *errorMessage) final; + template + static void addFuture(const QFuture &future) { addFuture(QFuture(future)); } + static void addFuture(const QFuture &future); + private: class DiffEditorPluginPrivate *d = nullptr; diff --git a/src/plugins/diffeditor/diffeditorwidgetcontroller.cpp b/src/plugins/diffeditor/diffeditorwidgetcontroller.cpp index 4a6545ef4b1..4d8bee2e4c5 100644 --- a/src/plugins/diffeditor/diffeditorwidgetcontroller.cpp +++ b/src/plugins/diffeditor/diffeditorwidgetcontroller.cpp @@ -8,23 +8,20 @@ #include #include -#include -#include -#include +#include #include -#include +#include +#include #include #include #include #include -#include #include -#include #include using namespace Core; @@ -43,6 +40,23 @@ DiffEditorWidgetController::DiffEditorWidgetController(QWidget *diffEditorWidget connect(&m_timer, &QTimer::timeout, this, &DiffEditorWidgetController::showProgress); } +bool DiffEditorWidgetController::isInProgress() const +{ + return m_isBusyShowing || (m_document && m_document->state() == DiffEditorDocument::Reloading); +} + +void DiffEditorWidgetController::toggleProgress(bool wasInProgress) +{ + const bool inProgress = isInProgress(); + if (wasInProgress == inProgress) + return; + + if (inProgress) + scheduleShowProgress(); + else + hideProgress(); +} + void DiffEditorWidgetController::setDocument(DiffEditorDocument *document) { if (!m_progressIndicator) { @@ -59,25 +73,16 @@ void DiffEditorWidgetController::setDocument(DiffEditorDocument *document) disconnect(m_document, &IDocument::reloadFinished, this, &DiffEditorWidgetController::onDocumentReloadFinished); } - const bool wasRunning = m_document && m_document->state() == DiffEditorDocument::Reloading; + const bool wasInProgress = isInProgress(); m_document = document; - if (m_document) { connect(m_document, &IDocument::aboutToReload, this, &DiffEditorWidgetController::scheduleShowProgress); connect(m_document, &IDocument::reloadFinished, this, &DiffEditorWidgetController::onDocumentReloadFinished); updateCannotDecodeInfo(); } - const bool isRunning = m_document && m_document->state() == DiffEditorDocument::Reloading; - - if (wasRunning == isRunning) - return; - - if (isRunning) - scheduleShowProgress(); - else - hideProgress(); + toggleProgress(wasInProgress); } DiffEditorDocument *DiffEditorWidgetController::document() const @@ -85,6 +90,16 @@ DiffEditorDocument *DiffEditorWidgetController::document() const return m_document; } +void DiffEditorWidgetController::setBusyShowing(bool busy) +{ + if (m_isBusyShowing == busy) + return; + + const bool wasInProgress = isInProgress(); + m_isBusyShowing = busy; + toggleProgress(wasInProgress); +} + void DiffEditorWidgetController::scheduleShowProgress() { m_timer.start(); @@ -107,10 +122,11 @@ void DiffEditorWidgetController::hideProgress() void DiffEditorWidgetController::onDocumentReloadFinished() { updateCannotDecodeInfo(); - hideProgress(); + if (!isInProgress()) + hideProgress(); } -void DiffEditorWidgetController::patch(bool revert, int fileIndex, int chunkIndex) +void DiffEditorWidgetController::patch(PatchAction patchAction, int fileIndex, int chunkIndex) { if (!m_document) return; @@ -118,24 +134,16 @@ void DiffEditorWidgetController::patch(bool revert, int fileIndex, int chunkInde if (!chunkExists(fileIndex, chunkIndex)) return; - const QString title = revert ? tr("Revert Chunk") : tr("Apply Chunk"); - const QString question = revert - ? tr("Would you like to revert the chunk?") - : tr("Would you like to apply the chunk?"); - if (QMessageBox::No == QMessageBox::question(m_diffEditorWidget, title, - question, - QMessageBox::Yes - | QMessageBox::No)) { + if (!PatchTool::confirmPatching(m_diffEditorWidget, patchAction)) return; - } const FileData fileData = m_contextFileData.at(fileIndex); - const QString fileName = revert - ? fileData.rightFileInfo.fileName - : fileData.leftFileInfo.fileName; - const DiffFileInfo::PatchBehaviour patchBehaviour = revert - ? fileData.rightFileInfo.patchBehaviour - : fileData.leftFileInfo.patchBehaviour; + const QString fileName = patchAction == PatchAction::Apply + ? fileData.fileInfo[LeftSide].fileName + : fileData.fileInfo[RightSide].fileName; + const DiffFileInfo::PatchBehaviour patchBehaviour = patchAction == PatchAction::Apply + ? fileData.fileInfo[LeftSide].patchBehaviour + : fileData.fileInfo[RightSide].patchBehaviour; const FilePath workingDirectory = m_document->baseDirectory().isEmpty() ? FilePath::fromString(fileName).absolutePath() @@ -145,14 +153,14 @@ void DiffEditorWidgetController::patch(bool revert, int fileIndex, int chunkInde if (patchBehaviour == DiffFileInfo::PatchFile) { const int strip = m_document->baseDirectory().isEmpty() ? -1 : 0; - const QString patch = m_document->makePatch(fileIndex, chunkIndex, ChunkSelection(), revert); + const QString patch = m_document->makePatch(fileIndex, chunkIndex, {}, patchAction); if (patch.isEmpty()) return; FileChangeBlocker fileChangeBlocker(absFilePath); if (PatchTool::runPatch(EditorManager::defaultTextCodec()->fromUnicode(patch), - workingDirectory, strip, revert)) + workingDirectory, strip, patchAction)) m_document->reload(); } else { // PatchEditor auto textDocument = qobject_cast( @@ -170,15 +178,14 @@ void DiffEditorWidgetController::patch(bool revert, int fileIndex, int chunkInde const QString contentsCopyFileName = contentsCopy.fileName(); const QString contentsCopyDir = QFileInfo(contentsCopyFileName).absolutePath(); - const QString patch = m_document->makePatch(fileIndex, chunkIndex, - ChunkSelection(), revert, false, + const QString patch = m_document->makePatch(fileIndex, chunkIndex, {}, patchAction, false, QFileInfo(contentsCopyFileName).fileName()); if (patch.isEmpty()) return; if (PatchTool::runPatch(EditorManager::defaultTextCodec()->fromUnicode(patch), - FilePath::fromString(contentsCopyDir), 0, revert)) { + FilePath::fromString(contentsCopyDir), 0, patchAction)) { QString errorString; if (textDocument->reload(&errorString, FilePath::fromString(contentsCopyFileName))) m_document->reload(); @@ -200,12 +207,13 @@ void DiffEditorWidgetController::jumpToOriginalFile(const QString &fileName, void DiffEditorWidgetController::setFontSettings(const FontSettings &fontSettings) { - m_fileLineFormat = fontSettings.toTextCharFormat(C_DIFF_FILE_LINE); - m_chunkLineFormat = fontSettings.toTextCharFormat(C_DIFF_CONTEXT_LINE); - m_leftLineFormat = fontSettings.toTextCharFormat(C_DIFF_SOURCE_LINE); - m_leftCharFormat = fontSettings.toTextCharFormat(C_DIFF_SOURCE_CHAR); - m_rightLineFormat = fontSettings.toTextCharFormat(C_DIFF_DEST_LINE); - m_rightCharFormat = fontSettings.toTextCharFormat(C_DIFF_DEST_CHAR); + m_fileLineFormat = fontSettings.toTextCharFormat(C_DIFF_FILE_LINE); + m_chunkLineFormat = fontSettings.toTextCharFormat(C_DIFF_CONTEXT_LINE); + m_spanLineFormat = fontSettings.toTextCharFormat(C_LINE_NUMBER); + m_lineFormat[LeftSide] = fontSettings.toTextCharFormat(C_DIFF_SOURCE_LINE); + m_charFormat[LeftSide] = fontSettings.toTextCharFormat(C_DIFF_SOURCE_CHAR); + m_lineFormat[RightSide] = fontSettings.toTextCharFormat(C_DIFF_DEST_LINE); + m_charFormat[RightSide] = fontSettings.toTextCharFormat(C_DIFF_DEST_CHAR); } void DiffEditorWidgetController::addCodePasterAction(QMenu *menu, int fileIndex, int chunkIndex) @@ -232,18 +240,12 @@ bool DiffEditorWidgetController::chunkExists(int fileIndex, int chunkIndex) cons ChunkData DiffEditorWidgetController::chunkData(int fileIndex, int chunkIndex) const { - if (!m_document) - return ChunkData(); - - if (fileIndex < 0 || chunkIndex < 0) - return ChunkData(); - - if (fileIndex >= m_contextFileData.count()) - return ChunkData(); + if (!m_document || fileIndex < 0 || chunkIndex < 0 || fileIndex >= m_contextFileData.count()) + return {}; const FileData fileData = m_contextFileData.at(fileIndex); if (chunkIndex >= fileData.chunks.count()) - return ChunkData(); + return {}; return fileData.chunks.at(chunkIndex); } @@ -251,25 +253,21 @@ ChunkData DiffEditorWidgetController::chunkData(int fileIndex, int chunkIndex) c bool DiffEditorWidgetController::fileNamesAreDifferent(int fileIndex) const { const FileData fileData = m_contextFileData.at(fileIndex); - return fileData.leftFileInfo.fileName != fileData.rightFileInfo.fileName; + return fileData.fileInfo[LeftSide].fileName != fileData.fileInfo[RightSide].fileName; } -void DiffEditorWidgetController::addApplyAction(QMenu *menu, int fileIndex, int chunkIndex) +void DiffEditorWidgetController::addPatchAction(QMenu *menu, int fileIndex, int chunkIndex, + PatchAction patchAction) { - QAction *applyAction = menu->addAction(tr("Apply Chunk...")); - connect(applyAction, &QAction::triggered, this, [this, fileIndex, chunkIndex] { - patch(false, fileIndex, chunkIndex); + const QString actionName = patchAction == PatchAction::Apply ? tr("Apply Chunk...") + : tr("Revert Chunk..."); + QAction *action = menu->addAction(actionName); + connect(action, &QAction::triggered, this, [this, fileIndex, chunkIndex, patchAction] { + patch(patchAction, fileIndex, chunkIndex); }); - applyAction->setEnabled(chunkExists(fileIndex, chunkIndex) && fileNamesAreDifferent(fileIndex)); -} - -void DiffEditorWidgetController::addRevertAction(QMenu *menu, int fileIndex, int chunkIndex) -{ - QAction *revertAction = menu->addAction(tr("Revert Chunk...")); - connect(revertAction, &QAction::triggered, this, [this, fileIndex, chunkIndex] { - patch(true, fileIndex, chunkIndex); - }); - revertAction->setEnabled(chunkExists(fileIndex, chunkIndex)); + const bool enabled = chunkExists(fileIndex, chunkIndex) + && (patchAction == PatchAction::Revert || fileNamesAreDifferent(fileIndex)); + action->setEnabled(enabled); } void DiffEditorWidgetController::addExtraActions(QMenu *menu, int fileIndex, int chunkIndex, @@ -309,8 +307,7 @@ void DiffEditorWidgetController::sendChunkToCodePaster(int fileIndex, int chunkI auto pasteService = ExtensionSystem::PluginManager::getObject(); QTC_ASSERT(pasteService, return); - const QString patch = m_document->makePatch(fileIndex, chunkIndex, - ChunkSelection(), false); + const QString patch = m_document->makePatch(fileIndex, chunkIndex, {}, PatchAction::Apply); if (patch.isEmpty()) return; @@ -322,10 +319,9 @@ DiffEditorInput::DiffEditorInput(DiffEditorWidgetController *controller) : m_contextFileData(controller->m_contextFileData) , m_fileLineFormat(&controller->m_fileLineFormat) , m_chunkLineFormat(&controller->m_chunkLineFormat) - , m_leftLineFormat(&controller->m_leftLineFormat) - , m_rightLineFormat(&controller->m_rightLineFormat) - , m_leftCharFormat(&controller->m_leftCharFormat) - , m_rightCharFormat(&controller->m_rightCharFormat) + , m_spanLineFormat(&controller->m_spanLineFormat) + , m_lineFormat{&controller->m_lineFormat[LeftSide], &controller->m_lineFormat[RightSide]} + , m_charFormat{&controller->m_charFormat[LeftSide], &controller->m_charFormat[RightSide]} { } diff --git a/src/plugins/diffeditor/diffeditorwidgetcontroller.h b/src/plugins/diffeditor/diffeditorwidgetcontroller.h index ab0d3269b9a..e5d1d49333d 100644 --- a/src/plugins/diffeditor/diffeditorwidgetcontroller.h +++ b/src/plugins/diffeditor/diffeditorwidgetcontroller.h @@ -5,6 +5,7 @@ #include "diffutils.h" +#include #include #include @@ -38,10 +39,12 @@ public: int columnNumber); void setFontSettings(const TextEditor::FontSettings &fontSettings); void addCodePasterAction(QMenu *menu, int fileIndex, int chunkIndex); - void addApplyAction(QMenu *menu, int fileIndex, int chunkIndex); - void addRevertAction(QMenu *menu, int fileIndex, int chunkIndex); + void addPatchAction(QMenu *menu, int fileIndex, int chunkIndex, Core::PatchAction patchAction); void addExtraActions(QMenu *menu, int fileIndex, int chunkIndex, const ChunkSelection &selection); void updateCannotDecodeInfo(); + void setBusyShowing(bool busy); + void setCurrentDiffFileIndex(int index) { m_currentDiffFileIndex = index; } + int currentDiffFileIndex() const { return m_currentDiffFileIndex; } ChunkData chunkData(int fileIndex, int chunkIndex) const; @@ -50,13 +53,15 @@ public: // contextLineCount taken into account QTextCharFormat m_fileLineFormat; QTextCharFormat m_chunkLineFormat; - QTextCharFormat m_leftLineFormat; - QTextCharFormat m_rightLineFormat; - QTextCharFormat m_leftCharFormat; - QTextCharFormat m_rightCharFormat; + QTextCharFormat m_spanLineFormat; + std::array m_lineFormat{}; + std::array m_charFormat{}; private: - void patch(bool revert, int fileIndex, int chunkIndex); + bool isInProgress() const; + void toggleProgress(bool wasInProgress); + + void patch(Core::PatchAction patchAction, int fileIndex, int chunkIndex); void sendChunkToCodePaster(int fileIndex, int chunkIndex); bool chunkExists(int fileIndex, int chunkIndex) const; bool fileNamesAreDifferent(int fileIndex) const; @@ -70,6 +75,8 @@ private: DiffEditorDocument *m_document = nullptr; + bool m_isBusyShowing = false; + int m_currentDiffFileIndex = -1; Utils::ProgressIndicator *m_progressIndicator = nullptr; QTimer m_timer; }; @@ -81,10 +88,9 @@ public: QList m_contextFileData; QTextCharFormat *m_fileLineFormat = nullptr; QTextCharFormat *m_chunkLineFormat = nullptr; - QTextCharFormat *m_leftLineFormat = nullptr; - QTextCharFormat *m_rightLineFormat = nullptr; - QTextCharFormat *m_leftCharFormat = nullptr; - QTextCharFormat *m_rightCharFormat = nullptr; + QTextCharFormat *m_spanLineFormat = nullptr; + std::array m_lineFormat{}; + std::array m_charFormat{}; }; } // namespace Internal diff --git a/src/plugins/diffeditor/diffenums.h b/src/plugins/diffeditor/diffenums.h new file mode 100644 index 00000000000..afd11728259 --- /dev/null +++ b/src/plugins/diffeditor/diffenums.h @@ -0,0 +1,14 @@ +// Copyright (C) 2022 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0+ OR GPL-3.0 WITH Qt-GPL-exception-1.0 + +#pragma once + +namespace DiffEditor { + +enum DiffSide { + LeftSide, + RightSide, + SideCount // Use only in array declarations +}; + +} // namespace DiffEditor diff --git a/src/plugins/diffeditor/diffutils.cpp b/src/plugins/diffeditor/diffutils.cpp index d12b34b6c21..07c4f31bd6e 100644 --- a/src/plugins/diffeditor/diffutils.cpp +++ b/src/plugins/diffeditor/diffutils.cpp @@ -15,9 +15,45 @@ using namespace Utils; namespace DiffEditor { +static int forBlockNumber(const QMap> &chunkInfo, int blockNumber, + const std::function &func) +{ + if (chunkInfo.isEmpty()) + return -1; + + auto it = chunkInfo.upperBound(blockNumber); + if (it == chunkInfo.constBegin()) + return -1; + + --it; + + if (blockNumber < it.key() + it.value().first) + return func(it.key(), it.value().first, it.value().second); + + return -1; +} + +int DiffChunkInfo::chunkRowForBlockNumber(int blockNumber) const +{ + return forBlockNumber(m_chunkInfo, blockNumber, [blockNumber](int startBlockNumber, int, int) + { return blockNumber - startBlockNumber; }); +} + +int DiffChunkInfo::chunkRowsCountForBlockNumber(int blockNumber) const +{ + return forBlockNumber(m_chunkInfo, blockNumber, + [](int, int rowsCount, int) { return rowsCount; }); +} + +int DiffChunkInfo::chunkIndexForBlockNumber(int blockNumber) const +{ + return forBlockNumber(m_chunkInfo, blockNumber, + [](int, int, int chunkIndex) { return chunkIndex; }); +} + int ChunkSelection::selectedRowsCount() const { - return Utils::toSet(leftSelection).unite(Utils::toSet(rightSelection)).size(); + return Utils::toSet(selection[LeftSide]).unite(Utils::toSet(selection[RightSide])).size(); } static QList assemblyRows(const QList &lines, @@ -38,18 +74,12 @@ static QList assemblyRows(const QList &lines, static bool lastLinesEqual(const QList &leftLines, const QList &rightLines) { - const bool leftLineEqual = !leftLines.isEmpty() - ? leftLines.last().text.isEmpty() - : true; - const bool rightLineEqual = !rightLines.isEmpty() - ? rightLines.last().text.isEmpty() - : true; + const bool leftLineEqual = leftLines.isEmpty() || leftLines.last().text.isEmpty(); + const bool rightLineEqual = rightLines.isEmpty() || rightLines.last().text.isEmpty(); return leftLineEqual && rightLineEqual; } -static void handleLine(const QStringList &newLines, - int line, - QList *lines, +static void handleLine(const QStringList &newLines, int line, QList *lines, int *lineNumber) { if (line < newLines.size()) { @@ -64,9 +94,7 @@ static void handleLine(const QStringList &newLines, } } -static void handleDifference(const QString &text, - QList *lines, - int *lineNumber) +static void handleDifference(const QString &text, QList *lines, int *lineNumber) { const QStringList newLines = text.split('\n'); for (int line = 0; line < newLines.size(); ++line) { @@ -207,10 +235,8 @@ ChunkData DiffUtils::calculateOriginalData(const QList &leftDiffList, } } - QList leftData = assemblyRows(leftLines, - leftSpans); - QList rightData = assemblyRows(rightLines, - rightSpans); + QList leftData = assemblyRows(leftLines, leftSpans); + QList rightData = assemblyRows(rightLines, rightSpans); // fill ending separators for (int i = leftData.size(); i < rightData.size(); i++) @@ -288,16 +314,15 @@ FileData DiffUtils::calculateContextData(const ChunkData &originalData, int cont const bool contextChunk = hiddenRows.contains(i); ChunkData chunkData; chunkData.contextChunk = contextChunk; - chunkData.leftStartingLineNumber = leftLineNumber; - chunkData.rightStartingLineNumber = rightLineNumber; + chunkData.startingLineNumber = {leftLineNumber, rightLineNumber}; while (i < originalData.rows.size()) { if (contextChunk != hiddenRows.contains(i)) break; RowData rowData = originalData.rows.at(i); chunkData.rows.append(rowData); - if (rowData.leftLine.textLineType == TextLineData::TextLine) + if (rowData.line[LeftSide].textLineType == TextLineData::TextLine) ++leftLineNumber; - if (rowData.rightLine.textLineType == TextLineData::TextLine) + if (rowData.line[RightSide].textLineType == TextLineData::TextLine) ++rightLineNumber; ++i; } @@ -335,7 +360,7 @@ QString DiffUtils::makePatch(const ChunkData &chunkData, bool lastChunk) { if (chunkData.contextChunk) - return QString(); + return {}; QString diffText; int leftLineCount = 0; @@ -352,15 +377,15 @@ QString DiffUtils::makePatch(const ChunkData &chunkData, int i = 0; for (i = rowCount; i > 0; i--) { const RowData &rowData = chunkData.rows.at(i - 1); - if (rowData.leftLine.textLineType != TextLineData::Separator - || rowData.rightLine.textLineType != TextLineData::TextLine) + if (rowData.line[LeftSide].textLineType != TextLineData::Separator + || rowData.line[RightSide].textLineType != TextLineData::TextLine) break; } const int leftSeparator = i; for (i = rowCount; i > 0; i--) { const RowData &rowData = chunkData.rows.at(i - 1); - if (rowData.rightLine.textLineType != TextLineData::Separator - || rowData.leftLine.textLineType != TextLineData::TextLine) + if (rowData.line[RightSide].textLineType != TextLineData::Separator + || rowData.line[LeftSide].textLineType != TextLineData::TextLine) break; } const int rightSeparator = i; @@ -410,7 +435,7 @@ QString DiffUtils::makePatch(const ChunkData &chunkData, } if (i < chunkData.rows.size()) { const QString line = makePatchLine(' ', - rowData.rightLine.text, + rowData.line[RightSide].text, lastChunk, i == chunkData.rows.size() - 1); @@ -422,19 +447,19 @@ QString DiffUtils::makePatch(const ChunkData &chunkData, diffText += line; } } else { - if (rowData.leftLine.textLineType == TextLineData::TextLine) - leftBuffer.append(rowData.leftLine); - if (rowData.rightLine.textLineType == TextLineData::TextLine) - rightBuffer.append(rowData.rightLine); + if (rowData.line[LeftSide].textLineType == TextLineData::TextLine) + leftBuffer.append(rowData.line[LeftSide]); + if (rowData.line[RightSide].textLineType == TextLineData::TextLine) + rightBuffer.append(rowData.line[RightSide]); } } const QString chunkLine = "@@ -" - + QString::number(chunkData.leftStartingLineNumber + 1) + + QString::number(chunkData.startingLineNumber[LeftSide] + 1) + ',' + QString::number(leftLineCount) + " +" - + QString::number(chunkData.rightStartingLineNumber + 1) + + QString::number(chunkData.startingLineNumber[RightSide] + 1) + ',' + QString::number(rightLineCount) + " @@" @@ -471,7 +496,7 @@ static QString leftFileName(const FileData &fileData, unsigned formatFlags) } else { if (formatFlags & DiffUtils::AddLevel) str << "a/"; - str << fileData.leftFileInfo.fileName; + str << fileData.fileInfo[LeftSide].fileName; } return diffText; } @@ -485,7 +510,7 @@ static QString rightFileName(const FileData &fileData, unsigned formatFlags) } else { if (formatFlags & DiffUtils::AddLevel) str << "b/"; - str << fileData.rightFileInfo.fileName; + str << fileData.fileInfo[RightSide].fileName; } return diffText; } @@ -498,8 +523,8 @@ QString DiffUtils::makePatch(const QList &fileDataList, unsigned forma for (int i = 0; i < fileDataList.size(); i++) { const FileData &fileData = fileDataList.at(i); if (formatFlags & GitFormat) { - str << "diff --git a/" << fileData.leftFileInfo.fileName - << " b/" << fileData.rightFileInfo.fileName << '\n'; + str << "diff --git a/" << fileData.fileInfo[LeftSide].fileName + << " b/" << fileData.fileInfo[RightSide].fileName << '\n'; } if (fileData.fileOperation == FileData::NewFile || fileData.fileOperation == FileData::DeleteFile) { // git only? @@ -509,7 +534,7 @@ QString DiffUtils::makePatch(const QList &fileDataList, unsigned forma str << "deleted"; str << " file mode 100644\n"; } - str << "index " << fileData.leftFileInfo.typeInfo << ".." << fileData.rightFileInfo.typeInfo; + str << "index " << fileData.fileInfo[LeftSide].typeInfo << ".." << fileData.fileInfo[RightSide].typeInfo; if (fileData.fileOperation == FileData::ChangeFile) str << " 100644"; str << "\n"; @@ -624,7 +649,7 @@ static QList readLines(QStringView patch, bool lastChunk, bool *lastChu || (noNewLineInInsert >= 0 && (noNewLineInInsert != lastInsert || lastEqual > lastInsert))) { if (ok) *ok = false; - return QList(); + return {}; } if (ok) @@ -713,7 +738,7 @@ static QStringView readLine(QStringView text, QStringView *remainingText, bool * const int indexOfFirstNewLine = text.indexOf(newLine); if (indexOfFirstNewLine < 0) { if (remainingText) - *remainingText = QStringView(); + *remainingText = {}; if (hasNewLine) *hasNewLine = false; return text; @@ -778,8 +803,7 @@ static bool detectChunkData(QStringView chunkDiff, ChunkData *chunkData, QString if (!ok) return false; - chunkData->leftStartingLineNumber = leftLineNumber - 1; - chunkData->rightStartingLineNumber = rightLineNumber - 1; + chunkData->startingLineNumber = {leftLineNumber - 1, rightLineNumber - 1}; chunkData->contextInfo = optionalHint.toString(); return true; @@ -855,13 +879,13 @@ static FileData readDiffHeaderAndChunks(QStringView headerAndChunks, bool *ok) const QRegularExpressionMatch leftMatch = leftFileRegExp.match(patch); if (leftMatch.hasMatch() && leftMatch.capturedStart() == 0) { patch = patch.mid(leftMatch.capturedEnd()); - fileData.leftFileInfo.fileName = leftMatch.captured(1); + fileData.fileInfo[LeftSide].fileName = leftMatch.captured(1); // followed by rightFileRegExp const QRegularExpressionMatch rightMatch = rightFileRegExp.match(patch); if (rightMatch.hasMatch() && rightMatch.capturedStart() == 0) { patch = patch.mid(rightMatch.capturedEnd()); - fileData.rightFileInfo.fileName = rightMatch.captured(1); + fileData.fileInfo[RightSide].fileName = rightMatch.captured(1); fileData.chunks = readChunks(patch, &fileData.lastChunkAtTheEndOfFile, @@ -871,8 +895,8 @@ static FileData readDiffHeaderAndChunks(QStringView headerAndChunks, bool *ok) // or by binaryRegExp const QRegularExpressionMatch binaryMatch = binaryRegExp.match(patch); if (binaryMatch.hasMatch() && binaryMatch.capturedStart() == 0) { - fileData.leftFileInfo.fileName = binaryMatch.captured(1); - fileData.rightFileInfo.fileName = binaryMatch.captured(2); + fileData.fileInfo[LeftSide].fileName = binaryMatch.captured(1); + fileData.fileInfo[RightSide].fileName = binaryMatch.captured(2); fileData.binaryFiles = true; readOk = true; } @@ -882,7 +906,7 @@ static FileData readDiffHeaderAndChunks(QStringView headerAndChunks, bool *ok) *ok = readOk; if (!readOk) - return FileData(); + return {}; return fileData; @@ -916,7 +940,7 @@ static QList readDiffPatch(QStringView patch, bool *ok, QFutureInterfa int lastPos = -1; do { if (jobController && jobController->isCanceled()) - return QList(); + return {}; int pos = diffMatch.capturedStart(); if (lastPos >= 0) { @@ -950,7 +974,7 @@ static QList readDiffPatch(QStringView patch, bool *ok, QFutureInterfa *ok = readOk; if (!readOk) - return QList(); + return {}; return fileDataList; } @@ -1014,12 +1038,12 @@ static bool detectIndexAndBinary(QStringView patch, FileData *fileData, QStringV const int dotsPosition = indices.indexOf(QStringLiteral("..")); if (dotsPosition < 0) return false; - fileData->leftFileInfo.typeInfo = indices.left(dotsPosition).toString(); + fileData->fileInfo[LeftSide].typeInfo = indices.left(dotsPosition).toString(); // if there is no space we take the remaining string const int spacePosition = indices.indexOf(QChar::Space, dotsPosition + 2); const int length = spacePosition < 0 ? -1 : spacePosition - dotsPosition - 2; - fileData->rightFileInfo.typeInfo = indices.mid(dotsPosition + 2, length).toString(); + fileData->fileInfo[RightSide].typeInfo = indices.mid(dotsPosition + 2, length).toString(); *remainingPatch = afterNextLine; } else if (fileData->fileOperation != FileData::ChangeFile) { @@ -1036,9 +1060,9 @@ static bool detectIndexAndBinary(QStringView patch, FileData *fileData, QStringV const QString devNull("/dev/null"); const QString leftFileName = fileData->fileOperation == FileData::NewFile - ? devNull : QLatin1String("a/") + fileData->leftFileInfo.fileName; + ? devNull : QLatin1String("a/") + fileData->fileInfo[LeftSide].fileName; const QString rightFileName = fileData->fileOperation == FileData::DeleteFile - ? devNull : QLatin1String("b/") + fileData->rightFileInfo.fileName; + ? devNull : QLatin1String("b/") + fileData->fileInfo[RightSide].fileName; const QString binaryLine = "Binary files " + leftFileName + " and " @@ -1046,7 +1070,7 @@ static bool detectIndexAndBinary(QStringView patch, FileData *fileData, QStringV if (*remainingPatch == binaryLine) { fileData->binaryFiles = true; - *remainingPatch = QStringView(); + *remainingPatch = {}; return true; } @@ -1118,7 +1142,7 @@ static bool detectFileData(QStringView patch, FileData *fileData, QStringView *r // change / new / delete fileData->fileOperation = FileData::ChangeFile; - fileData->leftFileInfo.fileName = fileData->rightFileInfo.fileName = commonFileName.toString(); + fileData->fileInfo[LeftSide].fileName = fileData->fileInfo[RightSide].fileName = commonFileName.toString(); QStringView afterSecondLine; const QStringView secondLine = readLine(afterDiffGit, &afterSecondLine, &hasNewLine); @@ -1174,10 +1198,10 @@ static bool detectFileData(QStringView patch, FileData *fileData, QStringView *r const QLatin1String renameFrom("rename from "); if (copyRenameFrom.startsWith(copyFrom)) { fileData->fileOperation = FileData::CopyFile; - fileData->leftFileInfo.fileName = copyRenameFrom.mid(copyFrom.size()).toString(); + fileData->fileInfo[LeftSide].fileName = copyRenameFrom.mid(copyFrom.size()).toString(); } else if (copyRenameFrom.startsWith(renameFrom)) { fileData->fileOperation = FileData::RenameFile; - fileData->leftFileInfo.fileName = copyRenameFrom.mid(renameFrom.size()).toString(); + fileData->fileInfo[LeftSide].fileName = copyRenameFrom.mid(renameFrom.size()).toString(); } else { return false; } @@ -1191,9 +1215,9 @@ static bool detectFileData(QStringView patch, FileData *fileData, QStringView *r const QLatin1String copyTo("copy to "); const QLatin1String renameTo("rename to "); if (fileData->fileOperation == FileData::CopyFile && copyRenameTo.startsWith(copyTo)) { - fileData->rightFileInfo.fileName = copyRenameTo.mid(copyTo.size()).toString(); + fileData->fileInfo[RightSide].fileName = copyRenameTo.mid(copyTo.size()).toString(); } else if (fileData->fileOperation == FileData::RenameFile && copyRenameTo.startsWith(renameTo)) { - fileData->rightFileInfo.fileName = copyRenameTo.mid(renameTo.size()).toString(); + fileData->fileInfo[RightSide].fileName = copyRenameTo.mid(renameTo.size()).toString(); } else { return false; } @@ -1227,7 +1251,7 @@ static QList readGitPatch(QStringView patch, bool *ok, QFutureInterfac const int count = startingPositions.size(); for (int i = 0; i < count; i++) { if (jobController && jobController->isCanceled()) - return QList(); + return {}; const int diffStart = startingPositions.at(i); const int diffEnd = (i < count - 1) @@ -1253,7 +1277,7 @@ static QList readGitPatch(QStringView patch, bool *ok, QFutureInterfac if (!readOk) { if (ok) *ok = readOk; - return QList(); + return {}; } if (jobController) @@ -1265,7 +1289,7 @@ static QList readGitPatch(QStringView patch, bool *ok, QFutureInterfac for (const auto &patchInfo : qAsConst(patches)) { if (jobController) { if (jobController->isCanceled()) - return QList(); + return {}; jobController->setProgressValue(i++); } @@ -1285,7 +1309,7 @@ static QList readGitPatch(QStringView patch, bool *ok, QFutureInterfac *ok = readOk; if (!readOk) - return QList(); + return {}; return fileDataList; } @@ -1318,4 +1342,17 @@ QList DiffUtils::readPatch(const QString &patch, bool *ok, return fileDataList; } +int DiffUtils::interpolate(int x, int x1, int x2, int y1, int y2) +{ + if (x1 == x2) + return x1; + if (x == x1) + return y1; + if (x == x2) + return y2; + const int numerator = (y2 - y1) * x + x2 * y1 - x1 * y2; + const int denominator = x2 - x1; + return qRound((double)numerator / denominator); +} + } // namespace DiffEditor diff --git a/src/plugins/diffeditor/diffutils.h b/src/plugins/diffeditor/diffutils.h index a7f482246e8..6e7e2143f5e 100644 --- a/src/plugins/diffeditor/diffutils.h +++ b/src/plugins/diffeditor/diffutils.h @@ -4,12 +4,15 @@ #pragma once #include "diffeditor_global.h" +#include "diffenums.h" -#include +#include #include #include +#include + QT_BEGIN_NAMESPACE class QFutureInterfaceBase; QT_END_NAMESPACE @@ -33,6 +36,23 @@ public: PatchBehaviour patchBehaviour = PatchFile; }; +using DiffFileInfoArray = std::array; + +class DiffChunkInfo { +public: + int chunkIndexForBlockNumber(int blockNumber) const; + int chunkRowForBlockNumber(int blockNumber) const; + int chunkRowsCountForBlockNumber(int blockNumber) const; + + void setChunkIndex(int startBlockNumber, int blockCount, int chunkIndex) { + m_chunkInfo.insert(startBlockNumber, {blockCount, chunkIndex}); + } + +private: + // start block number, block count of a chunk, chunk index inside a file. + QMap> m_chunkInfo; +}; + class DIFFEDITOR_EXPORT TextLineData { public: enum TextLineType { @@ -58,11 +78,10 @@ class DIFFEDITOR_EXPORT RowData { public: RowData() = default; RowData(const TextLineData &l) - : leftLine(l), rightLine(l), equal(true) {} + : line({l, l}), equal(true) {} RowData(const TextLineData &l, const TextLineData &r) - : leftLine(l), rightLine(r) {} - TextLineData leftLine; - TextLineData rightLine; + : line({l, r}) {} + std::array line{}; bool equal = false; }; @@ -70,8 +89,7 @@ class DIFFEDITOR_EXPORT ChunkData { public: QList rows; QString contextInfo; - int leftStartingLineNumber = 0; - int rightStartingLineNumber = 0; + std::array startingLineNumber{}; bool contextChunk = false; }; @@ -79,11 +97,10 @@ class DIFFEDITOR_EXPORT ChunkSelection { public: ChunkSelection() = default; ChunkSelection(const QList &left, const QList &right) - : leftSelection(left), rightSelection(right) {} - bool isNull() const { return leftSelection.isEmpty() && rightSelection.isEmpty(); } + : selection({left, right}) {} + bool isNull() const { return Utils::allOf(selection, &QList::isEmpty); } int selectedRowsCount() const; - QList leftSelection; - QList rightSelection; + std::array, SideCount> selection{}; }; class DIFFEDITOR_EXPORT FileData { @@ -100,8 +117,7 @@ public: FileData() = default; FileData(const ChunkData &chunkData) { chunks.append(chunkData); } QList chunks; - DiffFileInfo leftFileInfo; - DiffFileInfo rightFileInfo; + DiffFileInfoArray fileInfo{}; FileOperation fileOperation = ChangeFile; bool binaryFiles = false; bool lastChunkAtTheEndOfFile = false; @@ -135,6 +151,8 @@ public: static QList readPatch(const QString &patch, bool *ok = nullptr, QFutureInterfaceBase *jobController = nullptr); + // For progress reporting + static int interpolate(int x, int x1, int x2, int y1, int y2); }; } // namespace DiffEditor diff --git a/src/plugins/diffeditor/diffview.cpp b/src/plugins/diffeditor/diffview.cpp index f9e293991d4..b6328b5a123 100644 --- a/src/plugins/diffeditor/diffview.cpp +++ b/src/plugins/diffeditor/diffview.cpp @@ -166,16 +166,10 @@ QWidget *SideBySideView::widget() return m_widget; } -TextEditor::TextEditorWidget *SideBySideView::leftEditorWidget() +TextEditor::TextEditorWidget *SideBySideView::sideEditorWidget(DiffSide side) { widget(); // ensure widget creation - return m_widget->leftEditorWidget(); -} - -TextEditor::TextEditorWidget *SideBySideView::rightEditorWidget() -{ - widget(); // ensure widget creation - return m_widget->rightEditorWidget(); + return m_widget->sideEditorWidget(side); } void SideBySideView::setDocument(DiffEditorDocument *document) diff --git a/src/plugins/diffeditor/diffview.h b/src/plugins/diffeditor/diffview.h index 88569414237..8f07e37996a 100644 --- a/src/plugins/diffeditor/diffview.h +++ b/src/plugins/diffeditor/diffview.h @@ -3,6 +3,8 @@ #pragma once +#include "diffenums.h" + #include #include @@ -95,8 +97,7 @@ public: SideBySideView(); QWidget *widget() override; - TextEditor::TextEditorWidget *leftEditorWidget(); - TextEditor::TextEditorWidget *rightEditorWidget(); + TextEditor::TextEditorWidget *sideEditorWidget(DiffSide side); void setDocument(DiffEditorDocument *document) override; diff --git a/src/plugins/diffeditor/selectabletexteditorwidget.cpp b/src/plugins/diffeditor/selectabletexteditorwidget.cpp index eb045ec4ac0..781b7a8c513 100644 --- a/src/plugins/diffeditor/selectabletexteditorwidget.cpp +++ b/src/plugins/diffeditor/selectabletexteditorwidget.cpp @@ -20,17 +20,22 @@ SelectableTextEditorWidget::SelectableTextEditorWidget(Utils::Id id, QWidget *pa SelectableTextEditorWidget::~SelectableTextEditorWidget() = default; +void SelectableTextEditorWidget::setSelections(const DiffSelections &selections) +{ + m_diffSelections = selections; +} + static QList subtractSelection( const DiffSelection &minuendSelection, const DiffSelection &subtrahendSelection) { // tha case that whole minuend is before the whole subtrahend if (minuendSelection.end >= 0 && minuendSelection.end <= subtrahendSelection.start) - return QList() << minuendSelection; + return {minuendSelection}; // the case that whole subtrahend is before the whole minuend if (subtrahendSelection.end >= 0 && subtrahendSelection.end <= minuendSelection.start) - return QList() << minuendSelection; + return {minuendSelection}; bool makeMinuendSubtrahendStart = false; bool makeSubtrahendMinuendEnd = false; @@ -42,16 +47,16 @@ static QList subtractSelection( QList diffList; if (makeMinuendSubtrahendStart) - diffList << DiffSelection(minuendSelection.start, subtrahendSelection.start, minuendSelection.format); + diffList += {minuendSelection.format, minuendSelection.start, subtrahendSelection.start}; if (makeSubtrahendMinuendEnd) - diffList << DiffSelection(subtrahendSelection.end, minuendSelection.end, minuendSelection.format); + diffList += {minuendSelection.format, subtrahendSelection.end, minuendSelection.end}; return diffList; } -void SelectableTextEditorWidget::setSelections(const QMap > &selections) +DiffSelections SelectableTextEditorWidget::polishedSelections(const DiffSelections &selections) { - m_diffSelections.clear(); + DiffSelections polishedSelections; for (auto it = selections.cbegin(), end = selections.cend(); it != end; ++it) { const QList diffSelections = it.value(); QList workingList; @@ -72,8 +77,9 @@ void SelectableTextEditorWidget::setSelections(const QMap>; + class SelectableTextEditorWidget : public TextEditor::TextEditorWidget { Q_OBJECT public: SelectableTextEditorWidget(Utils::Id id, QWidget *parent = nullptr); ~SelectableTextEditorWidget() override; - void setSelections(const QMap > &selections); + void setSelections(const DiffSelections &selections); + static DiffSelections polishedSelections(const DiffSelections &selections); static void setFoldingIndent(const QTextBlock &block, int indent); private: @@ -37,10 +39,7 @@ private: const QVector &selections, const QRect &clipRect) const override; - // block number, list of ranges - // DiffSelection.start - can be -1 (continues from the previous line) - // DiffSelection.end - can be -1 (spans to the end of line, even after the last character in line) - QMap > m_diffSelections; + DiffSelections m_diffSelections; }; } // namespace Internal diff --git a/src/plugins/diffeditor/sidebysidediffeditorwidget.cpp b/src/plugins/diffeditor/sidebysidediffeditorwidget.cpp index 7a032e80516..4403f2285c3 100644 --- a/src/plugins/diffeditor/sidebysidediffeditorwidget.cpp +++ b/src/plugins/diffeditor/sidebysidediffeditorwidget.cpp @@ -2,9 +2,10 @@ // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0+ OR GPL-3.0 WITH Qt-GPL-exception-1.0 #include "sidebysidediffeditorwidget.h" -#include "selectabletexteditorwidget.h" + #include "diffeditorconstants.h" #include "diffeditordocument.h" +#include "diffeditorplugin.h" #include "diffutils.h" #include @@ -13,57 +14,41 @@ #include #include -#include -#include -#include -#include -#include - #include #include #include +#include +#include +#include +#include +#include +#include + +#include #include using namespace Core; using namespace TextEditor; using namespace Utils; +using namespace std::placeholders; + namespace DiffEditor { namespace Internal { +static DiffSide oppositeSide(DiffSide side) +{ + return side == LeftSide ? RightSide : LeftSide; +} + class SideDiffEditorWidget : public SelectableTextEditorWidget { Q_OBJECT public: SideDiffEditorWidget(QWidget *parent = nullptr); - // block number, file info - QMap fileInfo() const { return m_fileInfo; } - - void setLineNumber(int blockNumber, int lineNumber); - void setFileInfo(int blockNumber, const DiffFileInfo &fileInfo); - void setSkippedLines(int blockNumber, int skippedLines, const QString &contextInfo = QString()) { - m_skippedLines[blockNumber] = qMakePair(skippedLines, contextInfo); - setSeparator(blockNumber, true); - } - void setChunkIndex(int startBlockNumber, int blockCount, int chunkIndex); - void setSeparator(int blockNumber, bool separator) { - m_separators[blockNumber] = separator; - } - bool isFileLine(int blockNumber) const { - return m_fileInfo.contains(blockNumber); - } - int blockNumberForFileIndex(int fileIndex) const; - int fileIndexForBlockNumber(int blockNumber) const; - int chunkIndexForBlockNumber(int blockNumber) const; - int chunkRowForBlockNumber(int blockNumber) const; - int chunkRowsCountForBlockNumber(int blockNumber) const; - bool isChunkLine(int blockNumber) const { - return m_skippedLines.contains(blockNumber); - } void clearAll(const QString &message); - void clearAllData(); void saveState(); using TextEditor::TextEditorWidget::restoreState; void restoreState(); @@ -72,6 +57,9 @@ public: void setDisplaySettings(const DisplaySettings &ds) override; + SideDiffData diffData() const { return m_data; } + void setDiffData(const SideDiffData &data) { m_data = data; } + signals: void jumpToOriginalFileRequested(int diffFileIndex, int lineNumber, @@ -116,16 +104,8 @@ private: const QTextBlock &block, int top); void jumpToOriginalFile(const QTextCursor &cursor); - // block number, visual line number. - QMap m_lineNumbers; - // block number, fileInfo. Set for file lines only. - QMap m_fileInfo; - // block number, skipped lines and context info. Set for chunk lines only. - QMap > m_skippedLines; - // start block number, block count of a chunk, chunk index inside a file. - QMap > m_chunkInfo; - // block number, separator. Set for file, chunk or span line. - QMap m_separators; + SideDiffData m_data; + QColor m_fileLineForeground; QColor m_chunkLineForeground; QColor m_textForeground; @@ -134,7 +114,6 @@ private: QTextBlock m_drawCollapsedBlock; QPointF m_drawCollapsedOffset; QRect m_drawCollapsedClip; - int m_lineNumberDigits = 1; }; SideDiffEditorWidget::SideDiffEditorWidget(QWidget *parent) @@ -149,8 +128,8 @@ SideDiffEditorWidget::SideDiffEditorWidget(QWidget *parent) connect(this, &TextEditorWidget::tooltipRequested, this, [this](const QPoint &point, int position) { const int block = document()->findBlock(position).blockNumber(); - const auto it = m_fileInfo.constFind(block); - if (it != m_fileInfo.constEnd()) + const auto it = m_data.m_fileInfo.constFind(block); + if (it != m_data.m_fileInfo.constEnd()) ToolTip::show(point, it.value().fileName, this); else ToolTip::hide(); @@ -220,25 +199,25 @@ void SideDiffEditorWidget::applyFontSettings() QString SideDiffEditorWidget::lineNumber(int blockNumber) const { - const auto it = m_lineNumbers.constFind(blockNumber); - if (it != m_lineNumbers.constEnd()) + const auto it = m_data.m_lineNumbers.constFind(blockNumber); + if (it != m_data.m_lineNumbers.constEnd()) return QString::number(it.value()); - return QString(); + return {}; } int SideDiffEditorWidget::lineNumberDigits() const { - return m_lineNumberDigits; + return m_data.m_lineNumberDigits; } bool SideDiffEditorWidget::selectionVisible(int blockNumber) const { - return !m_separators.value(blockNumber, false); + return !m_data.m_separators.value(blockNumber, false); } bool SideDiffEditorWidget::replacementVisible(int blockNumber) const { - return isChunkLine(blockNumber) || (isFileLine(blockNumber) + return m_data.isChunkLine(blockNumber) || (m_data.isFileLine(blockNumber) && TextDocumentLayout::isFolded(document()->findBlockByNumber(blockNumber))); } @@ -253,7 +232,7 @@ QString SideDiffEditorWidget::plainTextFromSelection(const QTextCursor &cursor) const int startPosition = cursor.selectionStart(); const int endPosition = cursor.selectionEnd(); if (startPosition == endPosition) - return QString(); // no selection + return {}; // no selection const QTextBlock startBlock = document()->findBlock(startPosition); const QTextBlock endBlock = document()->findBlock(endPosition); @@ -283,25 +262,152 @@ QString SideDiffEditorWidget::plainTextFromSelection(const QTextCursor &cursor) return convertToPlainText(text); } -void SideDiffEditorWidget::setLineNumber(int blockNumber, int lineNumber) +SideBySideDiffOutput SideDiffData::diffOutput(QFutureInterface &fi, int progressMin, + int progressMax, const DiffEditorInput &input) +{ + SideBySideDiffOutput output; + + const QChar separator = '\n'; + int blockNumber = 0; + int i = 0; + const int count = input.m_contextFileData.size(); + std::array diffText{}; + + auto addFileLine = [&](DiffSide side, const FileData &fileData) { + output.side[side].selections[blockNumber].append({input.m_fileLineFormat}); + output.side[side].diffData.setFileInfo(blockNumber, fileData.fileInfo[side]); + diffText[side] += separator; + }; + + auto addChunkLine = [&](DiffSide side, int skippedLines, const QString &contextInfo = {}) { + output.side[side].selections[blockNumber].append({input.m_chunkLineFormat}); + output.side[side].diffData.setSkippedLines(blockNumber, skippedLines, contextInfo); + diffText[side] += separator; + }; + + auto addRowLine = [&](DiffSide side, const RowData &rowData, + int *lineNumber, int *lastLineNumber = nullptr) { + if (rowData.line[side].textLineType == TextLineData::TextLine) { + diffText[side] += rowData.line[side].text; + if (lastLineNumber) + *lastLineNumber = *lineNumber; + ++(*lineNumber); + output.side[side].diffData.setLineNumber(blockNumber, *lineNumber); + } else if (rowData.line[side].textLineType == TextLineData::Separator) { + output.side[side].diffData.setSeparator(blockNumber, true); + } + + if (!rowData.equal) { + if (rowData.line[side].textLineType == TextLineData::TextLine) + output.side[side].selections[blockNumber].append({input.m_lineFormat[side]}); + else + output.side[side].selections[blockNumber].append({input.m_spanLineFormat}); + } + for (auto it = rowData.line[side].changedPositions.cbegin(), + end = rowData.line[side].changedPositions.cend(); it != end; ++it) { + output.side[side].selections[blockNumber].append( + {input.m_charFormat[side], it.key(), it.value()}); + } + diffText[side] += separator; + }; + + auto addSkippedLine = [&](DiffSide side, int skippedLines) { + output.side[side].selections[blockNumber].append({input.m_chunkLineFormat}); + output.side[side].diffData.setSkippedLines(blockNumber, skippedLines); + diffText[side] += separator; + }; + + for (const FileData &contextFileData : input.m_contextFileData) { + diffText = {}; + output.foldingIndent.insert(blockNumber, 1); + + addFileLine(LeftSide, contextFileData); + addFileLine(RightSide, contextFileData); + blockNumber++; + + int lastLeftLineNumber = -1; + + if (contextFileData.binaryFiles) { + output.foldingIndent.insert(blockNumber, 2); + addChunkLine(LeftSide, -2); + addChunkLine(RightSide, -2); + blockNumber++; + } else { + for (int j = 0; j < contextFileData.chunks.count(); j++) { + const ChunkData &chunkData = contextFileData.chunks.at(j); + + int leftLineNumber = chunkData.startingLineNumber[LeftSide]; + int rightLineNumber = chunkData.startingLineNumber[RightSide]; + + if (!chunkData.contextChunk) { + const int skippedLines = leftLineNumber - lastLeftLineNumber - 1; + if (skippedLines > 0) { + output.foldingIndent.insert(blockNumber, 2); + addChunkLine(LeftSide, skippedLines, chunkData.contextInfo); + addChunkLine(RightSide, skippedLines, chunkData.contextInfo); + blockNumber++; + } + + const int rows = chunkData.rows.count(); + output.side[LeftSide].diffData.m_chunkInfo.setChunkIndex(blockNumber, rows, j); + output.side[RightSide].diffData.m_chunkInfo.setChunkIndex(blockNumber, rows, j); + + for (const RowData &rowData : chunkData.rows) { + addRowLine(LeftSide, rowData, &leftLineNumber, &lastLeftLineNumber); + addRowLine(RightSide, rowData, &rightLineNumber); + blockNumber++; + } + } + + if (j == contextFileData.chunks.count() - 1) { // the last chunk + int skippedLines = -2; + if (chunkData.contextChunk) { + // if it's context chunk + skippedLines = chunkData.rows.count(); + } else if (!contextFileData.lastChunkAtTheEndOfFile + && !contextFileData.contextChunksIncluded) { + // if not a context chunk and not a chunk at the end of file + // and context lines not included + skippedLines = -1; // unknown count skipped by the end of file + } + + if (skippedLines >= -1) { + addSkippedLine(LeftSide, skippedLines); + addSkippedLine(RightSide, skippedLines); + blockNumber++; + } // otherwise nothing skipped + } + } + } + diffText[LeftSide].replace('\r', ' '); + diffText[RightSide].replace('\r', ' '); + output.side[LeftSide].diffText += diffText[LeftSide]; + output.side[RightSide].diffText += diffText[RightSide]; + fi.setProgressValue(DiffUtils::interpolate(++i, 0, count, progressMin, progressMax)); + if (fi.isCanceled()) + return {}; + } + output.side[LeftSide].selections = SelectableTextEditorWidget::polishedSelections( + output.side[LeftSide].selections); + output.side[RightSide].selections = SelectableTextEditorWidget::polishedSelections( + output.side[RightSide].selections); + return output; +} + +void SideDiffData::setLineNumber(int blockNumber, int lineNumber) { const QString lineNumberString = QString::number(lineNumber); m_lineNumbers.insert(blockNumber, lineNumber); m_lineNumberDigits = qMax(m_lineNumberDigits, lineNumberString.count()); } -void SideDiffEditorWidget::setFileInfo(int blockNumber, const DiffFileInfo &fileInfo) +void SideDiffData::setFileInfo(int blockNumber, const DiffFileInfo &fileInfo) { m_fileInfo[blockNumber] = fileInfo; setSeparator(blockNumber, true); } -void SideDiffEditorWidget::setChunkIndex(int startBlockNumber, int blockCount, int chunkIndex) -{ - m_chunkInfo.insert(startBlockNumber, qMakePair(blockCount, chunkIndex)); -} - -int SideDiffEditorWidget::blockNumberForFileIndex(int fileIndex) const +int SideDiffData::blockNumberForFileIndex(int fileIndex) const { if (fileIndex < 0 || fileIndex >= m_fileInfo.count()) return -1; @@ -309,7 +415,7 @@ int SideDiffEditorWidget::blockNumberForFileIndex(int fileIndex) const return std::next(m_fileInfo.constBegin(), fileIndex).key(); } -int SideDiffEditorWidget::fileIndexForBlockNumber(int blockNumber) const +int SideDiffData::fileIndexForBlockNumber(int blockNumber) const { int i = -1; for (auto it = m_fileInfo.cbegin(), end = m_fileInfo.cend(); it != end; ++it, ++i) { @@ -320,77 +426,15 @@ int SideDiffEditorWidget::fileIndexForBlockNumber(int blockNumber) const return i; } -int SideDiffEditorWidget::chunkIndexForBlockNumber(int blockNumber) const -{ - if (m_chunkInfo.isEmpty()) - return -1; - - auto it = m_chunkInfo.upperBound(blockNumber); - if (it == m_chunkInfo.constBegin()) - return -1; - - --it; - - if (blockNumber < it.key() + it.value().first) - return it.value().second; - - return -1; -} - -int SideDiffEditorWidget::chunkRowForBlockNumber(int blockNumber) const -{ - if (m_chunkInfo.isEmpty()) - return -1; - - auto it = m_chunkInfo.upperBound(blockNumber); - if (it == m_chunkInfo.constBegin()) - return -1; - - --it; - - if (blockNumber < it.key() + it.value().first) - return blockNumber - it.key(); - - return -1; -} - -int SideDiffEditorWidget::chunkRowsCountForBlockNumber(int blockNumber) const -{ - if (m_chunkInfo.isEmpty()) - return -1; - - auto it = m_chunkInfo.upperBound(blockNumber); - if (it == m_chunkInfo.constBegin()) - return -1; - - --it; - - if (blockNumber < it.key() + it.value().first) - return it.value().first; - - return -1; -} - void SideDiffEditorWidget::clearAll(const QString &message) { clear(); - clearAllData(); - setExtraSelections(TextEditorWidget::OtherSelection, - QList()); + m_data = {}; + setSelections({}); + setExtraSelections(TextEditorWidget::OtherSelection, {}); setPlainText(message); } -void SideDiffEditorWidget::clearAllData() -{ - m_lineNumberDigits = 1; - m_lineNumbers.clear(); - m_fileInfo.clear(); - m_skippedLines.clear(); - m_chunkInfo.clear(); - m_separators.clear(); - setSelections(QMap >()); -} - void SideDiffEditorWidget::scrollContentsBy(int dx, int dy) { SelectableTextEditorWidget::scrollContentsBy(dx, dy); @@ -472,23 +516,23 @@ void SideDiffEditorWidget::contextMenuEvent(QContextMenuEvent *e) QTextCursor cursor = cursorForPosition(e->pos()); const int blockNumber = cursor.blockNumber(); - const int fileIndex = fileIndexForBlockNumber(blockNumber); - const int chunkIndex = chunkIndexForBlockNumber(blockNumber); + const int fileIndex = m_data.fileIndexForBlockNumber(blockNumber); + const int chunkIndex = m_data.m_chunkInfo.chunkIndexForBlockNumber(blockNumber); - const int selectionStartFileIndex = fileIndexForBlockNumber(startBlockNumber); - const int selectionStartChunkIndex = chunkIndexForBlockNumber(startBlockNumber); - const int selectionEndFileIndex = fileIndexForBlockNumber(endBlockNumber); - const int selectionEndChunkIndex = chunkIndexForBlockNumber(endBlockNumber); + const int selectionStartFileIndex = m_data.fileIndexForBlockNumber(startBlockNumber); + const int selectionStartChunkIndex = m_data.m_chunkInfo.chunkIndexForBlockNumber(startBlockNumber); + const int selectionEndFileIndex = m_data.fileIndexForBlockNumber(endBlockNumber); + const int selectionEndChunkIndex = m_data.m_chunkInfo.chunkIndexForBlockNumber(endBlockNumber); const int selectionStart = selectionStartFileIndex == fileIndex && selectionStartChunkIndex == chunkIndex - ? chunkRowForBlockNumber(startBlockNumber) + ? m_data.m_chunkInfo.chunkRowForBlockNumber(startBlockNumber) : 0; const int selectionEnd = selectionEndFileIndex == fileIndex && selectionEndChunkIndex == chunkIndex - ? chunkRowForBlockNumber(endBlockNumber) - : chunkRowsCountForBlockNumber(blockNumber); + ? m_data.m_chunkInfo.chunkRowForBlockNumber(endBlockNumber) + : m_data.m_chunkInfo.chunkRowsCountForBlockNumber(blockNumber); QList rows; for (int i = selectionStart; i <= selectionEnd; ++i) @@ -496,8 +540,8 @@ void SideDiffEditorWidget::contextMenuEvent(QContextMenuEvent *e) const ChunkSelection selection(rows, rows); - emit contextMenuRequested(menu, fileIndexForBlockNumber(blockNumber), - chunkIndexForBlockNumber(blockNumber), + emit contextMenuRequested(menu, m_data.fileIndexForBlockNumber(blockNumber), + m_data.m_chunkInfo.chunkIndexForBlockNumber(blockNumber), selection); connect(this, &SideDiffEditorWidget::destroyed, menu.data(), &QMenu::deleteLater); @@ -507,17 +551,17 @@ void SideDiffEditorWidget::contextMenuEvent(QContextMenuEvent *e) void SideDiffEditorWidget::jumpToOriginalFile(const QTextCursor &cursor) { - if (m_fileInfo.isEmpty()) + if (m_data.m_fileInfo.isEmpty()) return; const int blockNumber = cursor.blockNumber(); - if (!m_lineNumbers.contains(blockNumber)) + if (!m_data.m_lineNumbers.contains(blockNumber)) return; - const int lineNumber = m_lineNumbers.value(blockNumber); + const int lineNumber = m_data.m_lineNumbers.value(blockNumber); const int columnNumber = cursor.positionInBlock(); - emit jumpToOriginalFileRequested(fileIndexForBlockNumber(blockNumber), + emit jumpToOriginalFileRequested(m_data.fileIndexForBlockNumber(blockNumber), lineNumber, columnNumber); } @@ -535,7 +579,7 @@ void SideDiffEditorWidget::paintEvent(QPaintEvent *e) SelectableTextEditorWidget::paintEvent(e); QPainter painter(viewport()); - QPointF offset = contentOffset(); + const QPointF offset = contentOffset(); QTextBlock currentBlock = firstVisibleBlock(); while (currentBlock.isValid()) { @@ -549,8 +593,8 @@ void SideDiffEditorWidget::paintEvent(QPaintEvent *e) if (bottom >= e->rect().top()) { const int blockNumber = currentBlock.blockNumber(); - auto it = m_skippedLines.constFind(blockNumber); - if (it != m_skippedLines.constEnd()) { + auto it = m_data.m_skippedLines.constFind(blockNumber); + if (it != m_data.m_skippedLines.constEnd()) { QString skippedRowsText = '[' + skippedText(it->first) + ']'; if (!it->second.isEmpty()) skippedRowsText += ' ' + it->second; @@ -558,7 +602,7 @@ void SideDiffEditorWidget::paintEvent(QPaintEvent *e) skippedRowsText, currentBlock, top); } - const DiffFileInfo fileInfo = m_fileInfo.value(blockNumber); + const DiffFileInfo fileInfo = m_data.m_fileInfo.value(blockNumber); if (!fileInfo.fileName.isEmpty()) { const QString fileNameText = fileInfo.typeInfo.isEmpty() ? fileInfo.fileName @@ -579,7 +623,7 @@ void SideDiffEditorWidget::paintEvent(QPaintEvent *e) m_drawCollapsedOffset, m_drawCollapsedClip); // reset the data for the drawing - m_drawCollapsedBlock = QTextBlock(); + m_drawCollapsedBlock = {}; } } @@ -595,13 +639,13 @@ void SideDiffEditorWidget::customDrawCollapsedBlockPopup(QPainter &painter, while (!b.isVisible()) { const int blockNumber = b.blockNumber(); - if (!m_skippedLines.contains(blockNumber) && !m_separators.contains(blockNumber)) { + if (!m_data.m_skippedLines.contains(blockNumber) && !m_data.m_separators.contains(blockNumber)) { b.setVisible(true); // make sure block bounding rect works QRectF r = blockBoundingRect(b).translated(offset); QTextLayout *layout = b.layout(); - for (int i = layout->lineCount()-1; i >= 0; --i) - maxWidth = qMax(maxWidth, layout->lineAt(i).naturalTextWidth() + 2*margin); + for (int i = layout->lineCount() - 1; i >= 0; --i) + maxWidth = qMax(maxWidth, layout->lineAt(i).naturalTextWidth() + 2 * margin); blockHeight += r.height(); @@ -620,21 +664,19 @@ void SideDiffEditorWidget::customDrawCollapsedBlockPopup(QPainter &painter, if (ifdefedOutFormat.hasProperty(QTextFormat::BackgroundBrush)) brush = ifdefedOutFormat.background(); painter.setBrush(brush); - painter.drawRoundedRect(QRectF(offset.x(), - offset.y(), - maxWidth, blockHeight).adjusted(0, 0, 0, 0), 3, 3); + painter.drawRoundedRect(QRectF(offset.x(), offset.y(), maxWidth, blockHeight) + .adjusted(0, 0, 0, 0), 3, 3); painter.restore(); QTextBlock end = b; b = block; while (b != end) { const int blockNumber = b.blockNumber(); - if (!m_skippedLines.contains(blockNumber) && !m_separators.contains(blockNumber)) { + if (!m_data.m_skippedLines.contains(blockNumber) && !m_data.m_separators.contains(blockNumber)) { b.setVisible(true); // make sure block bounding rect works - QRectF r = blockBoundingRect(b).translated(offset); + const QRectF r = blockBoundingRect(b).translated(offset); QTextLayout *layout = b.layout(); - QVector selections; - layout->draw(&painter, offset, selections, clip); + layout->draw(&painter, offset, {}, clip); b.setVisible(false); // restore previous state b.setLineCount(0); // restore 0 line count for invisible block @@ -670,61 +712,76 @@ SideBySideDiffEditorWidget::SideBySideDiffEditorWidget(QWidget *parent) : QWidget(parent) , m_controller(this) { - m_leftEditor = new SideDiffEditorWidget(this); - m_leftEditor->setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff); - m_leftEditor->setReadOnly(true); - m_leftEditor->setCodeStyle(TextEditorSettings::codeStyle()); - connect(m_leftEditor, &SideDiffEditorWidget::jumpToOriginalFileRequested, - this, &SideBySideDiffEditorWidget::slotLeftJumpToOriginalFileRequested); - connect(m_leftEditor, &SideDiffEditorWidget::contextMenuRequested, - this, &SideBySideDiffEditorWidget::slotLeftContextMenuRequested, - Qt::DirectConnection); + auto setupEditor = [this](DiffSide side) { + m_editor[side] = new SideDiffEditorWidget(this); + m_editor[side]->setReadOnly(true); + m_editor[side]->setCodeStyle(TextEditorSettings::codeStyle()); - m_rightEditor = new SideDiffEditorWidget(this); - m_rightEditor->setReadOnly(true); - m_rightEditor->setCodeStyle(TextEditorSettings::codeStyle()); - connect(m_rightEditor, &SideDiffEditorWidget::jumpToOriginalFileRequested, - this, &SideBySideDiffEditorWidget::slotRightJumpToOriginalFileRequested); - connect(m_rightEditor, &SideDiffEditorWidget::contextMenuRequested, - this, &SideBySideDiffEditorWidget::slotRightContextMenuRequested, - Qt::DirectConnection); + connect(m_editor[side], &SideDiffEditorWidget::jumpToOriginalFileRequested, + this, std::bind(&SideBySideDiffEditorWidget::jumpToOriginalFileRequested, this, + side, _1, _2, _3)); + connect(m_editor[side], &SideDiffEditorWidget::contextMenuRequested, + this, std::bind(&SideBySideDiffEditorWidget::contextMenuRequested, this, + side, _1, _2, _3, _4)); - auto setupHighlightController = [this]() { - HighlightScrollBarController *highlightController = m_leftEditor->highlightScrollBarController(); - if (highlightController) - highlightController->setScrollArea(m_rightEditor); + connect(m_editor[side]->verticalScrollBar(), &QAbstractSlider::valueChanged, + this, std::bind(&SideBySideDiffEditorWidget::verticalSliderChanged, this, side)); + connect(m_editor[side]->verticalScrollBar(), &QAbstractSlider::actionTriggered, + this, std::bind(&SideBySideDiffEditorWidget::verticalSliderChanged, this, side)); + + connect(m_editor[side]->horizontalScrollBar(), &QAbstractSlider::valueChanged, + this, std::bind(&SideBySideDiffEditorWidget::horizontalSliderChanged, this, side)); + connect(m_editor[side]->horizontalScrollBar(), &QAbstractSlider::actionTriggered, + this, std::bind(&SideBySideDiffEditorWidget::horizontalSliderChanged, this, side)); + + connect(m_editor[side], &QPlainTextEdit::cursorPositionChanged, + this, std::bind(&SideBySideDiffEditorWidget::cursorPositionChanged, this, side)); + + connect(m_editor[side]->horizontalScrollBar(), &QAbstractSlider::rangeChanged, + this, &SideBySideDiffEditorWidget::syncHorizontalScrollBarPolicy); + + auto context = new IContext(this); + context->setWidget(m_editor[side]); + context->setContext(Context(Id(Constants::SIDE_BY_SIDE_VIEW_ID).withSuffix(side + 1))); + ICore::addContextObject(context); }; + setupEditor(LeftSide); + setupEditor(RightSide); + m_editor[LeftSide]->setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff); - setupHighlightController(); - connect(m_leftEditor, &SideDiffEditorWidget::gotDisplaySettings, this, setupHighlightController); + auto setupHighlight = [this] { + HighlightScrollBarController *ctrl = m_editor[LeftSide]->highlightScrollBarController(); + if (ctrl) + ctrl->setScrollArea(m_editor[RightSide]); + }; + setupHighlight(); + connect(m_editor[LeftSide], &SideDiffEditorWidget::gotDisplaySettings, this, setupHighlight); - m_rightEditor->verticalScrollBar()->setFocusProxy(m_leftEditor); - connect(m_leftEditor, &SideDiffEditorWidget::gotFocus, this, [this]() { - if (m_rightEditor->verticalScrollBar()->focusProxy() == m_leftEditor) + m_editor[RightSide]->verticalScrollBar()->setFocusProxy(m_editor[LeftSide]); + connect(m_editor[LeftSide], &SideDiffEditorWidget::gotFocus, this, [this] { + if (m_editor[RightSide]->verticalScrollBar()->focusProxy() == m_editor[LeftSide]) return; // We already did it before. - // Hack #1. If the left editor got a focus last time - // we don't want to focus right editor when clicking the right - // scrollbar. - m_rightEditor->verticalScrollBar()->setFocusProxy(m_leftEditor); + // Hack #1. If the left editor got a focus last time we don't want to focus right editor + // when clicking the right scrollbar. + m_editor[RightSide]->verticalScrollBar()->setFocusProxy(m_editor[LeftSide]); - // Hack #2. If the focus is currently not on the scrollbar's proxy - // and we click on the scrollbar, the focus will go to the parent - // of the scrollbar. In order to give the focus to the proxy - // we need to set a click focus policy on the scrollbar. + // Hack #2. If the focus is currently not on the scrollbar's proxy and we click on + // the scrollbar, the focus will go to the parent of the scrollbar. In order to give + // the focus to the proxy we need to set a click focus policy on the scrollbar. // See QApplicationPrivate::giveFocusAccordingToFocusPolicy(). - m_rightEditor->verticalScrollBar()->setFocusPolicy(Qt::ClickFocus); + m_editor[RightSide]->verticalScrollBar()->setFocusPolicy(Qt::ClickFocus); - // Hack #3. Setting the focus policy is not orthogonal to setting - // the focus proxy and unfortuantely it changes the policy of the proxy - // too. We bring back the original policy to keep tab focus working. - m_leftEditor->setFocusPolicy(Qt::StrongFocus); + // Hack #3. Setting the focus policy is not orthogonal to setting the focus proxy and + // unfortuantely it changes the policy of the proxy too. We bring back the original policy + // to keep tab focus working. + m_editor[LeftSide]->setFocusPolicy(Qt::StrongFocus); }); - connect(m_rightEditor, &SideDiffEditorWidget::gotFocus, this, [this]() { + connect(m_editor[RightSide], &SideDiffEditorWidget::gotFocus, this, [this] { // Unhack #1. - m_rightEditor->verticalScrollBar()->setFocusProxy(nullptr); + m_editor[RightSide]->verticalScrollBar()->setFocusProxy(nullptr); // Unhack #2. - m_rightEditor->verticalScrollBar()->setFocusPolicy(Qt::NoFocus); + m_editor[RightSide]->verticalScrollBar()->setFocusPolicy(Qt::NoFocus); }); connect(TextEditorSettings::instance(), @@ -732,71 +789,33 @@ SideBySideDiffEditorWidget::SideBySideDiffEditorWidget(QWidget *parent) this, &SideBySideDiffEditorWidget::setFontSettings); setFontSettings(TextEditorSettings::fontSettings()); - connect(m_leftEditor->verticalScrollBar(), &QAbstractSlider::valueChanged, - this, &SideBySideDiffEditorWidget::leftVSliderChanged); - connect(m_leftEditor->verticalScrollBar(), &QAbstractSlider::actionTriggered, - this, &SideBySideDiffEditorWidget::leftVSliderChanged); - - connect(m_leftEditor->horizontalScrollBar(), &QAbstractSlider::valueChanged, - this, &SideBySideDiffEditorWidget::leftHSliderChanged); - connect(m_leftEditor->horizontalScrollBar(), &QAbstractSlider::actionTriggered, - this, &SideBySideDiffEditorWidget::leftHSliderChanged); - - connect(m_leftEditor, &QPlainTextEdit::cursorPositionChanged, - this, &SideBySideDiffEditorWidget::leftCursorPositionChanged); - - connect(m_rightEditor->verticalScrollBar(), &QAbstractSlider::valueChanged, - this, &SideBySideDiffEditorWidget::rightVSliderChanged); - connect(m_rightEditor->verticalScrollBar(), &QAbstractSlider::actionTriggered, - this, &SideBySideDiffEditorWidget::rightVSliderChanged); - - connect(m_rightEditor->horizontalScrollBar(), &QAbstractSlider::valueChanged, - this, &SideBySideDiffEditorWidget::rightHSliderChanged); - connect(m_rightEditor->horizontalScrollBar(), &QAbstractSlider::actionTriggered, - this, &SideBySideDiffEditorWidget::rightHSliderChanged); - - connect(m_rightEditor, &QPlainTextEdit::cursorPositionChanged, - this, &SideBySideDiffEditorWidget::rightCursorPositionChanged); - - connect(m_leftEditor, &SideDiffEditorWidget::foldChanged, - m_rightEditor, &SideDiffEditorWidget::setFolded); - connect(m_rightEditor, &SideDiffEditorWidget::foldChanged, - m_leftEditor, &SideDiffEditorWidget::setFolded); - - connect(m_leftEditor->horizontalScrollBar(), &QAbstractSlider::rangeChanged, - this, &SideBySideDiffEditorWidget::syncHorizontalScrollBarPolicy); - - connect(m_rightEditor->horizontalScrollBar(), &QAbstractSlider::rangeChanged, - this, &SideBySideDiffEditorWidget::syncHorizontalScrollBarPolicy); + connect(m_editor[LeftSide], &SideDiffEditorWidget::foldChanged, + m_editor[RightSide], &SideDiffEditorWidget::setFolded); + connect(m_editor[RightSide], &SideDiffEditorWidget::foldChanged, + m_editor[LeftSide], &SideDiffEditorWidget::setFolded); syncHorizontalScrollBarPolicy(); m_splitter = new MiniSplitter(this); - m_splitter->addWidget(m_leftEditor); - m_splitter->addWidget(m_rightEditor); + m_splitter->addWidget(m_editor[LeftSide]); + m_splitter->addWidget(m_editor[RightSide]); QVBoxLayout *l = new QVBoxLayout(this); l->setContentsMargins(0, 0, 0, 0); l->addWidget(m_splitter); - setFocusProxy(m_leftEditor); - - auto leftContext = new IContext(this); - leftContext->setWidget(m_leftEditor); - leftContext->setContext(Core::Context(Utils::Id(Constants::SIDE_BY_SIDE_VIEW_ID).withSuffix(1))); - Core::ICore::addContextObject(leftContext); - auto rightContext = new IContext(this); - rightContext->setWidget(m_rightEditor); - rightContext->setContext(Core::Context(Utils::Id(Constants::SIDE_BY_SIDE_VIEW_ID).withSuffix(2))); - Core::ICore::addContextObject(rightContext); + setFocusProxy(m_editor[LeftSide]); } -TextEditorWidget *SideBySideDiffEditorWidget::leftEditorWidget() const +SideBySideDiffEditorWidget::~SideBySideDiffEditorWidget() { - return m_leftEditor; + if (m_watcher) { + m_watcher->cancel(); + DiffEditorPlugin::addFuture(m_watcher->future()); + } } -TextEditorWidget *SideBySideDiffEditorWidget::rightEditorWidget() const +TextEditorWidget *SideBySideDiffEditorWidget::sideEditorWidget(DiffSide side) const { - return m_rightEditor; + return m_editor[side]; } void SideBySideDiffEditorWidget::setDocument(DiffEditorDocument *document) @@ -817,22 +836,28 @@ DiffEditorDocument *SideBySideDiffEditorWidget::diffDocument() const void SideBySideDiffEditorWidget::clear(const QString &message) { const GuardLocker locker(m_controller.m_ignoreChanges); - setDiff(QList()); - m_leftEditor->clearAll(message); - m_rightEditor->clearAll(message); + setDiff({}); + for (SideDiffEditorWidget *editor : m_editor) + editor->clearAll(message); + if (m_watcher) { + m_watcher->cancel(); + DiffEditorPlugin::addFuture(m_watcher->future()); + m_watcher.reset(); + m_controller.setBusyShowing(false); + } } void SideBySideDiffEditorWidget::setDiff(const QList &diffFileList) { const GuardLocker locker(m_controller.m_ignoreChanges); - m_leftEditor->clear(); - m_rightEditor->clear(); + for (SideDiffEditorWidget *editor : m_editor) + editor->clearAll(tr("Waiting for data...")); m_controller.m_contextFileData = diffFileList; if (m_controller.m_contextFileData.isEmpty()) { const QString msg = tr("No difference."); - m_leftEditor->setPlainText(msg); - m_rightEditor->setPlainText(msg); + for (SideDiffEditorWidget *editor : m_editor) + editor->setPlainText(msg); } else { showDiff(); } @@ -843,345 +868,233 @@ void SideBySideDiffEditorWidget::setCurrentDiffFileIndex(int diffFileIndex) if (m_controller.m_ignoreChanges.isLocked()) return; - const int blockNumber = m_leftEditor->blockNumberForFileIndex(diffFileIndex); + const int blockNumber = m_editor[LeftSide]->diffData().blockNumberForFileIndex(diffFileIndex); const GuardLocker locker(m_controller.m_ignoreChanges); - QTextBlock leftBlock = m_leftEditor->document()->findBlockByNumber(blockNumber); - QTextCursor leftCursor = m_leftEditor->textCursor(); - leftCursor.setPosition(leftBlock.position()); - m_leftEditor->setTextCursor(leftCursor); - m_leftEditor->verticalScrollBar()->setValue(blockNumber); + m_controller.setCurrentDiffFileIndex(diffFileIndex); - QTextBlock rightBlock = m_rightEditor->document()->findBlockByNumber(blockNumber); - QTextCursor rightCursor = m_rightEditor->textCursor(); - rightCursor.setPosition(rightBlock.position()); - m_rightEditor->setTextCursor(rightCursor); - m_rightEditor->verticalScrollBar()->setValue(blockNumber); + for (SideDiffEditorWidget *editor : m_editor) { + QTextBlock block = editor->document()->findBlockByNumber(blockNumber); + QTextCursor cursor = editor->textCursor(); + cursor.setPosition(block.position()); + editor->setTextCursor(cursor); + editor->verticalScrollBar()->setValue(blockNumber); + } } void SideBySideDiffEditorWidget::setHorizontalSync(bool sync) { m_horizontalSync = sync; - rightHSliderChanged(); + horizontalSliderChanged(RightSide); } void SideBySideDiffEditorWidget::saveState() { - m_leftEditor->saveState(); - m_rightEditor->saveState(); + for (SideDiffEditorWidget *editor : m_editor) + editor->saveState(); } void SideBySideDiffEditorWidget::restoreState() { - m_leftEditor->restoreState(); - m_rightEditor->restoreState(); + for (SideDiffEditorWidget *editor : m_editor) + editor->restoreState(); } void SideBySideDiffEditorWidget::showDiff() { - QMap > leftFormats; - QMap > rightFormats; + m_watcher.reset(new QFutureWatcher()); + m_controller.setBusyShowing(true); - QString leftTexts, rightTexts; - int blockNumber = 0; - QChar separator = '\n'; - QHash foldingIndent; - for (const FileData &contextFileData : qAsConst(m_controller.m_contextFileData)) { - QString leftText, rightText; - - foldingIndent.insert(blockNumber, 1); - leftFormats[blockNumber].append(DiffSelection(&m_controller.m_fileLineFormat)); - rightFormats[blockNumber].append(DiffSelection(&m_controller.m_fileLineFormat)); - m_leftEditor->setFileInfo(blockNumber, contextFileData.leftFileInfo); - m_rightEditor->setFileInfo(blockNumber, contextFileData.rightFileInfo); - leftText = separator; - rightText = separator; - blockNumber++; - - int lastLeftLineNumber = -1; - - if (contextFileData.binaryFiles) { - foldingIndent.insert(blockNumber, 2); - leftFormats[blockNumber].append(DiffSelection(&m_controller.m_chunkLineFormat)); - rightFormats[blockNumber].append(DiffSelection(&m_controller.m_chunkLineFormat)); - m_leftEditor->setSkippedLines(blockNumber, -2); - m_rightEditor->setSkippedLines(blockNumber, -2); - leftText += separator; - rightText += separator; - blockNumber++; + connect(m_watcher.get(), &QFutureWatcherBase::finished, this, [this] { + if (m_watcher->isCanceled()) { + for (SideDiffEditorWidget *editor : m_editor) + editor->clearAll(tr("Retrieving data failed.")); } else { - for (int j = 0; j < contextFileData.chunks.count(); j++) { - const ChunkData &chunkData = contextFileData.chunks.at(j); + const ShowResults results = m_watcher->result(); + m_editor[LeftSide]->setDiffData(results[LeftSide].diffData); + m_editor[RightSide]->setDiffData(results[RightSide].diffData); + TextDocumentPtr leftDoc(results[LeftSide].textDocument); + TextDocumentPtr rightDoc(results[RightSide].textDocument); + { + const GuardLocker locker(m_controller.m_ignoreChanges); + // TextDocument was living in no thread, so it's safe to pull it + leftDoc->moveToThread(thread()); + rightDoc->moveToThread(thread()); + m_editor[LeftSide]->setTextDocument(leftDoc); + m_editor[RightSide]->setTextDocument(rightDoc); - int leftLineNumber = chunkData.leftStartingLineNumber; - int rightLineNumber = chunkData.rightStartingLineNumber; - - if (!chunkData.contextChunk) { - const int skippedLines = leftLineNumber - lastLeftLineNumber - 1; - if (skippedLines > 0) { - foldingIndent.insert(blockNumber, 2); - leftFormats[blockNumber].append(DiffSelection(&m_controller.m_chunkLineFormat)); - rightFormats[blockNumber].append(DiffSelection(&m_controller.m_chunkLineFormat)); - m_leftEditor->setSkippedLines(blockNumber, skippedLines, chunkData.contextInfo); - m_rightEditor->setSkippedLines(blockNumber, skippedLines, chunkData.contextInfo); - leftText += separator; - rightText += separator; - blockNumber++; - } - - m_leftEditor->setChunkIndex(blockNumber, chunkData.rows.count(), j); - m_rightEditor->setChunkIndex(blockNumber, chunkData.rows.count(), j); - - for (const RowData &rowData : chunkData.rows) { - TextLineData leftLineData = rowData.leftLine; - TextLineData rightLineData = rowData.rightLine; - if (leftLineData.textLineType == TextLineData::TextLine) { - leftText += leftLineData.text; - lastLeftLineNumber = leftLineNumber; - leftLineNumber++; - m_leftEditor->setLineNumber(blockNumber, leftLineNumber); - } else if (leftLineData.textLineType == TextLineData::Separator) { - m_leftEditor->setSeparator(blockNumber, true); - } - - if (rightLineData.textLineType == TextLineData::TextLine) { - rightText += rightLineData.text; - rightLineNumber++; - m_rightEditor->setLineNumber(blockNumber, rightLineNumber); - } else if (rightLineData.textLineType == TextLineData::Separator) { - m_rightEditor->setSeparator(blockNumber, true); - } - - if (!rowData.equal) { - if (rowData.leftLine.textLineType == TextLineData::TextLine) - leftFormats[blockNumber].append(DiffSelection(&m_controller.m_leftLineFormat)); - else - leftFormats[blockNumber].append(DiffSelection(&m_spanLineFormat)); - if (rowData.rightLine.textLineType == TextLineData::TextLine) - rightFormats[blockNumber].append(DiffSelection(&m_controller.m_rightLineFormat)); - else - rightFormats[blockNumber].append(DiffSelection(&m_spanLineFormat)); - } - - for (auto it = leftLineData.changedPositions.cbegin(), - end = leftLineData.changedPositions.cend(); it != end; ++it) { - leftFormats[blockNumber].append( - DiffSelection(it.key(), it.value(), - &m_controller.m_leftCharFormat)); - } - - for (auto it = rightLineData.changedPositions.cbegin(), - end = rightLineData.changedPositions.cend(); it != end; ++it) { - rightFormats[blockNumber].append( - DiffSelection(it.key(), it.value(), - &m_controller.m_rightCharFormat)); - } - - leftText += separator; - rightText += separator; - blockNumber++; - } - } - - if (j == contextFileData.chunks.count() - 1) { // the last chunk - int skippedLines = -2; - if (chunkData.contextChunk) { - // if it's context chunk - skippedLines = chunkData.rows.count(); - } else if (!contextFileData.lastChunkAtTheEndOfFile - && !contextFileData.contextChunksIncluded) { - // if not a context chunk and not a chunk at the end of file - // and context lines not included - skippedLines = -1; // unknown count skipped by the end of file - } - - if (skippedLines >= -1) { - leftFormats[blockNumber].append(DiffSelection(&m_controller.m_chunkLineFormat)); - rightFormats[blockNumber].append(DiffSelection(&m_controller.m_chunkLineFormat)); - m_leftEditor->setSkippedLines(blockNumber, skippedLines); - m_rightEditor->setSkippedLines(blockNumber, skippedLines); - leftText += separator; - rightText += separator; - blockNumber++; - } // otherwise nothing skipped - } + m_editor[LeftSide]->setReadOnly(true); + m_editor[RightSide]->setReadOnly(true); } + m_editor[LeftSide]->setSelections(results[LeftSide].selections); + m_editor[RightSide]->setSelections(results[RightSide].selections); + setCurrentDiffFileIndex(m_controller.currentDiffFileIndex()); } - leftText.replace('\r', ' '); - rightText.replace('\r', ' '); - leftTexts += leftText; - rightTexts += rightText; - } + m_watcher.release()->deleteLater(); + m_controller.setBusyShowing(false); + }); - if (leftTexts.isEmpty() && rightTexts.isEmpty()) - return; + const DiffEditorInput input(&m_controller); - { - const GuardLocker locker(m_controller.m_ignoreChanges); - m_leftEditor->clear(); - m_leftEditor->setPlainText(leftTexts); - m_rightEditor->clear(); - m_rightEditor->setPlainText(rightTexts); - } + auto getDocument = [input](QFutureInterface &futureInterface) { + auto cleanup = qScopeGuard([&futureInterface] { + if (futureInterface.isCanceled()) + futureInterface.reportCanceled(); + }); + const int firstPartMax = 20; // diffOutput is about 4 times quicker than filling document + const int leftPartMax = 60; + const int rightPartMax = 100; + futureInterface.setProgressRange(0, rightPartMax); + futureInterface.setProgressValue(0); + QFutureInterface fi = futureInterface; + const SideBySideDiffOutput output = SideDiffData::diffOutput(fi, 0, firstPartMax, input); + if (futureInterface.isCanceled()) + return; - QTextBlock block = m_leftEditor->document()->firstBlock(); - for (int b = 0; block.isValid(); block = block.next(), ++b) - SelectableTextEditorWidget::setFoldingIndent(block, foldingIndent.value(b, 3)); - block = m_rightEditor->document()->firstBlock(); - for (int b = 0; block.isValid(); block = block.next(), ++b) - SelectableTextEditorWidget::setFoldingIndent(block, foldingIndent.value(b, 3)); + const ShowResult leftResult{TextDocumentPtr(new TextDocument("DiffEditor.SideDiffEditor")), + output.side[LeftSide].diffData, output.side[LeftSide].selections}; + const ShowResult rightResult{TextDocumentPtr(new TextDocument("DiffEditor.SideDiffEditor")), + output.side[RightSide].diffData, output.side[RightSide].selections}; + const ShowResults result{leftResult, rightResult}; - m_leftEditor->setSelections(leftFormats); - m_rightEditor->setSelections(rightFormats); + auto propagateDocument = [&output, &fi](DiffSide side, const ShowResult &result, + int progressMin, int progressMax) { + // No need to store the change history + result.textDocument->document()->setUndoRedoEnabled(false); + + // We could do just: + // result.textDocument->setPlainText(output.diffText); + // but this would freeze the thread for couple of seconds without progress reporting + // and without checking for canceled. + const int diffSize = output.side[side].diffText.size(); + const int packageSize = 10000; + int currentPos = 0; + QTextCursor cursor(result.textDocument->document()); + while (currentPos < diffSize) { + const QString package = output.side[side].diffText.mid(currentPos, packageSize); + cursor.insertText(package); + currentPos += package.size(); + fi.setProgressValue(DiffUtils::interpolate(currentPos, 0, diffSize, progressMin, progressMax)); + if (fi.isCanceled()) + return; + } + + QTextBlock block = result.textDocument->document()->firstBlock(); + for (int b = 0; block.isValid(); block = block.next(), ++b) + SelectableTextEditorWidget::setFoldingIndent(block, output.foldingIndent.value(b, 3)); + + // If future was canceled, the destructor runs in this thread, so we can't move it + // to caller's thread. We push it to no thread (make object to have no thread affinity), + // and later, in the caller's thread, we pull it back to the caller's thread. + result.textDocument->moveToThread(nullptr); + }; + + propagateDocument(LeftSide, leftResult, firstPartMax, leftPartMax); + if (fi.isCanceled()) + return; + propagateDocument(RightSide, rightResult, leftPartMax, rightPartMax); + if (fi.isCanceled()) + return; + + futureInterface.reportResult(result); + }; + + m_watcher->setFuture(runAsync(getDocument)); + ProgressManager::addTask(m_watcher->future(), tr("Rendering diff"), "DiffEditor"); } -void SideBySideDiffEditorWidget::setFontSettings( - const FontSettings &fontSettings) +void SideBySideDiffEditorWidget::setFontSettings(const FontSettings &fontSettings) { - m_spanLineFormat = fontSettings.toTextCharFormat(C_LINE_NUMBER); m_controller.setFontSettings(fontSettings); } -void SideBySideDiffEditorWidget::slotLeftJumpToOriginalFileRequested( - int diffFileIndex, - int lineNumber, - int columnNumber) +void SideBySideDiffEditorWidget::jumpToOriginalFileRequested(DiffSide side, int diffFileIndex, + int lineNumber, int columnNumber) { if (diffFileIndex < 0 || diffFileIndex >= m_controller.m_contextFileData.count()) return; const FileData fileData = m_controller.m_contextFileData.at(diffFileIndex); - const QString leftFileName = fileData.leftFileInfo.fileName; - const QString rightFileName = fileData.rightFileInfo.fileName; - if (leftFileName == rightFileName) { - // The same file (e.g. in git diff), jump to the line number taken from the right editor. - // Warning: git show SHA^ vs SHA or git diff HEAD vs Index - // (when Working tree has changed in meantime) will not work properly. - for (const ChunkData &chunkData : fileData.chunks) { + const QString fileName = fileData.fileInfo[side].fileName; + const DiffSide otherSide = oppositeSide(side); + const QString otherFileName = fileData.fileInfo[otherSide].fileName; + if (side == RightSide || fileName != otherFileName) { + // different file (e.g. in Tools | Diff...) + m_controller.jumpToOriginalFile(fileName, lineNumber, columnNumber); + return; + } - int leftLineNumber = chunkData.leftStartingLineNumber; - int rightLineNumber = chunkData.rightStartingLineNumber; + // The same file (e.g. in git diff), jump to the line number taken from the right editor. + // Warning: git show SHA^ vs SHA or git diff HEAD vs Index + // (when Working tree has changed in meantime) will not work properly. + for (const ChunkData &chunkData : fileData.chunks) { - for (int j = 0; j < chunkData.rows.count(); j++) { - const RowData rowData = chunkData.rows.at(j); - if (rowData.leftLine.textLineType == TextLineData::TextLine) - leftLineNumber++; - if (rowData.rightLine.textLineType == TextLineData::TextLine) - rightLineNumber++; - if (leftLineNumber == lineNumber) { - int colNr = rowData.equal ? columnNumber : 0; - m_controller.jumpToOriginalFile(leftFileName, rightLineNumber, colNr); - return; - } + int thisLineNumber = chunkData.startingLineNumber[side]; + int otherLineNumber = chunkData.startingLineNumber[otherSide]; + + for (int j = 0; j < chunkData.rows.count(); j++) { + const RowData rowData = chunkData.rows.at(j); + if (rowData.line[side].textLineType == TextLineData::TextLine) + thisLineNumber++; + if (rowData.line[otherSide].textLineType == TextLineData::TextLine) + otherLineNumber++; + if (thisLineNumber == lineNumber) { + int colNr = rowData.equal ? columnNumber : 0; + m_controller.jumpToOriginalFile(fileName, otherLineNumber, colNr); + return; } } - } else { - // different file (e.g. in Tools | Diff...) - m_controller.jumpToOriginalFile(leftFileName, lineNumber, columnNumber); } } -void SideBySideDiffEditorWidget::slotRightJumpToOriginalFileRequested( - int diffFileIndex, - int lineNumber, - int columnNumber) -{ - if (diffFileIndex < 0 || diffFileIndex >= m_controller.m_contextFileData.count()) - return; - - const FileData fileData = m_controller.m_contextFileData.at(diffFileIndex); - const QString fileName = fileData.rightFileInfo.fileName; - m_controller.jumpToOriginalFile(fileName, lineNumber, columnNumber); -} - -void SideBySideDiffEditorWidget::slotLeftContextMenuRequested(QMenu *menu, - int fileIndex, - int chunkIndex, - const ChunkSelection &selection) +void SideBySideDiffEditorWidget::contextMenuRequested(DiffSide side, QMenu *menu, int fileIndex, + int chunkIndex, const ChunkSelection &selection) { menu->addSeparator(); + const PatchAction patchAction = side == LeftSide ? PatchAction::Apply : PatchAction::Revert; m_controller.addCodePasterAction(menu, fileIndex, chunkIndex); - m_controller.addApplyAction(menu, fileIndex, chunkIndex); + m_controller.addPatchAction(menu, fileIndex, chunkIndex, patchAction); m_controller.addExtraActions(menu, fileIndex, chunkIndex, selection); } -void SideBySideDiffEditorWidget::slotRightContextMenuRequested(QMenu *menu, - int fileIndex, - int chunkIndex, - const ChunkSelection &selection) -{ - menu->addSeparator(); - - m_controller.addCodePasterAction(menu, fileIndex, chunkIndex); - m_controller.addRevertAction(menu, fileIndex, chunkIndex); - m_controller.addExtraActions(menu, fileIndex, chunkIndex, selection); -} - -void SideBySideDiffEditorWidget::leftVSliderChanged() +void SideBySideDiffEditorWidget::verticalSliderChanged(DiffSide side) { if (m_controller.m_ignoreChanges.isLocked()) return; - m_rightEditor->verticalScrollBar()->setValue(m_leftEditor->verticalScrollBar()->value()); + m_editor[oppositeSide(side)]->verticalScrollBar()->setValue( + m_editor[side]->verticalScrollBar()->value()); } -void SideBySideDiffEditorWidget::rightVSliderChanged() +void SideBySideDiffEditorWidget::horizontalSliderChanged(DiffSide side) +{ + if (m_controller.m_ignoreChanges.isLocked() || !m_horizontalSync) + return; + + m_editor[oppositeSide(side)]->horizontalScrollBar()->setValue( + m_editor[side]->horizontalScrollBar()->value()); +} + +void SideBySideDiffEditorWidget::cursorPositionChanged(DiffSide side) { if (m_controller.m_ignoreChanges.isLocked()) return; - m_leftEditor->verticalScrollBar()->setValue(m_rightEditor->verticalScrollBar()->value()); -} - -void SideBySideDiffEditorWidget::leftHSliderChanged() -{ - if (m_controller.m_ignoreChanges.isLocked()) - return; - - if (m_horizontalSync) - m_rightEditor->horizontalScrollBar()->setValue(m_leftEditor->horizontalScrollBar()->value()); -} - -void SideBySideDiffEditorWidget::rightHSliderChanged() -{ - if (m_controller.m_ignoreChanges.isLocked()) - return; - - if (m_horizontalSync) - m_leftEditor->horizontalScrollBar()->setValue(m_rightEditor->horizontalScrollBar()->value()); -} - -void SideBySideDiffEditorWidget::leftCursorPositionChanged() -{ - if (m_controller.m_ignoreChanges.isLocked()) - return; - - handlePositionChange(m_leftEditor, m_rightEditor); - leftVSliderChanged(); - leftHSliderChanged(); -} - -void SideBySideDiffEditorWidget::rightCursorPositionChanged() -{ - if (m_controller.m_ignoreChanges.isLocked()) - return; - - handlePositionChange(m_rightEditor, m_leftEditor); - rightVSliderChanged(); - rightHSliderChanged(); + handlePositionChange(m_editor[side], m_editor[oppositeSide(side)]); + verticalSliderChanged(side); + horizontalSliderChanged(side); } void SideBySideDiffEditorWidget::syncHorizontalScrollBarPolicy() { - const bool alwaysOn = m_leftEditor->horizontalScrollBar()->maximum() - || m_rightEditor->horizontalScrollBar()->maximum(); - const Qt::ScrollBarPolicy newPolicy = alwaysOn - ? Qt::ScrollBarAlwaysOn : Qt::ScrollBarAsNeeded; - if (m_leftEditor->horizontalScrollBarPolicy() != newPolicy) - m_leftEditor->setHorizontalScrollBarPolicy(newPolicy); - if (m_rightEditor->horizontalScrollBarPolicy() != newPolicy) - m_rightEditor->setHorizontalScrollBarPolicy(newPolicy); + const bool alwaysOn = m_editor[LeftSide]->horizontalScrollBar()->maximum() + || m_editor[RightSide]->horizontalScrollBar()->maximum(); + const Qt::ScrollBarPolicy newPolicy = alwaysOn ? Qt::ScrollBarAlwaysOn : Qt::ScrollBarAsNeeded; + for (SideDiffEditorWidget *editor : m_editor) { + if (editor->horizontalScrollBarPolicy() != newPolicy) + editor->setHorizontalScrollBarPolicy(newPolicy); + } } void SideBySideDiffEditorWidget::handlePositionChange(SideDiffEditorWidget *source, SideDiffEditorWidget *dest) @@ -1189,10 +1102,14 @@ void SideBySideDiffEditorWidget::handlePositionChange(SideDiffEditorWidget *sour if (m_controller.m_ignoreChanges.isLocked()) return; + const int fileIndex = source->diffData().fileIndexForBlockNumber(source->textCursor().blockNumber()); + if (fileIndex < 0) + return; + const GuardLocker locker(m_controller.m_ignoreChanges); syncCursor(source, dest); - emit currentDiffFileIndexChanged( - source->fileIndexForBlockNumber(source->textCursor().blockNumber())); + m_controller.setCurrentDiffFileIndex(fileIndex); + emit currentDiffFileIndexChanged(fileIndex); } void SideBySideDiffEditorWidget::syncCursor(SideDiffEditorWidget *source, SideDiffEditorWidget *dest) diff --git a/src/plugins/diffeditor/sidebysidediffeditorwidget.h b/src/plugins/diffeditor/sidebysidediffeditorwidget.h index 08b8b38e55f..2c1e30f4d11 100644 --- a/src/plugins/diffeditor/sidebysidediffeditorwidget.h +++ b/src/plugins/diffeditor/sidebysidediffeditorwidget.h @@ -3,10 +3,12 @@ #pragma once +#include "diffenums.h" #include "diffeditorwidgetcontroller.h" +#include "selectabletexteditorwidget.h" // TODO: we need DiffSelections here only +#include #include -#include namespace Core { class IContext; } @@ -28,15 +30,67 @@ namespace Internal { class DiffEditorDocument; class SideDiffEditorWidget; +class SideBySideDiffOutput; + +class SideDiffData +{ +public: + static SideBySideDiffOutput diffOutput(QFutureInterface &fi, int progressMin, + int progressMax, const DiffEditorInput &input); + + DiffChunkInfo m_chunkInfo; + // block number, fileInfo. Set for file lines only. + QMap m_fileInfo; + // block number, visual line number. + QMap m_lineNumbers; + // block number, skipped lines and context info. Set for chunk lines only. + QMap> m_skippedLines; + // block number, separator. Set for file, chunk or span line. + QMap m_separators; + + int m_lineNumberDigits = 1; + + bool isFileLine(int blockNumber) const { return m_fileInfo.contains(blockNumber); } + bool isChunkLine(int blockNumber) const { return m_skippedLines.contains(blockNumber); } + int blockNumberForFileIndex(int fileIndex) const; + int fileIndexForBlockNumber(int blockNumber) const; + +private: + void setLineNumber(int blockNumber, int lineNumber); + void setFileInfo(int blockNumber, const DiffFileInfo &fileInfo); + void setSkippedLines(int blockNumber, int skippedLines, const QString &contextInfo = {}) { + m_skippedLines[blockNumber] = {skippedLines, contextInfo}; + setSeparator(blockNumber, true); + } + void setSeparator(int blockNumber, bool separator) { m_separators[blockNumber] = separator; } +}; + +class SideDiffOutput +{ +public: + SideDiffData diffData; + QString diffText; + DiffSelections selections; +}; + +class SideBySideDiffOutput +{ +public: + std::array side{}; + // 'foldingIndent' is populated with and folding indentation + // value where 1 indicates start of new file and 2 indicates a diff chunk. + // Remaining lines (diff contents) are assigned 3. + QHash foldingIndent; +}; class SideBySideDiffEditorWidget : public QWidget { Q_OBJECT public: explicit SideBySideDiffEditorWidget(QWidget *parent = nullptr); + ~SideBySideDiffEditorWidget(); - TextEditor::TextEditorWidget *leftEditorWidget() const; - TextEditor::TextEditorWidget *rightEditorWidget() const; + TextEditor::TextEditorWidget *sideEditorWidget(DiffSide side) const; void setDocument(DiffEditorDocument *document); DiffEditorDocument *diffDocument() const; @@ -49,42 +103,42 @@ public: void saveState(); void restoreState(); - void clear(const QString &message = QString()); + void clear(const QString &message = {}); signals: void currentDiffFileIndexChanged(int index); private: void setFontSettings(const TextEditor::FontSettings &fontSettings); - void slotLeftJumpToOriginalFileRequested(int diffFileIndex, - int lineNumber, int columnNumber); - void slotRightJumpToOriginalFileRequested(int diffFileIndex, - int lineNumber, int columnNumber); - void slotLeftContextMenuRequested(QMenu *menu, int fileIndex, - int chunkIndex, const ChunkSelection &selection); - void slotRightContextMenuRequested(QMenu *menu, int fileIndex, - int chunkIndex, const ChunkSelection &selection); - void leftVSliderChanged(); - void rightVSliderChanged(); - void leftHSliderChanged(); - void rightHSliderChanged(); - void leftCursorPositionChanged(); - void rightCursorPositionChanged(); + void jumpToOriginalFileRequested(DiffSide side, int diffFileIndex, + int lineNumber, int columnNumber); + void contextMenuRequested(DiffSide side, QMenu *menu, int fileIndex, int chunkIndex, + const ChunkSelection &selection); + void verticalSliderChanged(DiffSide side); + void horizontalSliderChanged(DiffSide side); + void cursorPositionChanged(DiffSide side); void syncHorizontalScrollBarPolicy(); void handlePositionChange(SideDiffEditorWidget *source, SideDiffEditorWidget *dest); void syncCursor(SideDiffEditorWidget *source, SideDiffEditorWidget *dest); void showDiff(); - SideDiffEditorWidget *m_leftEditor = nullptr; - SideDiffEditorWidget *m_rightEditor = nullptr; + std::array m_editor{}; QSplitter *m_splitter = nullptr; DiffEditorWidgetController m_controller; bool m_horizontalSync = false; - QTextCharFormat m_spanLineFormat; + struct ShowResult + { + QSharedPointer textDocument{}; + SideDiffData diffData; + DiffSelections selections; + }; + using ShowResults = std::array; + + std::unique_ptr> m_watcher; }; } // namespace Internal diff --git a/src/plugins/diffeditor/unifieddiffeditorwidget.cpp b/src/plugins/diffeditor/unifieddiffeditorwidget.cpp index 1347f44b61d..cd2c6e7986c 100644 --- a/src/plugins/diffeditor/unifieddiffeditorwidget.cpp +++ b/src/plugins/diffeditor/unifieddiffeditorwidget.cpp @@ -5,22 +5,25 @@ #include "diffeditorconstants.h" #include "diffeditordocument.h" +#include "diffeditorplugin.h" #include "diffutils.h" -#include #include #include #include #include #include +#include +#include +#include #include #include #include -#include -#include +#include +#include #include using namespace Core; @@ -34,17 +37,18 @@ UnifiedDiffEditorWidget::UnifiedDiffEditorWidget(QWidget *parent) : SelectableTextEditorWidget("DiffEditor.UnifiedDiffEditor", parent) , m_controller(this) { + setReadOnly(true); + DisplaySettings settings = displaySettings(); settings.m_textWrapping = false; settings.m_displayLineNumbers = true; settings.m_markTextChanges = false; settings.m_highlightBlocks = false; SelectableTextEditorWidget::setDisplaySettings(settings); - - setReadOnly(true); connect(TextEditorSettings::instance(), &TextEditorSettings::displaySettingsChanged, this, &UnifiedDiffEditorWidget::setDisplaySettings); setDisplaySettings(TextEditorSettings::displaySettings()); + setCodeStyle(TextEditorSettings::codeStyle()); connect(TextEditorSettings::instance(), &TextEditorSettings::fontSettingsChanged, @@ -63,14 +67,20 @@ UnifiedDiffEditorWidget::UnifiedDiffEditorWidget(QWidget *parent) setCodeFoldingSupported(true); } +UnifiedDiffEditorWidget::~UnifiedDiffEditorWidget() +{ + if (m_watcher) { + m_watcher->cancel(); + DiffEditorPlugin::addFuture(m_watcher->future()); + } +} + void UnifiedDiffEditorWidget::setDocument(DiffEditorDocument *document) { + m_controller.setBusyShowing(true); m_controller.setDocument(document); clear(); - QList diffFileList; - if (document) - diffFileList = document->diffFiles(); - setDiff(diffFileList); + setDiff(document ? document->diffFiles() : QList()); } DiffEditorDocument *UnifiedDiffEditorWidget::diffDocument() const @@ -116,8 +126,13 @@ void UnifiedDiffEditorWidget::slotCursorPositionChangedInEditor() if (m_controller.m_ignoreChanges.isLocked()) return; + const int fileIndex = m_data.fileIndexForBlockNumber(textCursor().blockNumber()); + if (fileIndex < 0) + return; + const GuardLocker locker(m_controller.m_ignoreChanges); - emit currentDiffFileIndexChanged(fileIndexForBlockNumber(textCursor().blockNumber())); + m_controller.setCurrentDiffFileIndex(fileIndex); + emit currentDiffFileIndexChanged(fileIndex); } void UnifiedDiffEditorWidget::mouseDoubleClickEvent(QMouseEvent *e) @@ -156,30 +171,30 @@ void UnifiedDiffEditorWidget::contextMenuEvent(QContextMenuEvent *e) QTextCursor cursor = cursorForPosition(e->pos()); const int blockNumber = cursor.blockNumber(); - const int fileIndex = fileIndexForBlockNumber(blockNumber); - const int chunkIndex = chunkIndexForBlockNumber(blockNumber); + const int fileIndex = m_data.fileIndexForBlockNumber(blockNumber); + const int chunkIndex = m_data.m_chunkInfo.chunkIndexForBlockNumber(blockNumber); const ChunkData chunkData = m_controller.chunkData(fileIndex, chunkIndex); QList leftSelection, rightSelection; for (int i = startBlockNumber; i <= endBlockNumber; ++i) { - const int currentFileIndex = fileIndexForBlockNumber(i); + const int currentFileIndex = m_data.fileIndexForBlockNumber(i); if (currentFileIndex < fileIndex) continue; if (currentFileIndex > fileIndex) break; - const int currentChunkIndex = chunkIndexForBlockNumber(i); + const int currentChunkIndex = m_data.m_chunkInfo.chunkIndexForBlockNumber(i); if (currentChunkIndex < chunkIndex) continue; if (currentChunkIndex > chunkIndex) break; - const int leftRow = m_data.m_leftLineNumbers.value(i, qMakePair(-1, -1)).second; - const int rightRow = m_data.m_rightLineNumbers.value(i, qMakePair(-1, -1)).second; + const int leftRow = m_data.m_lineNumbers[LeftSide].value(i, qMakePair(-1, -1)).second; + const int rightRow = m_data.m_lineNumbers[RightSide].value(i, qMakePair(-1, -1)).second; if (leftRow >= 0) leftSelection.append(leftRow); @@ -189,24 +204,22 @@ void UnifiedDiffEditorWidget::contextMenuEvent(QContextMenuEvent *e) const ChunkSelection selection(leftSelection, rightSelection); - addContextMenuActions(menu, fileIndexForBlockNumber(blockNumber), - chunkIndexForBlockNumber(blockNumber), selection); + addContextMenuActions(menu, m_data.fileIndexForBlockNumber(blockNumber), + m_data.m_chunkInfo.chunkIndexForBlockNumber(blockNumber), selection); connect(this, &UnifiedDiffEditorWidget::destroyed, menu.data(), &QMenu::deleteLater); menu->exec(e->globalPos()); delete menu; } -void UnifiedDiffEditorWidget::addContextMenuActions(QMenu *menu, - int fileIndex, - int chunkIndex, +void UnifiedDiffEditorWidget::addContextMenuActions(QMenu *menu, int fileIndex, int chunkIndex, const ChunkSelection &selection) { menu->addSeparator(); m_controller.addCodePasterAction(menu, fileIndex, chunkIndex); - m_controller.addApplyAction(menu, fileIndex, chunkIndex); - m_controller.addRevertAction(menu, fileIndex, chunkIndex); + m_controller.addPatchAction(menu, fileIndex, chunkIndex, PatchAction::Apply); + m_controller.addPatchAction(menu, fileIndex, chunkIndex, PatchAction::Revert); m_controller.addExtraActions(menu, fileIndex, chunkIndex, selection); } @@ -214,6 +227,12 @@ void UnifiedDiffEditorWidget::clear(const QString &message) { m_data = {}; setSelections({}); + if (m_watcher) { + m_watcher->cancel(); + DiffEditorPlugin::addFuture(m_watcher->future()); + m_watcher.reset(); + m_controller.setBusyShowing(false); + } const GuardLocker locker(m_controller.m_ignoreChanges); SelectableTextEditorWidget::clear(); @@ -225,81 +244,75 @@ QString UnifiedDiffEditorWidget::lineNumber(int blockNumber) const { QString lineNumberString; - const bool leftLineExists = m_data.m_leftLineNumbers.contains(blockNumber); - const bool rightLineExists = m_data.m_rightLineNumbers.contains(blockNumber); + const bool leftLineExists = m_data.m_lineNumbers[LeftSide].contains(blockNumber); + const bool rightLineExists = m_data.m_lineNumbers[RightSide].contains(blockNumber); if (leftLineExists || rightLineExists) { - const QString leftLine = leftLineExists - ? QString::number(m_data.m_leftLineNumbers.value(blockNumber).first) - : QString(); - lineNumberString += QString(m_data.m_leftLineNumberDigits - leftLine.count(), - ' ') + leftLine; - + auto addSideNumber = [&](DiffSide side, bool lineExists) { + const QString line = lineExists + ? QString::number(m_data.m_lineNumbers[side].value(blockNumber).first) + : QString(); + lineNumberString += QString(m_data.m_lineNumberDigits[side] - line.count(), ' ') + line; + }; + addSideNumber(LeftSide, leftLineExists); lineNumberString += '|'; - - const QString rightLine = rightLineExists - ? QString::number(m_data.m_rightLineNumbers.value(blockNumber).first) - : QString(); - lineNumberString += QString(m_data.m_rightLineNumberDigits - rightLine.count(), - ' ') + rightLine; + addSideNumber(RightSide, rightLineExists); } return lineNumberString; } int UnifiedDiffEditorWidget::lineNumberDigits() const { - return m_data.m_leftLineNumberDigits + m_data.m_rightLineNumberDigits + 1; + return m_data.m_lineNumberDigits[LeftSide] + m_data.m_lineNumberDigits[RightSide] + 1; } -void UnifiedDiffData::setLeftLineNumber(int blockNumber, int lineNumber, int rowNumberInChunk) +int UnifiedDiffData::blockNumberForFileIndex(int fileIndex) const { + if (fileIndex < 0 || fileIndex >= m_fileInfo.count()) + return -1; + + return std::next(m_fileInfo.constBegin(), fileIndex).key(); +} + +int UnifiedDiffData::fileIndexForBlockNumber(int blockNumber) const +{ + int i = -1; + for (auto it = m_fileInfo.cbegin(), end = m_fileInfo.cend(); it != end; ++it, ++i) { + if (it.key() > blockNumber) + break; + } + return i; +} + +void UnifiedDiffData::setLineNumber(DiffSide side, int blockNumber, int lineNumber, int rowNumberInChunk) +{ + QTC_ASSERT(side < SideCount, return); const QString lineNumberString = QString::number(lineNumber); - m_leftLineNumbers.insert(blockNumber, qMakePair(lineNumber, rowNumberInChunk)); - m_leftLineNumberDigits = qMax(m_leftLineNumberDigits, lineNumberString.count()); -} - -void UnifiedDiffData::setRightLineNumber(int blockNumber, int lineNumber, int rowNumberInChunk) -{ - const QString lineNumberString = QString::number(lineNumber); - m_rightLineNumbers.insert(blockNumber, qMakePair(lineNumber, rowNumberInChunk)); - m_rightLineNumberDigits = qMax(m_rightLineNumberDigits, lineNumberString.count()); -} - -void UnifiedDiffData::setFileInfo(int blockNumber, const DiffFileInfo &leftInfo, - const DiffFileInfo &rightInfo) -{ - m_fileInfo[blockNumber] = qMakePair(leftInfo, rightInfo); -} - -void UnifiedDiffData::setChunkIndex(int startBlockNumber, int blockCount, int chunkIndex) -{ - m_chunkInfo.insert(startBlockNumber, qMakePair(blockCount, chunkIndex)); + m_lineNumbers[side].insert(blockNumber, qMakePair(lineNumber, rowNumberInChunk)); + m_lineNumberDigits[side] = qMax(m_lineNumberDigits[side], lineNumberString.count()); } void UnifiedDiffEditorWidget::setDiff(const QList &diffFileList) { const GuardLocker locker(m_controller.m_ignoreChanges); - clear(); + clear(tr("Waiting for data...")); m_controller.m_contextFileData = diffFileList; showDiff(); } -QString UnifiedDiffData::showChunk(const DiffEditorInput &input, const ChunkData &chunkData, - bool lastChunk, int *blockNumber, int *charNumber, - QMap> *selections) +QString UnifiedDiffData::setChunk(const DiffEditorInput &input, const ChunkData &chunkData, + bool lastChunk, int *blockNumber, DiffSelections *selections) { if (chunkData.contextChunk) - return QString(); + return {}; QString diffText; - int leftLineCount = 0; - int rightLineCount = 0; int blockCount = 0; - int charCount = 0; - QList leftBuffer, rightBuffer; - QList leftRowsBuffer, rightRowsBuffer; + std::array lineCount{}; + std::array, SideCount> buffer{}; + std::array, SideCount> rowsBuffer{}; - (*selections)[*blockNumber].append(DiffSelection(input.m_chunkLineFormat)); + (*selections)[*blockNumber].append({input.m_chunkLineFormat}); int lastEqualRow = -1; if (lastChunk) { @@ -312,140 +325,94 @@ QString UnifiedDiffData::showChunk(const DiffEditorInput &input, const ChunkData } } + auto processSideChunk = [&](DiffSide side, int chunkIndex) { + if (buffer[side].isEmpty()) + return; + + for (int j = 0; j < buffer[side].count(); j++) { + const TextLineData &lineData = buffer[side].at(j); + const QString line = DiffUtils::makePatchLine( + '-', + lineData.text, + lastChunk, + chunkIndex == chunkData.rows.count() && j == buffer[side].count() - 1); + + const int blockDelta = line.count('\n'); // no new line + // could have been added + for (int k = 0; k < blockDelta; k++) + (*selections)[*blockNumber + blockCount + 1 + k].append({input.m_lineFormat[side]}); + + for (auto it = lineData.changedPositions.cbegin(), + end = lineData.changedPositions.cend(); it != end; ++it) { + const int startPos = it.key() < 0 ? 1 : it.key() + 1; + const int endPos = it.value() < 0 ? it.value() : it.value() + 1; + (*selections)[*blockNumber + blockCount + 1].append( + {input.m_charFormat[side], startPos, endPos}); + } + + if (!line.isEmpty()) { + setLineNumber(side, + *blockNumber + blockCount + 1, + chunkData.startingLineNumber[side] + lineCount[side] + 1, + rowsBuffer[side].at(j)); + blockCount += blockDelta; + ++lineCount[side]; + } + diffText += line; + } + buffer[side].clear(); + rowsBuffer[side].clear(); + }; + + auto processSideChunkEmpty = [&](DiffSide side, int chunkIndex) { + setLineNumber(side, *blockNumber + blockCount + 1, + chunkData.startingLineNumber[side] + lineCount[side] + 1, chunkIndex); + ++lineCount[side]; + }; + + auto processSideChunkDifferent = [&](DiffSide side, int chunkIndex, const RowData &rowData) { + if (rowData.line[side].textLineType == TextLineData::TextLine) { + buffer[side].append(rowData.line[side]); + rowsBuffer[side].append(chunkIndex); + } + }; + for (int i = 0; i <= chunkData.rows.count(); i++) { const RowData &rowData = i < chunkData.rows.count() ? chunkData.rows.at(i) - : RowData(TextLineData(TextLineData::Separator)); // dummy, - // ensure we process buffers to the end. - // rowData will be equal + // dummy, ensure we process buffers to the end. rowData will be equal + : RowData(TextLineData(TextLineData::Separator)); + + if (rowData.equal && i != lastEqualRow) { - if (!leftBuffer.isEmpty()) { - for (int j = 0; j < leftBuffer.count(); j++) { - const TextLineData &lineData = leftBuffer.at(j); - const QString line = DiffUtils::makePatchLine( - '-', - lineData.text, - lastChunk, - i == chunkData.rows.count() - && j == leftBuffer.count() - 1); - - const int blockDelta = line.count('\n'); // no new line - // could have been added - for (int k = 0; k < blockDelta; k++) - (*selections)[*blockNumber + blockCount + 1 + k].append(input.m_leftLineFormat); - - for (auto it = lineData.changedPositions.cbegin(), - end = lineData.changedPositions.cend(); it != end; ++it) { - const int startPos = it.key() < 0 - ? 1 : it.key() + 1; - const int endPos = it.value() < 0 - ? it.value() : it.value() + 1; - (*selections)[*blockNumber + blockCount + 1].append( - DiffSelection(startPos, endPos, input.m_leftCharFormat)); - } - - if (!line.isEmpty()) { - setLeftLineNumber(*blockNumber + blockCount + 1, - chunkData.leftStartingLineNumber - + leftLineCount + 1, - leftRowsBuffer.at(j)); - blockCount += blockDelta; - ++leftLineCount; - } - - diffText += line; - - charCount += line.count(); - } - leftBuffer.clear(); - leftRowsBuffer.clear(); - } - if (!rightBuffer.isEmpty()) { - for (int j = 0; j < rightBuffer.count(); j++) { - const TextLineData &lineData = rightBuffer.at(j); - const QString line = DiffUtils::makePatchLine( - '+', - lineData.text, - lastChunk, - i == chunkData.rows.count() - && j == rightBuffer.count() - 1); - - const int blockDelta = line.count('\n'); // no new line - // could have been added - - for (int k = 0; k < blockDelta; k++) - (*selections)[*blockNumber + blockCount + 1 + k].append(input.m_rightLineFormat); - - for (auto it = lineData.changedPositions.cbegin(), - end = lineData.changedPositions.cend(); it != end; ++it) { - const int startPos = it.key() < 0 - ? 1 : it.key() + 1; - const int endPos = it.value() < 0 - ? it.value() : it.value() + 1; - (*selections)[*blockNumber + blockCount + 1].append - (DiffSelection(startPos, endPos, input.m_rightCharFormat)); - } - - if (!line.isEmpty()) { - setRightLineNumber(*blockNumber + blockCount + 1, - chunkData.rightStartingLineNumber - + rightLineCount + 1, - rightRowsBuffer.at(j)); - blockCount += blockDelta; - ++rightLineCount; - } - - diffText += line; - - charCount += line.count(); - } - rightBuffer.clear(); - rightRowsBuffer.clear(); - } + processSideChunk(LeftSide, i); + processSideChunk(RightSide, i); if (i < chunkData.rows.count()) { const QString line = DiffUtils::makePatchLine(' ', - rowData.rightLine.text, + rowData.line[RightSide].text, lastChunk, i == chunkData.rows.count() - 1); - if (!line.isEmpty()) { - setLeftLineNumber(*blockNumber + blockCount + 1, - chunkData.leftStartingLineNumber - + leftLineCount + 1, - i); - setRightLineNumber(*blockNumber + blockCount + 1, - chunkData.rightStartingLineNumber - + rightLineCount + 1, - i); + processSideChunkEmpty(LeftSide, i); + processSideChunkEmpty(RightSide, i); blockCount += line.count('\n'); - ++leftLineCount; - ++rightLineCount; } - diffText += line; - - charCount += line.count(); } } else { - if (rowData.leftLine.textLineType == TextLineData::TextLine) { - leftBuffer.append(rowData.leftLine); - leftRowsBuffer.append(i); - } - if (rowData.rightLine.textLineType == TextLineData::TextLine) { - rightBuffer.append(rowData.rightLine); - rightRowsBuffer.append(i); - } + processSideChunkDifferent(LeftSide, i, rowData); + processSideChunkDifferent(RightSide, i, rowData); } } const QString chunkLine = "@@ -" - + QString::number(chunkData.leftStartingLineNumber + 1) + + QString::number(chunkData.startingLineNumber[LeftSide] + 1) + ',' - + QString::number(leftLineCount) + + QString::number(lineCount[LeftSide]) + " +" - + QString::number(chunkData.rightStartingLineNumber+ 1) + + QString::number(chunkData.startingLineNumber[RightSide]+ 1) + ',' - + QString::number(rightLineCount) + + QString::number(lineCount[RightSide]) + " @@" + chunkData.contextInfo + '\n'; @@ -453,119 +420,147 @@ QString UnifiedDiffData::showChunk(const DiffEditorInput &input, const ChunkData diffText.prepend(chunkLine); *blockNumber += blockCount + 1; // +1 for chunk line - *charNumber += charCount + chunkLine.count(); return diffText; } -UnifiedDiffOutput UnifiedDiffData::showDiff(const DiffEditorInput &input) +UnifiedDiffOutput UnifiedDiffData::diffOutput(QFutureInterface &fi, int progressMin, + int progressMax, const DiffEditorInput &input) { UnifiedDiffOutput output; int blockNumber = 0; - int charNumber = 0; + int i = 0; + const int count = input.m_contextFileData.size(); for (const FileData &fileData : qAsConst(input.m_contextFileData)) { - const QString leftFileInfo = "--- " + fileData.leftFileInfo.fileName + '\n'; - const QString rightFileInfo = "+++ " + fileData.rightFileInfo.fileName + '\n'; - setFileInfo(blockNumber, fileData.leftFileInfo, fileData.rightFileInfo); + const QString leftFileInfo = "--- " + fileData.fileInfo[LeftSide].fileName + '\n'; + const QString rightFileInfo = "+++ " + fileData.fileInfo[RightSide].fileName + '\n'; + output.diffData.m_fileInfo[blockNumber] = fileData.fileInfo; output.foldingIndent.insert(blockNumber, 1); - output.selections[blockNumber].append(DiffSelection(input.m_fileLineFormat)); + output.selections[blockNumber].append({input.m_fileLineFormat}); blockNumber++; output.foldingIndent.insert(blockNumber, 1); - output.selections[blockNumber].append(DiffSelection(input.m_fileLineFormat)); + output.selections[blockNumber].append({input.m_fileLineFormat}); blockNumber++; output.diffText += leftFileInfo; output.diffText += rightFileInfo; - charNumber += leftFileInfo.count() + rightFileInfo.count(); if (fileData.binaryFiles) { output.foldingIndent.insert(blockNumber, 2); - output.selections[blockNumber].append(DiffSelection(input.m_chunkLineFormat)); + output.selections[blockNumber].append({input.m_chunkLineFormat}); blockNumber++; const QString binaryLine = "Binary files " - + fileData.leftFileInfo.fileName + + fileData.fileInfo[LeftSide].fileName + " and " - + fileData.rightFileInfo.fileName + + fileData.fileInfo[RightSide].fileName + " differ\n"; output.diffText += binaryLine; - charNumber += binaryLine.count(); } else { for (int j = 0; j < fileData.chunks.count(); j++) { - const int oldBlockNumber = blockNumber; + const int oldBlock = blockNumber; output.foldingIndent.insert(blockNumber, 2); - output.diffText += showChunk(input, fileData.chunks.at(j), - (j == fileData.chunks.count() - 1) - && fileData.lastChunkAtTheEndOfFile, - &blockNumber, - &charNumber, - &output.selections); + output.diffText += output.diffData.setChunk(input, fileData.chunks.at(j), + (j == fileData.chunks.count() - 1) + && fileData.lastChunkAtTheEndOfFile, + &blockNumber, + &output.selections); if (!fileData.chunks.at(j).contextChunk) - setChunkIndex(oldBlockNumber, blockNumber - oldBlockNumber, j); + output.diffData.m_chunkInfo.setChunkIndex(oldBlock, blockNumber - oldBlock, j); } } + fi.setProgressValue(DiffUtils::interpolate(++i, 0, count, progressMin, progressMax)); + if (fi.isCanceled()) + return {}; } output.diffText.replace('\r', ' '); + output.selections = SelectableTextEditorWidget::polishedSelections(output.selections); return output; } void UnifiedDiffEditorWidget::showDiff() { - const DiffEditorInput input = {&m_controller}; - const UnifiedDiffOutput output = m_data.showDiff(input); - - if (output.diffText.isEmpty()) { + if (m_controller.m_contextFileData.isEmpty()) { setPlainText(tr("No difference.")); return; } - { - const GuardLocker locker(m_controller.m_ignoreChanges); - setPlainText(output.diffText); + m_watcher.reset(new QFutureWatcher()); + m_controller.setBusyShowing(true); + connect(m_watcher.get(), &QFutureWatcherBase::finished, this, [this] { + if (m_watcher->isCanceled()) { + setPlainText(tr("Retrieving data failed.")); + } else { + const ShowResult result = m_watcher->result(); + m_data = result.diffData; + TextDocumentPtr doc(result.textDocument); + { + const GuardLocker locker(m_controller.m_ignoreChanges); + // TextDocument was living in no thread, so it's safe to pull it + doc->moveToThread(thread()); + setTextDocument(doc); - QTextBlock block = document()->firstBlock(); + setReadOnly(true); + } + setSelections(result.selections); + setCurrentDiffFileIndex(m_controller.currentDiffFileIndex()); + } + m_watcher.release()->deleteLater(); + m_controller.setBusyShowing(false); + }); + + const DiffEditorInput input(&m_controller); + + auto getDocument = [input](QFutureInterface &futureInterface) { + auto cleanup = qScopeGuard([&futureInterface] { + if (futureInterface.isCanceled()) + futureInterface.reportCanceled(); + }); + const int progressMax = 100; + const int firstPartMax = 20; // diffOutput is about 4 times quicker than filling document + futureInterface.setProgressRange(0, progressMax); + futureInterface.setProgressValue(0); + QFutureInterface fi = futureInterface; + const UnifiedDiffOutput output = UnifiedDiffData::diffOutput(fi, 0, firstPartMax, input); + if (futureInterface.isCanceled()) + return; + + const ShowResult result = {TextDocumentPtr(new TextDocument("DiffEditor.UnifiedDiffEditor")), + output.diffData, output.selections}; + // No need to store the change history + result.textDocument->document()->setUndoRedoEnabled(false); + + // We could do just: + // result.textDocument->setPlainText(output.diffText); + // but this would freeze the thread for couple of seconds without progress reporting + // and without checking for canceled. + const int diffSize = output.diffText.size(); + const int packageSize = 10000; + int currentPos = 0; + QTextCursor cursor(result.textDocument->document()); + while (currentPos < diffSize) { + const QString package = output.diffText.mid(currentPos, packageSize); + cursor.insertText(package); + currentPos += package.size(); + fi.setProgressValue(DiffUtils::interpolate(currentPos, 0, diffSize, firstPartMax, progressMax)); + if (futureInterface.isCanceled()) + return; + } + + QTextBlock block = result.textDocument->document()->firstBlock(); for (int b = 0; block.isValid(); block = block.next(), ++b) setFoldingIndent(block, output.foldingIndent.value(b, 3)); - } - setSelections(output.selections); -} + // If future was canceled, the destructor runs in this thread, so we can't move it + // to caller's thread. We push it to no thread (make object to have no thread affinity), + // and later, in the caller's thread, we pull it back to the caller's thread. + result.textDocument->moveToThread(nullptr); + futureInterface.reportResult(result); + }; -int UnifiedDiffEditorWidget::blockNumberForFileIndex(int fileIndex) const -{ - if (fileIndex < 0 || fileIndex >= m_data.m_fileInfo.count()) - return -1; - - return std::next(m_data.m_fileInfo.constBegin(), fileIndex).key(); -} - -int UnifiedDiffEditorWidget::fileIndexForBlockNumber(int blockNumber) const -{ - int i = -1; - for (auto it = m_data.m_fileInfo.cbegin(), end = m_data.m_fileInfo.cend(); it != end; ++it, ++i) { - if (it.key() > blockNumber) - break; - } - - return i; -} - -int UnifiedDiffEditorWidget::chunkIndexForBlockNumber(int blockNumber) const -{ - if (m_data.m_chunkInfo.isEmpty()) - return -1; - - auto it = m_data.m_chunkInfo.upperBound(blockNumber); - if (it == m_data.m_chunkInfo.constBegin()) - return -1; - - --it; - - if (blockNumber < it.key() + it.value().first) - return it.value().second; - - return -1; + m_watcher->setFuture(runAsync(getDocument)); + ProgressManager::addTask(m_watcher->future(), tr("Rendering diff"), "DiffEditor"); } void UnifiedDiffEditorWidget::jumpToOriginalFile(const QTextCursor &cursor) @@ -574,34 +569,34 @@ void UnifiedDiffEditorWidget::jumpToOriginalFile(const QTextCursor &cursor) return; const int blockNumber = cursor.blockNumber(); - const int fileIndex = fileIndexForBlockNumber(blockNumber); + const int fileIndex = m_data.fileIndexForBlockNumber(blockNumber); if (fileIndex < 0) return; const FileData fileData = m_controller.m_contextFileData.at(fileIndex); - const QString leftFileName = fileData.leftFileInfo.fileName; - const QString rightFileName = fileData.rightFileInfo.fileName; + const QString leftFileName = fileData.fileInfo[LeftSide].fileName; + const QString rightFileName = fileData.fileInfo[RightSide].fileName; const int columnNumber = cursor.positionInBlock() - 1; // -1 for the first character in line - const int rightLineNumber = m_data.m_rightLineNumbers.value(blockNumber, qMakePair(-1, 0)).first; + const int rightLineNumber = m_data.m_lineNumbers[RightSide].value(blockNumber, qMakePair(-1, 0)).first; if (rightLineNumber >= 0) { m_controller.jumpToOriginalFile(rightFileName, rightLineNumber, columnNumber); return; } - const int leftLineNumber = m_data.m_leftLineNumbers.value(blockNumber, qMakePair(-1, 0)).first; + const int leftLineNumber = m_data.m_lineNumbers[LeftSide].value(blockNumber, qMakePair(-1, 0)).first; if (leftLineNumber >= 0) { if (leftFileName == rightFileName) { for (const ChunkData &chunkData : fileData.chunks) { - int newLeftLineNumber = chunkData.leftStartingLineNumber; - int newRightLineNumber = chunkData.rightStartingLineNumber; + int newLeftLineNumber = chunkData.startingLineNumber[LeftSide]; + int newRightLineNumber = chunkData.startingLineNumber[RightSide]; for (const RowData &rowData : chunkData.rows) { - if (rowData.leftLine.textLineType == TextLineData::TextLine) + if (rowData.line[LeftSide].textLineType == TextLineData::TextLine) newLeftLineNumber++; - if (rowData.rightLine.textLineType == TextLineData::TextLine) + if (rowData.line[RightSide].textLineType == TextLineData::TextLine) newRightLineNumber++; if (newLeftLineNumber == leftLineNumber) { m_controller.jumpToOriginalFile(leftFileName, newRightLineNumber, 0); @@ -622,7 +617,8 @@ void UnifiedDiffEditorWidget::setCurrentDiffFileIndex(int diffFileIndex) return; const GuardLocker locker(m_controller.m_ignoreChanges); - const int blockNumber = blockNumberForFileIndex(diffFileIndex); + m_controller.setCurrentDiffFileIndex(diffFileIndex); + const int blockNumber = m_data.blockNumberForFileIndex(diffFileIndex); QTextBlock block = document()->findBlockByNumber(blockNumber); QTextCursor cursor = textCursor(); diff --git a/src/plugins/diffeditor/unifieddiffeditorwidget.h b/src/plugins/diffeditor/unifieddiffeditorwidget.h index e90438332df..5320e6d0174 100644 --- a/src/plugins/diffeditor/unifieddiffeditorwidget.h +++ b/src/plugins/diffeditor/unifieddiffeditorwidget.h @@ -3,8 +3,10 @@ #pragma once -#include "selectabletexteditorwidget.h" #include "diffeditorwidgetcontroller.h" +#include "selectabletexteditorwidget.h" + +#include namespace Core { class IContext; } @@ -22,44 +24,41 @@ class ChunkSelection; namespace Internal { class DiffEditorDocument; +class UnifiedDiffOutput; + +class UnifiedDiffData +{ +public: + static UnifiedDiffOutput diffOutput(QFutureInterface &fi, int progressMin, int progressMax, + const DiffEditorInput &input); + + DiffChunkInfo m_chunkInfo; + // block number, visual line number. + QMap m_fileInfo; + // block number, visual line number, chunk row number + using LineNumbers = QMap>; + std::array m_lineNumbers{}; + std::array m_lineNumberDigits{1, 1}; + + int blockNumberForFileIndex(int fileIndex) const; + int fileIndexForBlockNumber(int blockNumber) const; + +private: + void setLineNumber(DiffSide side, int blockNumber, int lineNumber, int rowNumberInChunk); + QString setChunk(const DiffEditorInput &input, const ChunkData &chunkData, + bool lastChunk, int *blockNumber, DiffSelections *selections); +}; class UnifiedDiffOutput { public: + UnifiedDiffData diffData; QString diffText; // 'foldingIndent' is populated with and folding indentation // value where 1 indicates start of new file and 2 indicates a diff chunk. // Remaining lines (diff contents) are assigned 3. QHash foldingIndent; - - QMap> selections; -}; - -class UnifiedDiffData -{ -public: - UnifiedDiffOutput showDiff(const DiffEditorInput &input); - - // block number, visual line number, chunk row number - QMap> m_leftLineNumbers; - QMap> m_rightLineNumbers; - - int m_leftLineNumberDigits = 1; - int m_rightLineNumberDigits = 1; - - // block number, visual line number. - QMap> m_fileInfo; - // start block number, block count of a chunk, chunk index inside a file. - QMap> m_chunkInfo; - -private: - void setLeftLineNumber(int blockNumber, int lineNumber, int rowNumberInChunk); - void setRightLineNumber(int blockNumber, int lineNumber, int rowNumberInChunk); - void setFileInfo(int blockNumber, const DiffFileInfo &leftInfo, const DiffFileInfo &rightInfo); - void setChunkIndex(int startBlockNumber, int blockCount, int chunkIndex); - QString showChunk(const DiffEditorInput &input, const ChunkData &chunkData, bool lastChunk, - int *blockNumber, int *charNumber, - QMap> *selections); + DiffSelections selections; }; class UnifiedDiffEditorWidget final : public SelectableTextEditorWidget @@ -67,6 +66,7 @@ class UnifiedDiffEditorWidget final : public SelectableTextEditorWidget Q_OBJECT public: UnifiedDiffEditorWidget(QWidget *parent = nullptr); + ~UnifiedDiffEditorWidget(); void setDocument(DiffEditorDocument *document); DiffEditorDocument *diffDocument() const; @@ -79,7 +79,7 @@ public: using TextEditor::TextEditorWidget::restoreState; void restoreState(); - void clear(const QString &message = QString()); + void clear(const QString &message = {}); void setDisplaySettings(const TextEditor::DisplaySettings &ds) override; signals: @@ -94,22 +94,24 @@ protected: private: void setFontSettings(const TextEditor::FontSettings &fontSettings); - void slotCursorPositionChangedInEditor(); - void showDiff(); - int blockNumberForFileIndex(int fileIndex) const; - int fileIndexForBlockNumber(int blockNumber) const; - int chunkIndexForBlockNumber(int blockNumber) const; void jumpToOriginalFile(const QTextCursor &cursor); - void addContextMenuActions(QMenu *menu, - int fileIndex, - int chunkIndex, + void addContextMenuActions(QMenu *menu, int fileIndex, int chunkIndex, const ChunkSelection &selection); UnifiedDiffData m_data; DiffEditorWidgetController m_controller; QByteArray m_state; + + struct ShowResult + { + QSharedPointer textDocument; + UnifiedDiffData diffData; + DiffSelections selections; + }; + + std::unique_ptr> m_watcher; }; } // namespace Internal diff --git a/src/plugins/docker/dockerdevice.cpp b/src/plugins/docker/dockerdevice.cpp index 6f839fc9594..a28147c688c 100644 --- a/src/plugins/docker/dockerdevice.cpp +++ b/src/plugins/docker/dockerdevice.cpp @@ -146,7 +146,7 @@ public: Environment environment(); - CommandLine withDockerExecCmd(const CommandLine &cmd, bool interactive = false) const; + CommandLine withDockerExecCmd(const CommandLine &cmd, bool interactive = false); bool prepareForBuild(const Target *target); @@ -400,11 +400,13 @@ void DockerDevice::updateContainerAccess() const d->updateContainerAccess(); } -CommandLine DockerDevicePrivate::withDockerExecCmd(const CommandLine &cmd, bool interactive) const +CommandLine DockerDevicePrivate::withDockerExecCmd(const CommandLine &cmd, bool interactive) { if (!m_settings) return {}; + updateContainerAccess(); + QStringList args; args << "exec"; diff --git a/src/plugins/genericprojectmanager/genericprojectplugin.cpp b/src/plugins/genericprojectmanager/genericprojectplugin.cpp index 4ca27ff8472..b50a1826c3d 100644 --- a/src/plugins/genericprojectmanager/genericprojectplugin.cpp +++ b/src/plugins/genericprojectmanager/genericprojectplugin.cpp @@ -63,7 +63,7 @@ GenericProjectPluginPrivate::GenericProjectPluginPrivate() { ProjectManager::registerProjectType(Constants::GENERICMIMETYPE); - IWizardFactory::registerFactoryCreator([] { return QList{new GenericProjectWizard}; }); + IWizardFactory::registerFactoryCreator([] { return new GenericProjectWizard; }); ActionContainer *mproject = ActionManager::actionContainer(PEC::M_PROJECTCONTEXT); diff --git a/src/plugins/git/gitclient.cpp b/src/plugins/git/gitclient.cpp index 7e4ceee5124..d018c2b60bc 100644 --- a/src/plugins/git/gitclient.cpp +++ b/src/plugins/git/gitclient.cpp @@ -42,8 +42,6 @@ #include #include -#include -#include #include #include diff --git a/src/plugins/git/giteditor.cpp b/src/plugins/git/giteditor.cpp index d3f5264acef..305d4f1198c 100644 --- a/src/plugins/git/giteditor.cpp +++ b/src/plugins/git/giteditor.cpp @@ -4,10 +4,8 @@ #include "giteditor.h" #include "annotationhighlighter.h" -#include "branchadddialog.h" #include "gitclient.h" #include "gitsettings.h" -#include "gitsubmiteditorwidget.h" #include "gitconstants.h" #include "githighlighters.h" @@ -32,6 +30,7 @@ #define CHANGE_PATTERN "[a-f0-9]{7,40}" +using namespace Core; using namespace Utils; using namespace VcsBase; @@ -214,7 +213,7 @@ void GitEditorWidget::setPlainText(const QString &text) textDocument()->setPlainText(modText); } -void GitEditorWidget::applyDiffChunk(const DiffChunk& chunk, bool revert) +void GitEditorWidget::applyDiffChunk(const DiffChunk& chunk, PatchAction patchAction) { Utils::TemporaryFile patchFile("git-apply-chunk"); if (!patchFile.open()) @@ -226,7 +225,7 @@ void GitEditorWidget::applyDiffChunk(const DiffChunk& chunk, bool revert) patchFile.close(); QStringList args = {"--cached"}; - if (revert) + if (patchAction == PatchAction::Revert) args << "--reverse"; QString errorMessage; if (GitClient::instance()->synchronousApplyPatch(baseDir, patchFile.fileName(), &errorMessage, args)) { @@ -234,10 +233,8 @@ void GitEditorWidget::applyDiffChunk(const DiffChunk& chunk, bool revert) VcsOutputWindow::append(tr("Chunk successfully staged")); else VcsOutputWindow::append(errorMessage); - if (revert) - emit diffChunkReverted(chunk); - else - emit diffChunkApplied(chunk); + if (patchAction == PatchAction::Revert) + emit diffChunkReverted(); } else { VcsOutputWindow::appendError(errorMessage); } @@ -264,12 +261,12 @@ void GitEditorWidget::addDiffActions(QMenu *menu, const DiffChunk &chunk) QAction *stageAction = menu->addAction(tr("Stage Chunk...")); connect(stageAction, &QAction::triggered, this, [this, chunk] { - applyDiffChunk(chunk, false); + applyDiffChunk(chunk, PatchAction::Apply); }); QAction *unstageAction = menu->addAction(tr("Unstage Chunk...")); connect(unstageAction, &QAction::triggered, this, [this, chunk] { - applyDiffChunk(chunk, true); + applyDiffChunk(chunk, PatchAction::Revert); }); } diff --git a/src/plugins/git/giteditor.h b/src/plugins/git/giteditor.h index b56e2398641..8c92a6da659 100644 --- a/src/plugins/git/giteditor.h +++ b/src/plugins/git/giteditor.h @@ -37,7 +37,7 @@ signals: void toggleFilters(bool value); private: - void applyDiffChunk(const VcsBase::DiffChunk& chunk, bool revert); + void applyDiffChunk(const VcsBase::DiffChunk& chunk, Core::PatchAction patchAction); void init() override; void addDiffActions(QMenu *menu, const VcsBase::DiffChunk &chunk) override; diff --git a/src/plugins/help/CMakeLists.txt b/src/plugins/help/CMakeLists.txt index 05d2b81152a..41dac7e5622 100644 --- a/src/plugins/help/CMakeLists.txt +++ b/src/plugins/help/CMakeLists.txt @@ -17,6 +17,7 @@ add_qtc_plugin(Help helpviewer.cpp helpviewer.h helpwidget.cpp helpwidget.h localhelpmanager.cpp localhelpmanager.h + offline-dark.css openpagesmanager.cpp openpagesmanager.h openpagesswitcher.cpp openpagesswitcher.h openpageswidget.cpp openpageswidget.h diff --git a/src/plugins/help/help.qrc b/src/plugins/help/help.qrc index b00e06409b4..84b6776caaa 100644 --- a/src/plugins/help/help.qrc +++ b/src/plugins/help/help.qrc @@ -8,5 +8,6 @@ images/mode_help_mask@2x.png images/macos_touchbar_help.png images/macos_touchbar_help@2x.png + offline-dark.css diff --git a/src/plugins/help/litehtmlhelpviewer.cpp b/src/plugins/help/litehtmlhelpviewer.cpp index 0e8a9939017..f966c018f92 100644 --- a/src/plugins/help/litehtmlhelpviewer.cpp +++ b/src/plugins/help/litehtmlhelpviewer.cpp @@ -9,8 +9,10 @@ #include #include +#include #include +#include #include #include #include @@ -24,15 +26,55 @@ using namespace Help::Internal; const int kMaxHistoryItems = 20; -static QByteArray getData(const QUrl &url) +static void setLight(QWidget *widget) { - // TODO: this is just a hack for Qt documentation + QPalette p = widget->palette(); + p.setColor(QPalette::Base, Qt::white); + p.setColor(QPalette::Text, Qt::black); + widget->setPalette(p); +} + +static void setPaletteFromTheme(QWidget *widget) +{ + if (Utils::creatorTheme()) + widget->setPalette(Utils::creatorTheme()->palette()); +} + +static bool isDarkTheme() +{ + return Utils::creatorTheme() && Utils::creatorTheme()->flag(Utils::Theme::DarkUserInterface); +} + +static QByteArray getData(const QUrl &url, QWidget *widget) +{ + // This is a hack for Qt documentation, // which decides to use a simpler CSS if the viewer does not have JavaScript - // which was a hack to decide if we are viewing in QTextBrowser or QtWebEngine et al + // which was a hack to decide if we are viewing in QTextBrowser or QtWebEngine et al. + // Force it to use the "normal" offline CSS even without JavaScript, since litehtml can + // handle that, and inject a dark themed CSS into Qt documentation for dark Qt Creator themes QUrl actualUrl = url; QString path = url.path(QUrl::FullyEncoded); static const char simpleCss[] = "/offline-simple.css"; if (path.endsWith(simpleCss)) { + if (isDarkTheme()) { + // check if dark CSS is shipped with documentation + QString darkPath = path; + darkPath.replace(simpleCss, "/offline-dark.css"); + actualUrl.setPath(darkPath); + LocalHelpManager::HelpData data = LocalHelpManager::helpData(actualUrl); + if (!data.resolvedUrl.isValid() || data.data.isEmpty()) { + // fallback + QFile css(":/help/offline-dark.css"); + if (css.open(QIODevice::ReadOnly)) + data.data = css.readAll(); + } + if (!data.data.isEmpty()) { + // we found the dark style + // set background dark (by using theme palette) + setPaletteFromTheme(widget); + return data.data; + } + } path.replace(simpleCss, "/offline.css"); actualUrl.setPath(path); } @@ -44,7 +86,7 @@ LiteHtmlHelpViewer::LiteHtmlHelpViewer(QWidget *parent) : HelpViewer(parent) , m_viewer(new QLiteHtmlWidget) { - m_viewer->setResourceHandler([](const QUrl &url) { return getData(url); }); + m_viewer->setResourceHandler([this](const QUrl &url) { return getData(url, this); }); m_viewer->setFrameStyle(QFrame::NoFrame); m_viewer->viewport()->installEventFilter(this); connect(m_viewer, &QLiteHtmlWidget::linkClicked, this, [this](const QUrl &url) { @@ -113,6 +155,8 @@ void LiteHtmlHelpViewer::setSource(const QUrl &url) void LiteHtmlHelpViewer::setHtml(const QString &html) { + // We control the html, so use theme palette + setPaletteFromTheme(this); m_viewer->setUrl({"about:invalid"}); m_viewer->setHtml(html); } @@ -252,8 +296,12 @@ void LiteHtmlHelpViewer::setSourceInternal(const QUrl &url, std::optional v QUrl newUrlWithoutFragment = url; newUrlWithoutFragment.setFragment({}); m_viewer->setUrl(url); - if (currentUrlWithoutFragment != newUrlWithoutFragment) - m_viewer->setHtml(QString::fromUtf8(getData(url))); + if (currentUrlWithoutFragment != newUrlWithoutFragment) { + // We do not expect the documentation to support dark themes, so start with light palette. + // We override this if we find Qt's dark style + setLight(this); + m_viewer->setHtml(QString::fromUtf8(getData(url, this))); + } if (vscroll) m_viewer->verticalScrollBar()->setValue(*vscroll); else diff --git a/src/plugins/help/offline-dark.css b/src/plugins/help/offline-dark.css new file mode 100644 index 00000000000..559811b5295 --- /dev/null +++ b/src/plugins/help/offline-dark.css @@ -0,0 +1,770 @@ +body { + font: normal 400 14px/1.2 Arial; + margin-top: 50px; + font-family: Arial, Helvetica; + text-align: left; + margin-left: 5px; + margin-right: 5px; + background-color: #2E2F30; + color: #d0d0d0 +} + +p { + line-height: 20px +} + +img { + margin-left: 0px; + max-width: 800px; + height: auto; + filter: brightness(85%); +} + +.content .border img { + box-shadow:3px 3px 8px 3px rgba(200,200,200,0.5) +} + +.content .border .player { + box-shadow:3px 3px 8px 3px rgba(200,200,200,0.5) +} + +.content .indexboxcont li { + font: normal bold 13px/1 Verdana + } + +.content .normallist li { + font: normal 13px/1 Verdana + } + +.descr { + margin-top: 35px; + margin-bottom: 45px; + margin-left: 5px; + text-align: left; + vertical-align: top; +} + +.name { + max-width: 75%; + font-weight: 100; +} + +tt { + text-align: left +} + +/* +----------- +links +----------- +*/ + +a:link { + color: #9a9ef9; + text-decoration: none; + text-align: left; +} + +a.qa-mark:target:before { + content: "***"; + color: #ff0000; +} + +a:hover { + color: #9a9ef9; + text-decoration:underline; + text-align: left; +} + +a:visited { + color: #9a9ef9; + text-align: left; +} + +a:visited:hover { + color: #9a9ef9; + text-align: left; +} + +/* +----------- +offline viewing: HTML links display an icon +----------- +*/ + +a[href*="http://"]::before, +a[href*="ftp://"]::before, +a[href*="https://"]::before { + content: url(../images/ico_out.png); + padding-right: 5px; +} + +.video a { + background: none; +} + +.flags { + text-decoration: none; + text-height: 24px; +} + +.flags:target { + background-color: #FFFFD6; +} + +/* +------------------------------- +NOTE styles +------------------------------- +*/ +.admonition { + padding: 5px 0 5px 40px; + border: #404142 1px solid; +} + +.admonition.note, .admonition.important { + background: #353637 3px 6px no-repeat url(../images/ico_note.png); +} + +.admonition.warning { + background: #353637 3px 6px no-repeat url(../images/ico_note_attention.png); +} +/* +------------------------------- +Top navigation +------------------------------- +*/ + +.qtref { + display: block; + position: relative; + height: 15px; + z-index: 1; + font-size: 11px; + padding-right: 10px; + float: right; +} + +.naviNextPrevious { + clear: both; + display: block; + position: relative; + text-align: right; + top: -30px; + float: right; + height: 20px; + z-index: 1; + padding-right: 10px; + padding-top: 2px; + vertical-align: top; + margin: 0px; +} + +.naviNextPrevious > a:first-child { + background-image: url(../images/btn_prev.png); + background-repeat: no-repeat; + background-position: left; + padding-left: 20px; + height: 20px; + padding-left: 20px; + } + +.naviNextPrevious > a:last-child { + background-image: url(../images/btn_next.png); + background-repeat: no-repeat; + background-position: right; + padding-right: 20px; + height: 20px; + margin-left: 30px; + } + +.naviSeparator { display: none } +/* +----------- +footer and license +----------- +*/ + +.footer { + text-align: left; + padding-top: 45px; + padding-left: 5px; + margin-top: 45px; + margin-bottom: 45px; + font-size: 10px; + border-top: 1px solid #404142; +} + +.footer p { + line-height: 14px; + font-size: 11px; + padding: 0; + margin: 0; +} + +.footer a[href*="http://"], a[href*="ftp://"], a[href*="https://"] { + font-weight: bold; +} + +.footerNavi { + width: auto; + text-align: right; + margin-top: 50px; + z-index: 1; +} + +.navigationbar { + display: block; + position: relative; + border-top: 1px solid #404142; + border-bottom: 1px solid #404142; + background-color: #353637; + z-index: 1; + height: 20px; + padding-left: 7px; + margin: 0px; + padding-top: 2px; + margin-left: -5px; + margin-right: -5px; +} + +.navigationbar .first { + background: url(../images/home.png); + background-position: left; + background-repeat: no-repeat; + padding-left: 20px; + } + +.navigationbar ul { + margin: 0px; + padding: 0px; + } + + .navigationbar ul li { + list-style-type: none; + padding-top: 2px; + padding-left: 4px; + margin: 0; + height: 20px; + } + +.navigationbar li { + float: left + } + + .navigationbar li a, .navigationbar td a { + display: block; + text-decoration: none; + background: url(../images/arrow_bc.png); + background-repeat: no-repeat; + background-position: right; + padding-right: 17px; + } + +table.buildversion { + float: right; + margin-top: -18px !important; +} + +.navigationbar table { + border-radius: 0; + border: 0 none; + background-color: #F2F2F2; + margin: 0; +} + +.navigationbar table td { + padding: 0; + border: 0 none; +} + +#buildversion { + font-style: italic; + float: right; + margin-right: 5px; +} + +#buildversion a { + background: none; +} + +/* + +/* table of content +no display +*/ + +/* +----------- +headers +----------- +*/ + +@media screen { + .title { + color: #d0d0d0; + font-size: 20px; + font-weight: normal; + left: 0; + padding-bottom: 15px; + padding-left: 10px; + padding-top: 15px; + position: absolute; + right: 0; + top: 0; + background-color: #2E2F30; + border-bottom: 1px #404142 solid; + font-weight: bold; + margin-left: 0px; + margin-right: 0px; + } + .subtitle, .small-subtitle { + display: block; + clear: left; + } +} + +h1 { + margin: 0 +} + +h2, p.h2 { + font: 500 16px/1.2 Arial; + font-weight: 100; + background-color: #353637; + padding: 4px; + margin-bottom: 15px; + margin-top: 30px; + border-top: #404142 1px solid; + border-bottom: #404142 1px solid; + max-width: 99%; +} + +h2:target { + background-color: #F2F3D4; +} + +h3 { + font: 500 14px/1.2 Arial; + font-weight: 100; + text-decoration: underline; + margin-bottom: 15px; + margin-top: 30px; +} + +h3.fn, span.fn { + border-width: 1px; + border-style: solid; + border-color: #404142; + -moz-border-radius: 7px 7px 7px 7px; + -webkit-border-radius: 7px 7px 7px 7px; + border-radius: 7px 7px 7px 7px; + background-color: #353637; + word-spacing: 3px; + padding: 5px 5px; + text-decoration: none; + font-weight: bold; + max-width: 75%; + font-size: 14px; + margin: 0px; + margin-top: 30px; +} +.fngroup h3.fngroupitem { + margin-bottom: 5px; +} +h3.fn code { + float: right; +} +h3.fn:target { + background-color: #F6F6D6; +} + +.name { + color: #d0d0d0 +} + +.type { + color: #a4a6a8 +} + +/* +----------------- +table styles +----------------- +*/ + +.table img { + border: none; + margin-left: 0px; + -moz-box-shadow: 0px 0px 0px #2E2F30; + -webkit-box-shadow: 0px 0px 0px #2E2F30; + box-shadow: 0px 0px 0px #2E2F30; +} + +/* table with border alternative colors*/ + +table, pre, .LegaleseLeft { + -moz-border-radius: 7px 7px 7px 7px; + -webkit-border-radius: 7px 7px 7px 7px; + border-radius: 7px 7px 7px 7px; + background-color: #353637; + border: 1px solid #404142; + border-collapse: separate; + margin-bottom: 25px; + margin-left: 15px; + font-size: 12px; + line-height: 1.2; +} + + table tr.even { + background-color: #2E2F30; + color: #a4a6a8; + } + + table tr.odd { + background-color: #353637; + color: #a4a6a8; + } + + table tr:target { + background-color: #F6F6D6; + } + + table thead { + text-align: left; + padding-left: 20px; + background-color: #2E2F30; + border-left: none; + border-right: none; + } + + table thead th { + padding-top: 5px; + padding-left: 10px; + padding-bottom: 5px; + border-bottom: 2px solid #404142; + padding-right: 10px; + } + + table th { + text-align: left; + padding-left: 20px; + } + + table td { + padding: 3px 15px 3px 20px; + border-bottom: #404142 dotted 1px; + } + + table p { + margin: 0px + } + +.LegaleseLeft { + font-family: monospace; + white-space: pre-wrap; +} +/* table bodless & white*/ + +.borderless { + border-radius: 0px 0px 0px 0px; + background-color: #2E2F30; + border: 1px solid #2E2F30; +} + +.borderless tr { + background-color: #2E2F30; + color: #d0d0d0; + } + +.borderless td { + border: none; + border-bottom: #2E2F30 dotted 1px; + } + +/* +----------- +List +----------- +*/ + +ul { + margin-top: 10px; +} + +li { + margin-bottom: 10px; + padding-left: 8px; + list-style: outside; + text-align: left; +} + + ul > li { + list-style-type: square; + } + +ol { + margin: 10px; + padding: 0; +} + +ol.A > li { + list-style-type: upper-alpha; +} + +ol.a > li{ + list-style-type: lower-alpha; +} + +ol > li { + margin-left: 30px; + padding-left: 8px; + list-style-type: decimal; +} + +ol.A > li { + list-style-type: upper-alpha; +} + +ol.a > li { + list-style-type: lower-alpha; +} + +ol.i > li { + list-style-type: lower-roman; +} + +ol.I > li { + list-style-type: upper-roman; +} + +.centerAlign { + text-align: left +} + +.cpp, .LegaleseLeft { + display: block; + margin: 10px; + overflow: auto; + padding: 20px 20px 20px 20px; +} + +.js { + display: block; + margin: 10px; + overflow: auto; + padding: 20px 20px 20px 20px; +} + +.memItemLeft { + padding-right: 3px +} + +.memItemRight { + padding: 3px 15px 3px 0 +} + +.qml { + display: block; + margin: 10px; + overflow: auto; + padding: 20px 20px 20px 20px; +} + +.qmlextra { + padding-left: 5px; + float: right; + color: #254117; +} + +.rightAlign { + padding: 3px 5px 3px 10px; + text-align: right; +} + +.qmldoc { + margin-left: 15px +} + +.flowList { + padding: 25px +} +.flowList dd { + display: inline-block; + margin-left: 10px; + width: 255px; + line-height: 1.15em; + overflow-x: hidden; + text-overflow: ellipsis +} +.alphaChar { + font-size: 2em; + position: relative +} +/* +----------- +Content table +----------- +*/ + +@media screen { + .toc { + float: right; + clear: right; + vertical-align: top; + -moz-border-radius: 7px 7px 7px 7px; + -webkit-border-radius: 7px 7px 7px 7px; + border-radius: 7px 7px 7px 7px; + background: #353637; + background-position: top; + background-repeat: repeat-x; + border: 1px solid #404142; + padding-left: 5px; + padding-bottom: 10px; + height: auto; + width: 200px; + text-align: left; + margin-left: 20px; + margin-top: 5px; + } +} + + +.toc h3 { + text-decoration: none +} + +.toc h3 { + font: 500 14px/1.2 Arial; + font-weight: 100; + padding: 0px; + margin: 0px; + padding-top: 5px; + padding-left: 5px; +} + +.toc ul { + padding-left: 10px; + padding-right: 5px; +} + +.toc ul li { + margin-left: 15px; + marker-offset: 0px; + margin-bottom: 8px; + padding-left: 0px; + } + +.toc .level1 { + border: none +} + +.toc .level2 { + border: none; + margin-left: 25px; +} + +.level3 { + border: none; + margin-left: 30px; +} + +.clearfix { + clear: both +} + +/* +----------- +Landing page +----------- +*/ + +.col-group { + white-space: nowrap; + vertical-align: top; +} + + +.landing h2 { + background-color: transparent; + border: none; + margin-bottom: 0px; + font-size: 18px; +} + +.landing a, .landing li { + font-size: 13px; + font-weight: bold !important; +} + +.col-1 { + display: inline-block; + white-space: normal; + width: 70%; + height: 100%; + float: left; +} + +.col-2 { + display: inline-block; + white-space: normal; + width: 20%; + margin-left: 5%; + position: relative; + top: -20px; +} + +.col-1 h1 { + margin: 20px 0 0 0; + } + +.col-1 h2 { + font-size: 18px; + font-weight: bold !important; +} + +.landingicons { + display: inline-block; + width: 100%; +} + +.icons1of3 { + display: inline-block; + width: 33.3333%; + float: left; +} + +.icons1of3 h2, .doc-column h2 { + font-size: 15px; + margin: 0px; + padding: 0px; +} + +div.multi-column { + position: relative; +} + +div.multi-column div { + display: -moz-inline-box; + display: inline-block; + vertical-align: top; + margin-top: 1em; + margin-right: 4em; + width: 24em; +} + +.mainContent .video { + width:40%; + max-width:640px; + margin: 15px 0 0 15px; + position:relative; + display:table +} + +.mainContent .video iframe { + width:100%; + height:100%; + position:absolute; + top:0; + left:0 +} diff --git a/src/plugins/languageclient/languageclientformatter.cpp b/src/plugins/languageclient/languageclientformatter.cpp index 774b0899dee..f67302aa0e7 100644 --- a/src/plugins/languageclient/languageclientformatter.cpp +++ b/src/plugins/languageclient/languageclientformatter.cpp @@ -49,6 +49,7 @@ static const FormattingOptions formattingOptions(const TextEditor::TabSettings & QFutureWatcher *LanguageClientFormatter::format( const QTextCursor &cursor, const TextEditor::TabSettings &tabSettings) { + QTC_ASSERT(m_client, return nullptr); cancelCurrentRequest(); m_progress = QFutureInterface(); @@ -101,7 +102,7 @@ QFutureWatcher *LanguageClientFormatter::format( void LanguageClientFormatter::cancelCurrentRequest() { - if (m_currentRequest.has_value()) { + if (QTC_GUARD(m_client) && m_currentRequest.has_value()) { m_progress.reportCanceled(); m_progress.reportFinished(); m_client->cancelRequest(*m_currentRequest); @@ -113,8 +114,8 @@ void LanguageClientFormatter::cancelCurrentRequest() void LanguageClientFormatter::handleResponse(const DocumentRangeFormattingRequest::Response &response) { m_currentRequest = std::nullopt; - if (const std::optional &error = response - .error()) + const std::optional &error = response.error(); + if (QTC_GUARD(m_client) && error) m_client->log(*error); ChangeSet changeSet; if (std::optional> result = response.result()) { diff --git a/src/plugins/languageclient/languageclientformatter.h b/src/plugins/languageclient/languageclientformatter.h index e61e749d27b..1ddee2892ba 100644 --- a/src/plugins/languageclient/languageclientformatter.h +++ b/src/plugins/languageclient/languageclientformatter.h @@ -7,6 +7,8 @@ #include +#include + namespace TextEditor { class TextDocument; } namespace LanguageClient { @@ -26,7 +28,7 @@ private: void handleResponse( const LanguageServerProtocol::DocumentRangeFormattingRequest::Response &response); - Client *m_client = nullptr; // not owned + QPointer m_client = nullptr; // not owned QMetaObject::Connection m_cancelConnection; TextEditor::TextDocument *m_document; // not owned bool m_ignoreCancel = false; diff --git a/src/plugins/languageclient/languageclientsymbolsupport.cpp b/src/plugins/languageclient/languageclientsymbolsupport.cpp index c9f4ce6929c..75e552e4684 100644 --- a/src/plugins/languageclient/languageclientsymbolsupport.cpp +++ b/src/plugins/languageclient/languageclientsymbolsupport.cpp @@ -401,8 +401,11 @@ void SymbolSupport::handleRenameResponse(Core::SearchResult *search, const RenameRequest::Response &response) { const std::optional &error = response.error(); - if (error.has_value()) + QString errorMessage; + if (error.has_value()) { m_client->log(*error); + errorMessage = error->toString(); + } const std::optional &edits = response.result(); if (edits.has_value()) { @@ -412,7 +415,7 @@ void SymbolSupport::handleRenameResponse(Core::SearchResult *search, search->setSearchAgainEnabled(false); search->finishSearch(false); } else { - search->finishSearch(error.has_value()); + search->finishSearch(error.has_value(), errorMessage); } } diff --git a/src/plugins/projectexplorer/customwizard/customwizard.cpp b/src/plugins/projectexplorer/customwizard/customwizard.cpp index d929ad8266b..f55755bb9e9 100644 --- a/src/plugins/projectexplorer/customwizard/customwizard.cpp +++ b/src/plugins/projectexplorer/customwizard/customwizard.cpp @@ -365,7 +365,7 @@ CustomWizard *CustomWizard::createWizard(const CustomProjectWizard::CustomWizard containing valid configuration files and parse them into wizards. */ -QList CustomWizard::createWizards() +void CustomWizard::createWizards() { QString errorMessage; QString verboseLog; @@ -379,7 +379,7 @@ QList CustomWizard::createWizards() if (!templateDir.exists()) { if (CustomWizardPrivate::verbose) qWarning("Custom project template path %s does not exist.", qPrintable(templateDir.absolutePath())); - return {}; + return; } const QDir userTemplateDir(userTemplateDirName); @@ -411,8 +411,9 @@ QList CustomWizard::createWizards() switch (parameters->parse(dir.absoluteFilePath(configFile), &errorMessage)) { case CustomWizardParameters::ParseOk: if (!Utils::contains(toCreate, [parameters](CustomWizardParametersPtr p) { return parameters->id == p->id; })) { - parameters->directory = dir.absolutePath(); toCreate.append(parameters); + parameters->directory = dir.absolutePath(); + IWizardFactory::registerFactoryCreator([parameters] { return createWizard(parameters); }); } else { verboseLog += QString::fromLatin1("Customwizard: Ignoring wizard in %1 due to duplicate Id %2.\n") .arg(dir.absolutePath()).arg(parameters->id.toString()); @@ -438,23 +439,6 @@ QList CustomWizard::createWizards() } } } - - QList rc; - for (CustomWizardParametersPtr p : qAsConst(toCreate)) { - if (CustomWizard *w = createWizard(p)) { - rc.push_back(w); - } else { - qWarning("Custom wizard factory function failed for %s from %s.", - qPrintable(p->id.toString()), qPrintable(p->directory)); - } - } - - - if (CustomWizardPrivate::verbose) { // Print to output pane for Windows. - qWarning("%s", qPrintable(verboseLog)); - MessageManager::writeDisrupting(verboseLog); - } - return rc; } /*! diff --git a/src/plugins/projectexplorer/customwizard/customwizard.h b/src/plugins/projectexplorer/customwizard/customwizard.h index 64078d92b4e..69f1fa19951 100644 --- a/src/plugins/projectexplorer/customwizard/customwizard.h +++ b/src/plugins/projectexplorer/customwizard/customwizard.h @@ -73,7 +73,7 @@ public: // Create all wizards. As other plugins might register factories for derived // classes, call it in extensionsInitialized(). - static QList createWizards(); + static void createWizards(); static void setVerbose(int); static int verbose(); diff --git a/src/plugins/projectexplorer/jsonwizard/jsonwizardfactory.cpp b/src/plugins/projectexplorer/jsonwizard/jsonwizardfactory.cpp index aa5c6003152..54d0323accf 100644 --- a/src/plugins/projectexplorer/jsonwizard/jsonwizardfactory.cpp +++ b/src/plugins/projectexplorer/jsonwizard/jsonwizardfactory.cpp @@ -377,13 +377,12 @@ JsonWizardFactory::Page JsonWizardFactory::parsePage(const QVariant &value, QStr //FIXME: loadDefaultValues() has an almost identical loop. Make the loop return the results instead of //internal processing and create a separate function for it. Then process the results in //loadDefaultValues() and loadDefaultValues() -QList JsonWizardFactory::createWizardFactories() +void JsonWizardFactory::createWizardFactories() { QString errorMessage; QString verboseLog; const QString wizardFileName = QLatin1String(WIZARD_FILE); - QList result; const Utils::FilePaths paths = searchPaths(); for (const Utils::FilePath &path : paths) { if (path.isEmpty()) @@ -449,13 +448,10 @@ QList JsonWizardFactory::createWizardFactories() continue; } - JsonWizardFactory *factory = createWizardFactory(data, currentDir, &errorMessage); - if (!factory) { - verboseLog.append(tr("* Failed to create: %1\n").arg(errorMessage)); - continue; - } - - result << factory; + IWizardFactory::registerFactoryCreator([data, currentDir] { + QString errorMessage; + return createWizardFactory(data, currentDir, &errorMessage); + }); } else { FilePaths subDirs = currentDir.dirEntries(filter, sortflags); if (!subDirs.isEmpty()) { @@ -474,7 +470,6 @@ QList JsonWizardFactory::createWizardFactories() Core::MessageManager::writeDisrupting(verboseLog); } - return result; } JsonWizardFactory *JsonWizardFactory::createWizardFactory(const QVariantMap &data, @@ -485,6 +480,7 @@ JsonWizardFactory *JsonWizardFactory::createWizardFactory(const QVariantMap &dat if (!factory->initialize(data, baseDir, errorMessage)) { delete factory; factory = nullptr; + Core::MessageManager::writeDisrupting(*errorMessage); } return factory; } diff --git a/src/plugins/projectexplorer/jsonwizard/jsonwizardfactory.h b/src/plugins/projectexplorer/jsonwizard/jsonwizardfactory.h index 1902bc8ceb4..febfd3e3a13 100644 --- a/src/plugins/projectexplorer/jsonwizard/jsonwizardfactory.h +++ b/src/plugins/projectexplorer/jsonwizard/jsonwizardfactory.h @@ -69,7 +69,7 @@ private: // Create all wizards. As other plugins might register factories for derived // classes. Called when the new file dialog is shown for the first time. - static QList createWizardFactories(); + static void createWizardFactories(); static JsonWizardFactory *createWizardFactory(const QVariantMap &data, const Utils::FilePath &baseDir, QString *errorMessage); diff --git a/src/plugins/projectexplorer/projectexplorer.cpp b/src/plugins/projectexplorer/projectexplorer.cpp index c4704bd7c4a..030e92da3cf 100644 --- a/src/plugins/projectexplorer/projectexplorer.cpp +++ b/src/plugins/projectexplorer/projectexplorer.cpp @@ -833,13 +833,9 @@ bool ProjectExplorerPlugin::initialize(const QStringList &arguments, QString *er IWizardFactory::registerFeatureProvider(new KitFeatureProvider); - IWizardFactory::registerFactoryCreator([]() -> QList { - QList result; - result << CustomWizard::createWizards(); - result << JsonWizardFactory::createWizardFactories(); - result << new SimpleProjectWizard; - return result; - }); + IWizardFactory::registerFactoryCreator([] { return new SimpleProjectWizard; }); + CustomWizard::createWizards(); + JsonWizardFactory::createWizardFactories(); connect(&dd->m_welcomePage, &ProjectWelcomePage::manageSessions, dd, &ProjectExplorerPluginPrivate::showSessionManager); diff --git a/src/plugins/qbsprojectmanager/qbsproject.cpp b/src/plugins/qbsprojectmanager/qbsproject.cpp index 979d5efed6f..60fe82b56e5 100644 --- a/src/plugins/qbsprojectmanager/qbsproject.cpp +++ b/src/plugins/qbsprojectmanager/qbsproject.cpp @@ -616,7 +616,7 @@ void QbsBuildSystem::parseCurrentBuildConfiguration() ->expand(QbsSettings::defaultInstallDirTemplate())); } Environment env = m_buildConfiguration->environment(); - QString dir = m_buildConfiguration->buildDirectory().toString(); + FilePath dir = m_buildConfiguration->buildDirectory(); m_guard = guardParsingRun(); diff --git a/src/plugins/qbsprojectmanager/qbsprojectparser.cpp b/src/plugins/qbsprojectmanager/qbsprojectparser.cpp index 5e8886713a1..2ab317c13ff 100644 --- a/src/plugins/qbsprojectmanager/qbsprojectparser.cpp +++ b/src/plugins/qbsprojectmanager/qbsprojectparser.cpp @@ -16,15 +16,14 @@ using namespace Utils; -namespace QbsProjectManager { -namespace Internal { +namespace QbsProjectManager::Internal { // -------------------------------------------------------------------- // QbsProjectParser: // -------------------------------------------------------------------- QbsProjectParser::QbsProjectParser(QbsBuildSystem *buildSystem, QFutureInterface *fi) - : m_projectFilePath(buildSystem->project()->projectFilePath().toString()), + : m_projectFilePath(buildSystem->project()->projectFilePath()), m_session(buildSystem->session()), m_fi(fi) { @@ -40,8 +39,8 @@ QbsProjectParser::~QbsProjectParser() m_fi = nullptr; // we do not own m_fi, do not delete } -void QbsProjectParser::parse(const QVariantMap &config, const Environment &env, const QString &dir, - const QString &configName) +void QbsProjectParser::parse(const QVariantMap &config, const Environment &env, + const FilePath &dir, const QString &configName) { QTC_ASSERT(m_session, return); QTC_ASSERT(!dir.isEmpty(), return); @@ -61,10 +60,10 @@ void QbsProjectParser::parse(const QVariantMap &config, const Environment &env, // People don't like it when files are created as a side effect of opening a project, // so do not store the build graph if the build directory does not exist yet. - request.insert("dry-run", !QFileInfo::exists(dir)); + request.insert("dry-run", !dir.exists()); - request.insert("build-root", dir); - request.insert("project-file-path", m_projectFilePath); + request.insert("build-root", dir.path()); + request.insert("project-file-path", m_projectFilePath.path()); request.insert("override-build-graph-data", true); static const auto envToJson = [](const Environment &env) { QJsonObject envObj; @@ -108,5 +107,4 @@ void QbsProjectParser::cancel() m_session->cancelCurrentJob(); } -} // namespace Internal -} // namespace QbsProjectManager +} // QbsProjectManager::Internal diff --git a/src/plugins/qbsprojectmanager/qbsprojectparser.h b/src/plugins/qbsprojectmanager/qbsprojectparser.h index 531324a9fa3..568e663e13b 100644 --- a/src/plugins/qbsprojectmanager/qbsprojectparser.h +++ b/src/plugins/qbsprojectmanager/qbsprojectparser.h @@ -11,8 +11,7 @@ #include #include -namespace QbsProjectManager { -namespace Internal { +namespace QbsProjectManager::Internal { class QbsBuildSystem; @@ -24,7 +23,9 @@ public: QbsProjectParser(QbsBuildSystem *buildSystem, QFutureInterface *fi); ~QbsProjectParser() override; - void parse(const QVariantMap &config, const Utils::Environment &env, const QString &dir, + void parse(const QVariantMap &config, + const Utils::Environment &env, + const Utils::FilePath &dir, const QString &configName); void cancel(); Utils::Environment environment() const { return m_environment; } @@ -38,7 +39,7 @@ signals: private: Utils::Environment m_environment; - const QString m_projectFilePath; + const Utils::FilePath m_projectFilePath; QbsSession * const m_session; ErrorInfo m_error; QJsonObject m_projectData; @@ -46,5 +47,4 @@ private: QFutureInterface *m_fi = nullptr; }; -} // namespace Internal -} // namespace QbsProjectManager +} // QbsProjectManager::Internal diff --git a/src/plugins/qmakeprojectmanager/addlibrarywizard.cpp b/src/plugins/qmakeprojectmanager/addlibrarywizard.cpp index 1f1581fb5bf..2f265582b20 100644 --- a/src/plugins/qmakeprojectmanager/addlibrarywizard.cpp +++ b/src/plugins/qmakeprojectmanager/addlibrarywizard.cpp @@ -4,6 +4,7 @@ #include "addlibrarywizard.h" #include "librarydetailscontroller.h" +#include "qmakeprojectmanagertr.h" #include #include @@ -65,7 +66,7 @@ static bool validateLibraryPath(const Utils::FilePath &filePath, AddLibraryWizard::AddLibraryWizard(const Utils::FilePath &proFile, QWidget *parent) : Utils::Wizard(parent), m_proFile(proFile) { - setWindowTitle(tr("Add Library")); + setWindowTitle(Tr::tr("Add Library")); m_libraryTypePage = new LibraryTypePage(this); addPage(m_libraryTypePage); m_detailsPage = new DetailsPage(this); @@ -96,51 +97,51 @@ QString AddLibraryWizard::snippet() const LibraryTypePage::LibraryTypePage(AddLibraryWizard *parent) : QWizardPage(parent) { - setTitle(tr("Library Type")); - setSubTitle(tr("Choose the type of the library to link to")); + setTitle(Tr::tr("Library Type")); + setSubTitle(Tr::tr("Choose the type of the library to link to")); auto *layout = new QVBoxLayout(this); - m_internalRadio = new QRadioButton(tr("Internal library"), this); + m_internalRadio = new QRadioButton(Tr::tr("Internal library"), this); layout->addWidget(m_internalRadio); - QLabel *internalLabel = new QLabel(tr("Links to a library " - "that is located in your build " - "tree.\nAdds the library and " - "include paths to the .pro file.")); + QLabel *internalLabel = new QLabel(Tr::tr("Links to a library " + "that is located in your build " + "tree.\nAdds the library and " + "include paths to the .pro file.")); internalLabel->setWordWrap(true); internalLabel->setAttribute(Qt::WA_MacSmallSize, true); layout->addWidget(internalLabel); - m_externalRadio = new QRadioButton(tr("External library"), this); + m_externalRadio = new QRadioButton(Tr::tr("External library"), this); layout->addWidget(m_externalRadio); - QLabel *externalLabel = new QLabel(tr("Links to a library " - "that is not located in your " - "build tree.\nAdds the library " - "and include paths to the .pro file.")); + QLabel *externalLabel = new QLabel(Tr::tr("Links to a library " + "that is not located in your " + "build tree.\nAdds the library " + "and include paths to the .pro file.")); externalLabel->setWordWrap(true); externalLabel->setAttribute(Qt::WA_MacSmallSize, true); layout->addWidget(externalLabel); - m_systemRadio = new QRadioButton(tr("System library"), this); + m_systemRadio = new QRadioButton(Tr::tr("System library"), this); layout->addWidget(m_systemRadio); - QLabel *systemLabel = new QLabel(tr("Links to a system library." - "\nNeither the path to the " - "library nor the path to its " - "includes is added to the .pro file.")); + QLabel *systemLabel = new QLabel(Tr::tr("Links to a system library." + "\nNeither the path to the " + "library nor the path to its " + "includes is added to the .pro file.")); systemLabel->setWordWrap(true); systemLabel->setAttribute(Qt::WA_MacSmallSize, true); layout->addWidget(systemLabel); - m_packageRadio = new QRadioButton(tr("System package"), this); + m_packageRadio = new QRadioButton(Tr::tr("System package"), this); layout->addWidget(m_packageRadio); - QLabel *packageLabel = new QLabel(tr("Links to a system library using pkg-config.")); + QLabel *packageLabel = new QLabel(Tr::tr("Links to a system library using pkg-config.")); packageLabel->setWordWrap(true); packageLabel->setAttribute(Qt::WA_MacSmallSize, true); @@ -154,7 +155,7 @@ LibraryTypePage::LibraryTypePage(AddLibraryWizard *parent) // select the default m_internalRadio->setChecked(true); - setProperty(Utils::SHORT_TITLE_PROPERTY, tr("Type")); + setProperty(Utils::SHORT_TITLE_PROPERTY, Tr::tr("Type")); } AddLibraryWizard::LibraryKind LibraryTypePage::libraryKind() const @@ -185,7 +186,7 @@ DetailsPage::DetailsPage(AddLibraryWizard *parent) libPathChooser, errorMessage); }; libPathChooser->setValidationFunction(pathValidator); - setProperty(Utils::SHORT_TITLE_PROPERTY, tr("Details")); + setProperty(Utils::SHORT_TITLE_PROPERTY, Tr::tr("Details")); } bool DetailsPage::isComplete() const @@ -212,26 +213,26 @@ void DetailsPage::initializePage() QString subTitle; switch (m_libraryWizard->libraryKind()) { case AddLibraryWizard::InternalLibrary: - title = tr("Internal Library"); - subTitle = tr("Choose the project file of the library to link to"); + title = Tr::tr("Internal Library"); + subTitle = Tr::tr("Choose the project file of the library to link to"); m_libraryDetailsController = new InternalLibraryDetailsController( m_libraryDetailsWidget, m_libraryWizard->proFile(), this); break; case AddLibraryWizard::ExternalLibrary: - title = tr("External Library"); - subTitle = tr("Specify the library to link to and the includes path"); + title = Tr::tr("External Library"); + subTitle = Tr::tr("Specify the library to link to and the includes path"); m_libraryDetailsController = new ExternalLibraryDetailsController( m_libraryDetailsWidget, m_libraryWizard->proFile(), this); break; case AddLibraryWizard::SystemLibrary: - title = tr("System Library"); - subTitle = tr("Specify the library to link to"); + title = Tr::tr("System Library"); + subTitle = Tr::tr("Specify the library to link to"); m_libraryDetailsController = new SystemLibraryDetailsController( m_libraryDetailsWidget, m_libraryWizard->proFile(), this); break; case AddLibraryWizard::PackageLibrary: - title = tr("System Package"); - subTitle = tr("Specify the package to link to"); + title = Tr::tr("System Package"); + subTitle = Tr::tr("Specify the package to link to"); m_libraryDetailsController = new PackageLibraryDetailsController( m_libraryDetailsWidget, m_libraryWizard->proFile(), this); break; @@ -251,7 +252,7 @@ void DetailsPage::initializePage() SummaryPage::SummaryPage(AddLibraryWizard *parent) : QWizardPage(parent), m_libraryWizard(parent) { - setTitle(tr("Summary")); + setTitle(Tr::tr("Summary")); setFinalPage(true); auto *layout = new QVBoxLayout(this); @@ -271,14 +272,14 @@ SummaryPage::SummaryPage(AddLibraryWizard *parent) m_snippetLabel->setTextFormat(Qt::RichText); m_snippetLabel->setTextInteractionFlags(Qt::TextBrowserInteraction); - setProperty(Utils::SHORT_TITLE_PROPERTY, tr("Summary")); + setProperty(Utils::SHORT_TITLE_PROPERTY, Tr::tr("Summary")); } void SummaryPage::initializePage() { m_snippet = m_libraryWizard->snippet(); m_summaryLabel->setText( - tr("The following snippet will be added to the
%1 file:") + Tr::tr("The following snippet will be added to the
%1 file:") .arg(m_libraryWizard->proFile().fileName())); QString richSnippet; { @@ -312,40 +313,40 @@ LibraryDetailsWidget::LibraryDetailsWidget(QWidget *parent) libraryTypeComboBox = new QComboBox(parent); - platformGroupBox = new QGroupBox(tr("Platform:")); + platformGroupBox = new QGroupBox(Tr::tr("Platform:")); platformGroupBox->setFlat(true); - linkageGroupBox = new QGroupBox(tr("Linkage:")); + linkageGroupBox = new QGroupBox(Tr::tr("Linkage:")); linkageGroupBox->setFlat(true); - macGroupBox = new QGroupBox(tr("Mac:")); + macGroupBox = new QGroupBox(Tr::tr("Mac:")); macGroupBox->setFlat(true); - winGroupBox = new QGroupBox(tr("Windows:")); + winGroupBox = new QGroupBox(Tr::tr("Windows:")); winGroupBox->setFlat(true); - linCheckBox = new QCheckBox(tr("Linux")); + linCheckBox = new QCheckBox(Tr::tr("Linux")); linCheckBox->setChecked(true); - macCheckBox = new QCheckBox(tr("Mac")); + macCheckBox = new QCheckBox(Tr::tr("Mac")); macCheckBox->setChecked(true); - winCheckBox = new QCheckBox(tr("Windows")); + winCheckBox = new QCheckBox(Tr::tr("Windows")); winCheckBox->setChecked(true); - dynamicRadio = new QRadioButton(tr("Dynamic"), linkageGroupBox); - staticRadio = new QRadioButton(tr("Static"), linkageGroupBox); + dynamicRadio = new QRadioButton(Tr::tr("Dynamic"), linkageGroupBox); + staticRadio = new QRadioButton(Tr::tr("Static"), linkageGroupBox); - libraryRadio = new QRadioButton(tr("Library"), macGroupBox); - frameworkRadio = new QRadioButton(tr("Framework"), macGroupBox); + libraryRadio = new QRadioButton(Tr::tr("Library"), macGroupBox); + frameworkRadio = new QRadioButton(Tr::tr("Framework"), macGroupBox); - useSubfoldersCheckBox = new QCheckBox(tr("Library inside \"debug\" or \"release\" subfolder"), + useSubfoldersCheckBox = new QCheckBox(Tr::tr("Library inside \"debug\" or \"release\" subfolder"), winGroupBox); useSubfoldersCheckBox->setChecked(true); - addSuffixCheckBox = new QCheckBox(tr("Add \"d\" suffix for debug version"), winGroupBox); - removeSuffixCheckBox = new QCheckBox(tr("Remove \"d\" suffix for release version"), winGroupBox); + addSuffixCheckBox = new QCheckBox(Tr::tr("Add \"d\" suffix for debug version"), winGroupBox); + removeSuffixCheckBox = new QCheckBox(Tr::tr("Remove \"d\" suffix for release version"), winGroupBox); using namespace Utils::Layouting; @@ -357,11 +358,11 @@ LibraryDetailsWidget::LibraryDetailsWidget(QWidget *parent) Column { useSubfoldersCheckBox, addSuffixCheckBox, removeSuffixCheckBox }.attachTo(winGroupBox); - libraryLabel = new QLabel(tr("Library:")); - libraryFileLabel = new QLabel(tr("Library file:")); - libraryTypeLabel = new QLabel(tr("Library type:")); - packageLabel = new QLabel(tr("Package:")); - includeLabel = new QLabel(tr("Include path:")); + libraryLabel = new QLabel(Tr::tr("Library:")); + libraryFileLabel = new QLabel(Tr::tr("Library file:")); + libraryTypeLabel = new QLabel(Tr::tr("Library type:")); + packageLabel = new QLabel(Tr::tr("Package:")); + includeLabel = new QLabel(Tr::tr("Include path:")); Column { Form { diff --git a/src/plugins/qmakeprojectmanager/addlibrarywizard.h b/src/plugins/qmakeprojectmanager/addlibrarywizard.h index ef08c43f4ff..7ea24acf185 100644 --- a/src/plugins/qmakeprojectmanager/addlibrarywizard.h +++ b/src/plugins/qmakeprojectmanager/addlibrarywizard.h @@ -27,8 +27,6 @@ class SummaryPage; class LibraryDetailsWidget { - Q_DECLARE_TR_FUNCTIONS(QmakeProjectManager::Internal::LibraryDetailsWidget) - public: explicit LibraryDetailsWidget(QWidget *parent); diff --git a/src/plugins/qmakeprojectmanager/customwidgetwizard/classdefinition.cpp b/src/plugins/qmakeprojectmanager/customwidgetwizard/classdefinition.cpp index 29e0ee3ee2a..9d62b28c4e3 100644 --- a/src/plugins/qmakeprojectmanager/customwidgetwizard/classdefinition.cpp +++ b/src/plugins/qmakeprojectmanager/customwidgetwizard/classdefinition.cpp @@ -2,6 +2,7 @@ // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0+ OR GPL-3.0 WITH Qt-GPL-exception-1.0 #include "classdefinition.h" +#include "../qmakeprojectmanagertr.h" #include #include @@ -24,18 +25,18 @@ ClassDefinition::ClassDefinition(QWidget *parent) : // "Sources" tab auto sourceTab = new QWidget; - m_libraryRadio = new QRadioButton(tr("&Link library")); - auto includeRadio = new QRadioButton(tr("Include pro&ject")); + m_libraryRadio = new QRadioButton(Tr::tr("&Link library")); + auto includeRadio = new QRadioButton(Tr::tr("Include pro&ject")); includeRadio->setChecked(true); - m_skeletonCheck = new QCheckBox(tr("Create s&keleton")); - m_widgetLibraryLabel = new QLabel(tr("Widget librar&y:")); + m_skeletonCheck = new QCheckBox(Tr::tr("Create s&keleton")); + m_widgetLibraryLabel = new QLabel(Tr::tr("Widget librar&y:")); m_widgetLibraryEdit = new QLineEdit; - m_widgetProjectLabel = new QLabel(tr("Widget project &file:")); + m_widgetProjectLabel = new QLabel(Tr::tr("Widget project &file:")); m_widgetProjectEdit = new QLineEdit; m_widgetHeaderEdit = new QLineEdit; - m_widgetSourceLabel = new QLabel(tr("Widge&t source file:")); + m_widgetSourceLabel = new QLabel(Tr::tr("Widge&t source file:")); m_widgetSourceEdit = new QLineEdit; - m_widgetBaseClassLabel = new QLabel(tr("Widget &base class:")); + m_widgetBaseClassLabel = new QLabel(Tr::tr("Widget &base class:")); m_widgetBaseClassEdit = new QLineEdit("QWidget"); m_pluginClassEdit = new QLineEdit; m_pluginHeaderEdit = new QLineEdit; @@ -43,46 +44,46 @@ ClassDefinition::ClassDefinition(QWidget *parent) : m_iconPathChooser = new Utils::PathChooser; m_iconPathChooser->setExpectedKind(Utils::PathChooser::File); m_iconPathChooser->setHistoryCompleter(QLatin1String("Qmake.Icon.History")); - m_iconPathChooser->setPromptDialogTitle(tr("Select Icon")); - m_iconPathChooser->setPromptDialogFilter(tr("Icon files (*.png *.ico *.jpg *.xpm *.tif *.svg)")); + m_iconPathChooser->setPromptDialogTitle(Tr::tr("Select Icon")); + m_iconPathChooser->setPromptDialogFilter(Tr::tr("Icon files (*.png *.ico *.jpg *.xpm *.tif *.svg)")); Form { empty, Row { Column { m_libraryRadio, includeRadio }, m_skeletonCheck}, br, m_widgetLibraryLabel, m_widgetLibraryEdit, br, m_widgetProjectLabel, m_widgetProjectEdit, br, - tr("Widget h&eader file:"), m_widgetHeaderEdit, br, + Tr::tr("Widget h&eader file:"), m_widgetHeaderEdit, br, m_widgetSourceLabel, m_widgetSourceEdit, br, m_widgetBaseClassLabel, m_widgetBaseClassEdit, br, - tr("Plugin class &name:"), m_pluginClassEdit, br, - tr("Plugin &header file:"), m_pluginHeaderEdit, br, - tr("Plugin sou&rce file:"), m_pluginSourceEdit, br, - tr("Icon file:"), m_iconPathChooser, br, + Tr::tr("Plugin class &name:"), m_pluginClassEdit, br, + Tr::tr("Plugin &header file:"), m_pluginHeaderEdit, br, + Tr::tr("Plugin sou&rce file:"), m_pluginSourceEdit, br, + Tr::tr("Icon file:"), m_iconPathChooser, br, }.attachTo(sourceTab); - addTab(sourceTab, tr("&Sources")); + addTab(sourceTab, Tr::tr("&Sources")); // "Description" tab auto descriptionTab = new QWidget; m_groupEdit = new QLineEdit; m_tooltipEdit = new QLineEdit; m_whatsthisEdit = new QTextEdit; - m_containerCheck = new QCheckBox(tr("The widget is a &container")); + m_containerCheck = new QCheckBox(Tr::tr("The widget is a &container")); Form { - tr("G&roup:"), m_groupEdit, br, - tr("&Tooltip:"), m_tooltipEdit, br, - tr("W&hat's this:"), m_whatsthisEdit, br, + Tr::tr("G&roup:"), m_groupEdit, br, + Tr::tr("&Tooltip:"), m_tooltipEdit, br, + Tr::tr("W&hat's this:"), m_whatsthisEdit, br, empty, m_containerCheck, br, }.attachTo(descriptionTab); - addTab(descriptionTab, tr("&Description")); + addTab(descriptionTab, Tr::tr("&Description")); // "Property defaults" tab auto propertyDefaultsTab = new QWidget; - auto domXmlLabel = new QLabel(tr("dom&XML:")); + auto domXmlLabel = new QLabel(Tr::tr("dom&XML:")); m_domXmlEdit = new QTextEdit; domXmlLabel->setBuddy(m_domXmlEdit); Column { domXmlLabel, m_domXmlEdit, }.attachTo(propertyDefaultsTab); - addTab(propertyDefaultsTab, tr("Property defa&ults")); + addTab(propertyDefaultsTab, Tr::tr("Property defa&ults")); connect(m_libraryRadio, &QRadioButton::toggled, this, &ClassDefinition::enableButtons); connect(m_skeletonCheck, &QCheckBox::toggled, this, &ClassDefinition::enableButtons); diff --git a/src/plugins/qmakeprojectmanager/customwidgetwizard/classlist.cpp b/src/plugins/qmakeprojectmanager/customwidgetwizard/classlist.cpp index c7028593a1f..75f39fb6fd3 100644 --- a/src/plugins/qmakeprojectmanager/customwidgetwizard/classlist.cpp +++ b/src/plugins/qmakeprojectmanager/customwidgetwizard/classlist.cpp @@ -2,6 +2,7 @@ // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0+ OR GPL-3.0 WITH Qt-GPL-exception-1.0 #include "classlist.h" +#include "../qmakeprojectmanagertr.h" #include @@ -38,7 +39,7 @@ private: ClassModel::ClassModel(QObject *parent) : QStandardItemModel(0, 1, parent), m_validator(QLatin1String("^[a-zA-Z][a-zA-Z0-9_]*$")), - m_newClassPlaceHolder(ClassList::tr("")) + m_newClassPlaceHolder(Tr::tr("")) { QTC_ASSERT(m_validator.isValid(), return); appendPlaceHolder(); @@ -112,8 +113,8 @@ void ClassList::removeCurrentClass() if (!index.isValid() || index == m_model->placeHolderIndex()) return; if (QMessageBox::question(this, - tr("Confirm Delete"), - tr("Delete class %1 from list?").arg(className(index.row())), + Tr::tr("Confirm Delete"), + Tr::tr("Delete class %1 from list?").arg(className(index.row())), QMessageBox::Ok|QMessageBox::Cancel) != QMessageBox::Ok) return; // Delete row and set current on same item. diff --git a/src/plugins/qmakeprojectmanager/customwidgetwizard/customwidgetpluginwizardpage.cpp b/src/plugins/qmakeprojectmanager/customwidgetwizard/customwidgetpluginwizardpage.cpp index e11f474db60..acdcdf71c7a 100644 --- a/src/plugins/qmakeprojectmanager/customwidgetwizard/customwidgetpluginwizardpage.cpp +++ b/src/plugins/qmakeprojectmanager/customwidgetwizard/customwidgetpluginwizardpage.cpp @@ -3,6 +3,7 @@ #include "customwidgetpluginwizardpage.h" #include "customwidgetwidgetswizardpage.h" +#include "../qmakeprojectmanagertr.h" #include #include @@ -24,25 +25,25 @@ CustomWidgetPluginWizardPage::CustomWidgetPluginWizardPage(QWidget *parent) : m_classCount(-1), m_complete(false) { - m_collectionClassLabel = new QLabel(tr("Collection class:")); + m_collectionClassLabel = new QLabel(Tr::tr("Collection class:")); m_collectionClassEdit = new QLineEdit; - m_collectionHeaderLabel = new QLabel(tr("Collection header file:")); + m_collectionHeaderLabel = new QLabel(Tr::tr("Collection header file:")); m_collectionHeaderEdit = new QLineEdit; - m_collectionSourceLabel = new QLabel(tr("Collection source file:")); + m_collectionSourceLabel = new QLabel(Tr::tr("Collection source file:")); m_collectionSourceEdit = new QLineEdit; m_pluginNameEdit = new QLineEdit; - m_resourceFileEdit = new QLineEdit(tr("icons.qrc")); + m_resourceFileEdit = new QLineEdit(Tr::tr("icons.qrc")); using namespace Utils::Layouting; Column { - tr("Specify the properties of the plugin library and the collection class."), + Tr::tr("Specify the properties of the plugin library and the collection class."), Space(10), Form { m_collectionClassLabel, m_collectionClassEdit, br, m_collectionHeaderLabel, m_collectionHeaderEdit, br, m_collectionSourceLabel, m_collectionSourceEdit, br, - tr("Plugin name:"), m_pluginNameEdit, br, - tr("Resource file:"), m_resourceFileEdit, br, + Tr::tr("Plugin name:"), m_pluginNameEdit, br, + Tr::tr("Resource file:"), m_resourceFileEdit, br, } }.attachTo(this); @@ -60,7 +61,7 @@ CustomWidgetPluginWizardPage::CustomWidgetPluginWizardPage(QWidget *parent) : m_collectionSourceEdit->setText(m_fileNamingParameters.headerToSourceFileName(text)); }); - setProperty(Utils::SHORT_TITLE_PROPERTY, tr("Plugin Details")); + setProperty(Utils::SHORT_TITLE_PROPERTY, Tr::tr("Plugin Details")); } QString CustomWidgetPluginWizardPage::collectionClassName() const diff --git a/src/plugins/qmakeprojectmanager/customwidgetwizard/customwidgetwidgetswizardpage.cpp b/src/plugins/qmakeprojectmanager/customwidgetwizard/customwidgetwidgetswizardpage.cpp index 70a1e5a7c0a..86c3dee7576 100644 --- a/src/plugins/qmakeprojectmanager/customwidgetwizard/customwidgetwidgetswizardpage.cpp +++ b/src/plugins/qmakeprojectmanager/customwidgetwizard/customwidgetwidgetswizardpage.cpp @@ -4,6 +4,7 @@ #include "customwidgetwidgetswizardpage.h" #include "classdefinition.h" #include "classlist.h" +#include "../qmakeprojectmanagertr.h" #include #include @@ -23,7 +24,7 @@ CustomWidgetWidgetsWizardPage::CustomWidgetWidgetsWizardPage(QWidget *parent) : m_tabStackLayout(new QStackedLayout), m_complete(false) { - auto classListLabel = new QLabel(tr("Widget &Classes:")); + auto classListLabel = new QLabel(Tr::tr("Widget &Classes:")); auto addButton = new QToolButton; addButton->setIcon(Utils::Icons::PLUS.icon()); m_deleteButton = new QToolButton; @@ -40,7 +41,7 @@ CustomWidgetWidgetsWizardPage::CustomWidgetWidgetsWizardPage(QWidget *parent) : using namespace Utils::Layouting; Column { - tr("Specify the list of custom widgets and their properties."), + Tr::tr("Specify the list of custom widgets and their properties."), Space(10), Row { Column { @@ -62,7 +63,7 @@ CustomWidgetWidgetsWizardPage::CustomWidgetWidgetsWizardPage(QWidget *parent) : connect(m_classList, &ClassList::classRenamed, this, &CustomWidgetWidgetsWizardPage::slotClassRenamed); - setProperty(Utils::SHORT_TITLE_PROPERTY, tr("Custom Widgets")); + setProperty(Utils::SHORT_TITLE_PROPERTY, Tr::tr("Custom Widgets")); } bool CustomWidgetWidgetsWizardPage::isComplete() const diff --git a/src/plugins/qmakeprojectmanager/customwidgetwizard/customwidgetwizard.cpp b/src/plugins/qmakeprojectmanager/customwidgetwizard/customwidgetwizard.cpp index 3662dd5621f..613a0ef5135 100644 --- a/src/plugins/qmakeprojectmanager/customwidgetwizard/customwidgetwizard.cpp +++ b/src/plugins/qmakeprojectmanager/customwidgetwizard/customwidgetwizard.cpp @@ -6,6 +6,7 @@ #include "plugingenerator.h" #include "filenamingparameters.h" #include "pluginoptions.h" +#include "../qmakeprojectmanagertr.h" #include @@ -24,8 +25,8 @@ CustomWidgetWizard::CustomWidgetWizard() setCategory(QLatin1String(ProjectExplorer::Constants::QT_PROJECT_WIZARD_CATEGORY)); setDisplayCategory(QCoreApplication::translate("ProjectExplorer", ProjectExplorer::Constants::QT_PROJECT_WIZARD_CATEGORY_DISPLAY)); - setDisplayName(tr("Qt Custom Designer Widget")); - setDescription(tr("Creates a Qt Custom Designer Widget or a Custom Widget Collection.")); + setDisplayName(Tr::tr("Qt Custom Designer Widget")); + setDescription(Tr::tr("Creates a Qt Custom Designer Widget or a Custom Widget Collection.")); setIcon(themedIcon(":/wizards/images/gui.png")); setRequiredFeatures({QtSupport::Constants::FEATURE_QWIDGETS}); } diff --git a/src/plugins/qmakeprojectmanager/customwidgetwizard/customwidgetwizarddialog.cpp b/src/plugins/qmakeprojectmanager/customwidgetwizard/customwidgetwizarddialog.cpp index ca95b760e18..3aac573625c 100644 --- a/src/plugins/qmakeprojectmanager/customwidgetwizard/customwidgetwizarddialog.cpp +++ b/src/plugins/qmakeprojectmanager/customwidgetwizard/customwidgetwizarddialog.cpp @@ -5,6 +5,8 @@ #include "customwidgetwidgetswizardpage.h" #include "customwidgetpluginwizardpage.h" #include "pluginoptions.h" +#include "../qmakeprojectmanagertr.h" + #include #include @@ -26,8 +28,8 @@ CustomWidgetWizardDialog::CustomWidgetWizardDialog(const Core::BaseFileWizardFac setWindowIcon(icon); setWindowTitle(templateName); - setIntroDescription(tr("This wizard generates a Qt Designer Custom Widget " - "or a Qt Designer Custom Widget Collection project.")); + setIntroDescription(Tr::tr("This wizard generates a Qt Designer Custom Widget " + "or a Qt Designer Custom Widget Collection project.")); if (!parameters.extraValues().contains(QLatin1String(ProjectExplorer::Constants::PROJECT_KIT_IDS))) addTargetSetupPage(); diff --git a/src/plugins/qmakeprojectmanager/customwidgetwizard/plugingenerator.cpp b/src/plugins/qmakeprojectmanager/customwidgetwizard/plugingenerator.cpp index 588da68ebc4..1ac96007e90 100644 --- a/src/plugins/qmakeprojectmanager/customwidgetwizard/plugingenerator.cpp +++ b/src/plugins/qmakeprojectmanager/customwidgetwizard/plugingenerator.cpp @@ -3,6 +3,7 @@ #include "plugingenerator.h" #include "pluginoptions.h" +#include "../qmakeprojectmanagertr.h" #include #include @@ -157,7 +158,7 @@ QList PluginGenerator::generatePlugin(const GenerationPara widgetProjectContents.insert(wo.widgetProjectFile, pc); } else { if (pc.library != wo.widgetLibrary) { - *errorMessage = tr("Creating multiple widget libraries (%1, %2) in one project (%3) is not supported.") + *errorMessage = Tr::tr("Creating multiple widget libraries (%1, %2) in one project (%3) is not supported.") .arg(pc.library, wo.widgetLibrary, wo.widgetProjectFile); return QList(); } diff --git a/src/plugins/qmakeprojectmanager/externaleditors.cpp b/src/plugins/qmakeprojectmanager/externaleditors.cpp index 6c178589de3..7bb38331d01 100644 --- a/src/plugins/qmakeprojectmanager/externaleditors.cpp +++ b/src/plugins/qmakeprojectmanager/externaleditors.cpp @@ -2,6 +2,7 @@ // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0+ OR GPL-3.0 WITH Qt-GPL-exception-1.0 #include "externaleditors.h" +#include "qmakeprojectmanagertr.h" #include #include @@ -35,12 +36,12 @@ namespace Internal { static inline QString msgStartFailed(const QString &binary, QStringList arguments) { arguments.push_front(binary); - return ExternalQtEditor::tr("Unable to start \"%1\"").arg(arguments.join(QLatin1Char(' '))); + return Tr::tr("Unable to start \"%1\"").arg(arguments.join(QLatin1Char(' '))); } static inline QString msgAppNotFound(const QString &id) { - return ExternalQtEditor::tr("The application \"%1\" could not be found.").arg(id); + return Tr::tr("The application \"%1\" could not be found.").arg(id); } // -- Commands and helpers @@ -229,7 +230,7 @@ bool DesignerExternalEditor::startEditor(const Utils::FilePath &filePath, QStrin qDebug() << Q_FUNC_INFO << "\nWriting to socket:" << data.binary << filePath; QTcpSocket *socket = it.value(); if (!socket->write(filePath.toString().toUtf8() + '\n')) { - *errorMessage = tr("Qt Designer is not responding (%1).").arg(socket->errorString()); + *errorMessage = Tr::tr("Qt Designer is not responding (%1).").arg(socket->errorString()); return false; } return true; @@ -237,7 +238,7 @@ bool DesignerExternalEditor::startEditor(const Utils::FilePath &filePath, QStrin // No process yet. Create socket & launch the process QTcpServer server; if (!server.listen(QHostAddress::LocalHost)) { - *errorMessage = tr("Unable to create server socket: %1").arg(server.errorString()); + *errorMessage = Tr::tr("Unable to create server socket: %1").arg(server.errorString()); return false; } const quint16 port = server.serverPort(); diff --git a/src/plugins/qmakeprojectmanager/librarydetailscontroller.cpp b/src/plugins/qmakeprojectmanager/librarydetailscontroller.cpp index 7ffd360afff..117a1cbe0e2 100644 --- a/src/plugins/qmakeprojectmanager/librarydetailscontroller.cpp +++ b/src/plugins/qmakeprojectmanager/librarydetailscontroller.cpp @@ -6,6 +6,7 @@ #include "qmakebuildconfiguration.h" #include "qmakeparsernodes.h" #include "qmakeproject.h" +#include "qmakeprojectmanagertr.h" #include #include @@ -197,16 +198,16 @@ bool LibraryDetailsController::isIncludePathChanged() const void LibraryDetailsController::showLinkageType( AddLibraryWizard::LinkageType linkageType) { - const QString linkage(tr("Linkage:")); + const QString linkage(Tr::tr("Linkage:")); QString linkageTitle; switch (linkageType) { case AddLibraryWizard::DynamicLinkage: libraryDetailsWidget()->dynamicRadio->setChecked(true); - linkageTitle = tr("%1 Dynamic").arg(linkage); + linkageTitle = Tr::tr("%1 Dynamic").arg(linkage); break; case AddLibraryWizard::StaticLinkage: libraryDetailsWidget()->staticRadio->setChecked(true); - linkageTitle = tr("%1 Static").arg(linkage); + linkageTitle = Tr::tr("%1 Static").arg(linkage); break; default: libraryDetailsWidget()->dynamicRadio->setChecked(false); @@ -220,16 +221,16 @@ void LibraryDetailsController::showLinkageType( void LibraryDetailsController::showMacLibraryType( AddLibraryWizard::MacLibraryType libType) { - const QString libraryType(tr("Mac:")); + const QString libraryType(Tr::tr("Mac:")); QString libraryTypeTitle; switch (libType) { case AddLibraryWizard::FrameworkType: libraryDetailsWidget()->frameworkRadio->setChecked(true); - libraryTypeTitle = tr("%1 Framework").arg(libraryType); + libraryTypeTitle = Tr::tr("%1 Framework").arg(libraryType); break; case AddLibraryWizard::LibraryType: libraryDetailsWidget()->libraryRadio->setChecked(true); - libraryTypeTitle = tr("%1 Library").arg(libraryType); + libraryTypeTitle = Tr::tr("%1 Library").arg(libraryType); break; default: libraryDetailsWidget()->frameworkRadio->setChecked(false); diff --git a/src/plugins/qmakeprojectmanager/qmakebuildconfiguration.cpp b/src/plugins/qmakeprojectmanager/qmakebuildconfiguration.cpp index 9dc9d3a90e1..9bad1ae72b5 100644 --- a/src/plugins/qmakeprojectmanager/qmakebuildconfiguration.cpp +++ b/src/plugins/qmakeprojectmanager/qmakebuildconfiguration.cpp @@ -3,15 +3,16 @@ #include "qmakebuildconfiguration.h" -#include "qmakebuildinfo.h" -#include "qmakekitinformation.h" -#include "qmakeproject.h" -#include "qmakeprojectmanagerconstants.h" -#include "qmakenodes.h" -#include "qmakesettings.h" -#include "qmakestep.h" #include "makefileparse.h" #include "qmakebuildconfiguration.h" +#include "qmakebuildinfo.h" +#include "qmakekitinformation.h" +#include "qmakenodes.h" +#include "qmakeproject.h" +#include "qmakeprojectmanagerconstants.h" +#include "qmakeprojectmanagertr.h" +#include "qmakesettings.h" +#include "qmakestep.h" #include @@ -55,10 +56,10 @@ class RunSystemAspect : public TriStateAspect { Q_OBJECT public: - RunSystemAspect() : TriStateAspect(tr("Run"), tr("Ignore"), tr("Use global setting")) + RunSystemAspect() : TriStateAspect(Tr::tr("Run"), Tr::tr("Ignore"), Tr::tr("Use global setting")) { setSettingsKey("RunSystemFunction"); - setDisplayName(tr("qmake system() behavior when parsing:")); + setDisplayName(Tr::tr("qmake system() behavior when parsing:")); } }; @@ -91,7 +92,7 @@ const char BUILD_CONFIGURATION_KEY[] = "Qt4ProjectManager.Qt4BuildConfiguration. QmakeBuildConfiguration::QmakeBuildConfiguration(Target *target, Utils::Id id) : BuildConfiguration(target, id) { - setConfigWidgetDisplayName(tr("General")); + setConfigWidgetDisplayName(Tr::tr("General")); setConfigWidgetHasFrame(true); m_buildSystem = new QmakeBuildSystem(this); @@ -228,8 +229,8 @@ void QmakeBuildConfiguration::updateProblemLabel() // Check for Qt version: QtSupport::QtVersion *version = QtSupport::QtKitAspect::qtVersion(k); if (!version) { - buildDirectoryAspect()->setProblem(tr("This kit cannot build this project since it " - "does not define a Qt version.")); + buildDirectoryAspect()->setProblem(Tr::tr("This kit cannot build this project since it " + "does not define a Qt version.")); return; } @@ -280,11 +281,11 @@ void QmakeBuildConfiguration::updateProblemLabel() QString type; switch (task.type) { case ProjectExplorer::Task::Error: - type = tr("Error:"); + type = Tr::tr("Error:"); type += QLatin1Char(' '); break; case ProjectExplorer::Task::Warning: - type = tr("Warning:"); + type = Tr::tr("Warning:"); type += QLatin1Char(' '); break; case ProjectExplorer::Task::Unknown: @@ -299,12 +300,12 @@ void QmakeBuildConfiguration::updateProblemLabel() return; } } else if (targetMismatch) { - buildDirectoryAspect()->setProblem(tr("The build directory contains a build for " - "a different project, which will be overwritten.")); + buildDirectoryAspect()->setProblem(Tr::tr("The build directory contains a build for " + "a different project, which will be overwritten.")); return; } else if (incompatibleBuild) { - buildDirectoryAspect()->setProblem(tr("%1 The build will be overwritten.", - "%1 error message") + buildDirectoryAspect()->setProblem(Tr::tr("%1 The build will be overwritten.", + "%1 error message") .arg(errorString)); return; } else if (unalignedBuildDir) { @@ -372,7 +373,7 @@ void QmakeBuildConfiguration::setQMakeBuildConfiguration(QtVersion::QmakeBuildCo QString QmakeBuildConfiguration::unalignedBuildDirWarning() { - return tr("The build directory should be at the same level as the source directory."); + return Tr::tr("The build directory should be at the same level as the source directory."); } bool QmakeBuildConfiguration::isBuildDirAtSafeLocation(const QString &sourceDir, @@ -489,7 +490,7 @@ QmakeBuildConfiguration::MakefileState QmakeBuildConfiguration::compareToImportF if (parse.makeFileState() == MakeFileParse::CouldNotParse) { qCDebug(logs) << "**Makefile incompatible"; if (errorString) - *errorString = tr("Could not parse Makefile."); + *errorString = Tr::tr("Could not parse Makefile."); return MakefileIncompatible; } @@ -510,7 +511,7 @@ QmakeBuildConfiguration::MakefileState QmakeBuildConfiguration::compareToImportF qCDebug(logs) << "**Different profile used to generate the Makefile:" << parse.srcProFile() << " expected profile:" << projectPath; if (errorString) - *errorString = tr("The Makefile is for a different project."); + *errorString = Tr::tr("The Makefile is for a different project."); return MakefileIncompatible; } @@ -526,7 +527,7 @@ QmakeBuildConfiguration::MakefileState QmakeBuildConfiguration::compareToImportF qCDebug(logs) << "**Different qmake buildconfigurations buildconfiguration:" << qmakeBuildConfiguration() << " Makefile:" << buildConfig; if (errorString) - *errorString = tr("The build type has changed."); + *errorString = Tr::tr("The build type has changed."); return MakefileIncompatible; } @@ -575,14 +576,14 @@ QmakeBuildConfiguration::MakefileState QmakeBuildConfiguration::compareToImportF if (actualArgs != parsedArgs) { qCDebug(logs) << "**Mismatched args"; if (errorString) - *errorString = tr("The qmake arguments have changed."); + *errorString = Tr::tr("The qmake arguments have changed."); return MakefileIncompatible; } if (parse.config() != qs->deducedArguments()) { qCDebug(logs) << "**Mismatched config"; if (errorString) - *errorString = tr("The qmake arguments have changed."); + *errorString = Tr::tr("The qmake arguments have changed."); return MakefileIncompatible; } @@ -601,7 +602,7 @@ QmakeBuildConfiguration::MakefileState QmakeBuildConfiguration::compareToImportF qCDebug(logs) << "**Incompatible specs"; if (errorString) - *errorString = tr("The mkspec has changed."); + *errorString = Tr::tr("The mkspec has changed."); return MakefileIncompatible; } @@ -690,9 +691,9 @@ static BuildInfo createBuildInfo(const Kit *k, const FilePath &projectPath, if (type == BuildConfiguration::Release) { //: The name of the release build configuration created by default for a qmake project. - info.displayName = BuildConfiguration::tr("Release"); + info.displayName = BuildConfigurationTr::tr("Release"); //: Non-ASCII characters in directory suffix may cause build issues. - suffix = QmakeBuildConfiguration::tr("Release", "Shadow build directory suffix"); + suffix = Tr::tr("Release", "Shadow build directory suffix"); if (settings.qtQuickCompiler.value() == TriState::Default) { if (version && version->isQtQuickCompilerSupported()) extraInfo.config.useQtQuickCompiler = TriState::Enabled; @@ -700,14 +701,14 @@ static BuildInfo createBuildInfo(const Kit *k, const FilePath &projectPath, } else { if (type == BuildConfiguration::Debug) { //: The name of the debug build configuration created by default for a qmake project. - info.displayName = BuildConfiguration::tr("Debug"); + info.displayName = BuildConfigurationTr::tr("Debug"); //: Non-ASCII characters in directory suffix may cause build issues. - suffix = QmakeBuildConfiguration::tr("Debug", "Shadow build directory suffix"); + suffix = Tr::tr("Debug", "Shadow build directory suffix"); } else if (type == BuildConfiguration::Profile) { //: The name of the profile build configuration created by default for a qmake project. - info.displayName = BuildConfiguration::tr("Profile"); + info.displayName = BuildConfigurationTr::tr("Profile"); //: Non-ASCII characters in directory suffix may cause build issues. - suffix = QmakeBuildConfiguration::tr("Profile", "Shadow build directory suffix"); + suffix = Tr::tr("Profile", "Shadow build directory suffix"); if (settings.separateDebugInfo.value() == TriState::Default) extraInfo.config.separateDebugInfo = TriState::Enabled; diff --git a/src/plugins/qmakeprojectmanager/qmakekitinformation.cpp b/src/plugins/qmakeprojectmanager/qmakekitinformation.cpp index 60072e58cf5..e5c0265daa1 100644 --- a/src/plugins/qmakeprojectmanager/qmakekitinformation.cpp +++ b/src/plugins/qmakeprojectmanager/qmakekitinformation.cpp @@ -4,6 +4,7 @@ #include "qmakekitinformation.h" #include "qmakeprojectmanagerconstants.h" +#include "qmakeprojectmanagertr.h" #include #include @@ -27,8 +28,6 @@ namespace Internal { class QmakeKitAspectWidget final : public KitAspectWidget { - Q_DECLARE_TR_FUNCTIONS(QmakeProjectManager::Internal::QmakeKitAspect) - public: QmakeKitAspectWidget(Kit *k, const KitAspect *ki) : KitAspectWidget(k, ki), m_lineEdit(createSubWidget()) @@ -70,8 +69,8 @@ QmakeKitAspect::QmakeKitAspect() { setObjectName(QLatin1String("QmakeKitAspect")); setId(QmakeKitAspect::id()); - setDisplayName(tr("Qt mkspec")); - setDescription(tr("The mkspec to use when building the project with qmake.
" + setDisplayName(Tr::tr("Qt mkspec")); + setDescription(Tr::tr("The mkspec to use when building the project with qmake.
" "This setting is ignored when using other build systems.")); setPriority(24000); } @@ -83,9 +82,9 @@ Tasks QmakeKitAspect::validate(const Kit *k) const const QString mkspec = QmakeKitAspect::mkspec(k); if (!version && !mkspec.isEmpty()) - result << BuildSystemTask(Task::Warning, tr("No Qt version set, so mkspec is ignored.")); + result << BuildSystemTask(Task::Warning, Tr::tr("No Qt version set, so mkspec is ignored.")); if (version && !version->hasMkspec(mkspec)) - result << BuildSystemTask(Task::Error, tr("Mkspec not found for Qt version.")); + result << BuildSystemTask(Task::Error, Tr::tr("Mkspec not found for Qt version.")); return result; } @@ -97,12 +96,12 @@ KitAspectWidget *QmakeKitAspect::createConfigWidget(Kit *k) const KitAspect::ItemList QmakeKitAspect::toUserOutput(const Kit *k) const { - return {qMakePair(tr("mkspec"), QDir::toNativeSeparators(mkspec(k)))}; + return {qMakePair(Tr::tr("mkspec"), QDir::toNativeSeparators(mkspec(k)))}; } void QmakeKitAspect::addToMacroExpander(Kit *kit, MacroExpander *expander) const { - expander->registerVariable("Qmake:mkspec", tr("Mkspec configured for qmake by the kit."), + expander->registerVariable("Qmake:mkspec", Tr::tr("Mkspec configured for qmake by the kit."), [kit]() -> QString { return QDir::toNativeSeparators(mkspec(kit)); }); diff --git a/src/plugins/qmakeprojectmanager/qmakemakestep.cpp b/src/plugins/qmakeprojectmanager/qmakemakestep.cpp index 790489f459f..c96d877c6ce 100644 --- a/src/plugins/qmakeprojectmanager/qmakemakestep.cpp +++ b/src/plugins/qmakeprojectmanager/qmakemakestep.cpp @@ -3,11 +3,12 @@ #include "qmakemakestep.h" +#include "qmakebuildconfiguration.h" +#include "qmakenodes.h" #include "qmakeparser.h" #include "qmakeproject.h" -#include "qmakenodes.h" -#include "qmakebuildconfiguration.h" #include "qmakeprojectmanagerconstants.h" +#include "qmakeprojectmanagertr.h" #include "qmakesettings.h" #include "qmakestep.h" @@ -35,8 +36,6 @@ namespace Internal { class QmakeMakeStep : public MakeStep { - Q_DECLARE_TR_FUNCTIONS(QmakeProjectManager::QmakeMakeStep) - public: QmakeMakeStep(BuildStepList *bsl, Id id); @@ -211,7 +210,7 @@ void QmakeMakeStep::doRun() if (!m_makeFileToCheck.exists()) { if (!ignoreReturnValue()) - emit addOutput(tr("Cannot find Makefile. Check your build settings."), BuildStep::OutputFormat::NormalMessage); + emit addOutput(Tr::tr("Cannot find Makefile. Check your build settings."), BuildStep::OutputFormat::NormalMessage); const bool success = ignoreReturnValue(); emit finished(success); return; @@ -224,7 +223,7 @@ void QmakeMakeStep::finish(bool success) { if (!success && !isCanceled() && m_unalignedBuildDir && QmakeSettings::warnAgainstUnalignedBuildDir()) { - const QString msg = tr("The build directory is not at the same level as the source " + const QString msg = Tr::tr("The build directory is not at the same level as the source " "directory, which could be the reason for the build failure."); emit addTask(BuildSystemTask(Task::Warning, msg)); } diff --git a/src/plugins/qmakeprojectmanager/qmakenodetreebuilder.cpp b/src/plugins/qmakeprojectmanager/qmakenodetreebuilder.cpp index 21ea9208eb8..f2319d62dd8 100644 --- a/src/plugins/qmakeprojectmanager/qmakenodetreebuilder.cpp +++ b/src/plugins/qmakeprojectmanager/qmakenodetreebuilder.cpp @@ -4,6 +4,7 @@ #include "qmakenodetreebuilder.h" #include "qmakeproject.h" +#include "qmakeprojectmanagertr.h" #include #include @@ -37,19 +38,19 @@ public: }; const FileTypeDataStorage fileTypeDataStorage[] = { - { FileType::Header, QT_TRANSLATE_NOOP("QmakeProjectManager::QmakePriFile", "Headers"), + { FileType::Header, QT_TRANSLATE_NOOP("QmakeProjectManager", "Headers"), ProjectExplorer::Constants::FILEOVERLAY_H, "*.h; *.hh; *.hpp; *.hxx;"}, - { FileType::Source, QT_TRANSLATE_NOOP("QmakeProjectManager::QmakePriFile", "Sources"), + { FileType::Source, QT_TRANSLATE_NOOP("QmakeProjectManager", "Sources"), ProjectExplorer::Constants::FILEOVERLAY_CPP, "*.c; *.cc; *.cpp; *.cp; *.cxx; *.c++;" }, - { FileType::Form, QT_TRANSLATE_NOOP("QmakeProjectManager::QmakePriFile", "Forms"), + { FileType::Form, QT_TRANSLATE_NOOP("QmakeProjectManager", "Forms"), ProjectExplorer::Constants::FILEOVERLAY_UI, "*.ui;" }, - { FileType::StateChart, QT_TRANSLATE_NOOP("QmakeProjectManager::QmakePriFile", "State charts"), + { FileType::StateChart, QT_TRANSLATE_NOOP("QmakeProjectManager", "State charts"), ProjectExplorer::Constants::FILEOVERLAY_SCXML, "*.scxml;" }, - { FileType::Resource, QT_TRANSLATE_NOOP("QmakeProjectManager::QmakePriFile", "Resources"), + { FileType::Resource, QT_TRANSLATE_NOOP("QmakeProjectManager", "Resources"), ProjectExplorer::Constants::FILEOVERLAY_QRC, "*.qrc;" }, - { FileType::QML, QT_TRANSLATE_NOOP("QmakeProjectManager::QmakePriFile", "QML"), + { FileType::QML, QT_TRANSLATE_NOOP("QmakeProjectManager", "QML"), ProjectExplorer::Constants::FILEOVERLAY_QML, "*.qml;" }, - { FileType::Unknown, QT_TRANSLATE_NOOP("QmakeProjectManager::QmakePriFile", "Other files"), + { FileType::Unknown, QT_TRANSLATE_NOOP("QmakeProjectManager", "Other files"), ProjectExplorer::Constants::FILEOVERLAY_UNKNOWN, "*;" } }; @@ -86,7 +87,7 @@ QmakeStaticData::QmakeStaticData() fileTypeData.reserve(count); for (const FileTypeDataStorage &fileType : fileTypeDataStorage) { - const QString desc = QCoreApplication::translate("QmakeProjectManager::QmakePriFile", fileType.typeName); + const QString desc = QmakeProjectManager::Tr::tr(fileType.typeName); const QString filter = QString::fromUtf8(fileType.addFileFilter); fileTypeData.push_back(QmakeStaticData::FileTypeData(fileType.type, desc, filter, @@ -204,8 +205,7 @@ static void createTree(QmakeBuildSystem *buildSystem, const FilePath baseDir = generatedFiles.size() == 1 ? generatedFiles.first().parentDir() : buildSystem->buildDir(proFile->filePath()); auto genFolder = std::make_unique(baseDir); - genFolder->setDisplayName(QCoreApplication::translate("QmakeProjectManager::QmakePriFile", - "Generated Files")); + genFolder->setDisplayName(Tr::tr("Generated Files")); genFolder->setIsGenerated(true); for (const FilePath &fp : qAsConst(generatedFiles)) { auto fileNode = std::make_unique(fp, FileNode::fileTypeForFileName(fp)); diff --git a/src/plugins/qmakeprojectmanager/qmakeparsernodes.cpp b/src/plugins/qmakeprojectmanager/qmakeparsernodes.cpp index 69a6f2cfdd3..dbd1910bc21 100644 --- a/src/plugins/qmakeprojectmanager/qmakeparsernodes.cpp +++ b/src/plugins/qmakeprojectmanager/qmakeparsernodes.cpp @@ -5,6 +5,7 @@ #include "qmakeproject.h" #include "qmakeprojectmanagerconstants.h" +#include "qmakeprojectmanagertr.h" #include @@ -731,10 +732,8 @@ bool QmakePriFile::ensureWriteableProFile(const QString &file) bool makeWritable = QFile::setPermissions(file, fi.permissions() | QFile::WriteUser); if (!makeWritable) { QMessageBox::warning(Core::ICore::dialogParent(), - QCoreApplication::translate("QmakePriFile", "Failed"), - QCoreApplication::translate("QmakePriFile", - "Could not write project file %1.") - .arg(file)); + Tr::tr("Failed"), + Tr::tr("Could not write project file %1.").arg(file)); return false; } } @@ -922,8 +921,7 @@ void QmakePriFile::save(const QStringList &lines) FileChangeBlocker changeGuard(filePath()); QString errorMsg; if (!m_textFormat.writeFile(filePath(), lines.join('\n'), &errorMsg)) { - QMessageBox::critical(Core::ICore::dialogParent(), QCoreApplication::translate( - "QmakePriFile", "File Error"), errorMsg); + QMessageBox::critical(Core::ICore::dialogParent(), Tr::tr("File Error"), errorMsg); } } @@ -940,8 +938,7 @@ void QmakePriFile::save(const QStringList &lines) errorStrings << errorString; } if (!errorStrings.isEmpty()) - QMessageBox::warning(Core::ICore::dialogParent(), - QCoreApplication::translate("QmakePriFile", "File Error"), + QMessageBox::warning(Core::ICore::dialogParent(), Tr::tr("File Error"), errorStrings.join(QLatin1Char('\n'))); } @@ -1661,11 +1658,8 @@ void QmakeProFile::applyEvaluate(const QmakeEvalResultPtr &result) setParseInProgressRecursive(false); if (result->state == QmakeEvalResult::EvalFail) { - QmakeBuildSystem::proFileParseError( - QCoreApplication::translate("QmakeProFile", - "Error while parsing file %1. Giving up.") - .arg(filePath().toUserOutput()), - filePath()); + QmakeBuildSystem::proFileParseError(Tr::tr("Error while parsing file %1. Giving up.") + .arg(filePath().toUserOutput()), filePath()); if (m_projectType == ProjectType::Invalid) return; @@ -1929,7 +1923,7 @@ FilePaths QmakeProFile::subDirsPaths(QtSupport::ProFileReader *reader, } } else { if (errors) - errors->append(QCoreApplication::translate("QmakeProFile", "Could not find .pro file for subdirectory \"%1\" in \"%2\".") + errors->append(Tr::tr("Could not find .pro file for subdirectory \"%1\" in \"%2\".") .arg(subDirVar).arg(realDir)); } } diff --git a/src/plugins/qmakeprojectmanager/qmakeproject.cpp b/src/plugins/qmakeprojectmanager/qmakeproject.cpp index 592244eb817..0b62bc7dde0 100644 --- a/src/plugins/qmakeprojectmanager/qmakeproject.cpp +++ b/src/plugins/qmakeprojectmanager/qmakeproject.cpp @@ -9,6 +9,7 @@ #include "qmakenodetreebuilder.h" #include "qmakeprojectimporter.h" #include "qmakeprojectmanagerconstants.h" +#include "qmakeprojectmanagertr.h" #include "qmakestep.h" #include @@ -661,7 +662,7 @@ void QmakeBuildSystem::asyncUpdate() m_asyncUpdateFutureInterface.reset(new QFutureInterface); m_asyncUpdateFutureInterface->setProgressRange(0, 0); Core::ProgressManager::addTask(m_asyncUpdateFutureInterface->future(), - tr("Reading Project \"%1\"").arg(project()->displayName()), + Tr::tr("Reading Project \"%1\"").arg(project()->displayName()), Constants::PROFILE_EVALUATE); m_asyncUpdateFutureInterface->reportStarted(); @@ -683,10 +684,10 @@ void QmakeBuildSystem::asyncUpdate() QtSupport::QtVersion *const qtVersion = QtSupport::QtKitAspect::qtVersion(k); if (!qtVersion || !qtVersion->isValid()) { const QString errorMessage - = k ? tr("Cannot parse project \"%1\": The currently selected kit \"%2\" does not " - "have a valid Qt.") + = k ? Tr::tr("Cannot parse project \"%1\": The currently selected kit \"%2\" does not " + "have a valid Qt.") .arg(project()->displayName(), k->displayName()) - : tr("Cannot parse project \"%1\": No kit selected.").arg(project()->displayName()); + : Tr::tr("Cannot parse project \"%1\": No kit selected.").arg(project()->displayName()); proFileParseError(errorMessage, project()->projectFilePath()); m_asyncUpdateFutureInterface->reportCanceled(); m_asyncUpdateFutureInterface->reportFinished(); @@ -735,11 +736,11 @@ Tasks QmakeProject::projectIssues(const Kit *k) const Tasks result = Project::projectIssues(k); const QtSupport::QtVersion *const qtFromKit = QtSupport::QtKitAspect::qtVersion(k); if (!qtFromKit) - result.append(createProjectTask(Task::TaskType::Error, tr("No Qt version set in kit."))); + result.append(createProjectTask(Task::TaskType::Error, Tr::tr("No Qt version set in kit."))); else if (!qtFromKit->isValid()) - result.append(createProjectTask(Task::TaskType::Error, tr("Qt version is invalid."))); + result.append(createProjectTask(Task::TaskType::Error, Tr::tr("Qt version is invalid."))); if (!ToolChainKitAspect::cxxToolChain(k)) - result.append(createProjectTask(Task::TaskType::Error, tr("No C++ compiler set in kit."))); + result.append(createProjectTask(Task::TaskType::Error, Tr::tr("No C++ compiler set in kit."))); // A project can be considered part of more than one Qt version, for instance if it is an // example shipped via the installer. @@ -752,8 +753,8 @@ Tasks QmakeProject::projectIssues(const Kit *k) const if (!qtsContainingThisProject.isEmpty() && !qtsContainingThisProject.contains(const_cast(qtFromKit))) { result.append(CompileTask(Task::Warning, - tr("Project is part of Qt sources that do not match " - "the Qt defined in the kit."))); + Tr::tr("Project is part of Qt sources that do not match " + "the Qt defined in the kit."))); } return result; @@ -1398,8 +1399,7 @@ void QmakeBuildSystem::testToolChain(ToolChain *tc, const FilePath &path) const } TaskHub::addTask( BuildSystemTask(Task::Warning, - QCoreApplication::translate( - "QmakeProjectManager", + Tr::tr( "\"%1\" is used by qmake, but \"%2\" is configured in the kit.\n" "Please update your kit (%3) or choose a mkspec for qmake that matches " "your target environment better.") diff --git a/src/plugins/qmakeprojectmanager/qmakeprojectimporter.cpp b/src/plugins/qmakeprojectmanager/qmakeprojectimporter.cpp index 8948343eae6..554c6266600 100644 --- a/src/plugins/qmakeprojectmanager/qmakeprojectimporter.cpp +++ b/src/plugins/qmakeprojectmanager/qmakeprojectimporter.cpp @@ -3,11 +3,12 @@ #include "qmakeprojectimporter.h" +#include "makefileparse.h" +#include "qmakebuildconfiguration.h" #include "qmakebuildinfo.h" #include "qmakekitinformation.h" -#include "qmakebuildconfiguration.h" #include "qmakeproject.h" -#include "makefileparse.h" +#include "qmakeprojectmanagertr.h" #include "qmakestep.h" #include @@ -190,10 +191,10 @@ const QList QmakeProjectImporter::buildInfoList(void *directoryData) BuildInfo info; if (data->buildConfig & QtVersion::DebugBuild) { info.buildType = BuildConfiguration::Debug; - info.displayName = QCoreApplication::translate("QmakeProjectManager::Internal::QmakeProjectImporter", "Debug"); + info.displayName = Tr::tr("Debug"); } else { info.buildType = BuildConfiguration::Release; - info.displayName = QCoreApplication::translate("QmakeProjectManager::Internal::QmakeProjectImporter", "Release"); + info.displayName = Tr::tr("Release"); } info.buildDirectory = data->buildDirectory; diff --git a/src/plugins/qmakeprojectmanager/qmakeprojectmanagerplugin.cpp b/src/plugins/qmakeprojectmanager/qmakeprojectmanagerplugin.cpp index f768ebc5c8c..71f2313837f 100644 --- a/src/plugins/qmakeprojectmanager/qmakeprojectmanagerplugin.cpp +++ b/src/plugins/qmakeprojectmanager/qmakeprojectmanagerplugin.cpp @@ -4,18 +4,19 @@ #include "qmakeprojectmanagerplugin.h" #include "addlibrarywizard.h" +#include "customwidgetwizard/customwidgetwizard.h" +#include "externaleditors.h" #include "profileeditor.h" +#include "qmakebuildconfiguration.h" +#include "qmakekitinformation.h" +#include "qmakemakestep.h" #include "qmakenodes.h" +#include "qmakeproject.h" +#include "qmakeprojectmanagerconstants.h" +#include "qmakeprojectmanagertr.h" #include "qmakesettings.h" #include "qmakestep.h" -#include "qmakemakestep.h" -#include "qmakebuildconfiguration.h" #include "wizards/subdirsprojectwizard.h" -#include "customwidgetwizard/customwidgetwizard.h" -#include "qmakeprojectmanagerconstants.h" -#include "qmakeproject.h" -#include "externaleditors.h" -#include "qmakekitinformation.h" #include #include @@ -140,12 +141,8 @@ bool QmakeProjectManagerPlugin::initialize(const QStringList &arguments, QString //create and register objects ProjectManager::registerProjectType(QmakeProjectManager::Constants::PROFILE_MIMETYPE); - IWizardFactory::registerFactoryCreator([] { - return QList { - new SubdirsProjectWizard, - new CustomWidgetWizard - }; - }); + IWizardFactory::registerFactoryCreator([] { return new SubdirsProjectWizard; }); + IWizardFactory::registerFactoryCreator([] { return new CustomWidgetWizard; }); //menus ActionContainer *mbuild = @@ -160,7 +157,7 @@ bool QmakeProjectManagerPlugin::initialize(const QStringList &arguments, QString //register actions Command *command = nullptr; - d->m_buildSubProjectContextMenu = new ParameterAction(tr("Build"), tr("Build \"%1\""), + d->m_buildSubProjectContextMenu = new ParameterAction(Tr::tr("Build"), Tr::tr("Build \"%1\""), ParameterAction::AlwaysEnabled/*handled manually*/, this); command = ActionManager::registerAction(d->m_buildSubProjectContextMenu, Constants::BUILDSUBDIRCONTEXTMENU, projectContext); @@ -171,7 +168,7 @@ bool QmakeProjectManagerPlugin::initialize(const QStringList &arguments, QString connect(d->m_buildSubProjectContextMenu, &QAction::triggered, d, &QmakeProjectManagerPluginPrivate::buildSubDirContextMenu); - d->m_runQMakeActionContextMenu = new QAction(tr("Run qmake"), this); + d->m_runQMakeActionContextMenu = new QAction(Tr::tr("Run qmake"), this); command = ActionManager::registerAction(d->m_runQMakeActionContextMenu, Constants::RUNQMAKECONTEXTMENU, projectContext); command->setAttribute(Command::CA_Hide); mproject->addAction(command, ProjectExplorer::Constants::G_PROJECT_BUILD); @@ -183,7 +180,7 @@ bool QmakeProjectManagerPlugin::initialize(const QStringList &arguments, QString &d->m_subProjectRebuildSeparator); command->setAttribute(Command::CA_Hide); - d->m_rebuildSubProjectContextMenu = new QAction(tr("Rebuild"), this); + d->m_rebuildSubProjectContextMenu = new QAction(Tr::tr("Rebuild"), this); command = ActionManager::registerAction( d->m_rebuildSubProjectContextMenu, Constants::REBUILDSUBDIRCONTEXTMENU, projectContext); command->setAttribute(Command::CA_Hide); @@ -191,7 +188,7 @@ bool QmakeProjectManagerPlugin::initialize(const QStringList &arguments, QString connect(d->m_rebuildSubProjectContextMenu, &QAction::triggered, d, &QmakeProjectManagerPluginPrivate::rebuildSubDirContextMenu); - d->m_cleanSubProjectContextMenu = new QAction(tr("Clean"), this); + d->m_cleanSubProjectContextMenu = new QAction(Tr::tr("Clean"), this); command = ActionManager::registerAction( d->m_cleanSubProjectContextMenu, Constants::CLEANSUBDIRCONTEXTMENU, projectContext); command->setAttribute(Command::CA_Hide); @@ -199,14 +196,14 @@ bool QmakeProjectManagerPlugin::initialize(const QStringList &arguments, QString connect(d->m_cleanSubProjectContextMenu, &QAction::triggered, d, &QmakeProjectManagerPluginPrivate::cleanSubDirContextMenu); - d->m_buildFileContextMenu = new QAction(tr("Build"), this); + d->m_buildFileContextMenu = new QAction(Tr::tr("Build"), this); command = ActionManager::registerAction(d->m_buildFileContextMenu, Constants::BUILDFILECONTEXTMENU, projectContext); command->setAttribute(Command::CA_Hide); mfile->addAction(command, ProjectExplorer::Constants::G_FILE_OTHER); connect(d->m_buildFileContextMenu, &QAction::triggered, d, &QmakeProjectManagerPluginPrivate::buildFileContextMenu); - d->m_buildSubProjectAction = new ParameterAction(tr("Build &Subproject"), tr("Build &Subproject \"%1\""), + d->m_buildSubProjectAction = new ParameterAction(Tr::tr("Build &Subproject"), Tr::tr("Build &Subproject \"%1\""), ParameterAction::AlwaysEnabled, this); command = ActionManager::registerAction(d->m_buildSubProjectAction, Constants::BUILDSUBDIR, projectContext); command->setAttribute(Command::CA_Hide); @@ -216,15 +213,15 @@ bool QmakeProjectManagerPlugin::initialize(const QStringList &arguments, QString connect(d->m_buildSubProjectAction, &QAction::triggered, d, &QmakeProjectManagerPluginPrivate::buildSubDirContextMenu); - d->m_runQMakeAction = new QAction(tr("Run qmake"), this); + d->m_runQMakeAction = new QAction(Tr::tr("Run qmake"), this); const Context globalcontext(Core::Constants::C_GLOBAL); command = ActionManager::registerAction(d->m_runQMakeAction, Constants::RUNQMAKE, globalcontext); mbuild->addAction(command, ProjectExplorer::Constants::G_BUILD_BUILD); connect(d->m_runQMakeAction, &QAction::triggered, d, &QmakeProjectManagerPluginPrivate::runQMake); - d->m_rebuildSubProjectAction = new QAction(ProjectExplorer::Icons::REBUILD.icon(), tr("Rebuild"), this); - d->m_rebuildSubProjectAction->setWhatsThis(tr("Rebuild Subproject")); + d->m_rebuildSubProjectAction = new QAction(ProjectExplorer::Icons::REBUILD.icon(), Tr::tr("Rebuild"), this); + d->m_rebuildSubProjectAction->setWhatsThis(Tr::tr("Rebuild Subproject")); command = ActionManager::registerAction(d->m_rebuildSubProjectAction, Constants::REBUILDSUBDIR, projectContext); command->setAttribute(Command::CA_Hide); command->setAttribute(Command::CA_UpdateText); @@ -233,8 +230,8 @@ bool QmakeProjectManagerPlugin::initialize(const QStringList &arguments, QString connect(d->m_rebuildSubProjectAction, &QAction::triggered, d, &QmakeProjectManagerPluginPrivate::rebuildSubDirContextMenu); - d->m_cleanSubProjectAction = new QAction(Utils::Icons::CLEAN.icon(),tr("Clean"), this); - d->m_cleanSubProjectAction->setWhatsThis(tr("Clean Subproject")); + d->m_cleanSubProjectAction = new QAction(Utils::Icons::CLEAN.icon(),Tr::tr("Clean"), this); + d->m_cleanSubProjectAction->setWhatsThis(Tr::tr("Clean Subproject")); command = ActionManager::registerAction(d->m_cleanSubProjectAction, Constants::CLEANSUBDIR, projectContext); command->setAttribute(Command::CA_Hide); command->setAttribute(Command::CA_UpdateText); @@ -243,13 +240,13 @@ bool QmakeProjectManagerPlugin::initialize(const QStringList &arguments, QString connect(d->m_cleanSubProjectAction, &QAction::triggered, d, &QmakeProjectManagerPluginPrivate::cleanSubDirContextMenu); - d->m_buildFileAction = new ParameterAction(tr("Build File"), tr("Build File \"%1\""), + d->m_buildFileAction = new ParameterAction(Tr::tr("Build File"), Tr::tr("Build File \"%1\""), ParameterAction::AlwaysEnabled, this); command = ActionManager::registerAction(d->m_buildFileAction, Constants::BUILDFILE, projectContext); command->setAttribute(Command::CA_Hide); command->setAttribute(Command::CA_UpdateText); command->setDescription(d->m_buildFileAction->text()); - command->setDefaultKeySequence(QKeySequence(tr("Ctrl+Alt+B"))); + command->setDefaultKeySequence(QKeySequence(Tr::tr("Ctrl+Alt+B"))); mbuild->addAction(command, ProjectExplorer::Constants::G_BUILD_FILE); connect(d->m_buildFileAction, &QAction::triggered, d, &QmakeProjectManagerPluginPrivate::buildFile); @@ -271,14 +268,14 @@ bool QmakeProjectManagerPlugin::initialize(const QStringList &arguments, QString command = ActionManager::command(TextEditor::Constants::JUMP_TO_FILE_UNDER_CURSOR); contextMenu->addAction(command); - d->m_addLibraryAction = new QAction(tr("Add Library..."), this); + d->m_addLibraryAction = new QAction(Tr::tr("Add Library..."), this); command = ActionManager::registerAction(d->m_addLibraryAction, Constants::ADDLIBRARY, proFileEditorContext); connect(d->m_addLibraryAction, &QAction::triggered, d, &QmakeProjectManagerPluginPrivate::addLibrary); contextMenu->addAction(command); - d->m_addLibraryActionContextMenu = new QAction(tr("Add Library..."), this); + d->m_addLibraryActionContextMenu = new QAction(Tr::tr("Add Library..."), this); command = ActionManager::registerAction(d->m_addLibraryActionContextMenu, Constants::ADDLIBRARY, projectTreeContext); connect(d->m_addLibraryActionContextMenu, &QAction::triggered, @@ -416,7 +413,7 @@ void QmakeProjectManagerPluginPrivate::runQMakeImpl(Project *p, Node *node) if (auto *profile = dynamic_cast(node)) bc->setSubNodeBuild(profile); - BuildManager::appendStep(qs, QmakeProjectManagerPlugin::tr("QMake")); + BuildManager::appendStep(qs, Tr::tr("QMake")); bc->setSubNodeBuild(nullptr); } diff --git a/src/plugins/qmakeprojectmanager/qmakeprojectmanagertr.h b/src/plugins/qmakeprojectmanager/qmakeprojectmanagertr.h index 476e8d81b91..7cdfbeeadb5 100644 --- a/src/plugins/qmakeprojectmanager/qmakeprojectmanagertr.h +++ b/src/plugins/qmakeprojectmanager/qmakeprojectmanagertr.h @@ -12,4 +12,9 @@ struct Tr Q_DECLARE_TR_FUNCTIONS(QmakeProjectManager) }; +struct BuildConfigurationTr +{ + Q_DECLARE_TR_FUNCTIONS(BuildConfiguration) +}; + } // namespace QmakeProjectManager diff --git a/src/plugins/qmakeprojectmanager/qmakesettings.cpp b/src/plugins/qmakeprojectmanager/qmakesettings.cpp index 0fd61f0d1cf..0c7777e92d4 100644 --- a/src/plugins/qmakeprojectmanager/qmakesettings.cpp +++ b/src/plugins/qmakeprojectmanager/qmakesettings.cpp @@ -2,6 +2,7 @@ // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0+ OR GPL-3.0 WITH Qt-GPL-exception-1.0 #include "qmakesettings.h" +#include "qmakeprojectmanagertr.h" #include @@ -24,21 +25,21 @@ QmakeSettings::QmakeSettings() registerAspect(&m_warnAgainstUnalignedBuildDir); m_warnAgainstUnalignedBuildDir.setSettingsKey("QmakeProjectManager/WarnAgainstUnalignedBuildDir"); m_warnAgainstUnalignedBuildDir.setDefaultValue(HostOsInfo::isWindowsHost()); - m_warnAgainstUnalignedBuildDir.setLabelText(tr("Warn if a project's source and " + m_warnAgainstUnalignedBuildDir.setLabelText(Tr::tr("Warn if a project's source and " "build directories are not at the same level")); - m_warnAgainstUnalignedBuildDir.setToolTip(tr("Qmake has subtle bugs that " + m_warnAgainstUnalignedBuildDir.setToolTip(Tr::tr("Qmake has subtle bugs that " "can be triggered if source and build directory are not at the same level.")); registerAspect(&m_alwaysRunQmake); m_alwaysRunQmake.setSettingsKey("QmakeProjectManager/AlwaysRunQmake"); - m_alwaysRunQmake.setLabelText(tr("Run qmake on every build")); - m_alwaysRunQmake.setToolTip(tr("This option can help to prevent failures on " + m_alwaysRunQmake.setLabelText(Tr::tr("Run qmake on every build")); + m_alwaysRunQmake.setToolTip(Tr::tr("This option can help to prevent failures on " "incremental builds, but might slow them down unnecessarily in the general case.")); registerAspect(&m_ignoreSystemFunction); m_ignoreSystemFunction.setSettingsKey("QmakeProjectManager/RunSystemFunction"); - m_ignoreSystemFunction.setLabelText(tr("Ignore qmake's system() function when parsing a project")); - m_ignoreSystemFunction.setToolTip(tr("Checking this option avoids unwanted side effects, " + m_ignoreSystemFunction.setLabelText(Tr::tr("Ignore qmake's system() function when parsing a project")); + m_ignoreSystemFunction.setToolTip(Tr::tr("Checking this option avoids unwanted side effects, " "but may result in inexact parsing results.")); // The settings value has been stored with the opposite meaning for a while. // Avoid changing the stored value, but flip it on read/write: @@ -72,8 +73,6 @@ QmakeSettings &QmakeSettings::instance() class SettingsWidget final : public Core::IOptionsPageWidget { - Q_DECLARE_TR_FUNCTIONS(QmakeProjectManager::Internal::QmakeSettingsPage) - public: SettingsWidget() { @@ -100,7 +99,7 @@ public: QmakeSettingsPage::QmakeSettingsPage() { setId("K.QmakeProjectManager.QmakeSettings"); - setDisplayName(SettingsWidget::tr("Qmake")); + setDisplayName(Tr::tr("Qmake")); setCategory(ProjectExplorer::Constants::BUILD_AND_RUN_SETTINGS_CATEGORY); setWidgetCreator([] { return new SettingsWidget; }); } diff --git a/src/plugins/qmakeprojectmanager/qmakestep.cpp b/src/plugins/qmakeprojectmanager/qmakestep.cpp index 79ed69b1848..2eda6a97a27 100644 --- a/src/plugins/qmakeprojectmanager/qmakestep.cpp +++ b/src/plugins/qmakeprojectmanager/qmakestep.cpp @@ -9,6 +9,7 @@ #include "qmakeparser.h" #include "qmakeproject.h" #include "qmakeprojectmanagerconstants.h" +#include "qmakeprojectmanagertr.h" #include "qmakesettings.h" #include @@ -64,17 +65,17 @@ QMakeStep::QMakeStep(BuildStepList *bsl, Id id) m_buildType = addAspect(); m_buildType->setDisplayStyle(SelectionAspect::DisplayStyle::ComboBox); - m_buildType->setDisplayName(tr("qmake build configuration:")); - m_buildType->addOption(tr("Debug")); - m_buildType->addOption(tr("Release")); + m_buildType->setDisplayName(Tr::tr("qmake build configuration:")); + m_buildType->addOption(Tr::tr("Debug")); + m_buildType->addOption(Tr::tr("Release")); m_userArgs = addAspect(macroExpander()); m_userArgs->setSettingsKey(QMAKE_ARGUMENTS_KEY); - m_userArgs->setLabelText(tr("Additional arguments:")); + m_userArgs->setLabelText(Tr::tr("Additional arguments:")); m_effectiveCall = addAspect(); m_effectiveCall->setDisplayStyle(StringAspect::TextEditDisplay); - m_effectiveCall->setLabelText(tr("Effective qmake call:")); + m_effectiveCall->setLabelText(Tr::tr("Effective qmake call:")); m_effectiveCall->setReadOnly(true); m_effectiveCall->setUndoRedoEnabled(false); m_effectiveCall->setEnabled(true); @@ -82,9 +83,9 @@ QMakeStep::QMakeStep(BuildStepList *bsl, Id id) auto updateSummary = [this] { QtVersion *qtVersion = QtKitAspect::qtVersion(target()->kit()); if (!qtVersion) - return tr("qmake: No Qt version set. Cannot run qmake."); + return Tr::tr("qmake: No Qt version set. Cannot run qmake."); const QString program = qtVersion->qmakeFilePath().fileName(); - return tr("qmake: %1 %2").arg(program, project()->projectFilePath().fileName()); + return Tr::tr("qmake: %1 %2").arg(program, project()->projectFilePath().fileName()); }; setSummaryUpdater(updateSummary); @@ -182,7 +183,7 @@ bool QMakeStep::init() const QtVersion *qtVersion = QtKitAspect::qtVersion(kit()); if (!qtVersion) { - emit addOutput(tr("No Qt version configured."), BuildStep::OutputFormat::ErrorMessage); + emit addOutput(Tr::tr("No Qt version configured."), BuildStep::OutputFormat::ErrorMessage); return false; } @@ -217,8 +218,8 @@ bool QMakeStep::init() if (m_runMakeQmake) { const FilePath make = makeCommand(); if (make.isEmpty()) { - emit addOutput(tr("Could not determine which \"make\" command to run. " - "Check the \"make\" step in the build configuration."), + emit addOutput(Tr::tr("Could not determine which \"make\" command to run. " + "Check the \"make\" step in the build configuration."), BuildStep::OutputFormat::ErrorMessage); return false; } @@ -278,7 +279,7 @@ void QMakeStep::doRun() } if (!m_needToRunQMake) { - emit addOutput(tr("Configuration unchanged, skipping qmake step."), BuildStep::OutputFormat::NormalMessage); + emit addOutput(Tr::tr("Configuration unchanged, skipping qmake step."), BuildStep::OutputFormat::NormalMessage); emit finished(true); return; } @@ -415,10 +416,10 @@ QString QMakeStep::effectiveQMakeCall() const QtVersion *qtVersion = QtKitAspect::qtVersion(kit()); FilePath qmake = qtVersion ? qtVersion->qmakeFilePath() : FilePath(); if (qmake.isEmpty()) - qmake = FilePath::fromString(tr("")); + qmake = FilePath::fromString(Tr::tr("")); FilePath make = makeCommand(); if (make.isEmpty()) - make = FilePath::fromString(tr("")); + make = FilePath::fromString(Tr::tr("")); CommandLine cmd(qmake, {}); @@ -497,7 +498,7 @@ bool QMakeStep::fromMap(const QVariantMap &map) QWidget *QMakeStep::createConfigWidget() { - abisLabel = new QLabel(tr("ABIs:")); + abisLabel = new QLabel(Tr::tr("ABIs:")); abisLabel->setAlignment(Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop); abisListWidget = new QListWidget; @@ -529,7 +530,7 @@ QWidget *QMakeStep::createConfigWidget() connect(qmakeBuildConfiguration(), &QmakeBuildConfiguration::qmlDebuggingChanged, widget, [this] { linkQmlDebuggingLibraryChanged(); - askForRebuild(tr("QML Debugging")); + askForRebuild(Tr::tr("QML Debugging")); }); connect(project(), &Project::projectLanguagesUpdated, @@ -584,14 +585,14 @@ void QMakeStep::useQtQuickCompilerChanged() { updateAbiWidgets(); updateEffectiveQMakeCall(); - askForRebuild(tr("Qt Quick Compiler")); + askForRebuild(Tr::tr("Qt Quick Compiler")); } void QMakeStep::separateDebugInfoChanged() { updateAbiWidgets(); updateEffectiveQMakeCall(); - askForRebuild(tr("Separate Debug Information")); + askForRebuild(Tr::tr("Separate Debug Information")); } static bool isIos(const Kit *k) @@ -676,7 +677,7 @@ void QMakeStep::askForRebuild(const QString &title) { auto *question = new QMessageBox(Core::ICore::dialogParent()); question->setWindowTitle(title); - question->setText(tr("The option will only take effect if the project is recompiled. Do you want to recompile now?")); + question->setText(Tr::tr("The option will only take effect if the project is recompiled. Do you want to recompile now?")); question->setStandardButtons(QMessageBox::Yes | QMessageBox::No); question->setModal(true); connect(question, &QDialog::finished, this, &QMakeStep::recompileMessageBoxFinished); @@ -756,7 +757,7 @@ QMakeStepFactory::QMakeStepFactory() setSupportedConfiguration(Constants::QMAKE_BC_ID); setSupportedStepList(ProjectExplorer::Constants::BUILDSTEPS_BUILD); //: QMakeStep default display name - setDisplayName(::QmakeProjectManager::QMakeStep::tr("qmake")); + setDisplayName(::QmakeProjectManager::Tr::tr("qmake")); // Fully qualifying for lupdate setFlags(BuildStepInfo::UniqueStep); } diff --git a/src/plugins/qmakeprojectmanager/wizards/qtwizard.cpp b/src/plugins/qmakeprojectmanager/wizards/qtwizard.cpp index a0428f28145..01045080e2b 100644 --- a/src/plugins/qmakeprojectmanager/wizards/qtwizard.cpp +++ b/src/plugins/qmakeprojectmanager/wizards/qtwizard.cpp @@ -5,6 +5,7 @@ #include #include +#include #include @@ -158,17 +159,17 @@ int BaseQmakeProjectWizardDialog::addTargetSetupPage(int id) m_targetSetupPage->setTasksGenerator([this](const Kit *k) -> Tasks { if (!QtKitAspect::qtVersionPredicate(requiredFeatures())(k)) return { - ProjectExplorer::CompileTask(Task::Error, tr("Required Qt features not present."))}; + ProjectExplorer::CompileTask(Task::Error, Tr::tr("Required Qt features not present."))}; const Utils::Id platform = selectedPlatform(); if (platform.isValid() && !QtKitAspect::platformPredicate(platform)(k)) return {ProjectExplorer::CompileTask( ProjectExplorer::Task::Warning, - tr("Qt version does not target the expected platform."))}; + Tr::tr("Qt version does not target the expected platform."))}; QSet features = {QtSupport::Constants::FEATURE_DESKTOP}; if (!QtKitAspect::qtVersionPredicate(features)(k)) return {ProjectExplorer::CompileTask(ProjectExplorer::Task::Unknown, - tr("Qt version does not provide all features."))}; + Tr::tr("Qt version does not provide all features."))}; return {}; }); diff --git a/src/plugins/qmakeprojectmanager/wizards/subdirsprojectwizard.cpp b/src/plugins/qmakeprojectmanager/wizards/subdirsprojectwizard.cpp index d5b84116ec4..3fd6f80595f 100644 --- a/src/plugins/qmakeprojectmanager/wizards/subdirsprojectwizard.cpp +++ b/src/plugins/qmakeprojectmanager/wizards/subdirsprojectwizard.cpp @@ -5,6 +5,7 @@ #include "subdirsprojectwizarddialog.h" #include "../qmakeprojectmanagerconstants.h" +#include "../qmakeprojectmanagertr.h" #include #include @@ -25,9 +26,9 @@ SubdirsProjectWizard::SubdirsProjectWizard() setCategory(QLatin1String(ProjectExplorer::Constants::QT_PROJECT_WIZARD_CATEGORY)); setDisplayCategory(QCoreApplication::translate("ProjectExplorer", ProjectExplorer::Constants::QT_PROJECT_WIZARD_CATEGORY_DISPLAY)); - setDisplayName(tr("Subdirs Project")); - setDescription(tr("Creates a qmake-based subdirs project. This allows you to group " - "your projects in a tree structure.")); + setDisplayName(Tr::tr("Subdirs Project")); + setDescription(Tr::tr("Creates a qmake-based subdirs project. This allows you to group " + "your projects in a tree structure.")); setIcon(themedIcon(":/wizards/images/gui.png")); setRequiredFeatures({QtSupport::Constants::FEATURE_QT_PREFIX}); } @@ -40,7 +41,7 @@ Core::BaseFileWizard *SubdirsProjectWizard::create(QWidget *parent, dialog->setProjectName(SubdirsProjectWizardDialog::uniqueProjectName(parameters.defaultPath())); const QString buttonText = dialog->wizardStyle() == QWizard::MacStyle - ? tr("Done && Add Subproject") : tr("Finish && Add Subproject"); + ? Tr::tr("Done && Add Subproject") : Tr::tr("Finish && Add Subproject"); dialog->setButtonText(QWizard::FinishButton, buttonText); return dialog; } @@ -71,7 +72,7 @@ bool SubdirsProjectWizard::postGenerateFiles(const QWizard *w, const Core::Gener map.insert(QLatin1String(ProjectExplorer::Constants::PREFERRED_PROJECT_NODE), profileName.toVariant()); map.insert(QLatin1String(ProjectExplorer::Constants::PROJECT_KIT_IDS), Utils::transform(wizard->selectedKits(), &Utils::Id::toString)); - IWizardFactory::requestNewItemDialog(tr("New Subproject", "Title of dialog"), + IWizardFactory::requestNewItemDialog(Tr::tr("New Subproject", "Title of dialog"), Utils::filtered(Core::IWizardFactory::allWizardFactories(), [](Core::IWizardFactory *f) { return f->supportedProjectTypes().contains(Constants::QMAKEPROJECT_ID); diff --git a/src/plugins/qmakeprojectmanager/wizards/subdirsprojectwizarddialog.cpp b/src/plugins/qmakeprojectmanager/wizards/subdirsprojectwizarddialog.cpp index 1460af761bd..52b97966c89 100644 --- a/src/plugins/qmakeprojectmanager/wizards/subdirsprojectwizarddialog.cpp +++ b/src/plugins/qmakeprojectmanager/wizards/subdirsprojectwizarddialog.cpp @@ -2,6 +2,7 @@ // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0+ OR GPL-3.0 WITH Qt-GPL-exception-1.0 #include "subdirsprojectwizarddialog.h" +#include "../qmakeprojectmanagertr.h" #include @@ -19,8 +20,8 @@ SubdirsProjectWizardDialog::SubdirsProjectWizardDialog(const Core::BaseFileWizar setWindowIcon(icon); setWindowTitle(templateName); - setIntroDescription(tr("This wizard generates a Qt Subdirs project. " - "Add subprojects to it later on by using the other wizards.")); + setIntroDescription(Tr::tr("This wizard generates a Qt Subdirs project. " + "Add subprojects to it later on by using the other wizards.")); if (!parameters.extraValues().contains(QLatin1String(ProjectExplorer::Constants::PROJECT_KIT_IDS))) addTargetSetupPage(); diff --git a/src/plugins/qmldesigner/components/edit3d/backgroundcolorselection.h b/src/plugins/qmldesigner/components/edit3d/backgroundcolorselection.h index a569e3700f5..061c5b7ea7a 100644 --- a/src/plugins/qmldesigner/components/edit3d/backgroundcolorselection.h +++ b/src/plugins/qmldesigner/components/edit3d/backgroundcolorselection.h @@ -6,6 +6,7 @@ #include #include +#include QT_FORWARD_DECLARE_CLASS(QColorDialog) diff --git a/src/plugins/qnx/qnxplugin.cpp b/src/plugins/qnx/qnxplugin.cpp index 08932b1462b..0776064d208 100644 --- a/src/plugins/qnx/qnxplugin.cpp +++ b/src/plugins/qnx/qnxplugin.cpp @@ -160,11 +160,12 @@ void QnxPlugin::extensionsInitialized() void QnxPluginPrivate::updateDebuggerActions() { - const bool hasValidQnxKit = KitManager::kit([](const Kit *kit) { - return kit->isValid() - && DeviceTypeKitAspect::deviceTypeId(kit) == Constants::QNX_QNX_OS_TYPE - && !DeviceKitAspect::device(kit).isNull(); - }) != nullptr; + auto isQnxKit = [](const Kit *kit) { + return DeviceTypeKitAspect::deviceTypeId(kit) == Constants::QNX_QNX_OS_TYPE + && !DeviceKitAspect::device(kit).isNull() && kit->isValid(); + }; + + const bool hasValidQnxKit = KitManager::kit(isQnxKit) != nullptr; m_attachToQnxApplication.setVisible(hasValidQnxKit); m_debugSeparator->setVisible(hasValidQnxKit); diff --git a/src/plugins/squish/images/jumpTo.png b/src/plugins/squish/images/jumpTo.png index d194f0c6b21..13c32a54ec5 100644 Binary files a/src/plugins/squish/images/jumpTo.png and b/src/plugins/squish/images/jumpTo.png differ diff --git a/src/plugins/squish/images/jumpTo@2x.png b/src/plugins/squish/images/jumpTo@2x.png new file mode 100644 index 00000000000..513a9a5233f Binary files /dev/null and b/src/plugins/squish/images/jumpTo@2x.png differ diff --git a/src/plugins/squish/images/objectsmap.png b/src/plugins/squish/images/objectsmap.png index 39a2a07eaec..aeab263b4a0 100644 Binary files a/src/plugins/squish/images/objectsmap.png and b/src/plugins/squish/images/objectsmap.png differ diff --git a/src/plugins/squish/images/objectsmap@2x.png b/src/plugins/squish/images/objectsmap@2x.png new file mode 100644 index 00000000000..4897f85ec81 Binary files /dev/null and b/src/plugins/squish/images/objectsmap@2x.png differ diff --git a/src/plugins/squish/propertyitemdelegate.cpp b/src/plugins/squish/propertyitemdelegate.cpp index 7db1b6a1260..c8f235f7148 100644 --- a/src/plugins/squish/propertyitemdelegate.cpp +++ b/src/plugins/squish/propertyitemdelegate.cpp @@ -137,7 +137,7 @@ ValidatingPropertyNameLineEdit::ValidatingPropertyNameLineEdit(const QStringList if (!edit) return false; - const QRegularExpression identifier("^[a-zA2-Z0-9_]+$"); + const QRegularExpression identifier("^[a-zA-Z0-9_]+$"); const QString &value = edit->text(); return !m_forbidden.contains(value) && identifier.match(value).hasMatch(); diff --git a/src/plugins/squish/squish.qrc b/src/plugins/squish/squish.qrc index c190d40bdf4..d9c7130419d 100644 --- a/src/plugins/squish/squish.qrc +++ b/src/plugins/squish/squish.qrc @@ -3,7 +3,9 @@ images/settingscategory_squish.png images/settingscategory_squish@2x.png images/objectsmap.png + images/objectsmap@2x.png images/jumpTo.png + images/jumpTo@2x.png images/data.png images/data@2x.png diff --git a/src/plugins/squish/squishfilehandler.cpp b/src/plugins/squish/squishfilehandler.cpp index 9b6200d6b72..6c3bfea6a06 100644 --- a/src/plugins/squish/squishfilehandler.cpp +++ b/src/plugins/squish/squishfilehandler.cpp @@ -193,13 +193,17 @@ void SquishFileHandler::openTestSuites() emit suitesOpened(); } -void SquishFileHandler::openTestSuite(const Utils::FilePath &suitePath) +void SquishFileHandler::openTestSuite(const Utils::FilePath &suitePath, bool isReopen) { const QString suiteName = suitePath.parentDir().fileName(); const QString suitePathStr = suitePath.toString(); const QStringList cases = SuiteConf::validTestCases(suitePath.parentDir().toString()); if (m_suites.contains(suiteName)) { + if (isReopen) { + modifySuiteItem(suiteName, suitePathStr, cases); + return; + } QMessageBox::Button replaceSuite = QMessageBox::question(Core::ICore::dialogParent(), Tr::tr("Suite Already Open"), diff --git a/src/plugins/squish/squishfilehandler.h b/src/plugins/squish/squishfilehandler.h index 4d6f41d27ce..adaccbf0f46 100644 --- a/src/plugins/squish/squishfilehandler.h +++ b/src/plugins/squish/squishfilehandler.h @@ -22,7 +22,7 @@ public: ~SquishFileHandler() override = default; static SquishFileHandler *instance(); void openTestSuites(); - void openTestSuite(const Utils::FilePath &suitePath); + void openTestSuite(const Utils::FilePath &suitePath, bool isReopen = false); void closeTestSuite(const QString &suiteName); void closeAllTestSuites(); void runTestCase(const QString &suiteName, const QString &testCaseName); diff --git a/src/plugins/squish/squishnavigationwidget.cpp b/src/plugins/squish/squishnavigationwidget.cpp index 5c77c4e30d1..b7390fdb574 100644 --- a/src/plugins/squish/squishnavigationwidget.cpp +++ b/src/plugins/squish/squishnavigationwidget.cpp @@ -5,6 +5,8 @@ #include "squishconstants.h" #include "squishfilehandler.h" +#include "squishplugin.h" +#include "squishsettings.h" #include "squishtesttreemodel.h" #include "squishtesttreeview.h" #include "squishtr.h" @@ -50,6 +52,7 @@ SquishNavigationWidget::SquishNavigationWidget(QWidget *parent) header->setSectionResizeMode(2, QHeaderView::Fixed); m_view->setHeader(header); m_view->setHeaderHidden(true); + m_view->setEditTriggers(QAbstractItemView::NoEditTriggers); QVBoxLayout *layout = new QVBoxLayout; layout->setContentsMargins(0, 0, 0, 0); @@ -132,6 +135,10 @@ void SquishNavigationWidget::contextMenuEvent(QContextMenuEvent *event) connect(runThisTestSuite, &QAction::triggered, [suiteName]() { SquishFileHandler::instance()->runTestSuite(suiteName); }); + connect(addNewTestCase, &QAction::triggered, [this, idx]() { + onNewTestCaseTriggered(idx); + }); + connect(closeTestSuite, &QAction::triggered, [suiteName]() { SquishFileHandler::instance()->closeTestSuite(suiteName); }); @@ -244,8 +251,9 @@ void SquishNavigationWidget::onItemActivated(const QModelIndex &idx) break; } - if (!item->filePath().isEmpty()) - Core::EditorManager::openEditor(Utils::FilePath::fromString(item->filePath())); + auto filePath = Utils::FilePath::fromString(item->filePath()); + if (filePath.exists()) + Core::EditorManager::openEditor(filePath); } void SquishNavigationWidget::onExpanded(const QModelIndex &idx) @@ -320,6 +328,33 @@ void SquishNavigationWidget::onRecordTestCase(const QString &suiteName, const QS SquishFileHandler::instance()->recordTestCase(suiteName, testCase); } +void SquishNavigationWidget::onNewTestCaseTriggered(const QModelIndex &index) +{ + auto settings = SquishPlugin::squishSettings(); + QTC_ASSERT(settings, return); + + if (!settings->squishPath.filePath().pathAppended("scriptmodules").exists()) { + QMessageBox::critical(Core::ICore::dialogParent(), + Tr::tr("Error"), + Tr::tr("Set up a valid Squish path to be able to create " + "a new test case.\n(Edit > Preferences > Squish)")); + return; + } + + SquishTestTreeItem *suiteItem = m_model->itemForIndex(m_sortModel->mapToSource(index)); + QTC_ASSERT(suiteItem, return); + + const QString name = suiteItem->generateTestCaseName(); + SquishTestTreeItem *item = new SquishTestTreeItem(name, SquishTestTreeItem::SquishTestCase); + item->setParentName(suiteItem->displayName()); + + m_model->addTreeItem(item); + m_view->expand(index); + QModelIndex added = m_model->indexForItem(item); + QTC_ASSERT(added.isValid(), return); + m_view->edit(m_sortModel->mapFromSource(added)); +} + SquishNavigationWidgetFactory::SquishNavigationWidgetFactory() { setDisplayName(Tr::tr("Squish")); diff --git a/src/plugins/squish/squishnavigationwidget.h b/src/plugins/squish/squishnavigationwidget.h index 5d1a83784e0..d1eab6caf3f 100644 --- a/src/plugins/squish/squishnavigationwidget.h +++ b/src/plugins/squish/squishnavigationwidget.h @@ -36,6 +36,8 @@ private: void onRemoveSharedFolderTriggered(int row, const QModelIndex &parent); void onRemoveAllSharedFolderTriggered(); void onRecordTestCase(const QString &suiteName, const QString &testCase); + void onNewTestCaseTriggered(const QModelIndex &index); + SquishTestTreeView *m_view; SquishTestTreeModel *m_model; // not owned SquishTestTreeSortModel *m_sortModel; diff --git a/src/plugins/squish/squishtesttreemodel.cpp b/src/plugins/squish/squishtesttreemodel.cpp index 80769fea00e..b8d0fbd3686 100644 --- a/src/plugins/squish/squishtesttreemodel.cpp +++ b/src/plugins/squish/squishtesttreemodel.cpp @@ -5,8 +5,10 @@ #include "squishfilehandler.h" #include "squishtr.h" +#include "suiteconf.h" #include +#include #include #include @@ -23,23 +25,23 @@ SquishTestTreeItem::SquishTestTreeItem(const QString &displayName, Type type) , m_type(type) , m_checked(Qt::Checked) { + const Qt::ItemFlags common = Qt::ItemIsEnabled | Qt::ItemIsSelectable; switch (type) { case Root: m_flags = Qt::NoItemFlags; break; case SquishSuite: - m_flags = Qt::ItemIsEnabled | Qt::ItemIsSelectable | Qt::ItemIsUserTristate - | Qt::ItemIsUserCheckable; + m_flags = common | Qt::ItemIsUserTristate | Qt::ItemIsUserCheckable; break; case SquishTestCase: - m_flags = Qt::ItemIsEnabled | Qt::ItemIsSelectable | Qt::ItemIsUserCheckable; + m_flags = common | Qt::ItemIsEditable | Qt::ItemIsUserCheckable; break; case SquishSharedData: case SquishSharedDataFolder: case SquishSharedFile: case SquishSharedFolder: case SquishSharedRoot: - m_flags = Qt::ItemIsEnabled | Qt::ItemIsSelectable; + m_flags = common; break; } } @@ -108,9 +110,41 @@ bool SquishTestTreeItem::modifyContent(const SquishTestTreeItem &other) m_displayName = other.m_displayName; m_filePath = other.m_filePath; m_parentName = other.m_parentName; + + removeChildren(); + if (other.hasChildren()) { + for (int i = 0; i < other.childCount(); ++i) { + const auto modifiedChild = static_cast(other.childAt(i)); + auto child = new SquishTestTreeItem(modifiedChild->displayName(), + modifiedChild->type()); + child->modifyContent(*modifiedChild); + appendChild(child); + } + } return modified; } +QString SquishTestTreeItem::generateTestCaseName() const +{ + QTC_ASSERT(m_type == SquishSuite, return {}); + + const auto suiteConfFilePath = Utils::FilePath::fromString(m_filePath); + const SuiteConf suiteConf = SuiteConf::readSuiteConf(suiteConfFilePath); + const QStringList used = suiteConf.usedTestCases(); + const auto suiteDir = suiteConfFilePath.parentDir(); + + const QString tmpl("tst_case"); + for (int i = 1; i < 9999; ++i) { + const QString current = tmpl + QString::number(i); + if (used.contains(current)) + continue; + const Utils::FilePath testCaseFolder = suiteDir.pathAppended(current); + if (!testCaseFolder.exists()) + return current; + } + return {}; +} + void SquishTestTreeItem::revalidateCheckState() { if (childCount() == 0) @@ -363,7 +397,7 @@ void SquishTestTreeModel::modifyTreeItem(int row, QModelIndex childIndex = index(row, 0, parent); - SquishTestTreeItem *toBeModified = static_cast(itemForIndex(childIndex)); + SquishTestTreeItem *toBeModified = itemForIndex(childIndex); if (toBeModified->modifyContent(modified)) emit dataChanged(childIndex, childIndex); diff --git a/src/plugins/squish/squishtesttreemodel.h b/src/plugins/squish/squishtesttreemodel.h index 14c763e4477..96e30cc87c2 100644 --- a/src/plugins/squish/squishtesttreemodel.h +++ b/src/plugins/squish/squishtesttreemodel.h @@ -44,7 +44,9 @@ public: Qt::CheckState checkState() const { return m_checked; } bool modifyContent(const SquishTestTreeItem &other); + QString generateTestCaseName() const; + void reloadSuite(); private: void revalidateCheckState(); diff --git a/src/plugins/squish/squishtesttreeview.cpp b/src/plugins/squish/squishtesttreeview.cpp index 86a054174c1..3a1194e2881 100644 --- a/src/plugins/squish/squishtesttreeview.cpp +++ b/src/plugins/squish/squishtesttreeview.cpp @@ -2,12 +2,24 @@ // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0+ OR GPL-3.0 WITH Qt-GPL-exception-1.0 #include "squishtesttreeview.h" -#include "squishconstants.h" -#include "squishtesttreemodel.h" +#include "squishconstants.h" +#include "squishfilehandler.h" +#include "squishplugin.h" +#include "squishsettings.h" +#include "squishtesttreemodel.h" +#include "suiteconf.h" + +#include #include #include +#include +#include +#include + +#include + namespace Squish { namespace Internal { @@ -106,5 +118,140 @@ QSize SquishTestTreeItemDelegate::sizeHint(const QStyleOptionViewItem &option, return QStyledItemDelegate::sizeHint(opt, idx); } +QWidget *SquishTestTreeItemDelegate::createEditor(QWidget *parent, + const QStyleOptionViewItem &option, + const QModelIndex &index) const +{ + Q_UNUSED(option) + QTC_ASSERT(parent, return nullptr); + QTC_ASSERT(index.isValid(), return nullptr); + auto model = static_cast(index.model()); + QTC_ASSERT(model, return nullptr); + auto srcModel = static_cast(model->sourceModel()); + + const SquishTestTreeItem *suite = srcModel->itemForIndex(model->mapToSource(index.parent())); + SquishTestTreeItem *testCaseItem = srcModel->itemForIndex(model->mapToSource(index)); + const SuiteConf suiteConf = SuiteConf::readSuiteConf(Utils::FilePath::fromString(suite->filePath())); + const QStringList inUse = suiteConf.usedTestCases(); + Utils::FancyLineEdit *editor = new Utils::FancyLineEdit(parent); + editor->setValidationFunction([inUse](Utils::FancyLineEdit *edit, QString *) { + static const QRegularExpression validFileName("^[-a-zA-Z0-9_$. ]+$"); + QString testName = edit->text(); + if (!testName.startsWith("tst_")) + testName.prepend("tst_"); + return validFileName.match(testName).hasMatch() && !inUse.contains(testName); + }); + + connect(this, &QStyledItemDelegate::closeEditor, + editor, [srcModel, testCaseItem](QWidget *, EndEditHint hint) { + QTC_ASSERT(srcModel, return); + QTC_ASSERT(testCaseItem, return); + if (hint != QAbstractItemDelegate::RevertModelCache) + return; + srcModel->destroyItem(testCaseItem); + }); + return editor; +} + +void SquishTestTreeItemDelegate::setEditorData(QWidget *editor, const QModelIndex &index) const +{ + QTC_ASSERT(editor, return); + QTC_ASSERT(index.isValid(), return); + + static_cast(editor)->setText(index.data().toString()); +} + +static Utils::FilePath scriptsPath(const Utils::FilePath &squishPath, Language language) +{ + Utils::FilePath scripts = squishPath.pathAppended("scriptmodules"); + switch (language) { + case Language::Python: scripts = scripts.pathAppended("python"); break; + case Language::Perl: scripts = scripts.pathAppended("perl"); break; + case Language::JavaScript: scripts = scripts.pathAppended("javascript"); break; + case Language::Ruby: scripts = scripts.pathAppended("ruby"); break; + case Language::Tcl: scripts = scripts.pathAppended("tcl"); break; + } + + return scripts; +} + +static bool copyScriptTemplates(const SuiteConf &suiteConf, + const Utils::FilePath &destination) +{ + const SquishSettings *s = SquishPlugin::squishSettings(); + QTC_ASSERT(s, return false); + // copy template files + Utils::FilePath squishPath = s->squishPath.filePath(); + Utils::FilePath scripts = scriptsPath(squishPath, suiteConf.language()); + + bool ok = destination.ensureWritableDir(); + QTC_ASSERT(ok, return false); + + const bool scripted = suiteConf.objectMapStyle() == "script"; + const QString extension = suiteConf.scriptExtension(); + const QString testStr = scripted ? QString("script_som_template") : QString("script_template"); + + const Utils::FilePath test = scripts.pathAppended(testStr + extension); + const Utils::FilePath testFile = destination.pathAppended("test" + extension); + ok = test.copyFile(testFile); + QTC_ASSERT(ok, return false); + + if (scripted) { + const Utils::FilePath destinationObjectMap = destination.parentDir() + .pathAppended("shared/scripts/names" + extension); + if (destinationObjectMap.exists()) + return true; + + const Utils::FilePath objectMap = scripts.pathAppended("objectmap_template" + extension); + ok = destinationObjectMap.parentDir().ensureWritableDir(); + QTC_ASSERT(ok, return false); + ok = objectMap.copyFile(destinationObjectMap); + QTC_ASSERT(ok, return false); + } + return true; +} + +void SquishTestTreeItemDelegate::setModelData(QWidget *editor, QAbstractItemModel *model, + const QModelIndex &index) const +{ + QTC_ASSERT(editor, return); + QTC_ASSERT(model, return); + QTC_ASSERT(index.isValid(), return); + + auto sortModel = static_cast(model); + auto sourceModel = static_cast(sortModel->sourceModel()); + auto lineEdit = static_cast(editor); + auto removeFormerlyAdded = [sortModel, sourceModel, &index](){ + auto item = sourceModel->itemForIndex(sortModel->mapToSource(index)); + QTC_ASSERT(item, return); + sourceModel->destroyItem(item); + }; + + if (!lineEdit->isValid()) { + // remove the formerly added again + removeFormerlyAdded(); + return; + } + + QString chosenName = lineEdit->text(); + if (!chosenName.startsWith("tst_")) + chosenName.prepend("tst_"); + + const QModelIndex parent = index.parent(); + SquishTestTreeItem *suiteItem = sourceModel->itemForIndex(sortModel->mapToSource(parent)); + const auto suiteConfPath = Utils::FilePath::fromString(suiteItem->filePath()); + SuiteConf suiteConf = SuiteConf::readSuiteConf(suiteConfPath); + const Utils::FilePath destination = suiteConfPath.parentDir().pathAppended(chosenName); + bool ok = copyScriptTemplates(suiteConf, destination); + QTC_ASSERT(ok, removeFormerlyAdded(); return); + + suiteConf.addTestCase(chosenName); + ok = suiteConf.write(); + QTC_ASSERT(ok, removeFormerlyAdded(); return); + SquishFileHandler::instance()->openTestSuite(suiteConfPath, true); + + Core::EditorManager::openEditor(destination.pathAppended("test" + suiteConf.scriptExtension())); +} + } // namespace Internal } // namespace Squish diff --git a/src/plugins/squish/squishtesttreeview.h b/src/plugins/squish/squishtesttreeview.h index de263f7480c..3ccdf61a844 100644 --- a/src/plugins/squish/squishtesttreeview.h +++ b/src/plugins/squish/squishtesttreeview.h @@ -43,6 +43,12 @@ public: const QStyleOptionViewItem &option, const QModelIndex &idx) const override; QSize sizeHint(const QStyleOptionViewItem &option, const QModelIndex &index) const override; + + QWidget *createEditor(QWidget *parent, const QStyleOptionViewItem &option, + const QModelIndex &index) const override; + void setEditorData(QWidget *editor, const QModelIndex &index) const override; + void setModelData(QWidget *editor, QAbstractItemModel *model, + const QModelIndex &index) const override; }; } // namespace Internal diff --git a/src/plugins/squish/suiteconf.cpp b/src/plugins/squish/suiteconf.cpp index fe03145fc65..94b78900ec1 100644 --- a/src/plugins/squish/suiteconf.cpp +++ b/src/plugins/squish/suiteconf.cpp @@ -3,10 +3,12 @@ #include "suiteconf.h" +#include + +#include #include #include -#include namespace Squish { namespace Internal { @@ -17,22 +19,155 @@ const char squishAutKey[] = "AUT"; const char objectsMapKey[] = "OBJECTMAP"; const char objectMapStyleKey[] = "OBJECTMAPSTYLE"; +// splits an input string into chunks separated by ws, but keeps quoted items without splitting +// them (quotes get removed inside the resulting list) +static QStringList parseHelper(const QStringView input) +{ + if (input.isEmpty()) + return {}; + + QStringList result; + QString chunk; + + auto appendChunk = [&]() { + if (!chunk.isEmpty()) + result.append(chunk); + chunk.clear(); + }; + + bool inQuote = false; + for (const QChar &inChar : input) { + switch (inChar.toLatin1()) { + case '"': + appendChunk(); + inQuote = !inQuote; + break; + case ' ': + if (!inQuote) { + appendChunk(); + break; + } + Q_FALLTHROUGH(); + default: + chunk.append(inChar); + } + } + appendChunk(); + return result; +} + +static QString quoteIfNeeded(const QString &input) +{ + if (input.contains(' ')) + return QString('"' + input + '"'); + return input; +} + +// joins items, separating them by single ws and quoting items if needed +static QString joinItems(const QStringList &items) +{ + QStringList result; + for (const QString ¤t : items) + result.append(quoteIfNeeded(current)); + return result.join(' '); +} + +static QMap readSuiteConfContent(const Utils::FilePath &file) +{ + if (!file.isReadableFile()) + return {}; + + std::optional suiteConfContent = file.fileContents(); + if (!suiteConfContent) + return {}; + + QMap suiteConf; + int invalidCounter = 0; + static const QRegularExpression validLine("^(?[A-Z_]+)=(?.*)$"); + for (const QByteArray &line : suiteConfContent->split('\n')) { + const QString utf8Line = QString::fromUtf8(line.trimmed()); + if (utf8Line.isEmpty()) // skip empty lines + continue; + const QRegularExpressionMatch match = validLine.match(utf8Line); + if (match.hasMatch()) + suiteConf.insert(match.captured("key"), match.captured("value")); + else // save invalid lines + suiteConf.insert(QString::number(++invalidCounter), utf8Line); + } + return suiteConf; +} + +static bool writeSuiteConfContent(const Utils::FilePath &file, const QMap &data) +{ + auto isNumber = [](const QString &str) { + return !str.isEmpty() && Utils::allOf(str, &QChar::isDigit); + }; + QByteArray outData; + for (auto it = data.begin(), end = data.end(); it != end; ++it) { + if (isNumber(it.key())) // an invalid line we just write out as we got it + outData.append(it.value().toUtf8()).append('\n'); + else + outData.append(it.key().toUtf8()).append('=').append(it.value().toUtf8()).append('\n'); + } + return file.writeFileContents(outData); +} + bool SuiteConf::read() { - if (!m_filePath.isReadableFile()) - return false; + const QMap suiteConf = readSuiteConfContent(m_filePath); - const QSettings suiteConf(m_filePath.toString(), QSettings::IniFormat); // TODO get all information - actually only the information needed now is fetched - m_aut = suiteConf.value(squishAutKey).toString(); - // TODO args are listed in config.xml? - setLanguage(suiteConf.value(squishLanguageKey).toString()); - m_testcases = suiteConf.value(squishTestCasesKey).toString(); - m_objectMap = suiteConf.value(objectsMapKey).toString(); - m_objectMapStyle = suiteConf.value(objectMapStyleKey).toString(); + const QStringList parsedAUT = parseHelper(suiteConf.value(squishAutKey)); + if (parsedAUT.isEmpty()) { + m_aut.clear(); + m_arguments.clear(); + } else { + m_aut = parsedAUT.first(); + if (parsedAUT.size() > 1) + m_arguments = joinItems(parsedAUT.mid(1)); + else + m_arguments.clear(); + } + + setLanguage(suiteConf.value(squishLanguageKey)); + m_testcases = suiteConf.value(squishTestCasesKey); + m_objectMap = suiteConf.value(objectsMapKey); + m_objectMapStyle = suiteConf.value(objectMapStyleKey); return true; } +static QString languageEntry(Language language) +{ + switch (language) { + case Language::Python: return "Python"; + case Language::Perl: return "Perl"; + case Language::JavaScript: return "JavaScript"; + case Language::Ruby: return "Ruby"; + case Language::Tcl: return "Tcl"; + } + return {}; +} + +bool SuiteConf::write() +{ + Core::DocumentManager::expectFileChange(m_filePath); + + // we need the original suite.conf content to handle invalid content "correctly" + QMap suiteConf = readSuiteConfContent(m_filePath); + if (m_arguments.isEmpty()) + suiteConf.insert(squishAutKey, quoteIfNeeded(m_aut)); + else if (QTC_GUARD(!m_aut.isEmpty())) + suiteConf.insert(squishAutKey, QString(quoteIfNeeded(m_aut) + ' ' + m_arguments)); + + suiteConf.insert(squishLanguageKey, languageEntry(m_language)); + suiteConf.insert(objectsMapKey, m_objectMap); + if (!m_objectMap.isEmpty()) + suiteConf.insert(objectMapStyleKey, m_objectMapStyle); + suiteConf.insert(squishTestCasesKey, m_testcases); + + return writeSuiteConfContent(m_filePath, suiteConf); +} + QString SuiteConf::langParameter() const { switch (m_language) { @@ -61,7 +196,38 @@ QString SuiteConf::scriptExtension() const QStringList SuiteConf::testCases() const { - return m_testcases.split(QRegularExpression("\\s+")); + return parseHelper(m_testcases); +} + +QStringList SuiteConf::usedTestCases() const +{ + QStringList result = testCases(); + + auto suiteDir = m_filePath.parentDir(); + const Utils::FilePaths entries = Utils::filtered( + suiteDir.dirEntries(QDir::Dirs | QDir::NoDotAndDotDot), + [](const Utils::FilePath &fp) { + return fp.fileName().startsWith("tst_"); + }); + const QStringList testCaseNames = Utils::transform(entries, &Utils::FilePath::fileName); + for (const QString &testCaseName : testCaseNames) { + if (result.contains(testCaseName)) + continue; + result.append(testCaseName); // should this check for test.*? + } + return result; +} + +void SuiteConf::addTestCase(const QString &name) +{ + QStringList current = testCases(); + int insertAt = 0; + for (int count = current.count(); insertAt < count; ++insertAt) { + if (current.at(insertAt) > name) + break; + } + current.insert(insertAt, name); + m_testcases = joinItems(current); } void SuiteConf::setLanguage(const QString &language) @@ -94,10 +260,19 @@ QStringList SuiteConf::validTestCases(const QString &baseDirectory) const Utils::FilePath testCaseDir = subDir / testCase; if (testCaseDir.isDir()) { Utils::FilePath testCaseTest = testCaseDir.pathAppended("test" + extension); - if (testCaseTest.isFile()) - validCases.append(testCaseTest.toString()); + validCases.append(testCaseTest.toString()); } } + + // now unlisted matching tests (suite.conf's TEST_CASES is used for some ordering) + const Utils::FilePaths entries = subDir.dirEntries(QDir::Dirs | QDir::NoDotAndDotDot); + for (const Utils::FilePath &entry : entries) { + if (!entry.fileName().startsWith("tst_")) + continue; + const QString testFileStr = entry.pathAppended("test" + extension).toString(); + if (!validCases.contains(testFileStr)) + validCases.append(testFileStr); + } } return validCases; } diff --git a/src/plugins/squish/suiteconf.h b/src/plugins/squish/suiteconf.h index bf6734d14bb..8c96f71ed5f 100644 --- a/src/plugins/squish/suiteconf.h +++ b/src/plugins/squish/suiteconf.h @@ -21,6 +21,7 @@ public: static QStringList validTestCases(const QString &baseDirectory); bool read(); + bool write(); QString aut() const { return m_aut; } void setAut(const QString &aut) { m_aut = aut; } @@ -32,7 +33,9 @@ public: QString objectMapStyle() const { return m_objectMapStyle; } QString scriptExtension() const; QStringList testCases() const; + void addTestCase(const QString &testCase); + QStringList usedTestCases() const; private: void setLanguage(const QString &language); diff --git a/src/plugins/subversion/subversionclient.cpp b/src/plugins/subversion/subversionclient.cpp index 8db5e2543fe..8e614c0430a 100644 --- a/src/plugins/subversion/subversionclient.cpp +++ b/src/plugins/subversion/subversionclient.cpp @@ -7,9 +7,6 @@ #include -#include -#include - #include #include #include diff --git a/src/plugins/texteditor/texteditor.cpp b/src/plugins/texteditor/texteditor.cpp index 0bfe7c06d16..dc28b7f3bfc 100644 --- a/src/plugins/texteditor/texteditor.cpp +++ b/src/plugins/texteditor/texteditor.cpp @@ -492,7 +492,6 @@ public: TextEditorWidgetPrivate(TextEditorWidget *parent); ~TextEditorWidgetPrivate() override; - void setupDocumentSignals(); void updateLineSelectionColor(); void print(QPrinter *printer); @@ -503,7 +502,7 @@ public: void collectToCircularClipboard(); void setClipboardSelection(); - void ctor(const QSharedPointer &doc); + void setDocument(const QSharedPointer &doc); void handleHomeKey(bool anchor, bool block); void handleBackspaceKey(); void moveLineUpDown(bool up); @@ -588,6 +587,7 @@ public: void slotUpdateRequest(const QRect &r, int dy); void slotUpdateBlockNotify(const QTextBlock &); void updateTabStops(); + void applyTabSettings(); void applyFontSettingsDelayed(); void markRemoved(TextMark *mark); @@ -652,15 +652,12 @@ public: bool m_lastCursorChangeWasInteresting = false; QSharedPointer m_document; + QList m_documentConnections; QByteArray m_tempState; QByteArray m_tempNavigationState; bool m_parenthesesMatchingEnabled = false; - - // parentheses matcher - bool m_formatRange = false; QTimer m_parenthesesMatchingTimer; - // end parentheses matcher QWidget *m_extraArea = nullptr; @@ -891,19 +888,23 @@ void TextEditorWidgetFind::cancelCurrentSelectAll() } TextEditorWidgetPrivate::TextEditorWidgetPrivate(TextEditorWidget *parent) - : q(parent), - m_marksVisible(false), - m_codeFoldingVisible(false), - m_codeFoldingSupported(false), - m_revisionsVisible(false), - m_lineNumbersVisible(true), - m_highlightCurrentLine(true), - m_requestMarkEnabled(true), - m_lineSeparatorsAllowed(false), - m_maybeFakeTooltipEvent(false), - m_hoverHandlerRunner(parent, m_hoverHandlers), - m_clipboardAssistProvider(new ClipboardAssistProvider), - m_autoCompleter(new AutoCompleter) + : q(parent) + , m_marksVisible(false) + , m_codeFoldingVisible(false) + , m_codeFoldingSupported(false) + , m_revisionsVisible(false) + , m_lineNumbersVisible(true) + , m_highlightCurrentLine(true) + , m_requestMarkEnabled(true) + , m_lineSeparatorsAllowed(false) + , m_maybeFakeTooltipEvent(false) + , m_hoverHandlerRunner(parent, m_hoverHandlers) + , m_clipboardAssistProvider(new ClipboardAssistProvider) + , m_autoCompleter(new AutoCompleter) + , m_overlay(new TextEditorOverlay(q)) + , m_snippetOverlay(new SnippetOverlay(q)) + , m_searchResultOverlay(new TextEditorOverlay(q)) + , m_refactorOverlay(new RefactorOverlay(q)) { auto aggregate = new Aggregation::Aggregate; m_find = new TextEditorWidgetFind(q); @@ -947,6 +948,68 @@ TextEditorWidgetPrivate::TextEditorWidgetPrivate(TextEditorWidget *parent) m_fileEncodingLabelAction = m_toolBar->addWidget(m_fileEncodingLabel); m_extraSelections.reserve(NExtraSelectionKinds); + + connect(&m_codeAssistant, &CodeAssistant::finished, + q, &TextEditorWidget::assistFinished); + + connect(q, &QPlainTextEdit::blockCountChanged, + this, &TextEditorWidgetPrivate::slotUpdateExtraAreaWidth); + + connect(q, &QPlainTextEdit::modificationChanged, + m_extraArea, QOverload<>::of(&QWidget::update)); + + connect(q, &QPlainTextEdit::cursorPositionChanged, + q, &TextEditorWidget::slotCursorPositionChanged); + + connect(q, &QPlainTextEdit::cursorPositionChanged, + this, &TextEditorWidgetPrivate::updateCursorPosition); + + connect(q, &QPlainTextEdit::updateRequest, + this, &TextEditorWidgetPrivate::slotUpdateRequest); + + connect(q, &QPlainTextEdit::selectionChanged, + this, &TextEditorWidgetPrivate::slotSelectionChanged); + + m_parenthesesMatchingTimer.setSingleShot(true); + m_parenthesesMatchingTimer.setInterval(50); + connect(&m_parenthesesMatchingTimer, &QTimer::timeout, + this, &TextEditorWidgetPrivate::_q_matchParentheses); + + m_highlightBlocksTimer.setSingleShot(true); + connect(&m_highlightBlocksTimer, &QTimer::timeout, + this, &TextEditorWidgetPrivate::_q_highlightBlocks); + + m_scrollBarUpdateTimer.setSingleShot(true); + connect(&m_scrollBarUpdateTimer, &QTimer::timeout, + this, &TextEditorWidgetPrivate::highlightSearchResultsInScrollBar); + + m_delayedUpdateTimer.setSingleShot(true); + connect(&m_delayedUpdateTimer, &QTimer::timeout, + q->viewport(), QOverload<>::of(&QWidget::update)); + + connect(m_fileEncodingLabel, &FixedSizeClickLabel::clicked, + q, &TextEditorWidget::selectEncoding); + + connect(m_fileLineEnding, &QComboBox::currentIndexChanged, + q, &TextEditorWidget::selectLineEnding); + + TextEditorSettings *settings = TextEditorSettings::instance(); + + // Connect to settings change signals + connect(settings, &TextEditorSettings::typingSettingsChanged, + q, &TextEditorWidget::setTypingSettings); + connect(settings, &TextEditorSettings::storageSettingsChanged, + q, &TextEditorWidget::setStorageSettings); + connect(settings, &TextEditorSettings::behaviorSettingsChanged, + q, &TextEditorWidget::setBehaviorSettings); + connect(settings, &TextEditorSettings::marginSettingsChanged, + q, &TextEditorWidget::setMarginSettings); + connect(settings, &TextEditorSettings::displaySettingsChanged, + q, &TextEditorWidget::setDisplaySettings); + connect(settings, &TextEditorSettings::completionSettingsChanged, + q, &TextEditorWidget::setCompletionSettings); + connect(settings, &TextEditorSettings::extraEncodingSettingsChanged, + q, &TextEditorWidget::setExtraEncodingSettings); } TextEditorWidgetPrivate::~TextEditorWidgetPrivate() @@ -1089,11 +1152,16 @@ TextEditorWidget::TextEditorWidget(QWidget *parent) // passed to this object's event() which uses 'd'. d = nullptr; d = new TextEditorWidgetPrivate(this); + + setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOn); + setLayoutDirection(Qt::LeftToRight); + viewport()->setMouseTracking(true); + setFrameStyle(QFrame::NoFrame); } void TextEditorWidget::setTextDocument(const QSharedPointer &doc) { - d->ctor(doc); + d->setDocument(doc); } void TextEditorWidgetPrivate::setupScrollBar() @@ -1111,105 +1179,160 @@ void TextEditorWidgetPrivate::setupScrollBar() } } -void TextEditorWidgetPrivate::ctor(const QSharedPointer &doc) +void TextEditorWidgetPrivate::setDocument(const QSharedPointer &doc) { - q->setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOn); + QSharedPointer previousDocument = m_document; + for (const QMetaObject::Connection &connection : m_documentConnections) + disconnect(connection); + m_documentConnections.clear(); - m_overlay = new TextEditorOverlay(q); - m_snippetOverlay = new SnippetOverlay(q); - m_searchResultOverlay = new TextEditorOverlay(q); - m_refactorOverlay = new RefactorOverlay(q); + m_document = doc; + q->QPlainTextEdit::setDocument(doc->document()); + previousDocument.clear(); + q->setCursorWidth(2); // Applies to the document layout - { - // QPlainTextEdit keeps pointer to the old QTextDocumentLayout, - // and QPlainTextEdit::setDocument() disconnects unconditionally from the old layout. - // Since the old layout it being deleted together with the old text document when - // dropping the shared pointer reference, QPlainTextEdit::setDocument() will crash. - // We prolong the lifetime of the old document and its layout by keeping the - // shared pointer still for a while. - QSharedPointer lifetimeProlonger = m_document; - m_document = doc; - setupDocumentSignals(); - } + auto documentLayout = qobject_cast( + m_document->document()->documentLayout()); + QTC_CHECK(documentLayout); + + m_documentConnections << connect(documentLayout, + &QPlainTextDocumentLayout::updateBlock, + this, + &TextEditorWidgetPrivate::slotUpdateBlockNotify); + + m_documentConnections << connect(documentLayout, + &TextDocumentLayout::updateExtraArea, + m_extraArea, + QOverload<>::of(&QWidget::update)); + + m_documentConnections << connect(q, + &TextEditorWidget::requestBlockUpdate, + documentLayout, + &QPlainTextDocumentLayout::updateBlock); + + m_documentConnections << connect(documentLayout, + &TextDocumentLayout::updateExtraArea, + this, + &TextEditorWidgetPrivate::scheduleUpdateHighlightScrollBar); + + m_documentConnections << connect(documentLayout, + &TextDocumentLayout::parenthesesChanged, + &m_parenthesesMatchingTimer, + QOverload<>::of(&QTimer::start)); + + m_documentConnections << connect(documentLayout, + &QAbstractTextDocumentLayout::documentSizeChanged, + this, + &TextEditorWidgetPrivate::scheduleUpdateHighlightScrollBar); + + m_documentConnections << connect(documentLayout, + &QAbstractTextDocumentLayout::update, + this, + &TextEditorWidgetPrivate::scheduleUpdateHighlightScrollBar); + + m_documentConnections << connect(m_document->document(), + &QTextDocument::contentsChange, + this, + &TextEditorWidgetPrivate::editorContentsChange); + + m_documentConnections << connect(m_document->document(), + &QTextDocument::modificationChanged, + q, + &TextEditorWidget::updateTextCodecLabel); + + m_documentConnections << connect(m_document->document(), + &QTextDocument::modificationChanged, + q, + &TextEditorWidget::updateTextLineEndingLabel); + + m_documentConnections << connect(m_document.data(), + &TextDocument::aboutToReload, + this, + &TextEditorWidgetPrivate::documentAboutToBeReloaded); + + m_documentConnections << connect(m_document.data(), + &TextDocument::reloadFinished, + this, + &TextEditorWidgetPrivate::documentReloadFinished); + + m_documentConnections << connect(m_document.data(), + &TextDocument::tabSettingsChanged, + this, + &TextEditorWidgetPrivate::applyTabSettings); + + m_documentConnections << connect(m_document.data(), + &TextDocument::fontSettingsChanged, + this, + &TextEditorWidgetPrivate::applyFontSettingsDelayed); + + m_documentConnections << connect(m_document.data(), + &TextDocument::markRemoved, + this, + &TextEditorWidgetPrivate::markRemoved); + + m_documentConnections << connect(m_document.data(), + &TextDocument::aboutToOpen, + q, + &TextEditorWidget::aboutToOpen); + + m_documentConnections << connect(m_document.data(), + &TextDocument::openFinishedSuccessfully, + q, + &TextEditorWidget::openFinishedSuccessfully); + + m_documentConnections << connect(TextEditorSettings::instance(), + &TextEditorSettings::fontSettingsChanged, + m_document.data(), + &TextDocument::setFontSettings); + + slotUpdateExtraAreaWidth(); + + // Apply current settings + // the document might already have the same settings as we set here in which case we do not + // get an update, so we have to trigger updates manually here + const FontSettings fontSettings = TextEditorSettings::fontSettings(); + if (m_document->fontSettings() == fontSettings) + applyFontSettingsDelayed(); + else + m_document->setFontSettings(fontSettings); + const TabSettings tabSettings = TextEditorSettings::codeStyle()->tabSettings(); + if (m_document->tabSettings() == tabSettings) + applyTabSettings(); + else + m_document->setTabSettings(tabSettings); // also set through code style ??? + + q->setTypingSettings(TextEditorSettings::typingSettings()); + q->setStorageSettings(TextEditorSettings::storageSettings()); + q->setBehaviorSettings(TextEditorSettings::behaviorSettings()); + q->setMarginSettings(TextEditorSettings::marginSettings()); + q->setDisplaySettings(TextEditorSettings::displaySettings()); + q->setCompletionSettings(TextEditorSettings::completionSettings()); + q->setExtraEncodingSettings(TextEditorSettings::extraEncodingSettings()); + q->setCodeStyle(TextEditorSettings::codeStyle(m_tabSettingsId)); m_blockCount = doc->document()->blockCount(); // from RESEARCH - q->setLayoutDirection(Qt::LeftToRight); - q->viewport()->setMouseTracking(true); - extraAreaSelectionAnchorBlockNumber = -1; extraAreaToggleMarkBlockNumber = -1; extraAreaHighlightFoldedBlockNumber = -1; visibleFoldedBlockNumber = -1; suggestedVisibleFoldedBlockNumber = -1; - QObject::connect(&m_codeAssistant, &CodeAssistant::finished, - q, &TextEditorWidget::assistFinished); - - QObject::connect(q, &QPlainTextEdit::blockCountChanged, - this, &TextEditorWidgetPrivate::slotUpdateExtraAreaWidth); - - QObject::connect(q, &QPlainTextEdit::modificationChanged, - m_extraArea, QOverload<>::of(&QWidget::update)); - - QObject::connect(q, &QPlainTextEdit::cursorPositionChanged, - q, &TextEditorWidget::slotCursorPositionChanged); - - QObject::connect(q, &QPlainTextEdit::cursorPositionChanged, - this, &TextEditorWidgetPrivate::updateCursorPosition); - - QObject::connect(q, &QPlainTextEdit::updateRequest, - this, &TextEditorWidgetPrivate::slotUpdateRequest); - - QObject::connect(q, &QPlainTextEdit::selectionChanged, - this, &TextEditorWidgetPrivate::slotSelectionChanged); - - // parentheses matcher - m_formatRange = true; - m_parenthesesMatchingTimer.setSingleShot(true); - m_parenthesesMatchingTimer.setInterval(50); - QObject::connect(&m_parenthesesMatchingTimer, &QTimer::timeout, - this, &TextEditorWidgetPrivate::_q_matchParentheses); - - m_highlightBlocksTimer.setSingleShot(true); - QObject::connect(&m_highlightBlocksTimer, &QTimer::timeout, - this, &TextEditorWidgetPrivate::_q_highlightBlocks); - - m_scrollBarUpdateTimer.setSingleShot(true); - QObject::connect(&m_scrollBarUpdateTimer, &QTimer::timeout, - this, &TextEditorWidgetPrivate::highlightSearchResultsInScrollBar); - - m_bracketsAnimator = nullptr; - m_autocompleteAnimator = nullptr; + if (m_bracketsAnimator) + m_bracketsAnimator->finish(); + if (m_autocompleteAnimator) + m_autocompleteAnimator->finish(); slotUpdateExtraAreaWidth(); updateHighlights(); - q->setFrameStyle(QFrame::NoFrame); - - m_delayedUpdateTimer.setSingleShot(true); - QObject::connect(&m_delayedUpdateTimer, &QTimer::timeout, - q->viewport(), QOverload<>::of(&QWidget::update)); m_moveLineUndoHack = false; updateCannotDecodeInfo(); - QObject::connect(m_document.data(), &TextDocument::aboutToOpen, - q, &TextEditorWidget::aboutToOpen); - QObject::connect(m_document.data(), &TextDocument::openFinishedSuccessfully, - q, &TextEditorWidget::openFinishedSuccessfully); - connect(m_fileEncodingLabel, &FixedSizeClickLabel::clicked, - q, &TextEditorWidget::selectEncoding); - connect(m_document->document(), &QTextDocument::modificationChanged, - q, &TextEditorWidget::updateTextCodecLabel); q->updateTextCodecLabel(); - - connect(m_fileLineEnding, &QComboBox::currentIndexChanged, - q, &TextEditorWidget::selectLineEnding); - connect(m_document->document(), &QTextDocument::modificationChanged, - q, &TextEditorWidget::updateTextLineEndingLabel); q->updateTextLineEndingLabel(); setupFromDefinition(currentDefinition()); } @@ -3445,91 +3568,6 @@ AutoCompleter *TextEditorWidget::autoCompleter() const // TextEditorWidgetPrivate // -void TextEditorWidgetPrivate::setupDocumentSignals() -{ - QTextDocument *doc = m_document->document(); - q->QPlainTextEdit::setDocument(doc); - q->setCursorWidth(2); // Applies to the document layout - - auto documentLayout = qobject_cast(doc->documentLayout()); - QTC_CHECK(documentLayout); - - QObject::connect(documentLayout, &QPlainTextDocumentLayout::updateBlock, - this, &TextEditorWidgetPrivate::slotUpdateBlockNotify); - - QObject::connect(documentLayout, &TextDocumentLayout::updateExtraArea, - m_extraArea, QOverload<>::of(&QWidget::update)); - - QObject::connect(q, &TextEditorWidget::requestBlockUpdate, - documentLayout, &QPlainTextDocumentLayout::updateBlock); - - QObject::connect(documentLayout, &TextDocumentLayout::updateExtraArea, - this, &TextEditorWidgetPrivate::scheduleUpdateHighlightScrollBar); - - QObject::connect(documentLayout, &TextDocumentLayout::parenthesesChanged, - &m_parenthesesMatchingTimer, QOverload<>::of(&QTimer::start)); - - QObject::connect(documentLayout, &QAbstractTextDocumentLayout::documentSizeChanged, - this, &TextEditorWidgetPrivate::scheduleUpdateHighlightScrollBar); - - QObject::connect(documentLayout, &QAbstractTextDocumentLayout::update, - this, &TextEditorWidgetPrivate::scheduleUpdateHighlightScrollBar); - - QObject::connect(doc, &QTextDocument::contentsChange, - this, &TextEditorWidgetPrivate::editorContentsChange); - - QObject::connect(m_document.data(), &TextDocument::aboutToReload, - this, &TextEditorWidgetPrivate::documentAboutToBeReloaded); - - QObject::connect(m_document.data(), &TextDocument::reloadFinished, - this, &TextEditorWidgetPrivate::documentReloadFinished); - - QObject::connect(m_document.data(), &TextDocument::tabSettingsChanged, this, [this] { - updateTabStops(); - m_autoCompleter->setTabSettings(m_document->tabSettings()); - }); - - QObject::connect(m_document.data(), &TextDocument::fontSettingsChanged, - this, &TextEditorWidgetPrivate::applyFontSettingsDelayed); - - QObject::connect(m_document.data(), &TextDocument::markRemoved, - this, &TextEditorWidgetPrivate::markRemoved); - - slotUpdateExtraAreaWidth(); - - TextEditorSettings *settings = TextEditorSettings::instance(); - - // Connect to settings change signals - connect(settings, &TextEditorSettings::fontSettingsChanged, - m_document.data(), &TextDocument::setFontSettings); - connect(settings, &TextEditorSettings::typingSettingsChanged, - q, &TextEditorWidget::setTypingSettings); - connect(settings, &TextEditorSettings::storageSettingsChanged, - q, &TextEditorWidget::setStorageSettings); - connect(settings, &TextEditorSettings::behaviorSettingsChanged, - q, &TextEditorWidget::setBehaviorSettings); - connect(settings, &TextEditorSettings::marginSettingsChanged, - q, &TextEditorWidget::setMarginSettings); - connect(settings, &TextEditorSettings::displaySettingsChanged, - q, &TextEditorWidget::setDisplaySettings); - connect(settings, &TextEditorSettings::completionSettingsChanged, - q, &TextEditorWidget::setCompletionSettings); - connect(settings, &TextEditorSettings::extraEncodingSettingsChanged, - q, &TextEditorWidget::setExtraEncodingSettings); - - // Apply current settings - m_document->setFontSettings(TextEditorSettings::fontSettings()); - m_document->setTabSettings(TextEditorSettings::codeStyle()->tabSettings()); // also set through code style ??? - q->setTypingSettings(TextEditorSettings::typingSettings()); - q->setStorageSettings(TextEditorSettings::storageSettings()); - q->setBehaviorSettings(TextEditorSettings::behaviorSettings()); - q->setMarginSettings(TextEditorSettings::marginSettings()); - q->setDisplaySettings(TextEditorSettings::displaySettings()); - q->setCompletionSettings(TextEditorSettings::completionSettings()); - q->setExtraEncodingSettings(TextEditorSettings::extraEncodingSettings()); - q->setCodeStyle(TextEditorSettings::codeStyle(m_tabSettingsId)); -} - bool TextEditorWidgetPrivate::snippetCheckCursor(const QTextCursor &cursor) { if (!m_snippetOverlay->isVisible() || m_snippetOverlay->isEmpty()) @@ -4520,7 +4558,6 @@ void TextEditorWidgetPrivate::paintCursor(const PaintEventData &data, QPainter & void TextEditorWidgetPrivate::setupBlockLayout(const PaintEventData &data, QPainter &painter, PaintEventBlockData &blockData) const - { blockData.layout = data.block.layout(); @@ -7378,6 +7415,11 @@ void TextEditorWidget::applyFontSettings() if (font != this->font()) { setFont(font); d->updateTabStops(); // update tab stops, they depend on the font + } else if (font != document()->defaultFont()) { + // When the editor already have the correct font configured it wont generate a font change + // signal. In turn the default font of the document wont get updated so we need to do that + // manually here + document()->setDefaultFont(font); } // Line numbers @@ -8280,6 +8322,12 @@ void TextEditorWidgetPrivate::updateTabStops() q->document()->setDefaultTextOption(option); } +void TextEditorWidgetPrivate::applyTabSettings() +{ + updateTabStops(); + m_autoCompleter->setTabSettings(m_document->tabSettings()); +} + int TextEditorWidget::columnCount() const { QFontMetricsF fm(font()); diff --git a/src/plugins/vcsbase/CMakeLists.txt b/src/plugins/vcsbase/CMakeLists.txt index 489e65a69cb..327e872b5f7 100644 --- a/src/plugins/vcsbase/CMakeLists.txt +++ b/src/plugins/vcsbase/CMakeLists.txt @@ -9,9 +9,9 @@ add_qtc_plugin(VcsBase cleandialog.cpp cleandialog.h commonvcssettings.cpp commonvcssettings.h diffandloghighlighter.cpp diffandloghighlighter.h - nicknamedialog.cpp nicknamedialog.h nicknamedialog.ui + nicknamedialog.cpp nicknamedialog.h submiteditorfile.cpp submiteditorfile.h - submiteditorwidget.cpp submiteditorwidget.h submiteditorwidget.ui + submiteditorwidget.cpp submiteditorwidget.h submitfieldwidget.cpp submitfieldwidget.h submitfilemodel.cpp submitfilemodel.h vcsbase.qrc diff --git a/src/plugins/vcsbase/nicknamedialog.cpp b/src/plugins/vcsbase/nicknamedialog.cpp index d5427c9434f..1a5a529950c 100644 --- a/src/plugins/vcsbase/nicknamedialog.cpp +++ b/src/plugins/vcsbase/nicknamedialog.cpp @@ -2,11 +2,14 @@ // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0+ OR GPL-3.0 WITH Qt-GPL-exception-1.0 #include "nicknamedialog.h" -#include "ui_nicknamedialog.h" +#include #include +#include +#include #include +#include #include #include #include @@ -28,8 +31,7 @@ enum { NickNameRole = Qt::UserRole + 1 }; be preferred. */ -namespace VcsBase { -namespace Internal { +namespace VcsBase::Internal { // For code clarity, a struct representing the entries of a mail map file // with parse and model functions. @@ -143,42 +145,54 @@ QDebug operator<<(QDebug d, const NickNameEntry &e) NickNameDialog::NickNameDialog(QStandardItemModel *model, QWidget *parent) : QDialog(parent), - m_ui(new Internal::Ui::NickNameDialog), m_model(model), m_filterModel(new QSortFilterProxyModel(this)) { - m_ui->setupUi(this); + auto filterLineEdit = new FancyLineEdit; + + m_filterTreeView = new TreeView; + + m_buttonBox = new QDialogButtonBox(QDialogButtonBox::Cancel|QDialogButtonBox::Ok); + okButton()->setEnabled(false); // Populate model and grow tree to accommodate it m_filterModel->setSourceModel(model); m_filterModel->setFilterCaseSensitivity(Qt::CaseInsensitive); - m_ui->filterTreeView->setModel(m_filterModel); - m_ui->filterTreeView->setActivationMode(DoubleClickActivation); + m_filterTreeView->setModel(m_filterModel); + m_filterTreeView->setActivationMode(DoubleClickActivation); const int columnCount = m_filterModel->columnCount(); int treeWidth = 0; for (int c = 0; c < columnCount; c++) { - m_ui->filterTreeView->resizeColumnToContents(c); - treeWidth += m_ui->filterTreeView->columnWidth(c); + m_filterTreeView->resizeColumnToContents(c); + treeWidth += m_filterTreeView->columnWidth(c); } - m_ui->filterTreeView->setMinimumWidth(treeWidth + 20); - m_ui->filterLineEdit->setFiltering(true); - connect(m_ui->filterTreeView, &QAbstractItemView::activated, this, + m_filterTreeView->setMinimumWidth(treeWidth + 20); + filterLineEdit->setFiltering(true); + + using namespace Layouting; + Column { + filterLineEdit, + m_filterTreeView, + m_buttonBox + }.attachTo(this); + + connect(m_buttonBox, &QDialogButtonBox::accepted, this, &QDialog::accept); + connect(m_buttonBox, &QDialogButtonBox::rejected, this, &QDialog::reject); + + connect(m_filterTreeView, &QAbstractItemView::activated, this, &NickNameDialog::slotActivated); - connect(m_ui->filterTreeView->selectionModel(), &QItemSelectionModel::currentRowChanged, + connect(m_filterTreeView->selectionModel(), &QItemSelectionModel::currentRowChanged, this, &NickNameDialog::slotCurrentItemChanged); - connect(m_ui->filterLineEdit, &FancyLineEdit::filterChanged, + connect(filterLineEdit, &FancyLineEdit::filterChanged, m_filterModel, &QSortFilterProxyModel::setFilterFixedString); } -NickNameDialog::~NickNameDialog() -{ - delete m_ui; -} +NickNameDialog::~NickNameDialog() = default; QPushButton *NickNameDialog::okButton() const { - return m_ui->buttonBox->button(QDialogButtonBox::Ok); + return m_buttonBox->button(QDialogButtonBox::Ok); } void NickNameDialog::slotCurrentItemChanged(const QModelIndex &index) @@ -194,7 +208,7 @@ void NickNameDialog::slotActivated(const QModelIndex &) QString NickNameDialog::nickName() const { - const QModelIndex index = m_ui->filterTreeView->selectionModel()->currentIndex(); + const QModelIndex index = m_filterTreeView->selectionModel()->currentIndex(); if (index.isValid()) { const QModelIndex sourceIndex = m_filterModel->mapToSource(index); if (const QStandardItem *item = m_model->itemFromIndex(sourceIndex)) @@ -250,5 +264,4 @@ QStringList NickNameDialog::nickNameList(const QStandardItemModel *model) return rc; } -} // namespace Internal -} // namespace VcsBase +} // VcsBase::Internal diff --git a/src/plugins/vcsbase/nicknamedialog.h b/src/plugins/vcsbase/nicknamedialog.h index 555c1158dd1..6ca5e0e704e 100644 --- a/src/plugins/vcsbase/nicknamedialog.h +++ b/src/plugins/vcsbase/nicknamedialog.h @@ -6,16 +6,16 @@ #include QT_BEGIN_NAMESPACE -class QSortFilterProxyModel; -class QStandardItemModel; +class QDialogButtonBox; class QModelIndex; class QPushButton; +class QSortFilterProxyModel; +class QStandardItemModel; QT_END_NAMESPACE -namespace VcsBase { -namespace Internal { +namespace Utils { class TreeView; } -namespace Ui { class NickNameDialog; } +namespace VcsBase::Internal { class NickNameDialog : public QDialog { @@ -42,10 +42,11 @@ private: QPushButton *okButton() const; - Ui::NickNameDialog *m_ui; QStandardItemModel *m_model; QSortFilterProxyModel *m_filterModel; + + Utils::TreeView *m_filterTreeView; + QDialogButtonBox *m_buttonBox; }; -} // namespace Internal -} // namespace VcsBase +} // VcsBase::Internal diff --git a/src/plugins/vcsbase/nicknamedialog.ui b/src/plugins/vcsbase/nicknamedialog.ui deleted file mode 100644 index bb9c84a1d62..00000000000 --- a/src/plugins/vcsbase/nicknamedialog.ui +++ /dev/null @@ -1,82 +0,0 @@ - - - VcsBase::Internal::NickNameDialog - - - - 0 - 0 - 618 - 414 - - - - Nicknames - - - - - - - - - - - - Qt::Horizontal - - - QDialogButtonBox::Cancel|QDialogButtonBox::Ok - - - - - - - - Utils::FancyLineEdit - QLineEdit -
utils/fancylineedit.h
-
- - Utils::TreeView - QTreeView -
utils/itemviews.h
-
-
- - - - buttonBox - accepted() - VcsBase::Internal::NickNameDialog - accept() - - - 252 - 405 - - - 157 - 274 - - - - - buttonBox - rejected() - VcsBase::Internal::NickNameDialog - reject() - - - 293 - 405 - - - 286 - 274 - - - - -
diff --git a/src/plugins/vcsbase/submiteditorwidget.cpp b/src/plugins/vcsbase/submiteditorwidget.cpp index 61d04c65836..782d8856aaf 100644 --- a/src/plugins/vcsbase/submiteditorwidget.cpp +++ b/src/plugins/vcsbase/submiteditorwidget.cpp @@ -4,23 +4,33 @@ #include "submiteditorwidget.h" #include "submitfieldwidget.h" #include "submitfilemodel.h" -#include "ui_submiteditorwidget.h" + +#include #include +#include #include +#include #include +#include +#include #include +#include +#include +#include +#include +#include #include +#include +#include +#include +#include #include #include -#include - -#include -#include #include -#include -#include +#include +#include using namespace Utils; @@ -57,24 +67,20 @@ namespace VcsBase { // (similar to a QToolButton) class QActionPushButton : public QToolButton { - Q_OBJECT public: - explicit QActionPushButton(QAction *a); -}; - -QActionPushButton::QActionPushButton(QAction *a) : - QToolButton() -{ - setIcon(a->icon()); - setText(a->text()); - setToolButtonStyle(Qt::ToolButtonTextBesideIcon); - connect(a, &QAction::changed, this, [this, a] { - setEnabled(a->isEnabled()); + explicit QActionPushButton(QAction *a) + { + setIcon(a->icon()); setText(a->text()); - }); - connect(this, &QAbstractButton::clicked, a, &QAction::trigger); - setEnabled(a->isEnabled()); -} + setToolButtonStyle(Qt::ToolButtonTextBesideIcon); + connect(a, &QAction::changed, this, [this, a] { + setEnabled(a->isEnabled()); + setText(a->text()); + }); + connect(this, &QAbstractButton::clicked, a, &QAction::trigger); + setEnabled(a->isEnabled()); + } +}; // Helpers to retrieve model data // Convenience to extract a list of selected indexes @@ -85,7 +91,15 @@ struct SubmitEditorWidgetPrivate // A pair of position/action to extend context menus typedef QPair > AdditionalContextMenuAction; - Ui::SubmitEditorWidget m_ui; + Core::MiniSplitter *splitter; + QGroupBox *descriptionBox; + QVBoxLayout *descriptionLayout; + QLabel *descriptionHint; + Utils::CompletingTextEdit *description; + QCheckBox *checkAllCheckBox; + QTreeView *fileView; + QHBoxLayout *buttonLayout; + QVBoxLayout *vboxLayout; QList descriptionEditContextMenuActions; QVBoxLayout *m_fieldLayout = nullptr; @@ -108,29 +122,88 @@ struct SubmitEditorWidgetPrivate SubmitEditorWidget::SubmitEditorWidget() : d(new SubmitEditorWidgetPrivate) { - d->m_ui.setupUi(this); - d->m_ui.description->setContextMenuPolicy(Qt::CustomContextMenu); - d->m_ui.description->setLineWrapMode(QTextEdit::NoWrap); - d->m_ui.description->setWordWrapMode(QTextOption::WordWrap); - connect(d->m_ui.description, &QWidget::customContextMenuRequested, + resize(507, 419); + setMinimumSize(QSize(0, 0)); + setWindowTitle(tr("Subversion Submit")); + + auto scrollAreaWidgetContents = new QWidget(); + scrollAreaWidgetContents->setGeometry(QRect(0, 0, 505, 417)); + scrollAreaWidgetContents->setMinimumSize(QSize(400, 400)); + + d->descriptionBox = new QGroupBox(tr("Descriptio&n")); + d->descriptionBox->setFlat(true); + + d->descriptionHint = new QLabel(d->descriptionBox); + d->descriptionHint->setWordWrap(true); + + d->descriptionLayout = new QVBoxLayout(d->descriptionBox); + d->descriptionLayout->addWidget(d->descriptionHint); + + d->description = new CompletingTextEdit(d->descriptionBox); + d->description->setAcceptRichText(false); + d->description->setContextMenuPolicy(Qt::CustomContextMenu); + d->description->setLineWrapMode(QTextEdit::NoWrap); + d->description->setWordWrapMode(QTextOption::WordWrap); + + d->descriptionLayout->addWidget(d->description); + + auto groupBox = new QGroupBox(tr("F&iles")); + groupBox->setFlat(true); + + d->checkAllCheckBox = new QCheckBox(tr("Select a&ll")); + d->checkAllCheckBox->setTristate(false); + + d->fileView = new QTreeView(groupBox); + d->fileView->setContextMenuPolicy(Qt::CustomContextMenu); + d->fileView->setSelectionMode(QAbstractItemView::ExtendedSelection); + d->fileView->setRootIsDecorated(false); + + auto verticalLayout_2 = new QVBoxLayout(groupBox); + verticalLayout_2->addWidget(d->checkAllCheckBox); + verticalLayout_2->addWidget(d->fileView); + + d->splitter = new Core::MiniSplitter(scrollAreaWidgetContents); + d->splitter->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); + d->splitter->setOrientation(Qt::Horizontal); + d->splitter->addWidget(d->descriptionBox); + d->splitter->addWidget(groupBox); + + d->buttonLayout = new QHBoxLayout(); + d->buttonLayout->setContentsMargins(0, -1, -1, -1); + d->buttonLayout->addItem(new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum)); + + d->vboxLayout = new QVBoxLayout(scrollAreaWidgetContents); + d->vboxLayout->setSpacing(6); + d->vboxLayout->setContentsMargins(9, 9, 9, 9); + d->vboxLayout->addWidget(d->splitter); + d->vboxLayout->addLayout(d->buttonLayout); + + auto scrollArea = new QScrollArea; + scrollArea->setFrameShape(QFrame::NoFrame); + scrollArea->setWidgetResizable(true); + scrollArea->setWidget(scrollAreaWidgetContents); + + using namespace Layouting; + Column { + scrollArea + }.attachTo(this, WithoutMargins); + + connect(d->description, &QWidget::customContextMenuRequested, this, &SubmitEditorWidget::editorCustomContextMenuRequested); - connect(d->m_ui.description, &QTextEdit::textChanged, + connect(d->description, &QTextEdit::textChanged, this, &SubmitEditorWidget::descriptionTextChanged); // File List - d->m_ui.fileView->setContextMenuPolicy(Qt::CustomContextMenu); - connect(d->m_ui.fileView, &QWidget::customContextMenuRequested, + connect(d->fileView, &QWidget::customContextMenuRequested, this, &SubmitEditorWidget::fileListCustomContextMenuRequested); - d->m_ui.fileView->setSelectionMode(QAbstractItemView::ExtendedSelection); - d->m_ui.fileView->setRootIsDecorated(false); - connect(d->m_ui.fileView, &QAbstractItemView::doubleClicked, + connect(d->fileView, &QAbstractItemView::doubleClicked, this, &SubmitEditorWidget::diffActivated); - connect(d->m_ui.checkAllCheckBox, &QCheckBox::stateChanged, + connect(d->checkAllCheckBox, &QCheckBox::stateChanged, this, &SubmitEditorWidget::checkAllToggled); setFocusPolicy(Qt::StrongFocus); - setFocusProxy(d->m_ui.description); + setFocusProxy(d->description); } SubmitEditorWidget::~SubmitEditorWidget() @@ -142,16 +215,16 @@ void SubmitEditorWidget::registerActions(QAction *editorUndoAction, QAction *edi QAction *submitAction, QAction *diffAction) { if (editorUndoAction) { - editorUndoAction->setEnabled(d->m_ui.description->document()->isUndoAvailable()); - connect(d->m_ui.description, &QTextEdit::undoAvailable, + editorUndoAction->setEnabled(d->description->document()->isUndoAvailable()); + connect(d->description, &QTextEdit::undoAvailable, editorUndoAction, &QAction::setEnabled); - connect(editorUndoAction, &QAction::triggered, d->m_ui.description, &QTextEdit::undo); + connect(editorUndoAction, &QAction::triggered, d->description, &QTextEdit::undo); } if (editorRedoAction) { - editorRedoAction->setEnabled(d->m_ui.description->document()->isRedoAvailable()); - connect(d->m_ui.description, &QTextEdit::redoAvailable, + editorRedoAction->setEnabled(d->description->document()->isRedoAvailable()); + connect(d->description, &QTextEdit::redoAvailable, editorRedoAction, &QAction::setEnabled); - connect(editorRedoAction, &QAction::triggered, d->m_ui.description, &QTextEdit::redo); + connect(editorRedoAction, &QAction::triggered, d->description, &QTextEdit::redo); } if (submitAction) { @@ -166,7 +239,7 @@ void SubmitEditorWidget::registerActions(QAction *editorUndoAction, QAction *edi connect(this, &SubmitEditorWidget::submitActionTextChanged, submitAction, &QAction::setText); d->m_submitButton = new QActionPushButton(submitAction); - d->m_ui.buttonLayout->addWidget(d->m_submitButton); + d->buttonLayout->addWidget(d->m_submitButton); if (!d->m_submitShortcut) d->m_submitShortcut = new QShortcut(QKeySequence(Qt::CTRL + Qt::Key_Return), this); connect(d->m_submitShortcut, &QShortcut::activated, @@ -181,7 +254,7 @@ void SubmitEditorWidget::registerActions(QAction *editorUndoAction, QAction *edi diffAction->setEnabled(d->m_filesSelected); connect(this, &SubmitEditorWidget::fileSelectionChanged, diffAction, &QAction::setEnabled); connect(diffAction, &QAction::triggered, this, &SubmitEditorWidget::triggerDiffSelected); - d->m_ui.buttonLayout->addWidget(new QActionPushButton(diffAction)); + d->buttonLayout->addWidget(new QActionPushButton(diffAction)); } } @@ -213,9 +286,9 @@ void SubmitEditorWidget::wrapDescription() e.setVisible(false); e.setMinimumWidth(1000); e.setFontPointSize(1.0); - e.setLineWrapColumnOrWidth(d->m_ui.description->lineWrapColumnOrWidth()); - e.setLineWrapMode(d->m_ui.description->lineWrapMode()); - e.setWordWrapMode(d->m_ui.description->wordWrapMode()); + e.setLineWrapColumnOrWidth(d->description->lineWrapColumnOrWidth()); + e.setLineWrapMode(d->description->lineWrapMode()); + e.setWordWrapMode(d->description->wordWrapMode()); e.setPlainText(d->m_description); d->m_description.clear(); QTextCursor cursor(e.document()); @@ -247,12 +320,12 @@ QString SubmitEditorWidget::descriptionText() const void SubmitEditorWidget::setDescriptionText(const QString &text) { - d->m_ui.description->setPlainText(text); + d->description->setPlainText(text); } bool SubmitEditorWidget::lineWrap() const { - return d->m_ui.description->lineWrapMode() != QTextEdit::NoWrap; + return d->description->lineWrapMode() != QTextEdit::NoWrap; } void SubmitEditorWidget::setLineWrap(bool v) @@ -260,10 +333,10 @@ void SubmitEditorWidget::setLineWrap(bool v) if (debug) qDebug() << Q_FUNC_INFO << v; if (v) { - d->m_ui.description->setLineWrapColumnOrWidth(d->m_lineWidth); - d->m_ui.description->setLineWrapMode(QTextEdit::FixedColumnWidth); + d->description->setLineWrapColumnOrWidth(d->m_lineWidth); + d->description->setLineWrapMode(QTextEdit::FixedColumnWidth); } else { - d->m_ui.description->setLineWrapMode(QTextEdit::NoWrap); + d->description->setLineWrapMode(QTextEdit::NoWrap); } descriptionTextChanged(); } @@ -281,7 +354,7 @@ void SubmitEditorWidget::setLineWrapWidth(int v) return; d->m_lineWidth = v; if (lineWrap()) - d->m_ui.description->setLineWrapColumnOrWidth(v); + d->description->setLineWrapColumnOrWidth(v); descriptionTextChanged(); } @@ -297,24 +370,24 @@ void SubmitEditorWidget::setDescriptionMandatory(bool v) QAbstractItemView::SelectionMode SubmitEditorWidget::fileListSelectionMode() const { - return d->m_ui.fileView->selectionMode(); + return d->fileView->selectionMode(); } void SubmitEditorWidget::setFileListSelectionMode(QAbstractItemView::SelectionMode sm) { - d->m_ui.fileView->setSelectionMode(sm); + d->fileView->setSelectionMode(sm); } void SubmitEditorWidget::setFileModel(SubmitFileModel *model) { - d->m_ui.fileView->clearSelection(); // trigger the change signals + d->fileView->clearSelection(); // trigger the change signals - d->m_ui.fileView->setModel(model); + d->fileView->setModel(model); if (model->rowCount()) { const int columnCount = model->columnCount(); for (int c = 0; c < columnCount; c++) - d->m_ui.fileView->resizeColumnToContents(c); + d->fileView->resizeColumnToContents(c); } connect(model, &QAbstractItemModel::dataChanged, @@ -329,14 +402,14 @@ void SubmitEditorWidget::setFileModel(SubmitFileModel *model) this, &SubmitEditorWidget::updateSubmitAction); connect(model, &QAbstractItemModel::rowsRemoved, this, &SubmitEditorWidget::updateSubmitAction); - connect(d->m_ui.fileView->selectionModel(), &QItemSelectionModel::selectionChanged, + connect(d->fileView->selectionModel(), &QItemSelectionModel::selectionChanged, this, &SubmitEditorWidget::updateDiffAction); updateActions(); } SubmitFileModel *SubmitEditorWidget::fileModel() const { - return static_cast(d->m_ui.fileView->model()); + return static_cast(d->fileView->model()); } QStringList SubmitEditorWidget::checkedFiles() const @@ -354,7 +427,7 @@ QStringList SubmitEditorWidget::checkedFiles() const CompletingTextEdit *SubmitEditorWidget::descriptionEdit() const { - return d->m_ui.description; + return d->description; } void SubmitEditorWidget::triggerDiffSelected() @@ -394,9 +467,9 @@ void SubmitEditorWidget::updateSubmitAction() d->m_commitEnabled = newCommitState; emit submitActionEnabledChanged(d->m_commitEnabled); } - if (d->m_ui.fileView && d->m_ui.fileView->model()) { + if (d->fileView && d->fileView->model()) { // Update button text. - const int fileCount = d->m_ui.fileView->model()->rowCount(); + const int fileCount = d->fileView->model()->rowCount(); const QString msg = checkedCount ? tr("%1 %2/%n File(s)", nullptr, fileCount) .arg(commitName()).arg(checkedCount) : @@ -426,17 +499,17 @@ void SubmitEditorWidget::updateCheckAllComboBox() const GuardLocker locker(d->m_ignoreChanges); int checkedCount = checkedFilesCount(); if (checkedCount == 0) - d->m_ui.checkAllCheckBox->setCheckState(Qt::Unchecked); - else if (checkedCount == d->m_ui.fileView->model()->rowCount()) - d->m_ui.checkAllCheckBox->setCheckState(Qt::Checked); + d->checkAllCheckBox->setCheckState(Qt::Unchecked); + else if (checkedCount == d->fileView->model()->rowCount()) + d->checkAllCheckBox->setCheckState(Qt::Checked); else - d->m_ui.checkAllCheckBox->setCheckState(Qt::PartiallyChecked); + d->checkAllCheckBox->setCheckState(Qt::PartiallyChecked); } bool SubmitEditorWidget::hasSelection() const { // Not present until model is set - if (const QItemSelectionModel *sm = d->m_ui.fileView->selectionModel()) + if (const QItemSelectionModel *sm = d->fileView->selectionModel()) return sm->hasSelection(); return false; } @@ -460,12 +533,12 @@ QString SubmitEditorWidget::cleanupDescription(const QString &input) const void SubmitEditorWidget::insertTopWidget(QWidget *w) { - d->m_ui.vboxLayout->insertWidget(0, w); + d->vboxLayout->insertWidget(0, w); } void SubmitEditorWidget::insertLeftWidget(QWidget *w) { - d->m_ui.splitter->insertWidget(0, w); + d->splitter->insertWidget(0, w); } void SubmitEditorWidget::addSubmitButtonMenu(QMenu *menu) @@ -475,15 +548,15 @@ void SubmitEditorWidget::addSubmitButtonMenu(QMenu *menu) void SubmitEditorWidget::hideDescription() { - d->m_ui.descriptionBox->hide(); + d->descriptionBox->hide(); setDescriptionMandatory(false); } void SubmitEditorWidget::verifyDescription() { if (!isEnabled()) { - d->m_ui.descriptionHint->setText(QString()); - d->m_ui.descriptionHint->setToolTip(QString()); + d->descriptionHint->setText(QString()); + d->descriptionHint->setToolTip(QString()); return; } @@ -521,9 +594,9 @@ void SubmitEditorWidget::verifyDescription() if (secondLineLength > 0) hints.append(hint + tr("Hint: The second line of a commit message should be empty.")); - d->m_ui.descriptionHint->setText(hints.join("
")); - if (!d->m_ui.descriptionHint->text().isEmpty()) { - d->m_ui.descriptionHint->setToolTip( + d->descriptionHint->setText(hints.join("
")); + if (!d->descriptionHint->text().isEmpty()) { + d->descriptionHint->setToolTip( tr("

Writing good commit messages

" "
    " "
  • Avoid very short commit messages.
  • " @@ -537,7 +610,7 @@ void SubmitEditorWidget::verifyDescription() void SubmitEditorWidget::descriptionTextChanged() { - d->m_description = cleanupDescription(d->m_ui.description->toPlainText()); + d->m_description = cleanupDescription(d->description->toPlainText()); verifyDescription(); wrapDescription(); trimDescription(); @@ -579,13 +652,13 @@ bool SubmitEditorWidget::updateInProgress() const QList SubmitEditorWidget::selectedRows() const { - return Utils::transform(d->m_ui.fileView->selectionModel()->selectedRows(0), &QModelIndex::row); + return Utils::transform(d->fileView->selectionModel()->selectedRows(0), &QModelIndex::row); } void SubmitEditorWidget::setSelectedRows(const QList &rows) { if (const SubmitFileModel *model = fileModel()) { - QItemSelectionModel *selectionModel = d->m_ui.fileView->selectionModel(); + QItemSelectionModel *selectionModel = d->fileView->selectionModel(); for (int row : rows) { selectionModel->select(model->index(row, 0), QItemSelectionModel::Select | QItemSelectionModel::Rows); @@ -606,7 +679,7 @@ void SubmitEditorWidget::addSubmitFieldWidget(SubmitFieldWidget *f) auto outerLayout = new QHBoxLayout; outerLayout->addLayout(d->m_fieldLayout); outerLayout->addItem(new QSpacerItem(0, 0, QSizePolicy::Expanding, QSizePolicy::Ignored)); - d->m_ui.descriptionLayout->addLayout(outerLayout); + d->descriptionLayout->addLayout(outerLayout); } d->m_fieldLayout->addWidget(f); d->m_fieldWidgets.push_back(f); @@ -631,7 +704,7 @@ void SubmitEditorWidget::insertDescriptionEditContextMenuAction(int pos, QAction void SubmitEditorWidget::editorCustomContextMenuRequested(const QPoint &pos) { - QScopedPointer menu(d->m_ui.description->createStandardContextMenu()); + QScopedPointer menu(d->description->createStandardContextMenu()); // Extend for (const SubmitEditorWidgetPrivate::AdditionalContextMenuAction &a : qAsConst(d->descriptionEditContextMenuActions)) { @@ -642,17 +715,17 @@ void SubmitEditorWidget::editorCustomContextMenuRequested(const QPoint &pos) menu->addAction(a.second); } } - menu->exec(d->m_ui.description->mapToGlobal(pos)); + menu->exec(d->description->mapToGlobal(pos)); } void SubmitEditorWidget::checkAllToggled() { if (d->m_ignoreChanges.isLocked()) return; - Qt::CheckState checkState = d->m_ui.checkAllCheckBox->checkState(); + Qt::CheckState checkState = d->checkAllCheckBox->checkState(); fileModel()->setAllChecked(checkState == Qt::Checked || checkState == Qt::PartiallyChecked); // Reset that again, so that the user can't do it - d->m_ui.checkAllCheckBox->setTristate(false); + d->checkAllCheckBox->setTristate(false); } void SubmitEditorWidget::fileListCustomContextMenuRequested(const QPoint & pos) @@ -663,7 +736,7 @@ void SubmitEditorWidget::fileListCustomContextMenuRequested(const QPoint & pos) QAction *checkAllAction = menu.addAction(tr("Select All")); //: Uncheck all for submit QAction *uncheckAllAction = menu.addAction(tr("Unselect All")); - QAction *action = menu.exec(d->m_ui.fileView->mapToGlobal(pos)); + QAction *action = menu.exec(d->fileView->mapToGlobal(pos)); if (action == checkAllAction) { fileModel()->setAllChecked(true);; return; @@ -688,5 +761,3 @@ void SubmitEditorWidget::setEmptyFileListEnabled(bool e) } } // namespace VcsBase - -#include "submiteditorwidget.moc" diff --git a/src/plugins/vcsbase/submiteditorwidget.h b/src/plugins/vcsbase/submiteditorwidget.h index 9c239d9e78d..63fd8337104 100644 --- a/src/plugins/vcsbase/submiteditorwidget.h +++ b/src/plugins/vcsbase/submiteditorwidget.h @@ -22,12 +22,6 @@ class SubmitFileModel; class VCSBASE_EXPORT SubmitEditorWidget : public QWidget { Q_OBJECT - Q_PROPERTY(QString descriptionText READ descriptionText WRITE setDescriptionText DESIGNABLE true) - Q_PROPERTY(QAbstractItemView::SelectionMode fileListSelectionMode READ fileListSelectionMode WRITE setFileListSelectionMode DESIGNABLE true) - Q_PROPERTY(bool lineWrap READ lineWrap WRITE setLineWrap DESIGNABLE true) - Q_PROPERTY(int lineWrapWidth READ lineWrapWidth WRITE setLineWrapWidth DESIGNABLE true) - Q_PROPERTY(bool descriptionMandatory READ isDescriptionMandatory WRITE setDescriptionMandatory DESIGNABLE false) - Q_PROPERTY(bool emptyFileListEnabled READ isEmptyFileListEnabled WRITE setEmptyFileListEnabled DESIGNABLE true) public: SubmitEditorWidget(); diff --git a/src/plugins/vcsbase/submiteditorwidget.ui b/src/plugins/vcsbase/submiteditorwidget.ui deleted file mode 100644 index 02699ea20ae..00000000000 --- a/src/plugins/vcsbase/submiteditorwidget.ui +++ /dev/null @@ -1,181 +0,0 @@ - - - VcsBase::SubmitEditorWidget - - - - 0 - 0 - 507 - 419 - - - - - 0 - 0 - - - - Subversion Submit - - - - 0 - - - 0 - - - 0 - - - 0 - - - 0 - - - - - QFrame::NoFrame - - - true - - - - - 0 - 0 - 505 - 417 - - - - - 400 - 400 - - - - - 6 - - - 9 - - - 9 - - - 9 - - - 9 - - - - - - 0 - 0 - - - - Qt::Horizontal - - - - Descriptio&n - - - true - - - - - - - - - true - - - - - - - false - - - - - - - - F&iles - - - true - - - - - - Select a&ll - - - false - - - - - - - - - - - - - - 0 - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - - - - - - - - Utils::CompletingTextEdit - QTextEdit -
    utils/completingtextedit.h
    -
    - - Core::MiniSplitter - QSplitter -
    coreplugin/minisplitter.h
    - 1 -
    -
    - - -
    diff --git a/src/plugins/vcsbase/submitfieldwidget.h b/src/plugins/vcsbase/submitfieldwidget.h index 0ba391d42e2..7fd1aebba3b 100644 --- a/src/plugins/vcsbase/submitfieldwidget.h +++ b/src/plugins/vcsbase/submitfieldwidget.h @@ -18,9 +18,6 @@ struct SubmitFieldWidgetPrivate; class VCSBASE_EXPORT SubmitFieldWidget : public QWidget { Q_OBJECT - Q_PROPERTY(QStringList fields READ fields WRITE setFields DESIGNABLE true) - Q_PROPERTY(bool hasBrowseButton READ hasBrowseButton WRITE setHasBrowseButton DESIGNABLE true) - Q_PROPERTY(bool allowDuplicateFields READ allowDuplicateFields WRITE setAllowDuplicateFields DESIGNABLE true) public: explicit SubmitFieldWidget(QWidget *parent = nullptr); diff --git a/src/plugins/vcsbase/vcsbase.qbs b/src/plugins/vcsbase/vcsbase.qbs index d9cfd524efa..8c91a54af1a 100644 --- a/src/plugins/vcsbase/vcsbase.qbs +++ b/src/plugins/vcsbase/vcsbase.qbs @@ -33,12 +33,10 @@ QtcPlugin { "diffandloghighlighter.h", "nicknamedialog.cpp", "nicknamedialog.h", - "nicknamedialog.ui", "submiteditorfile.cpp", "submiteditorfile.h", "submiteditorwidget.cpp", "submiteditorwidget.h", - "submiteditorwidget.ui", "submitfieldwidget.cpp", "submitfieldwidget.h", "submitfilemodel.cpp", diff --git a/src/plugins/vcsbase/vcsbasediffeditorcontroller.cpp b/src/plugins/vcsbase/vcsbasediffeditorcontroller.cpp index f04e902ed07..ebb3d8ca407 100644 --- a/src/plugins/vcsbase/vcsbasediffeditorcontroller.cpp +++ b/src/plugins/vcsbase/vcsbasediffeditorcontroller.cpp @@ -8,8 +8,6 @@ #include #include -#include - #include #include #include diff --git a/src/plugins/vcsbase/vcsbaseeditor.cpp b/src/plugins/vcsbase/vcsbaseeditor.cpp index aa45edc2710..2ca4c01d2c5 100644 --- a/src/plugins/vcsbase/vcsbaseeditor.cpp +++ b/src/plugins/vcsbase/vcsbaseeditor.cpp @@ -41,7 +41,6 @@ #include #include #include -#include #include #include #include @@ -979,12 +978,12 @@ void VcsBaseEditorWidget::contextMenuEvent(QContextMenuEvent *e) // fileNameFromDiffSpecification() works. QAction *applyAction = menu->addAction(tr("Apply Chunk...")); connect(applyAction, &QAction::triggered, this, [this, chunk] { - slotApplyDiffChunk(chunk, false); + slotApplyDiffChunk(chunk, PatchAction::Apply); }); // Revert a chunk from a VCS diff, which might be linked to reloading the diff. QAction *revertAction = menu->addAction(tr("Revert Chunk...")); connect(revertAction, &QAction::triggered, this, [this, chunk] { - slotApplyDiffChunk(chunk, true); + slotApplyDiffChunk(chunk, PatchAction::Revert); }); // Custom diff actions addDiffActions(menu, chunk); @@ -1506,10 +1505,10 @@ bool VcsBaseEditorWidget::canApplyDiffChunk(const DiffChunk &dc) const // Default implementation of revert: Apply a chunk by piping it into patch, // (passing '-R' for revert), assuming we got absolute paths from the VCS plugins. -bool VcsBaseEditorWidget::applyDiffChunk(const DiffChunk &dc, bool revert) const +bool VcsBaseEditorWidget::applyDiffChunk(const DiffChunk &dc, PatchAction patchAction) const { return Core::PatchTool::runPatch(dc.asPatch(d->m_workingDirectory), - FilePath::fromString(d->m_workingDirectory), 0, revert); + FilePath::fromString(d->m_workingDirectory), 0, patchAction); } QString VcsBaseEditorWidget::fileNameFromDiffSpecification(const QTextBlock &inBlock, QString *header) const @@ -1586,20 +1585,13 @@ bool VcsBaseEditorWidget::hasDiff() const } } -void VcsBaseEditorWidget::slotApplyDiffChunk(const DiffChunk &chunk, bool revert) +void VcsBaseEditorWidget::slotApplyDiffChunk(const DiffChunk &chunk, PatchAction patchAction) { - const QString title = revert ? tr("Revert Chunk") : tr("Apply Chunk"); - const QString question = revert ? tr("Would you like to revert the chunk?") - : tr("Would you like to apply the chunk?"); - if (QMessageBox::No == QMessageBox::question(this, title, question, QMessageBox::Yes|QMessageBox::No)) + if (!PatchTool::confirmPatching(this, patchAction)) return; - if (applyDiffChunk(chunk, revert)) { - if (revert) - emit diffChunkReverted(chunk); - else - emit diffChunkApplied(chunk); - } + if (applyDiffChunk(chunk, patchAction) && patchAction == PatchAction::Revert) + emit diffChunkReverted(); } // Tagging of editors for re-use. diff --git a/src/plugins/vcsbase/vcsbaseeditor.h b/src/plugins/vcsbase/vcsbaseeditor.h index badb7985fbb..a79df047553 100644 --- a/src/plugins/vcsbase/vcsbaseeditor.h +++ b/src/plugins/vcsbase/vcsbaseeditor.h @@ -5,6 +5,7 @@ #include "vcsbase_global.h" +#include #include #include @@ -110,11 +111,6 @@ public: class VCSBASE_EXPORT VcsBaseEditorWidget : public TextEditor::TextEditorWidget { - Q_PROPERTY(QString source READ source WRITE setSource) - Q_PROPERTY(Utils::FilePath workingDirectory READ workingDirectory WRITE setWorkingDirectory) - Q_PROPERTY(QTextCodec *codec READ codec WRITE setCodec) - Q_PROPERTY(QString annotateRevisionTextFormat READ annotateRevisionTextFormat WRITE setAnnotateRevisionTextFormat) - Q_PROPERTY(bool isFileLogAnnotateEnabled READ isFileLogAnnotateEnabled WRITE setFileLogAnnotateEnabled) Q_OBJECT protected: @@ -203,8 +199,7 @@ signals: void describeRequested(const Utils::FilePath &source, const QString &change); void annotateRevisionRequested(const Utils::FilePath &workingDirectory, const QString &file, const QString &change, int lineNumber); - void diffChunkApplied(const VcsBase::DiffChunk &dc); - void diffChunkReverted(const VcsBase::DiffChunk &dc); + void diffChunkReverted(); protected: void contextMenuEvent(QContextMenuEvent *e) override; @@ -250,14 +245,14 @@ private: void slotJumpToEntry(int); void slotCursorPositionChanged() override; void slotAnnotateRevision(const QString &change); - void slotApplyDiffChunk(const DiffChunk &chunk, bool revert); + void slotApplyDiffChunk(const DiffChunk &chunk, Core::PatchAction patchAction); void slotPaste(); void showProgressIndicator(); void hideProgressIndicator(); bool canApplyDiffChunk(const DiffChunk &dc) const; // Revert a patch chunk. Default implementation uses patch.exe - bool applyDiffChunk(const DiffChunk &dc, bool revert = false) const; + bool applyDiffChunk(const DiffChunk &dc, Core::PatchAction patchAction) const; // Indicates if the editor has diff contents. If true, an appropriate // highlighter is used and double-click inside a diff chunk jumps to diff --git a/src/plugins/vcsbase/vcsbasesubmiteditor.h b/src/plugins/vcsbase/vcsbasesubmiteditor.h index 742e13ac22d..41e1fc5265c 100644 --- a/src/plugins/vcsbase/vcsbasesubmiteditor.h +++ b/src/plugins/vcsbase/vcsbasesubmiteditor.h @@ -36,10 +36,6 @@ public: class VCSBASE_EXPORT VcsBaseSubmitEditor : public Core::IEditor { Q_OBJECT - Q_PROPERTY(QAbstractItemView::SelectionMode fileListSelectionMode READ fileListSelectionMode WRITE setFileListSelectionMode DESIGNABLE true) - Q_PROPERTY(bool lineWrap READ lineWrap WRITE setLineWrap DESIGNABLE true) - Q_PROPERTY(int lineWrapWidth READ lineWrapWidth WRITE setLineWrapWidth DESIGNABLE true) - Q_PROPERTY(bool emptyFileListEnabled READ isEmptyFileListEnabled WRITE setEmptyFileListEnabled DESIGNABLE true) protected: explicit VcsBaseSubmitEditor(SubmitEditorWidget *editorWidget);