diff --git a/doc/images/qtcreator-cmake-build-settings.png b/doc/images/qtcreator-cmake-build-settings.png index 512d002df90..2c2af74c6d0 100644 Binary files a/doc/images/qtcreator-cmake-build-settings.png and b/doc/images/qtcreator-cmake-build-settings.png differ diff --git a/doc/images/qtcreator-cmake-build-steps.png b/doc/images/qtcreator-cmake-build-steps.png new file mode 100644 index 00000000000..1679217c51e Binary files /dev/null and b/doc/images/qtcreator-cmake-build-steps.png differ diff --git a/doc/images/qtcreator-cmake-clean-steps.png b/doc/images/qtcreator-cmake-clean-steps.png new file mode 100644 index 00000000000..9ecfbc74f11 Binary files /dev/null and b/doc/images/qtcreator-cmake-clean-steps.png differ diff --git a/doc/images/qtcreator-cmake-import-wizard1.png b/doc/images/qtcreator-cmake-import-wizard1.png deleted file mode 100644 index 9749ed9ffa6..00000000000 Binary files a/doc/images/qtcreator-cmake-import-wizard1.png and /dev/null differ diff --git a/doc/images/qtcreator-cmake-import-wizard2.png b/doc/images/qtcreator-cmake-import-wizard2.png deleted file mode 100644 index 574bb9a0553..00000000000 Binary files a/doc/images/qtcreator-cmake-import-wizard2.png and /dev/null differ diff --git a/doc/images/qtcreator-cmake-run-cmake.png b/doc/images/qtcreator-cmake-run-cmake.png new file mode 100644 index 00000000000..c778ea45116 Binary files /dev/null and b/doc/images/qtcreator-cmake-run-cmake.png differ diff --git a/doc/images/qtcreator-cmake-run-settings.png b/doc/images/qtcreator-cmake-run-settings.png new file mode 100644 index 00000000000..229bdae6dd1 Binary files /dev/null and b/doc/images/qtcreator-cmake-run-settings.png differ diff --git a/doc/images/qtcreator-cmakeexecutable.png b/doc/images/qtcreator-cmakeexecutable.png index 711c2f708ce..c50c05a20bb 100644 Binary files a/doc/images/qtcreator-cmakeexecutable.png and b/doc/images/qtcreator-cmakeexecutable.png differ diff --git a/doc/images/qtcreator-kits.png b/doc/images/qtcreator-kits.png index 13bc784a763..1a3d5e1336c 100644 Binary files a/doc/images/qtcreator-kits.png and b/doc/images/qtcreator-kits.png differ diff --git a/doc/src/overview/creator-issues.qdoc b/doc/src/overview/creator-issues.qdoc index 48b8e29cd0a..06212266fad 100644 --- a/doc/src/overview/creator-issues.qdoc +++ b/doc/src/overview/creator-issues.qdoc @@ -109,8 +109,6 @@ items with names consisting of plain characters, numbers, underscores, and hyphens. - \li Creating new CMake projects with \QC is not supported. - \li If error messages displayed in the \uicontrol {Compile Output} pane contain paths where slashes are missing (for example, C:QtSDK), check your PATH variable. For more information, see diff --git a/doc/src/projects/creator-projects-cmake.qdoc b/doc/src/projects/creator-projects-cmake.qdoc index 8f406a69ee3..74ea95c0e27 100644 --- a/doc/src/projects/creator-projects-cmake.qdoc +++ b/doc/src/projects/creator-projects-cmake.qdoc @@ -43,38 +43,81 @@ native build configurations and workspaces that you can use in the compiler environment of your choice. - Since \QC 1.1, CMake configuration files are supported. Since \QC 1.3, the - Microsoft tool chain is supported if the CMake version is at least 2.8. - \QC automatically detects the CMake executable specified in the \c PATH. You can add paths to other CMake executables and use them in different build and run \l{glossary-buildandrun-kit}{kits}. \section1 Adding CMake Tools - To specify paths to CMake executables, select \uicontrol Tools > - \uicontrol Options > \uicontrol {Build & Run} > \uicontrol CMake > - \uicontrol Add. + \QC supports CMake version 2.9, or later. - \image qtcreator-cmakeexecutable.png + To specify paths to CMake executables and to add them to kits: + + \list 1 + + \li Select \uicontrol Tools > \uicontrol Options > + \uicontrol {Build & Run} > \uicontrol CMake > \uicontrol Add. + + \image qtcreator-cmakeexecutable.png + + \li In the \uicontrol Name field, specify a name for the tool. + + \li In the \uicontrol Path field, specify the path to the CMake + executable. + + \li Select \uicontrol Apply to save your changes. + + \li Select the \uicontrol Kits tab to add the CMake tool to a build and + run kit. The kit also specifies the CMake Generator that is used for + producing project files for \QC and the configuration variables that + are used: + + \image qtcreator-kits.png + + For more information, see \l {Adding Kits}. + + \endlist + + \section1 Creating CMake Projects + + To create a CMake project: + + \list 1 + + \li Select \uicontrol File > \uicontrol {New File or Project} > + \uicontrol {Non-Qt Project} > \uicontrol {Plain C Application} or + \uicontrol {Plain C++ Application} > \uicontrol Choose. + + \li In the \uicontrol Name field, enter a name for the project. + + \li In the \uicontrol {Create in} field, enter the path for the project + files, and then select \uicontrol Next (or \uicontrol Continue on + OS X). + + \li In the \uicontrol {Build system} field, select \uicontrol CMake, and + then select \uicontrol Next. + + \li Select CMake kits for the platforms that you want to build the + application for, and then select \uicontrol Next. + + \li Review the project settings, and click \uicontrol{Finish} (or + \uicontrol Done on OS X). + + \li Select \uicontrol {Run CMake} to generate a .cbp file. + + \image qtcreator-cmake-run-cmake.png + + Some projects require command line arguments to the initial CMake + call. CMake will remember the arguments during subsequent calls. + + \endlist + + \QC generates a \c {main.cpp} and \c {CMakeLists.txt} file that you can + modify in the \uicontrol Edit mode. \section1 Opening CMake Projects - \note Before you open a CMake project, you must modify the \c {PATH} - environment variable to include the bin folders of \c mingw and Qt. - - For instance, if Qt 5.5 is installed in \c {C:\Qt}, you would use the - following command to set the environment variables in the command line - prompt: - \code - set PATH=C:\Qt\Tools\mingw\bin;C:\Qt\5.5\\bin; - \endcode - Then start \QC by typing: - \code - C:\Qt\Tools\QtCreator\qtcreator.exe - \endcode - - To open a CMake project: + To open an existing CMake project: \list 1 @@ -82,28 +125,22 @@ \li Select the \c {CMakeLists.txt} file from your CMake project. + \li Select a kit that is configured to use CMake for building the + project. + + \li In \uicontrol Projects, right-click the project name to open the + context menu, and then select \uicontrol {Run CMake} to have the + project contents listed in the view. + \endlist - A wizard guides you through the rest of the process. - - \note If the CMake project does not have an in-place build, \QC - lets you specify the directory in which the project is built - (\l{glossary-shadow-build}{shadow build}). - - \image qtcreator-cmake-import-wizard1.png - - The screenshot below shows how you can specify command line arguments to - CMake for your project. - - \image qtcreator-cmake-import-wizard2.png - - Normally, there is no need to pass any command line arguments for projects - that are already built, as CMake caches that information. - \section1 Editing CMake Configuration Files - You can open CMake configuration files in \QC for editing. The following - features are supported: + To open a CMakeLists.txt file for editing, right-click it in the + \uicontrol Projects view and select \uicontrol {Open with} > + \uicontrol {CMake Editor}. + + The following features are supported: \list @@ -119,31 +156,55 @@ \section1 Building CMake Projects - \QC builds CMake projects by running \c make, \c mingw32-make, - \c nmake, or \c ninja depending on your platform. The build errors and - warnings are parsed and displayed in the \uicontrol Issues output pane. + To build CMake projects, select \uicontrol {Build Project} or press + \key Ctrl+B (or \key Cmd+B on OS X). - By default, \QC uses the \uicontrol All \l{glossary-build-config} + \QC builds CMake projects by running \c make, \c mingw32-make, \c nmake, or + \c ninja depending on the selected kit. + + By default, \QC uses the \uicontrol Default \l{glossary-build-config} {build configuration}. You can select another build configuration in - \uicontrol Projects > \uicontrol {Edit build configuration}. In addition to + \uicontrol Projects > \uicontrol {Build Settings} > + \uicontrol {Edit build configuration}. In addition to debug and release build configurations, you can create a release build that contains debug information or a release build with the smallest possible size. \image qtcreator-cmake-build-settings.png - You can change the build directory after the initial import. + In the \uicontrol {Build directory} field, you can specify the directory in + which the project is built (\l{glossary-shadow-build}{shadow build}). - The build and run kit that you select determines which CMake tool is used - for building. For more information, see \l {Adding Kits}. + To view all settings, select the \uicontrol Advanced check box. + + To modify the value of a build setting, select it, and then select + \uicontrol Edit. The new value is displayed in italics until you save the + changes by selecting \uicontrol {Apply Configuration Changes}. Any + configuration change might trigger a follow-up configuration change, so keep + saving until no more values are displayed in italics. + + You can add arguments and targets for the build command in + \uicontrol {Build Steps}. + + \image qtcreator-cmake-build-steps.png + + You can add arguments and targets for the clean command in + \uicontrol {Clean Steps}. + + \image qtcreator-cmake-clean-steps.png + + The build errors and warnings are parsed and displayed in the + \uicontrol Issues output pane. \section1 Running CMake Projects \QC automatically adds \uicontrol {Run Configurations} for all targets specified in the CMake project file. - For more information about known issues for the current version, see - \l{Known Issues}. + \image qtcreator-cmake-run-settings.png + + To run CMake projects, select \uicontrol Run or press \key Ctrl+R (or + \key Cmd+R on OS X). \section1 Deploying CMake Projects to Embedded Linux Devices diff --git a/doc/src/projects/creator-projects-targets.qdoc b/doc/src/projects/creator-projects-targets.qdoc index 2a34e6df341..d332355e5a7 100644 --- a/doc/src/projects/creator-projects-targets.qdoc +++ b/doc/src/projects/creator-projects-targets.qdoc @@ -126,6 +126,16 @@ CMake tools to the list. For more information, see \l{Adding CMake Tools}. + \li In the \uicontrol {CMake Generator} field, select the CMake + Generator to use for producing project files. Only the generators + with names beginning with the string \uicontrol CodeBlocks produce + all the necessary data for the \QC code model. \QC displays a + warning if you select a generator that is not supported. + + \li In the \uicontrol {CMake configuration} field, select + \uicontrol Change to edit the variables of the CMake configuration + for the kit. + \endlist */ diff --git a/share/qtcreator/debugger/qttypes.py b/share/qtcreator/debugger/qttypes.py index b2b0ffd4eb3..0d8908730a4 100644 --- a/share/qtcreator/debugger/qttypes.py +++ b/share/qtcreator/debugger/qttypes.py @@ -426,7 +426,7 @@ def qdump__QFile(d, value): if d.isWindowsTarget(): offset = 164 if is32bit else 248 else: - offset = 156 if is32bit else 248 + offset = 164 if is32bit else 248 elif qtVersion >= 0x050400: if d.isWindowsTarget(): offset = 188 if is32bit else 272 diff --git a/share/qtcreator/translations/qtcreator_ru.ts b/share/qtcreator/translations/qtcreator_ru.ts index ddd6ece543f..06a6914e404 100644 --- a/share/qtcreator/translations/qtcreator_ru.ts +++ b/share/qtcreator/translations/qtcreator_ru.ts @@ -32,6 +32,37 @@ Файл «%1» не является файлом документации. + + AddSignalHandlerDialog + + Implement Signal Handler + Реализация обработчика сигналов + + + Frequently used signals + Популярные сигналы + + + Property changes + Изменение свойств + + + All signals + Все сигналы + + + Signal: + Сигнал: + + + Choose the signal you want to handle: + Выберите сигнал для обработки: + + + The item will be exported automatically. + Элемент будет автоматически экспортирован. + + AdvancedSection @@ -82,153 +113,6 @@ Анализатор - - Analyzer::AnalyzerManager - - Debug - Отладка - - - Profile - Профилирование - - - Release - Выпуск - - - in Debug mode - она создана для режима отладки - - - in Profile mode - она создана для режима профилирования - - - in Release mode - она создана для режима выпуска - - - with debug symbols (Debug or Profile mode) - ей требуются отладочные символы (отладка или профилирование) - - - on optimized code (Profile or Release mode) - ей требуется оптимизированный код (профилирование или выпуск) - - - <html><head/><body><p>You are trying to run the tool "%1" on an application in %2 mode. The tool is designed to be used %3.</p><p>Run-time characteristics differ significantly between optimized and non-optimized binaries. Analytical findings for one mode may or may not be relevant for the other.</p><p>Running tools that need debug symbols on binaries that don't provide any may lead to missing function names or otherwise insufficient output.</p><p>Do you want to continue and run the tool in %2 mode?</p></body></html> - <html><head/><body><p>Вы пытаетесь запустить утилиту «%1» для приложения в режиме %2, а %3.</p><p>Характер работы приложения сильно зависит от оптимизации. Выводы, сделанные для одного режима, могут быть неверны для другого.</p><p>Запуск утилиты требующей отладочные символы для программ их не имеющих приведёт к проблемам определения имён функций или некорректному выводу информации.</p><p>Запустить утилиту в режиме %2?</p></body></html> - - - Run %1 in %2 Mode? - Выполнить %1 в режиме %2? - - - Analyze - Анализ - - - &Analyze - &Анализ - - - Start - Запустить - - - Stop - Остановить - - - Analyzer Toolbar - Панель анализатора - - - An analysis is still in progress. - Производится анализ. - - - No analyzer tool selected. - Инструмент анализа не выбран. - - - - Analyzer::AnalyzerRunConfigWidget - - Use Customized Settings - Используются особые настройки - - - Use Global Settings - Используются глобальные настройки - - - - Analyzer::DetailedErrorView - - Copy - Копировать - - - - Analyzer::Internal::AnalyzerPlugin - - Analyzer - Category under which Analyzer tasks are listed in Issues view - Анализатор - - - - Analyzer::StartRemoteDialog - - Start Remote Analysis - Запуск удалённой отладки - - - Kit: - Комплект: - - - Executable: - Программа: - - - Arguments: - Параметры: - - - Working directory: - Рабочий каталог: - - - - AnalyzerManager - - Memory Analyzer Tool finished, %n issues were found. - - Анализ памяти завершён, найдена %n проблема. - Анализ памяти завершён, найдено %n проблемы. - Анализ памяти завершён, найдено %n проблем. - - - - Memory Analyzer Tool finished, no issues were found. - Анализ памяти завершён, проблем не найдено. - - - Log file processed, %n issues were found. - - Файл журнала обработан, найдена %n проблема. - Файл журнала обработан, найдено %n проблемы. - Файл журнала обработан, найдено %n проблем. - - - - Log file processed, no issues were found. - Файл журнала обработан, проблем не найдено. - - AnchorRow @@ -545,10 +429,6 @@ Do you want to uninstall the existing package? Create Android Virtual Device Создать виртуальное устройство - - Always use this device for architecture %1 - Всегда использовать для архитектуры %1 - ABI: ABI: @@ -605,6 +485,14 @@ Do you want to uninstall the existing package? Cancel Отмена + + This can be later reset in deployment settings in the Projects mode. + Можно в любой момент выключить в настройках установки в режиме Проекты. + + + Always use this device for architecture %1 for this project + Всегда использовать это устройство для архитектуры %1 в этом проекте + Android::Internal::AndroidDeviceFactory @@ -1418,6 +1306,495 @@ Deploying local Qt libraries is incompatible with Android 5. Непрозрачность + + Autotest::Constants + + <unnamed> + <безымянный> + + + + Autotest::Internal::AutotestPlugin + + &Tests + &Тесты + + + Run &All Tests + Запустить &все + + + Alt+Shift+T,Alt+A + Alt+Shift+T,Alt+A + + + &Run Selected Tests + &Запустить выбранные + + + Alt+Shift+T,Alt+R + Alt+Shift+T,Alt+R + + + Re&scan Tests + &Пересканировать + + + Alt+Shift+T,Alt+S + Alt+Shift+T,Alt+S + + + + Autotest::Internal::GTestOutputReader + + You have %n disabled test(s). + + Имеется %n отключённый тест. + Имеется %n отключённых теста. + Имеется %n отключённых тестов. + + + + Test execution took %1 + Выполнение теста заняло %1 + + + Repeating test case %1 (iteration %2) + Повторное тестирование %1 (повтор %2) + + + Executing test case %1 + Выполнение теста %1 + + + Entering test set %1 + Вход в набор тестов %1 + + + Execution took %1. + Выполнение заняло %1. + + + + Autotest::Internal::QtTestOutputReader + + Executing test case %1 + Выполнение теста %1 + + + Entering test function %1::%2 + Вход в тестовую функцию %1::%2 + + + Qt version: %1 + Версия Qt: %1 + + + Qt build: %1 + Сборка Qt: %1 + + + QTest version: %1 + Версия QTest: %1 + + + Execution took %1 ms. + Выполнение заняло %1 мс. + + + Test finished. + Тест завершён. + + + Test execution took %1 ms. + Выполнение теста заняло %1 мс. + + + + Autotest::Internal::TestCodeParser + + Scanning for Tests + Поиск тестов + + + + Autotest::Internal::TestNavigationWidget + + Tests + Тесты + + + Run This Test + Запустить этот тест + + + Select All + Выбрать все + + + Deselect All + Отменить выбор + + + Filter Test Tree + Отфильтровать дерево тестов + + + Sort Naturally + Отсортировать по порядку + + + Expand All + Развернуть всё + + + Collapse All + Свернуть всё + + + Sort Alphabetically + Сортировать по алфавиту + + + Show Init and Cleanup Functions + Показывать функции Init и Cleanup + + + Show Data Functions + Показывать функции Data + + + + Autotest::Internal::TestNavigationWidgetFactory + + Tests + Тесты + + + + Autotest::Internal::TestResultsPane + + Expand All + Развернуть всё + + + Run All Tests + Запуск всех тестов + + + Run Selected Tests + Запуск выбранных тестов + + + Stop Test Run + Остановка тестов + + + Filter Test Results + Фильтрация результатов тестирования + + + Test Results + Результаты тестирования + + + Pass + Успешно + + + Fail + Ошибка + + + Expected Fail + Ожидаемая ошибка + + + Unexpected Pass + Неожиданный успех + + + Skip + Пропущен + + + Benchmarks + Производительность + + + Debug Messages + Отладочные сообщения + + + Warning Messages + Предупреждающие сообщения + + + Internal Messages + Внутренние сообщения + + + Check All Filters + Включить все фильтры + + + passes + успехов + + + fails + ошибок + + + unexpected passes + неожиданных успехов + + + expected fails + ожиданных ошибок + + + fatals + фатальных + + + blacklisted + исключённых + + + , %1 disabled + , %1 отключенных + + + Copy + Копировать + + + Copy All + Копировать всё + + + Save Output to File... + Сохранить вывод в файл... + + + Save Output To... + Сохранение вывода в... + + + Error + Ошибка + + + Failed to write "%1". + +%2 + Не удалось записать «%1»: + +%2 + + + + Autotest::Internal::TestRunner + + Project's run configuration was guessed for "%1". +This might cause trouble during execution. + Конфигурация запуска проекта соответствует «%1». +Это может вызвать проблемы при запуске. + + + No tests selected. Canceling test run. + Тесты не выбраны. Отмена теста. + + + Project is null. Canceling test run. +Only desktop kits are supported. Make sure the currently active kit is a desktop kit. + Проект пуст. Отмена теста. +Поддерживаются только комплекты для десктопов. Убедитесь, что текущий комплект для десктопа. + + + Project is not configured. Canceling test run. + Проект не настроен. Отмена теста. + + + Running Tests + Выполнение тестов + + + Build failed. Canceling test run. + Сборка не удалась. Отмена теста. + + + + Autotest::Internal::TestSettingsPage + + Form + + + + General + Основное + + + Hides internal messages by default. You can still enable them by using the test results filter. + Скрывать внутренние сообщения по умолчанию. Их можно включить используя фильтр результатов тестирования. + + + Omit internal messages + Опускать внутренние сообщения + + + Hides warnings related to a guessed run configuration. + Скрывать предупреждения связанные с выбранной конфигурацией запуска. + + + Omit run configuration warnings + Опускать предупреждения конфигурации запуска + + + Limit result output to 100000 characters. + Ограничить вывод результата 100000 символами. + + + Limit result output + Ограничить вывод результата + + + Automatically scroll down when new items are added and scrollbar is at bottom. + Автоматически пролистывать при добавлении новых элеметов, если ползунок внизу. + + + Automatically scroll results + Автоматически пролистывать результаты + + + Parse for tests even when no Tests related widget is displayed. + Искать тесты даже, если тестируемый виджет не отображается. + + + Always parse current project for tests + Всегда искать тесты в текущем проекте + + + Timeout used when executing each test case. + Таймаут, используемый при выполнении каждого теста. + + + Timeout: + Таймаут: + + + Timeout used when executing test cases. This will apply for each test case on its own, not the whole project. + Таймаут, используемый при выполнении тестов. Он применяется для каждого теста, а не всего проекта. + + + s + с + + + Google Test + Google Test + + + Executes disabled tests when performing a test run. + Запускать отключённые тесты при выполнении тестового запуска. + + + Run disabled tests + Запускать отключённые тесты + + + Repeats a test run (you might be required to increase the timeout to avoid canceling the tests). + Повторяет запуск теста (возможно, потребуется увеличить таймаут для предотвращения отмены тестирования). + + + Repeat tests + Повторять тесты + + + Iterations: + Повторов: + + + Shuffle tests automatically on every iteration by the given seed. + Автоматически перемешивать тесты при кажом повторе согласно заданной Seed. + + + Shuffle tests + Перемешать тесты + + + Seed: + Seed: + + + A seed of 0 generates a seed based on the current timestamp. + 0 приводит к генерации на основе текущего времени. + + + Benchmark Metrics + Метрика аттестации + + + Uses walltime metrics for executing benchmarks (default). + Использовать обычное время при выполнении тестирования производительности (по умолчанию). + + + Walltime + Время + + + Uses tick counter when executing benchmarks. + Использовать счётчик тиков при тестировании производительности. + + + Tick counter + Счётчик тиков + + + Uses event counter when executing benchmarks. + Использовать счётчик событий при тестировании производительности. + + + Event counter + Счётчик событий + + + Uses Valgrind Callgrind when executing benchmarks (it must be installed). + Использовать Valgrind Callgrind при тестировании производительности (должен быть установлен). + + + Callgrind + Callgrind + + + Uses Perf when executing benchmarks (it must be installed). + Использовать Perf при тестировании производительности (должен быть установлен). + + + Perf + Perf + + + Test Settings + Настройки тестов + + + + Autotest::Internal::TestTreeModel + + Auto Tests + Автотесты + + + Qt Quick Tests + Тесты Qt Quick + + + Google Tests + Тесты Google + + AutotoolsProjectManager::Internal::AutogenStep @@ -1629,10 +2006,6 @@ Deploying local Qt libraries is incompatible with Android 5. Executable: Программа: - - Arguments: - Параметры: - Work directory: Рабочий каталог: @@ -1750,10 +2123,6 @@ Deploying local Qt libraries is incompatible with Android 5. Executable: Программа: - - Arguments: - Параметры: - <default> <по умолчанию> @@ -2012,6 +2381,10 @@ Deploying local Qt libraries is incompatible with Android 5. BaseQtVersion + + Device type is not supported by Qt version. + Устройства этого типа не поддерживается профилем Qt. + The compiler "%1" (%2) cannot produce code for the Qt version "%3" (%4). Компилятор «%1» (%2) не может создавать код для профиля Qt «%3» (%4). @@ -2416,7 +2789,7 @@ Local commits are not pushed to the master branch until a normal commit is perfo Timeout: - Время ожидания: + Таймаут: s @@ -2622,26 +2995,10 @@ For example, "Revision: 15" will leave the branch at revision 15. Beautifier::Internal::BeautifierPlugin - - Cannot create temporary file "%1": %2. - Невозможно создать временный файл «%1»: %2. - - - Cannot call %1 or some other error occurred. - Не удалось вызвать %1 или возникла другая ошибка. - - - Cannot read file "%1": %2. - Невозможно прочитать файл «%1»: %2. - File was modified. Файл изменился. - - Time out reached while formatting file %1. - Время форматирования файла %1 истекло. - Could not format file %1. Не удалось переформатировать файл %1. @@ -2692,10 +3049,6 @@ For example, "Revision: 15" will leave the branch at revision 15.Clang Format command: Команда Clang Format: - - Format entire file if no text was selected. (For action Format Selected Text) - Форматировать файл целиком, если текст не выделен (для «Форматировать выделенное») - Clang Format Clang Format @@ -2708,6 +3061,14 @@ For example, "Revision: 15" will leave the branch at revision 15.Use customized style: Использовать особый стиль: + + For action Format Selected Text + Для операции «Форматировать выделенное» + + + Format entire file if no text was selected + Форматировать весь файл, если ничего не выбрано + Beautifier::Internal::ConfigurationDialog @@ -2790,6 +3151,14 @@ For example, "Revision: 15" will leave the branch at revision 15.Use customized style: Использовать особый стиль: + + For action Format Selected Text + Для операции «Форматировать выделенное» + + + Format entire file if no text was selected + Форматировать весь файл, если ничего не выбрано + BinEditor::BinEditorWidget @@ -3261,6 +3630,71 @@ For example, "Revision: 15" will leave the branch at revision 15.Показывать информацию о событии при наведении курсора. + + CMakeProjectManager::CMakeBuildStep + + Qt Creator needs a cmake tool set up to build. Configure a cmake tool in the kit options. + Для сборки необходимо, чтобы была задана утилита cmake. Задайте её в настройках комлекта. + + + + CMakeProjectManager::CMakeConfigurationKitInformation + + CMake configuration has no path to qmake binary set, even though the kit has a valid Qt version. + В конфигурации CMake не указан путь к qmake, даже при заданном профиле Qt комплекта. + + + CMake configuration has a path to a qmake binary set, even though the kit has no valid Qt version. + В конфигурации CMake указан путь к qmake, при незаданном верном профиле Qt комплекта. + + + CMake configuration has a path to a qmake binary set, which does not match up with the qmake binary path configured in the Qt version. + В конфигурации CMake указан путь к qmake, но он не совпадает с заданным в профиле Qt комплекта. + + + CMake configuration has no path to a C++ compiler set, even though the kit has a valid tool chain. + В конфигурации CMake не указан путь к компилятору С++, при заданном верном инструментарии комплекта. + + + CMake configuration has a path to a C++ compiler set, even though the kit has no valid tool chain. + В конфигурации CMake указан путь к компилятору С++, при незаданном верном инструментарии комплекта. + + + 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 указан путь к компилятору С++, но он не совпадает с заданным в инструментарии комплекта. + + + CMake Configuration + Конфигурация CMake + + + + CMakeProjectManager::CMakeGeneratorKitInformation + + No CMake Tool configured, CMake generator will be ignored. + Утилита CMake не задана, генератор CMake игнорируется. + + + CMake Tool is unconfigured, CMake generator will be ignored. + Утилита CMake не настроена, генератор CMake игнорируется. + + + CMake Tool does not support the configured generator. + Утилита CMake не поддерживает выбранный генератор. + + + CMake generator does not generate CodeBlocks file. Qt Creator will not be able to parse the CMake project. + Генератор CMake не создает файл CodeBlocks. Qt Creator не сможет обрабатывать проект CMake. + + + CMake Generator + Генератор CMake + + + <Use Default Generator> + <Генератор по умолчанию> + + CMakeProjectManager::CMakeKitInformation @@ -3275,8 +3709,8 @@ For example, "Revision: 15" will leave the branch at revision 15. CMakeProjectManager::CMakeProject - Internal Error: No build configuration found in settings file. - Внутренняя ошибка: Не удалось обнаружить конфигурацию сборки в файле настроек. + No cmake tool set. + Программа cmake не указана. @@ -3321,6 +3755,52 @@ For example, "Revision: 15" will leave the branch at revision 15.Системная CMake в %1 + + CMakeProjectManager::ConfigModel + + <UNSET> + <не задано> + + + Setting + Настройка + + + Value + Значение + + + Advanced + Дополнительно + + + + CMakeProjectManager::Internal::BuildDirManager + + The build directory is not for %1 + Каталог сборки не для %1 + + + Running "%1 %2" in %3. + Выполнение "%1 %2" в %3. + + + Configuring "%1" + Настройка «%1» + + + *** cmake process crashed! + *** процесс cmake завершился крахом! + + + *** cmake process exited with exit code %1. + *** процесс cmake завершился с кодом %1. + + + Failed to open %1 for reading. + Не удалось открыть %1 для чтения. + + CMakeProjectManager::Internal::CMakeBuildConfigurationFactory @@ -3352,20 +3832,24 @@ For example, "Revision: 15" will leave the branch at revision 15. CMakeProjectManager::Internal::CMakeBuildSettingsWidget - Run CMake... - Запустить CMake... + Build directory: + Каталог сборки: - Reconfigure project: - Перенастроить проект: - - - &Change + &Edit &Изменить - Build directory: - Каталог сборки: + &Reset + &Вернуть + + + Advanced + Дополнительно + + + Apply Configuration Changes + Применить изменения CMake @@ -3373,14 +3857,85 @@ For example, "Revision: 15" will leave the branch at revision 15. - CMakeProjectManager::Internal::CMakeEditor + CMakeProjectManager::Internal::CMakeBuildStep - Changes to cmake files are shown in the project tree after building. - Изменения в файлах cmake будут отображены в дереве проекта после сборки. + Make + Default display name for the cmake make step. + Сборка - Build now - Собрать + Persisting CMake state... + Фиксация состояния CMake... + + + + CMakeProjectManager::Internal::CMakeBuildStepConfigWidget + + Tool arguments: + Параметры утилиты: + + + Targets: + Цели: + + + Build + CMakeProjectManager::CMakeBuildStepConfigWidget display name. + Сборка + + + <b>No build configuration found on this kit.</b> + <b>Для этого комплекта отсутствует конфигурация сборки.</b> + + + + CMakeProjectManager::Internal::CMakeBuildStepFactory + + Build + Display name for CMakeProjectManager::CMakeBuildStep id. + Сборка + + + + CMakeProjectManager::Internal::CMakeConfigurationKitConfigWidget + + Change... + Изменить... + + + CMake Configuration + Конфигурация CMake + + + <No Changes to Apply> + <Нет изменений> + + + 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>Можно указывать тип, добавляя «:ТИП» перед "=".<br>Например: CMAKE_BUILD_TYPE:STRING=DebWithRelInfo. + + + + CMakeProjectManager::Internal::CMakeGeneratorKitConfigWidget + + CMake Generator: + Генератор CMake: + + + <Use Default Generator> + <Генератор по умолчанию> + + + CMake generator defines how a project is built when using CMake.<br>This setting is ignored when using other build systems. + Генератор CMake определяет, как проект будет собираться при использовании CMake.<br>Он игнорируется при использовании других систем сборки. @@ -3411,18 +3966,15 @@ For example, "Revision: 15" will leave the branch at revision 15.Run CMake Запустить CMake + + Clear CMake Configuration + Очистить конфигурацию + Failed opening project "%1": Project is not a file Не удалось открыть проект «%1»: проект не является файлом - - CMakeProjectManager::Internal::CMakeOpenProjectWizard - - CMake Wizard - Мастер CMake - - CMakeProjectManager::Internal::CMakeRunConfiguration @@ -3438,68 +3990,6 @@ For example, "Revision: 15" will leave the branch at revision 15.Приложение собрано не текущей конфигурацией сборки - - CMakeProjectManager::Internal::CMakeRunConfigurationWidget - - Select Working Directory - Выбор рабочего каталога - - - Reset to Default - Сбросить в исходное состояние - - - Working directory: - Рабочий каталог: - - - - CMakeProjectManager::Internal::CMakeRunPage - - Run CMake - Запустить CMake - - - The build directory "%1" for build configuration "%2" for target "%3" contains an outdated .cbp file. Qt Creator needs to update this file by running CMake. You can add command line arguments below. Note that CMake remembers command line arguments from the previous runs. - Каталог сборки «%1» конфигурации «%2» для цели «%3» содержит устаревший файл *.cbp. Qt Creator должен его обновить путём запуска CMake. Можно передать дополнительные параметры командной строки ниже. Следует иметь в виду, что CMake запоминает параметры командной строки каждого запуска. - - - The directory "%1" specified in build configuration "%2", for target "%3" 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. - Каталог сборки «%1» конфигурации «%2» цели «%3» не содержит файл *.cbp. Qt Creator должен его создать путём запуска CMake. Некоторым проектам требуется передать параметры командной строки при первом запуске CMake. Следует иметь в виду, что CMake запоминает параметры командной строки каждого запуска. - - - Qt Creator needs to run CMake in the new build directory. Some projects require command line arguments to the initial CMake call. - Qt Creator должен запустить CMake в новом каталоге сборки. Некоторые проекты требуют указания дополнительных параметров командной строки при первом запуске CMake. - - - Refreshing the .cbp file in "%1" for build configuration "%2" for target "%3". - Обновление файла *.cbp в «%1» конфигурации «%2» для цели «%3». - - - Selected kit has no valid CMake executable specified. - У выбранного комплекта не задана программа CMake. - - - Open project with errors. - Открывать проекты с ошибками. - - - No generator selected. - Генератор не выбран. - - - CMake exited with errors. Please check CMake output. - CMake завершился с ошибкой. Проверьте сообщения CMake. - - - Arguments: - Параметры: - - - Generator: - Генератор: - - CMakeProjectManager::Internal::CMakeSettingsPage @@ -3537,10 +4027,6 @@ For example, "Revision: 15" will leave the branch at revision 15.Set as the default CMake Tool to use when creating a new kit or when no value is set. Задание утилиты CMake по умолчанию, используемой при создании новых комплектов. - - Prefer Ninja generator (CMake 2.8.9 or higher required) - Предпочитать генератор Ninja (требуется CMake не ниже 2.8.9) - Clone of %1 Копия %1 @@ -3550,125 +4036,6 @@ For example, "Revision: 15" will leave the branch at revision 15.Новая CMake - - CMakeProjectManager::Internal::GeneratorInfo - - Ninja (%1) - Ninja (%1) - - - NMake Generator (%1) - Генератор для NMake (%1) - - - MinGW Generator (%1) - Генератор для MinGW (%1) - - - Unix Generator (%1) - Генератор для Unix (%1) - - - - 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 не позволит изменить каталог сборки. Если требуется теневая сборка, необходимо очистить каталог исходников и открыть проект снова. - - - Build Location - Каталог сборки - - - - CMakeProjectManager::Internal::MakeStep - - Make - Default display name for the cmake make step. - Сборка - - - - CMakeProjectManager::Internal::MakeStepConfigWidget - - Override command: - Заменяющая команда: - - - Additional arguments: - Дополнительные параметры: - - - Targets: - Цели: - - - <b>No build configuration found on this kit.</b> - <b>Для этого комплекта отсутствует конфигурация сборки.</b> - - - Make - CMakeProjectManager::MakeStepConfigWidget display name. - Сборка - - - - CMakeProjectManager::Internal::MakeStepFactory - - Make - Display name for CMakeProjectManager::MakeStep id. - Сборка - - - - CMakeProjectManager::Internal::NoCMakePage - - Check CMake Tools - Проверка утилит CMake - - - There are CMake Tools registered. - Обнаружена утилита CMake. - - - Qt Creator has no CMake Tools that are required for CMake projects. Please configure at least one. - У Qt Creator не настроены утилиты CMake, необходимые для сборки проектов на базе CMake. Настройте хотя бы одну. - - - - CMakeProjectManager::Internal::NoKitPage - - Check Kits - Проверить комплекты - - - There are compatible kits. - Имеются совместимые комплекты. - - - Qt Creator has no kits that are suitable for CMake projects. Please configure a kit. - У Qt Creator нет комплектов, подходящих для проектов CMake. Настройте комплект. - - - - CMakeProjectManager::Internal::ShadowBuildPage - - Please enter the directory in which you want to build your project. - Укажите каталог, в котором желаете собирать проект. - - - 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::CheckSymbols @@ -3752,6 +4119,21 @@ For example, "Revision: 15" will leave the branch at revision 15.Находится в %1 + + ClangCodeModel::Internal::ClangProjectSettingsWidget + + Warnings + Предупреждения + + + Clang Code Model + Модель кода Clang + + + Global setting (%1) + Глобальная настройка (%1) + + ClangCodeModel::Internal::ModelManagerSupport @@ -3760,6 +4142,25 @@ For example, "Revision: 15" will leave the branch at revision 15.Clang + + ClangDiagnosticConfigsModel + + Warnings for questionable constructs + Предупреждать о сомнительных конструкциях + + + Pedantic Warnings + Педантичные предупреждения + + + Warnings for almost everything + Предупреждать обо всём + + + %1 [built-in] + %1 [встроенный] + + ClangFormatSettings @@ -3767,6 +4168,252 @@ For example, "Revision: 15" will leave the branch at revision 15.Описание недоступно. + + ClangStaticAnalyzer + + The chosen file "%1" seems to point to an icecc binary not suitable for analyzing. +Please set a real clang executable. + Кажется, выбранный файл «%1» указывает на программу icecc непригодную для анализа. +Укажите реальную программу clang. + + + + ClangStaticAnalyzer::Diagnostic + + Category: + Категория: + + + Type: + Тип: + + + Context: + Контекст: + + + Location: + Размещение: + + + + ClangStaticAnalyzer::ExplainingStep + + Message: + Сообщение: + + + Extended Message: + Подробное сообщение: + + + Location: + Размещение: + + + + ClangStaticAnalyzer::Internal::ClangStaticAnalyzerConfigWidget + + Form + + + + General + Основное + + + Clang executable: + Исполняемый файл Clang: + + + Simultaneous processes: + Одновременных процессов: + + + Clang Command + Команда Clang + + + + ClangStaticAnalyzer::Internal::ClangStaticAnalyzerDiagnosticModel + + Issue + Проблема + + + Location + Размещение + + + + ClangStaticAnalyzer::Internal::ClangStaticAnalyzerDiagnosticView + + Suppress this diagnostic + Подавить эту диагностику + + + + ClangStaticAnalyzer::Internal::ClangStaticAnalyzerOptionsPage + + Clang Static Analyzer + Статический анализатор Clang + + + + ClangStaticAnalyzer::Internal::ClangStaticAnalyzerPlugin + + Clang Static Analyzer Settings + Настройки статического анализатора Clang + + + + ClangStaticAnalyzer::Internal::ClangStaticAnalyzerRunControl + + Running Clang Static Analyzer on %1 + Выполнения статического анализа Clang для %1 + + + Clang Static Analyzer: Invalid executable "%1", stop. + Статический анализатор Clang: Неверная программа «%1», остановлено. + + + Clang Static Analyzer: Failed to create temporary dir, stop. + Статический анализатор Clang: Не удалось создать временный каталог, остановлено. + + + Analyzing + Анализ + + + Clang Static Analyzer stopped by user. + Статический анализатор Clang остановлен пользователем. + + + Analyzing "%1". + Анализ «%1». + + + Failed to analyze "%1": %2 + Не удалось проанализировать «%1»: %2 + + + Clang Static Analyzer finished: Processed %1 files successfully, %2 failed. + Работа статического анализатора Clang завершена: Успешно обработано %1 файлов и %2 не удалось. + + + Clang Static Analyzer: Not all files could be analyzed. + Статический анализатор Clang: Не все файлы удалось проанализовать. + + + + ClangStaticAnalyzer::Internal::ClangStaticAnalyzerRunControlFactory + + The project configuration changed since the start of the Clang Static Analyzer. Please re-run with current configuration. + Конфигурация проекта изменилась с момента запуска статического анализатора Clang. Перезапустите его. + + + + ClangStaticAnalyzer::Internal::ClangStaticAnalyzerTool + + Clang Static Analyzer Issues + Если перевести буквально, то будет очень длинно + Статический анализатор Clang + + + Go to previous bug. + К предыдущей проблеме. + + + Go to next bug. + К следующей проблеме. + + + Clang Static Analyzer uses the analyzer from the clang project to find bugs. + Статический анализатор Clang использует анализатор из проекта clang для поиска проблем. + + + Clang Static Analyzer + Статический анализатор Clang + + + Release + Выпуск + + + Run %1 in %2 Mode? + Выполнить %1 в режиме %2? + + + <html><head/><body><p>You are trying to run the tool "%1" on an application in %2 mode. The tool is designed to be used in Debug mode since enabled assertions can reduce the number of false positives.</p><p>Do you want to continue and run the tool in %2 mode?</p></body></html> + <html><head/><body><p>Вы пытаетесь запустить «%1» для приложения в режиме %2. Этот инструмент разработан для использования в отладочном режиме, так как включённые утверждения могут уменьшить число ложных срабатываний.</p><p>Продолжить запуск в режиме %2?</p></body></html> + + + Clang Static Analyzer is still running. + Статический анализатор Clang ещё работает. + + + Start Clang Static Analyzer. + Запустить статический анализатор Clang. + + + Clang Static Analyzer running. + Статический анализатор Clang работает. + + + Clang Static Analyzer finished. + Статический анализ Clang завершён. + + + No issues found. + Проблем не найдено. + + + %n issues found (%1 suppressed). + + найдена %n проблема (%1 подавлено). + найдено %n проблемы (%1 подавлено). + найдено %n проблем (%1 подавлено). + + + + + ClangStaticAnalyzer::Internal::ProjectSettingsWidget + + Form + + + + Suppressed Diagnostics: + Подавляемые диагностики: + + + Remove Selected + Удалить выбранное + + + Remove All + Удалить всё + + + + ClangStaticAnalyzer::Internal::SuppressedDiagnosticsModel + + File + Файл + + + Context + Контекст + + + Diagnostic + Диагностика + + + Function "%1" + Функция «%1» + + ClassView::Internal::NavigationWidget @@ -4191,7 +4838,7 @@ For example, "Revision: 15" will leave the branch at revision 15. &Timeout: - В&ремя ожидания: + Та&ймаут: s @@ -5014,6 +5661,22 @@ Continue? Opening File Открытие файла + + Split + Разделить + + + Split Side by Side + Разделить вертикально + + + Open in New Window + Открыть в новом окне + + + Close Document + Закрыть документ + Core::EditorToolBar @@ -5351,6 +6014,10 @@ Continue? The current time (QTime formatstring). Текущее время (строка форматирования QTime). + + Generate a new UUID. + Создать новый UUID. + A comment. Комментарий. @@ -5552,6 +6219,18 @@ To do this, you type this shortcut and a space in the Locator entry field, and t Ctrl+E,1 Ctrl+E,1 + + Go to Previous Split or Window + Перейти к предыдущему разделению или окну + + + Meta+E,i + Meta+E,i + + + Ctrl+E,i + Ctrl+E,i + Go to Next Split or Window Перейти к следующему разделению или окну @@ -6127,10 +6806,6 @@ Do you want to kill it? Find: Искать: - - ... - ... - Replace with: Заменить на: @@ -6159,12 +6834,12 @@ Do you want to kill it? <Системный> - Interface - Интерфейс + Restart Required + Требуется перезапуск - Restart required - Требуется перезапуск + Interface + Интерфейс The language change will take effect after a restart of Qt Creator. @@ -6814,6 +7489,14 @@ Do you want to kill it? Previous Item Предыдущий + + Ctrl+Shift+9 + Ctrl+Shift+9 + + + Alt+Shift+9 + Alt+Shift+9 + Maximize Output Pane Развернуть панель вывода @@ -6830,14 +7513,6 @@ Do you want to kill it? F6 F6 - - Ctrl+9 - Ctrl+9 - - - Alt+9 - Alt+9 - Minimize Output Pane Свернуть панель вывода @@ -7193,10 +7868,6 @@ Do you want to kill it? Terminal Сбросить в исходное состояние. - - <html>Influences how file names are matched to decide if they are the same. - <html>Определяет, как сравнивать похожие именя файлов. - File system case sensitivity: Будет: "При стравнении имён файлов: учитывать регистр" @@ -7226,124 +7897,20 @@ Do you want to kill it? Variables Переменные - - - Core::Internal::ThemeEditor::ThemeEditorWidget - Theme Editor - Редактор тем - - - Filter: - Фильтр: + Influences how file names are matched to decide if they are the same. + Определяет способ сравнения имён файлов. - Core::Internal::ThemeEditor::ThemeSettingsItemDelegate + Core::Internal::ThemeChooser - <Unnamed> (Current) - <Без имени> (текущая) + Restart Required + Требуется перезапуск - (Current) - (текущая) - - - Remove Variable Name - Удалить имя переменной - - - Add Variable Name... - Добавить имя переменной... - - - Variable name: - Имя переменной: - - - Add Variable Name - Добавление имени переменной - - - - Core::Internal::ThemeEditor::ThemeSettingsTableModel - - Widget Style - Стиль виджета - - - Colors - Цвета - - - Flags - Флаги - - - Role - Роль - - - Value - Значение - - - - Core::Internal::ThemeSettings - - Rename... - Переименовать... - - - Copy... - Копировать... - - - Delete - Удалить - - - Theme - Тема - - - - Core::Internal::ThemeSettingsWidget - - Delete Theme - Удаление темы - - - Are you sure you want to delete the theme "%1" permanently? - Удалить тему «%1» навсегда? - - - Delete - Удалить - - - Copy Theme - Копирование темы - - - Theme name: - Имя темы: - - - Theme Changed - Тема изменена - - - The theme "%1" was modified, do you want to save the changes? - Тема «%1» была изменена, сохранить изменения? - - - Discard - Отказаться - - - Rename Theme - Переименование темы + The theme change will take effect after a restart of Qt Creator. + Изменение темы вступит в силу только после перезапуска Qt Creator. @@ -8036,6 +8603,41 @@ to version control (%2) Имя класса. + + CppTools::ClangDiagnosticConfigsWidget + + Form + + + + Configuration to use: + Использовать конфигурацию: + + + Copy... + Копировать... + + + Remove + Удалить + + + For appropriate options, consult the GCC or Clang manual pages or the <a href="https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html">GCC online documentation</a>. + Описание параметров можно найти страницах man GCC или Clang или в <a href="https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html">Документации GCC</a>. + + + Copy Diagnostic Configuration + Копирование конфигурации диагностики + + + Diagnostic configuration name: + Имя конфигурации диагностики: + + + %1 (Copy) + %1 (копия) + + CppTools::CppClassesFilter @@ -8189,7 +8791,7 @@ In addition, Shift+Enter inserts an escape character at the cursor position and Timeout in ms: - Время ожидания в мс: + Таймаут в мс: @@ -8215,16 +8817,8 @@ In addition, Shift+Enter inserts an escape character at the cursor position and <i>Включите модуль Clang Code Model, чтобы менять настройки.</i> - Use Clang Code Model - Использовать модель кода Clang - - - Append additional command line options to Clang, one per line. <i>Use this with care.</i> - Дополнительные параметры командной строки Clang, по одной на строке.<br><i>Используйте их с осторожностью.</i> - - - Reset Options - Сбросить + Clang Code Model Warnings + Предупреждения модели кода Clang @@ -9224,7 +9818,7 @@ Flags: %3 Timeout: - Время ожидания: + Таймаут: s @@ -9254,6 +9848,29 @@ Flags: %3 Команда CVS + + DebugMessagesModel + + Debug Message + Отладочное сообщение + + + Warning Message + Предупреждающее сообщение + + + Critical Message + Критическое сообщение + + + Fatal Message + Фатальное сообщение + + + Info Message + Информационное сообщение + + Debugger @@ -9278,6 +9895,64 @@ Flags: %3 Ctrl+Shift+F11 + + Debugger::AnalyzerAction + + Cannot start %1 without a project. Please open the project and try again. + Невозможно запустить %1 без проекта. Откройте проект и попробуйте снова. + + + Debug + отладки + + + Profile + профилирования + + + Release + выпуска + + + in Debug mode + она создана для режима отладки + + + in Profile mode + она создана для режима профилирования + + + in Release mode + она создана для режима выпуска + + + with debug symbols (Debug or Profile mode) + ей требуются отладочные символы (отладка или профилирование) + + + on optimized code (Profile or Release mode) + ей требуется оптимизированный код (профилирование или выпуск) + + + Run %1 in %2 Mode? + Выполнить %1 в режиме %2? + + + <html><head/><body><p>You are trying to run the tool "%1" on an application in %2 mode. The tool is designed to be used %3.</p><p>Run-time characteristics differ significantly between optimized and non-optimized binaries. Analytical findings for one mode may or may not be relevant for the other.</p><p>Running tools that need debug symbols on binaries that don't provide any may lead to missing function names or otherwise insufficient output.</p><p>Do you want to continue and run the tool in %2 mode?</p></body></html> + <html><head/><body><p>Вы пытаетесь запустить утилиту «%1» для приложения в режиме %2, а %3.</p><p>Характер работы приложения сильно зависит от оптимизации. Выводы, сделанные для одного режима, могут быть неверны для другого.</p><p>Запуск утилиты требующей отладочные символы для программ их не имеющих приведёт к проблемам определения имён функций или некорректному выводу информации.</p><p>Запустить утилиту в режиме %2?</p></body></html> + + + + Debugger::AnalyzerRunConfigWidget + + Use Customized Settings + Используются особые настройки + + + Use Global Settings + Используются глобальные настройки + + Debugger::DebuggerItemManager @@ -9356,21 +10031,6 @@ Flags: %3 Debugger Отладчик - - No kit found. - Комплект не найден. - - - - Debugger::DebuggerMainWindow - - Memory... - Память... - - - Debugger Toolbar - Панель отладчика - Debugger::DebuggerOptionsPage @@ -9506,6 +10166,13 @@ Flags: %3 Закрытие сессии отладки + + Debugger::DetailedErrorView + + Copy + Копировать + + Debugger::Internal::AddressDialog @@ -10419,6 +11086,44 @@ Flags: %3 <бесконечна> + + Debugger::Internal::Console + + Show debug, log, and info messages. + Показывать сообщения уровней: отладка, журнал и информация. + + + Show warning messages. + Показывать предупреждения. + + + Show error messages. + Показывать сообщения об ошибках. + + + Can only evaluate during a debug session. + Вычислится только при отладке. + + + Debugger Console + Консоль отладчика + + + + Debugger::Internal::ConsoleView + + &Copy + &Копировать + + + &Show in Editor + &Показать в редакторе + + + C&lear + &Очистить + + Debugger::Internal::DebuggerEngine @@ -10511,6 +11216,18 @@ Flags: %3 Exception Triggered Возникло исключение + + The inferior is in the Portable Executable format. +Selecting CDB as debugger would improve the debugging experience for this binary format. + Программа имеет формат Portable Executable. +Рекомендуется использовать отладчик CDB для улучшения отладочных возможностей. + + + The inferior is in the ELF format. +Selecting GDB or LLDB as debugger would improve the debugging experience for this binary format. + Программа имеет формает ELF. +Рекомендуется использовать отладчик GDB или LLDB для улучшения отладочных возможностей. + Found. Найдена. @@ -10527,6 +11244,14 @@ Flags: %3 Warning Предупреждение + + The selected debugger may be inappropiate for the inferior. +Examining symbols and setting breakpoints by file name and line number may fail. + + Выбранный отладчик возможно не подходит для отлаживаемой программы. +Обзор символов и установка точек останова по имени файла и строке может не работать. + + This does not seem to be a "Debug" build. Setting breakpoints by file name and line number may fail. @@ -10657,6 +11382,11 @@ Setting breakpoints by file name and line number may fail. Sections in "%1" Секции в «%1» + + Debugger + Category under which Analyzer tasks are listed in Issues view + Отладчик + Some breakpoints cannot be handled by the debugger languages currently active, and will be ignored. Affected are breakpoints %1 @@ -10675,6 +11405,14 @@ Affected are breakpoints %1 Unable to create a debugger engine of the type "%1" Не удалось создать отладчик типа «%1» + + Install &Debug Information + Установить &отладочную информацию + + + Tries to install missing debug information. + Попытка установить отсутствующую отладочную информацию. + Debugger::Internal::DebuggerPluginPrivate @@ -10894,6 +11632,10 @@ Qt Creator не может подключиться к нему. Debugger Runtime Программа отладчика + + Debugger + Отладчик + Cannot attach to process with PID 0 Невозможно подключиться к процессу с PID равным 0 @@ -10978,6 +11720,14 @@ Qt Creator не может подключиться к нему. Breakpoints Точки останова + + &Analyze + &Анализ + + + Memory... + Память... + Modules Модули @@ -11093,10 +11843,6 @@ Qt Creator не может подключиться к нему. Debugger::Internal::DebuggerSettings - - Verbose Log - Расширенное журналирование - Use Alternating Row Colors Использовать чередующиеся цвета строк @@ -11129,10 +11875,6 @@ Qt Creator не может подключиться к нему. Dereference Pointers Automatically Автоматически разыменовывать указатели - - <p>This switches the Locals&&Watchers view to automatically dereference pointers. This saves a level in the tree view, but also loses data for the now-missing intermediate level. - <p>Переключает обзор переменных в режим автоматического разыменования указателей. Позволяет сохранить уровень древовидного отображения, но при этом недоступны данные промежуточного уровня. - Show "std::" Namespace in Types Показывать пространство имён «std::» в типах @@ -11157,6 +11899,14 @@ Qt Creator не может подключиться к нему. <p>Shows Qt namespace prefix for Qt types. This is only relevant if Qt was configured with "-qtnamespace". <p>Отображать приставку пространтсва имён Qt для типов Qt. Имеет смысл только тогда, когда Qt собран с параметром «-qtnamespace». + + Show QObject names if available + Показывать доступные имена QObject + + + <p>Displays the objectName property of QObject based items. Note that this can negatively impact debugger performance even if no QObjects are present. + <p>Отображает свойство objectName производных от QObject объектов. Может негативно сказаться на скорости работы отладчика даже если нет подобных объектов. + Sort Members of Classes and Structs Alphabetically Сортировать члены классов и структур по алфавиту @@ -11213,6 +11963,10 @@ Qt Creator не может подключиться к нему. Synchronize Breakpoints Согласовывать точки останова + + <p>This switches the Locals and Expressions view to automatically dereference pointers. This saves a level in the tree view, but also loses data for the now-missing intermediate level. + <p>Переключает обзор Переменных и выражений в режим автоматического разыменовывания указателей. Позволяет сократить размер дерева, но при этом теряются данные промежуточного уровня. + Adjust Breakpoint Locations Подстраивать размещение точек останова @@ -11473,6 +12227,10 @@ Qt Creator не может подключиться к нему. Attach to core "%1" failed: Не удалось подключиться к дампу «%1»: + + Continuing nevertheless. + Всё же продолжаем. + Debugger::Internal::GdbEngine @@ -11722,6 +12480,10 @@ You can choose between waiting longer or aborting debugging. Value changed from %1 to %2. Значение изменилось с %1 на %2. + + The selected build of GDB supports Python scripting, but the used version %1.%2 is not sufficient for Qt Creator. Supported versions are Python 2.7 and 3.x. + Выбранная сборка GDB поддерживает сценарии Python, но версия Python %1.%2 не подходит Qt Creator. Поддерживается Python версий 2.7 и 3.x. + Execution Error Ошибка выполнения @@ -11807,7 +12569,7 @@ You can choose between waiting longer or aborting debugging. GDB timeout: - Время ожидания ответа GDB: + Таймаут ответа GDB: The number of seconds Qt Creator will wait before it terminates @@ -12505,12 +13267,6 @@ Stepping into the module or setting breakpoints by file and line is expected to Do you want to retry? Не удалось подключиться к внутрипроцессному отладчику QML. Повторить? - - - Could not connect to the in-process QML debugger. -%1 - Не удалось подключиться к внутрипроцессному отладчику QML. -%1 QML Debugger: Remote host closed connection. @@ -12520,6 +13276,10 @@ Do you want to retry? JS Source for %1 Исходник JS для %1 + + Could not connect to the in-process QML debugger. %1 + Не удалось подключиться к внутрипроцессному отладчику QML. %1 + Starting %1 %2 Запускается %1 %2 @@ -12587,7 +13347,7 @@ Do you want to retry? В виде %1-битных двоичных целых - Contents as %1-bit Floating Point Values + Content as %1-bit Floating Point Values В виде %1-битных действительных @@ -13176,6 +13936,10 @@ Do you want to retry? Attach to Process Not Yet Started Подключение процессу ещё не началось + + Reset + Сбросить + Reopen dialog when application finishes Открыть диалог при завершении приложения @@ -13221,19 +13985,6 @@ Do you want to retry? Подключить - - Debugger::Internal::WatchData - - <not in scope> - Value of variable in Debugger Locals display for variables out of scope (stopped above initialization). - <вне области> - - - %1 <shadowed %2> - Display of variables shadowed by variables of the same name in nested scopes: Variable %1 is the variable name, %2 is a simple count. - %1 <затеняет %2> - - Debugger::Internal::WatchHandler @@ -13244,10 +13995,6 @@ Do you want to retry? Internal Type Внутренний тип - - Displayed Type - Отображаемый тип - ... <cut off> ... <обрезано> @@ -13264,6 +14011,10 @@ Do you want to retry? Pointer Address Адрес указателя + + Array Index + Индекс массива + Static Object Size Размер статического объекта @@ -13341,6 +14092,19 @@ Do you want to retry? Имя + + Debugger::Internal::WatchItem + + <not in scope> + Value of variable in Debugger Locals display for variables out of scope (stopped above initialization). + <вне области> + + + %1 <shadowed %2> + Display of variables shadowed by variables of the same name in nested scopes: Variable %1 is the variable name, %2 is a simple count. + %1 <затеняет %2> + + Debugger::Internal::WatchModel @@ -13702,6 +14466,29 @@ Do you want to retry? Переменные и выражения + + Debugger::StartRemoteDialog + + Start Remote Analysis + Запуск удалённой отладки + + + Kit: + Комплект: + + + Executable: + Программа: + + + Arguments: + Параметры: + + + Working directory: + Рабочий каталог: + + DebuggerEngine @@ -13709,17 +14496,6 @@ Do you want to retry? Отладка сложных командных строк под Windows пока не поддерживаеться. - - DebuggerPlugin - - Install &Debug Information - Установить &отладочную информацию - - - Tries to install missing debug information. - Попытка установить отсутствующую отладочную информацию. - - Delegate @@ -13863,13 +14639,6 @@ Rebuilding the project might help. Невозможно добавить определение метода. - - DeviceProcessesDialog - - &Attach to Process - &Подключиться к процессу - - Diff @@ -14173,33 +14942,6 @@ Rebuilding the project might help. Перерегулирование перехода кубической кривой. - - EditorManager - - Go Back - Перейти назад - - - Go Forward - Перейти вперёд - - - Split - Разделить - - - Split Side by Side - Разделить вертикально - - - Open in New Window - Открыть в новом окне - - - Close Document - Закрыть документ - - EditorSettingsPanelFactory @@ -15023,6 +15765,45 @@ will also disable the following plugins: Имя шаблона: + + FlameGraphView + + Details + Подробнее + + + Various Events + Разные события + + + Type + Тип + + + Calls + Вызовы + + + Total Time + Общее время + + + Mean Time + Среднее время + + + In Percent + В процентах + + + Location + Размещение + + + No data available + Нет данных + + FlickableSection @@ -15269,26 +16050,6 @@ will also disable the following plugins: Files Файлы - - Hide files matching: - Скрыть файлы соответствующие: - - - Show files matching: - Показывать совпадения файлов: - - - Apply Filter - Применить фильтр - - - Generating file list... - -%1 - Создание списка файлов... - -%1 - GenericProjectManager::Internal::GenericBuildConfigurationFactory @@ -15808,6 +16569,10 @@ Would you like to terminate it? Git::Internal::BranchDialog + + Include branches and tags that have not been active for %1 days. + Включение веток и тегов неактивных в течение %1 дней. + Checkout Смена ветки @@ -15916,6 +16681,10 @@ Would you like to terminate it? Set current branch to track the selected one. Сделать текущую ветку связанной с выбранной. + + &Include old entries + В&ключая старые элементы + Git::Internal::BranchModel @@ -15934,10 +16703,6 @@ Would you like to terminate it? Git::Internal::ChangeSelectionDialog - - Browse &Directory... - Открыть &каталог... - Browse &History... Открыть &историю... @@ -17118,14 +17883,6 @@ Commit now? Git::Internal::MergeTool - - Error - Ошибка - - - File input for the merge tool requires Git 1.7.8, or later. - Для задания файлов mergetool требуется Git не ниже 1.7.8. - Normal Обычный @@ -17292,7 +18049,7 @@ Remote: %4 Timeout: - Время ожидания: + Таймаут: s @@ -17475,6 +18232,41 @@ You can choose between stashing the changes or discarding them. Ошибка восстановления %1 + + GitGrep + + &Use Git Grep + &Использовать Git Grep + + + Use Git Grep for searching. This includes only files that are managed by Git. + Использовать для поиска Git Grep. Включает только файлы под управлением Git. + + + Tree (optional) + Дерево (опционально) + + + Can be HEAD, tag, local or remote branch, or a commit hash. +Leave empty to search through the file system. + Может быть HEAD, тегом, хешем фиксации, локальной или внешней веткой. +Оставьте пустым для поиска по файловой системе. + + + Git Grep + Git Grep + + + Ref: %1 +%2 + Ссылка: %1 +%2 + + + Git Show %1:%2 + Git Show %1:%2 + + GlslEditor::Internal::GlslEditorPlugin @@ -18250,6 +19042,47 @@ Add, modify, and remove document filters, which determine the documentation set Открыть просмотр изображений + + ImageViewer::Internal::ExportDialog + + File: + Файл: + + + x + Multiplication, as in 32x32 + x + + + Size: + Размер: + + + %1 already exists. +Would you like to overwrite it? + %1 уже существует. +Перезаписать его? + + + + ImageViewer::Internal::ImageView + + Export %1 + Экспорт %1 + + + Exported "%1", %2x%3, %4 bytes + Экспорт «%1», %2х%3, %4 байт + + + Export Image + Экспорт изображения + + + Could not write file "%1". + Не удалось записать файл «%1». + + ImageViewer::Internal::ImageViewer @@ -18261,65 +19094,6 @@ Add, modify, and remove document filters, which determine the documentation set Приостановить анимацию - - ImageViewer::Internal::ImageViewerActionHandler - - Zoom In - Увеличить - - - Ctrl++ - - - - Zoom Out - Уменьшить - - - Ctrl+- - - - - Original Size - Исходный размер - - - Ctrl+0 - - - - Meta+0 - Meta+0 - - - Fit To Screen - На весь экран - - - Ctrl+= - - - - Switch Background - Включить/отключить фон - - - Switch Outline - Включить/отключить обзор - - - Toggle Animation - Воспроизвести/приостановить анимацию - - - Ctrl+[ - - - - Ctrl+] - - - ImageViewer::Internal::ImageViewerFile @@ -18335,6 +19109,69 @@ Add, modify, and remove document filters, which determine the documentation set Не удалось прочитать изображение. + + ImageViewer::Internal::ImageViewerPlugin + + Zoom In + Увеличить + + + Ctrl++ + Ctrl++ + + + Zoom Out + Уменьшить + + + Ctrl+- + Ctrl+- + + + Original Size + Исходный размер + + + Meta+0 + Meta+0 + + + Ctrl+0 + Ctrl+0 + + + Fit To Screen + На весь экран + + + Ctrl+= + Ctrl+= + + + Switch Background + Включить/отключить фон + + + Ctrl+[ + Ctrl+[ + + + Switch Outline + Включить/отключить обзор + + + Ctrl+] + Ctrl+] + + + Toggle Animation + Воспроизвести/приостановить анимацию + + + Export Image + Экспортировать изображение + + ImageViewer::Internal::ImageViewerToolbar @@ -18361,6 +19198,10 @@ Add, modify, and remove document filters, which determine the documentation set Original Size Исходный размер + + Export as Image + Экспортировать как изображение + ImportManagerComboBox @@ -18651,6 +19492,14 @@ Ids must begin with a lowercase letter. %1 is not connected. %1 не подключён. + + Device type: + Тип устройства: + + + Executable: + Программа: + Ios::Internal::IosRunConfigurationWidget @@ -18724,41 +19573,6 @@ Ids must begin with a lowercase letter. - - IosRunConfiguration - - Form - - - - Executable: - Программа: - - - Arguments: - Параметры: - - - iPad - iPad - - - iPhone 3.5-inch Retina Display - iPhone с экраном Ретина 3.5" - - - iPhone 4-inch Retina Display - iPhone с экраном Ретина 4" - - - iPad Retina Display - iPad с экраном Ретина - - - Device type: - Тип устройства: - - IosSettingsWidget @@ -18836,7 +19650,7 @@ Ids must begin with a lowercase letter. Предпочтительный размер - Preferred height of an item in a layout. If the preferred height is -1, it will be ignored. + Preferred size of an item in a layout. If the preferred height or width is -1, it is ignored. Предпочтительный резмер элемента в компоновщике. Если он -1, то игнорируется. @@ -18883,13 +19697,6 @@ Ids must begin with a lowercase letter. Привязки - - LinksBar - - Qt Creator - Qt Creator - - ListViewSpecifics @@ -19180,10 +19987,110 @@ Ids must begin with a lowercase letter. Input Events События ввода + + Debug Messages + Отладочные сообщения + JavaScript JavaScript + + GUI Thread + Поток GUI + + + Render Thread + Поток рендера + + + Render Thread Details + Подробности потока рендера + + + Polish + Полировка + + + Wait + Ожидание + + + GUI Thread Sync + Синхронизация с потоком GUI + + + Render Thread Sync + Синхронизация с потоком рендера + + + Render + Рендер + + + Swap + Переключение + + + Render Preprocess + Рендер - преобработка + + + Render Update + Рендер - обновление + + + Render Bind + Рендер - привязка + + + Render Render + Рендер - рендеринг + + + Material Compile + Компиляция материала + + + Glyph Render + Отрисовка глифов + + + Glyph Upload + Выгрузка глифов + + + Texture Bind + Текстуры - привязка + + + Texture Convert + Текстуры - преобразование + + + Texture Swizzle + не знаю, как выбор/обмен цветовых каналов перевести на русский + Текстуры - смешивание + + + Texture Upload + Текстуры - выгрузка + + + Texture Mipmap + Текстуры - мипмамминг + + + Texture Delete + Текстуры - удаление + + + + MainWindow + + MainWindow + + Mercurial::Internal::AuthenticationDialog @@ -19525,7 +20432,7 @@ Ids must begin with a lowercase letter. Timeout: - Время ожидания: + Таймаут: s @@ -19620,6 +20527,10 @@ Ids must begin with a lowercase letter. C++ source code Файл исходных текстов C++ + + Qt documentation file + Файл документации Qt + Objective-C++ source code Файл исходных текстов Objective-C++ @@ -19791,6 +20702,14 @@ Ids must begin with a lowercase letter. &Delete &Удалить + + Model Editor + Редактор моделей + + + Export Diagram... + Экспорт диаграммы... + Open Parent Diagram Открыть родительскую диаграмму @@ -19799,36 +20718,32 @@ Ids must begin with a lowercase letter. Edit Element Properties Изменить свойства элемента + + Shift+Return + Shift+Return + + + Edit Item on Diagram + Изменить элемент диаграммы + Return Ввод - ModelEditor::Internal::FileWizardFactory + ModelEditor::Internal::ExtPropertiesMView - Model - Модель + Select Custom Configuration Folder + Выбор особого каталога настроек - Creates an empty model - Создаёт пустую модель + Config Path: + Путь к настройкам: - New %1 - Новая %1 - - - Model Name and Location - Имя модели и размещение - - - Model name: - Имя модели: - - - Location: - Размещение: + <font color=red>Model file must be reloaded.</font> + <font color=red>Файл модели должен быть перезагружен.</font> @@ -19837,10 +20752,6 @@ Ids must begin with a lowercase letter. No model loaded. Cannot save. Модель не загружена. Сохранить невозможно. - - model.qmodel - model.qmodel - Cannot reload model file. Не удалось загрузить файл модели. @@ -19872,6 +20783,26 @@ Ids must begin with a lowercase letter. Add Canvas Diagram Добавить диаграмму холста + + Images (*.png *.jpeg *.jpg *.tif *.tiff);;PDF (*.pdf) + Изображения (*.png *.jpeg *.jpg *.tif *.tiff);;PDF (*.pdf) + + + ;;SVG (*.svg) + ;;SVG (*.svg) + + + Export Diagram + Экспорт диаграммы + + + Exporting Diagram Failed + Не удалось экспортировать диаграмму + + + Exporting the diagram into file<br>"%1"<br>failed. + Не удалось экспортировать диаграмму в файл «%1». + Package Пакет @@ -19948,6 +20879,10 @@ Ids must begin with a lowercase letter. Go to Implementation Перейти к реализации + + Invalid item. + Неверный элемент. + Cannot find an implementation. Не удалось найти реализацию. @@ -20638,7 +21573,7 @@ Ids must begin with a lowercase letter. Timeout: - Время ожидания: + Таймаут: s @@ -20744,6 +21679,10 @@ Ids must begin with a lowercase letter. The plugin "%1" does not exist. Модуль «%1» не существует. + + The plugin "%1" is not tested. + Модуль «%1» не тестировался. + Unknown option %1 Неизвестный параметр: %1 @@ -21082,6 +22021,13 @@ Ids must begin with a lowercase letter. + + ProjectExplorer::ClangToolChainFactory + + Clang + Clang + + ProjectExplorer::CustomWizard @@ -21124,6 +22070,46 @@ Ids must begin with a lowercase letter. Qt Creator Plugin Модуль Qt Creator + + Creates a new project including auto test skeleton. + Создание нового проекта с заготовкой под автотест. + + + Auto Test + Автотест + + + Project and Test Information + Информация о проекте и тестах + + + GUI Application + Приложение с GUI + + + Test Case Name: + Имя теста: + + + Requires QApplication + Требуется QApplication + + + Generate initialization and cleanup code + Создать код инициализации и очистки + + + Build auto tests + Собирать автотесты + + + always + всегда + + + debug only + только при отладке + Creates a qmake-based test project for which a code snippet can be entered. Создание тестового проекта на базе qmake с возможностью вставки фрагмента кода. @@ -21845,6 +22831,13 @@ Ids must begin with a lowercase letter. Этапы очистки + + ProjectExplorer::Internal::ClangClToolChainConfigWidget + + LLVM: + LLVM: + + ProjectExplorer::Internal::ClangToolChainFactory @@ -21923,10 +22916,6 @@ Ids must begin with a lowercase letter. &Error message capture pattern: Шаблон захвата сообщений об &ошибках: - - #error (.*):(\d+): (.*)$ - - Capture Positions Положения захвата @@ -21951,10 +22940,6 @@ Ids must begin with a lowercase letter. E&rror message: &Сообщение об ошибке: - - #error /home/user/src/test.c:891: Unknown identifier `test` - - File name: Имя файла: @@ -21980,8 +22965,40 @@ Ids must begin with a lowercase letter. Шаблон пуст. - Pattern does not match the error message. - Шаблон не соответствует сообщению об ошибке. + No message given. + Сообщение не передано. + + + Pattern does not match the message. + Шаблон не соответствует сообщению. + + + Error + Ошибка + + + Capture Output Channels + Захват выходных каналов + + + Standard output + Стандартный ввод + + + Standard error + Вывод ошибок + + + Warning + Предупреждение + + + Warning message capture pattern: + Шаблон захвата предупреждений: + + + Warning message: + Предупреждающее сообщение: @@ -22271,10 +23288,6 @@ Ids must begin with a lowercase letter. Open Project in "%1" Открыть проект в «%1» - - Open With - Открыть с помощью - Choose Folder... Выбрать каталог... @@ -22454,6 +23467,29 @@ Ids must begin with a lowercase letter. + + ProjectExplorer::Internal::LocalApplicationRunControl + + No executable specified. + Программа не указана. + + + Executable %1 does not exist. + Программа %1 отсутствует. + + + Starting %1... + Запускается %1... + + + %1 crashed + %1 завершился крахом + + + %1 exited with code %2 + %1 завершился с кодом %2 + + ProjectExplorer::Internal::MingwToolChainFactory @@ -22545,7 +23581,7 @@ Ids must begin with a lowercase letter. - ProjectExplorer::Internal::MsvcToolChainConfigWidget + ProjectExplorer::Internal::MsvcBasedToolChainConfigWidget Initialization: Инициализация: @@ -23060,34 +24096,6 @@ to project "%2". No kit defined in this project. Для данного проекта не задан комплект. - - Incompatible Kit - Комплект не подходит - - - Kit %1 is incompatible with kit %2. - Комплекты %1 и %2 несовместимы. - - - Build configurations: - Конфигурации сборки: - - - Deploy configurations: - Конфигурации установки: - - - Run configurations - Конфигурации запуска - - - Partially Incompatible Kit - Комплект частично несовместим - - - Some configurations could not be copied. - Некоторые конфигураций не удалось скопировать. - Cancel Build && Remove Kit Отменить сборку и удалить комплект @@ -23229,12 +24237,12 @@ to project "%2". Компилятор, используемый для сборки.<br>Убедитесь, что компилятор создаёт код, совместимый с целевым устройством, профилем Qt и другими используемыми библиотеками. - Compiler: - Компилятор: + <No compiler> + <Нет компилятора> - <No compiler available> - <Компилятор недоступен> + Compiler: + Компилятор: @@ -23634,6 +24642,10 @@ to project "%2". "data" must be empty or a JSON object for "Project" pages. Объект «data» должен быть пустым или иметь тип JSON для страниц «Проект». + + Invalid regular expression "%1" in "%2". %3 + Неверное регулярное выражение «%1» в «%2». %3 + "data" for a "Summary" page can be unset or needs to be an object. «data» для страницы «Общее» может быть не задан или должен быть объектом. @@ -23884,6 +24896,30 @@ to project "%2". JS File Файл JS + + Model name: + Имя модели: + + + Location: + Размещение: + + + Model Name and Location + Имя модели и размещение + + + Creates a new empty model with an empty diagram. + Создание новой пустой модели с пустой диаграммой. + + + Modeling + Моделирование + + + Model + Модель + Creates an empty Python script file using UTF-8 charset. Создание пустого файла сценария Python с использованием кодировки UTF-8. @@ -24044,6 +25080,14 @@ Preselects a desktop Qt for building the application if available. Qt Canvas 3D Application Приложение Qt Canvas 3D + + Creates a deployable Qt Quick 2 application using Qt Labs Controls. + Создание устанавливаемого приложения Qt Quick 2 с использованием Qt Labs Controls. + + + Qt Labs Controls Application + Приложение Qt Labs Controls + Qt 5.6 Qt 5.6 @@ -24124,6 +25168,14 @@ Preselects a desktop Qt for building the application if available. Directory: Каталог: + + Creates a vertex shader in the Desktop OpenGL Shading Language (GLSL). Vertex shaders transform the positions, normals and texture coordinates of triangles, points and lines rendered with OpenGL. + Создание вершинного шейдера на языке Desktop OpenGL Shading Language (GLSL). Вершинные шейдеры изменяют положение, нормали и текстурные координаты теугольников, точек и линий, отрисовываемых с помощью OpenGL. + + + Creates a vertex shader in the OpenGL/ES 2.0 Shading Language (GLSL/ES). Vertex shaders transform the positions, normals and texture coordinates of triangles, points and lines rendered with OpenGL. + Создание вершинного шейдера на языке OpenGL/ES 2.0 Shading Language (GLSL/ES). Вершинные шейдеры изменяют положение, нормали и текстурные координаты теугольников, точек и линий, отрисовываемых с помощью OpenGL. + "%{JS: Util.toNativeSeparators('%{TargetPath}')}" exists in the filesystem. «%{JS: Util.toNativeSeparators('%{TargetPath}')}» уже существует. @@ -24308,10 +25360,6 @@ Preselects a desktop Qt for building the application if available. Fragment Shader (Desktop OpenGL) Фрагментный шейдер (Desktop OpenGL) - - Creates a vertex shader in the Desktop OpenGL Shading Language (GLSL). Vertex shaders transform the positions, normals and texture co-ordinates of triangles, points and lines rendered with OpenGL. - Создание вершинного шейдера на языке Desktop OpenGL Shading Language (GLSL). Вершинные шейдеры изменяют положение, нормали и текстурные координаты теугольников, точек и линий, отрисовываемых с помощью OpenGL. - Vertex Shader (Desktop OpenGL) Вершинный шейдер (Desktop OpenGL) @@ -24324,10 +25372,6 @@ Preselects a desktop Qt for building the application if available. Fragment Shader (OpenGL/ES 2.0) Фрагментный шейдер (OpenGL/ES 2.0) - - Creates a vertex shader in the OpenGL/ES 2.0 Shading Language (GLSL/ES). Vertex shaders transform the positions, normals and texture co-ordinates of triangles, points and lines rendered with OpenGL. - Создание вершинного шейдера на языке OpenGL/ES 2.0 Shading Language (GLSL/ES). Вершинные шейдеры изменяют положение, нормали и текстурные координаты теугольников, точек и линий, отрисовываемых с помощью OpenGL. - Vertex Shader (OpenGL/ES 2.0) Вершинный шейдер (OpenGL/ES 2.0) @@ -24415,6 +25459,10 @@ Preselects a desktop Qt for building the application if available. "kind" value "%1" is not "class" (deprecated), "file" or "project". «kind» имеет значение «%1», не являющееся «class» (устарело), «file» или «project». + + "kind" is "file" or "class" (deprecated) and "%1" is also set. + «kind» это «file» или «class» (устарело) и «%1» установлен. + Icon file "%1" not found. Файл значка «%1» не найден. @@ -24471,18 +25519,6 @@ Preselects a desktop Qt for building the application if available. When parsing "pages": %1 При обработке «pages»: %1 - - List element of "options" is not an object. - Списочный элемент записей типа «options» не является объектом. - - - No "key" given for entry in "options". - Не задан «key» для элемента в «options». - - - When parsing "options": Key "%1" set more than once. - При обработке «options»: Ключ «%1» задан более одного раза. - ProjectExplorer::JsonWizardGenerator @@ -24585,29 +25621,6 @@ Preselects a desktop Qt for building the application if available. Сделать по умолчанию - - ProjectExplorer::LocalApplicationRunControl - - No executable specified. - Программа не указана. - - - Executable %1 does not exist. - Программа %1 отсутствует. - - - Starting %1... - Запускается %1... - - - %1 crashed - %1 завершился крахом - - - %1 exited with code %2 - %1 завершился с кодом %2 - - ProjectExplorer::LocalEnvironmentAspect @@ -24642,6 +25655,34 @@ Please close all running instances of your application before starting a build.< Project Name Имя проекта + + Incompatible Kit + Комплект не подходит + + + Kit %1 is incompatible with kit %2. + Комплекты %1 и %2 несовместимы. + + + Build configurations: + Конфигурации сборки: + + + Deploy configurations: + Конфигурации установки: + + + Run configurations: + Конфигурации запуска: + + + Partially Incompatible Kit + Комплект частично несовместим + + + Some configurations could not be copied. + Некоторые конфигураций не удалось скопировать. + ProjectExplorer::ProjectConfiguration @@ -24696,10 +25737,6 @@ Please close all running instances of your application before starting a build.< Recent P&rojects Недавние п&роекты - - Sessions - Сессии - Close Project Закрыть проект @@ -24792,6 +25829,10 @@ Please close all running instances of your application before starting a build.< Cancel Build Отменить сборку + + S&essions + С&ессии + Add New... Добавить новый... @@ -25255,6 +26296,16 @@ Reason: %2 Add Existing Directory Добавление существующего каталога + + + ProjectExplorer::SelectableFilesDialogEditFiles + + Edit Files + Изменить файлы + + + + ProjectExplorer::SelectableFilesWidget Source directory: Каталог исходников: @@ -25263,21 +26314,14 @@ Reason: %2 Start Parsing Начать обработку - - - ProjectExplorer::SelectableFilesDialogEditFiles - Edit Files - Изменить файлы + Show files matching: + Показывать совпадения файлов: Hide files matching: Скрыть файлы соответствующие: - - Show files matching: - Показывать совпадения файлов: - Apply Filter Применить фильтр @@ -25471,6 +26515,10 @@ These files are preserved. Qt Creator needs a build configuration set up to build. Configure a build configuration in the project settings. Для сборки проекта необходимо в настройках проекта задать конфигурацию сборки. + + You asked to build the current Run Configuration's build target only, but it is not associated with a build target. Update the Make Step in your build settings. + Запрос на сборку только цели текущей конфигурации запуска, но она не связана с целью. Обновите шаги сборки в настройках сборки. + ProjectExplorer::TerminalAspect @@ -25507,6 +26555,10 @@ These files are preserved. None Не задан + + Path to the compiler executable + Путь к компилятору + No compiler set in kit. У комплекта не задан компилятор. @@ -25657,10 +26709,6 @@ These files are preserved. unnamed без имени - - %1 (built-in) - %1 (встроенная) - QDockWidget @@ -25695,64 +26743,122 @@ These files are preserved. <Введите регулярное выражение> - Show Definition - Показать определение + %1 %2 per iteration (total: %3, iterations: %4) + %1 %2 за итерацию (всего: %3, итераций: %4) - Open Diagram - Открыть диаграмму + Test run canceled by user. + Тест прерван пользователем. - Create Diagram - Создать диаграмму + Project is null for "%1". Removing from test run. +Check the test environment. + Нулевой проект для «%1». Исключается из тестирования. +Проверьте среду тестирования. - Remove - Убрать + Could not find command "%1". (%2) + Не удалось найти команду «%1». (%2) - Delete - Удалить + Test case canceled due to timeout. +Maybe raise the timeout? + Текст был отменён по таймауту. +Может его увеличить? - Align Objects - Выровнить объекты + (none) + (нет) - Align Left - По левому краю + <p>Give all test cases a name to ensure correct behavior when running test cases and to be able to select them.</p> + <p>Задайте имена всем тестам, чтобы быть уверенным в корректности поведения при прохождении тестов и для их выбора.</p> - Center Vertically - По центру вертикально + parameterized + параметрический - Align Right - По правому краю + typed + типизированный - Align Top - По верху + Cannot create temporary file "%1": %2. + Невозможно создать временный файл «%1»: %2. - Center Horizontally - По центру горизонтально + Cannot call %1 or some other error occurred. Time out reached while formatting file %2. + Не удалось вызвать %1 или возникла другая ошибка. Истекло время форматирования файла %2. - Align Bottom - По низу + Cannot read file "%1": %2. + Невозможно прочитать файл «%1»: %2. - Same Width - По ширине + Cannot call %1 or some other error occurred. + Не удалось вызвать %1 или возникла другая ошибка. - Same Height - По высоте + Inspect available fixits + Проверить доступные запросы на исправление (fixit) - Same Size - По размеру + File "%1" does not exist or is not readable. + Файл «%1» не существует или не читается. + + + Could not read file "%1": UnexpectedElementError. + Не удалось прочитать файл «%1»: UnexpectedElementError. + + + Could not read file "%1": CustomError. + Не удалось прочитать файл «%1»: CustomError. + + + Could not read file "%1": NotWellFormedError. + Не удалось прочитать файл «%1»: NotWellFormedError. + + + Could not read file "%1": PrematureEndOfDocumentError. + Не удалось прочитать файл «%1»: PrematureEndOfDocumentError. + + + File is not a plist version 1.0 file. + Файл не является plist версии 1.0. + + + Expected a string element. + Ожидается строковый элемент. + + + Expected an array element. + Ожидается элемент типа массив. + + + Expected an integer element. + Ожидается целочисленный элемент. + + + An error occurred with the clang static analyzer process. + Возникла ошибка при статическом анализе Clang. + + + Clang static analyzer crashed. + Статический анализ Clang завершился крахом. + + + Clang static analyzer finished with exit code: %1. + Статический анализ Clang завершился с кодом %1. + + + Command line: "%1" +Process Error: %2 +Output: +%3 + Командная строка: «%1» +Ошибка: %2 +Вывод: +%3 @@ -25925,7 +27031,7 @@ These files are preserved. Timeout waiting for reply from server. - Вышло время ожидания ответа от сервера. + Истекло время ожидания ответа от сервера. No private key file given. @@ -26104,6 +27210,10 @@ These files are preserved. Profiles Профили + + Version Info + Информация о версии + QbsProjectManager::Internal::CustomQbsPropertiesDialog @@ -26184,10 +27294,6 @@ These files are preserved. QbsProjectManager::Internal::QbsBuildStepConfigWidget - - Dry run - Только проверка - Debug Отладка @@ -26244,10 +27350,6 @@ These files are preserved. Properties to pass to the project. Свойства, передаваемые проекту. - - No commands will be executed and no permanent changes to the build graph will be done. - Не будут выполняться команды и вноситься постоянные изменения в граф сборки. - Keep going when errors occur (if at all possible). Продолжать сборку при ошибках (если возможно). @@ -26285,10 +27387,6 @@ These files are preserved. QbsProjectManager::Internal::QbsCleanStepConfigWidget - - Clean all artifacts - Очистить всё - Dry run Тестовое выполнение @@ -26317,6 +27415,17 @@ These files are preserved. Очистка Qbs + + QbsProjectManager::Internal::QbsInfoWidget + + Form + + + + Qbs version: + Версия Qbs: + + QbsProjectManager::Internal::QbsInstallStep @@ -26407,6 +27516,10 @@ These files are preserved. &Edit... &Изменить... + + Store profiles in Qt Creator settings directory + Хранить профили в каталоге настроек Qt Creator + QbsProjectManager::Internal::QbsProject @@ -26976,26 +28089,6 @@ The files in the Android package source directory are copied to the build direct Executable: Программа: - - Arguments: - Параметры: - - - Select Working Directory - Выбор рабочего каталога - - - Reset to Default - По умолчанию - - - Working directory: - Рабочий каталог: - - - Run in terminal - Запускать в терминале - Run on QVFb Запускать в QVFb @@ -27847,6 +28940,10 @@ Neither the path to the library nor the path to its includes is added to the .pr Forms Формы + + StateCharts + Диаграммы состояний + Resources Ресурсы @@ -27929,22 +29026,6 @@ Neither the path to the library nor the path to its includes is added to the .pr QmlDebug::QmlDebugConnection - - Connecting to debug server at %1:%2 ... - Подключение к серверу отладки %1:%2 ... - - - - QmlDebug::QmlDebugConnectionPrivate - - Error: (%1) %2 - %1=error code, %2=error message - Ошибка: (%1) %2 - - - <device is gone> - <устройство отсутствует> - Network connection dropped Разорвано сетевое подключение @@ -27973,6 +29054,18 @@ Neither the path to the library nor the path to its includes is added to the .pr Socket state changed to ListeningState. This should not happen! Состояние сокета изменилось на ListeningState. Это не должно было произойти! + + Unknown state %1 + Неверное состояние %1 + + + Error: Remote host closed the connection + Ошибка: Удалённый узел закрыл соединение + + + Error: Unknown socket error %1 + Ошибка: Неизвестная ошибка сокета %1 + QmlDebug::QmlOutputParser @@ -28485,8 +29578,8 @@ Neither the path to the library nor the path to its includes is added to the .pr Требуется перезапуск - The QML emulation layer path changes will take effect after a restart of the QML Emulation layer or Qt Creator. - Изменения в путях слоя эмуляции QML требуют перезапуска эмулятора QML или Qt Creator. + The made changes will take effect after a restart of the QML Emulation layer or Qt Creator. + Изменения вступят в силу после перезапуска слоя эмуляции QML или Qt Creator. Canvas @@ -28600,6 +29693,34 @@ Neither the path to the library nor the path to its includes is added to the .pr Path where Qt Creator can find the QML emulation layer executable (qmlpuppet). Путь, по которому Qt Creator сможет найти программу слоя эмуляции QML (qmlpuppet). + + Internationalization + Интернационализация + + + qsTr() + qsTr() + + + qsTrId() + qsTrId() + + + Show property editor warnings + Показывать предупреждения редактора свойств + + + Forward puppet output: + Перенаправление вывода: + + + Show warn exceptions + Предупреждающие исключения + + + Debug puppet: + Отладка эмулятора: + QmlDesigner::InvalidArgumentException @@ -29167,13 +30288,6 @@ This is independent of the visibility property in QML. Сбросить - - QmlDumpBuildTask - - Building QML Helpers - Сборка помощников QML - - QmlEditorWidgets::ContextPaneWidget @@ -30163,70 +31277,6 @@ Qt Creator know about a likely URI. Функции QML - - QmlJSTools::Internal::QmlConsoleEdit - - Cu&t - Выре&зать - - - &Copy - &Копировать - - - &Paste - В&ставить - - - Select &All - Вы&делить всё - - - C&lear - &Очистить - - - - QmlJSTools::Internal::QmlConsoleModel - - Can only evaluate during a QML debug session. - Можно вычислить только во время сессии отладки QML. - - - - QmlJSTools::Internal::QmlConsolePane - - Show debug, log, and info messages. - Показывать сообщения уровней: отладка, журнал и информация. - - - Show warning messages. - Показывать предупреждения. - - - Show error messages. - Показывать сообщения об ошибках. - - - QML/JS Console - Консоль QML/JS - - - - QmlJSTools::Internal::QmlConsoleView - - &Copy - &Копировать - - - &Show in Editor - &Показать в редакторе - - - C&lear - &Очистить - - QmlJSTools::Internal::QmlJSToolsPlugin @@ -30402,10 +31452,6 @@ Do you want to retry? Debug connection closed Отладочное соединение закрыто - - Debug connection error %1 - Ошибка отладочного подключения %1 - Failed to connect! Не удалось подключиться! @@ -30417,36 +31463,106 @@ Do you want to retry? Flush data while profiling: Передавать данные при профилировании: - - Periodically flush pending data to Qt Creator. This reduces the delay when loading the -data and the memory usage in the application. It distorts the profile as the flushing -itself takes time. - Периодически передавать очередные данные Qt Creator. Это уменьшает задержку -загрузки данных и использование памяти приложением, но искажает результат -профилирования, так как передача сама по себе занимает время. - Flush interval (ms): Интервал передачи (мс): - - - QmlProfiler::Internal::QmlProfilerEventRelativesView - <bytecode> - <байтовый код> + Periodically flush pending data to Qt Creator. This reduces the delay when loading the +data and the memory usage in the application. It distorts the profile as the flushing +itself takes time. + Периодически сбрасывать ожидающие данные в Qt Creator. Это уменьшает +задержку при загрузке данных и объём используемой приложением памяти. +Но портит профилирование, так как сброс данных занимает время. - Source code not available - Исходники недоступны + Process data only when process ends: + Обрабатывать данные после завершения: - Part of binding loop. - Часть закольцованных связей. + Only process data when the process being profiled ends, not when the current recording +session ends. This way multiple recording sessions can be aggregated in a single trace, +for example if multiple QML engines start and stop sequentially during a single run of +the program. + Обрабатывать данные только после завершения профилируемого процесса, а не +при окончании сессии записи. Это позволяет объединять несколько сессий записи +в единую трассировку. Применимо при последовательном запуске/остановке +нескольких движков QML в рамках одного запуска программы. - QmlProfiler::Internal::QmlProfilerEventsMainView + QmlProfiler::Internal::QmlProfilerFileReader + + Error while parsing trace data file: %1 + Ошибка разбора файла данных трассировки: %1 + + + + QmlProfiler::Internal::QmlProfilerOptionsPage + + QML Profiler + Профайлер QML + + + Analyzer + Анализатор + + + + QmlProfiler::Internal::QmlProfilerRangeModel + + Duration + Продолжительность + + + Details + Подробнее + + + Location + Размещение + + + + QmlProfiler::Internal::QmlProfilerRunControlFactory + + No executable file to launch. + Нет программы для запуска. + + + + QmlProfiler::Internal::QmlProfilerStateWidget + + Profiling application + Профилируемое приложение + + + No QML events recorded + События QML не записаны + + + Processing data + Обработка данных + + + Waiting for more data + Ожидание данных + + + Clearing old trace + Очистка старой трассировки + + + Application stopped before loading all data + Приложение остановлено до загрузки всех данных + + + Waiting for data + Ожидание данных + + + + QmlProfiler::Internal::QmlProfilerStatisticsMainView <program> <программа> @@ -30455,6 +31571,10 @@ itself takes time. Main Program Основная программа + + Binding loop detected. + Обнаружена закольцованность связей. + <bytecode> <байтовый код> @@ -30477,10 +31597,6 @@ references to elements in other files, loops, and so on.) Source code not available Исходники недоступны - - Binding loop detected. - Обнаружена закольцованность связей. - Paint Отрисовка @@ -30507,7 +31623,26 @@ references to elements in other files, loops, and so on.) - QmlProfiler::Internal::QmlProfilerEventsWidget + QmlProfiler::Internal::QmlProfilerStatisticsRelativesView + + <bytecode> + <байтовый код> + + + Source code not available + Исходники недоступны + + + Part of binding loop. + Часть закольцованных связей. + + + + QmlProfiler::Internal::QmlProfilerStatisticsView + + Statistics + Статистика + Copy Row Скопировать строку @@ -30520,82 +31655,11 @@ references to elements in other files, loops, and so on.) Extended Event Statistics Расширенная статистика событий - - Limit to Current Range - Ограничить текущим диапазоном - Show Full Range Показать весь диапазон - - QmlProfiler::Internal::QmlProfilerFileReader - - Error while parsing trace data file: %1 - Ошибка разбора файла данных трассировки: %1 - - - - QmlProfiler::Internal::QmlProfilerOptionsPage - - QML Profiler - Профайлер QML - - - Analyzer - Анализатор - - - - QmlProfiler::Internal::QmlProfilerPlugin - - QML Profiler - Профайлер QML - - - QML Profiler (External) - Профайлер QML (внешний) - - - - QmlProfiler::Internal::QmlProfilerRangeModel - - Duration - Продолжительность - - - Details - Подробнее - - - Location - Размещение - - - - QmlProfiler::Internal::QmlProfilerStateWidget - - Loading data - Загрузка данных - - - Profiling application - Профилируемое приложение - - - No QML events recorded - События QML не записаны - - - Application stopped before loading all data - Приложение остановлено до загрузки всех данных - - - Waiting for data - Ожидание данных - - QmlProfiler::Internal::QmlProfilerTool @@ -30618,6 +31682,18 @@ references to elements in other files, loops, and so on.) Save QML Trace Сохранить трассировку QML + + QML Profiler (External) + Профайлер QML (внешний) + + + A Qml Profiler analysis is still in progress. + Выполняется профилирование QML. + + + Start Qml Profiler analysis. + Начать профилирование QML. + %1 s %1 сек @@ -30670,12 +31746,12 @@ Do you want to save the data first? QmlProfiler::Internal::QmlProfilerTraceView - Limit Events Pane to Current Range - Ограничить панель событий текущим диапазоном + Analyze Current Range + Анализировать текущий диапазон - Show Full Range in Events Pane - Показать весь диапазон в панели событий + Analyze Full Range + Анализировать весь диапазон Reset Zoom @@ -30684,20 +31760,13 @@ Do you want to save the data first? QmlProfiler::Internal::QmlProfilerViewManager - - Events - События - Timeline Временная шкала - - - QmlProfiler::LocalQmlProfilerRunner - No executable file to launch. - Нет программы для запуска. + QML Profiler + Профайлер QML @@ -30764,6 +31833,274 @@ Do you want to save the data first? %1 + + QmlProfilerExtension::Internal::DebugMessagesModel + + Unknown Message %1 + Неизвестное сообщение %1 + + + Timestamp + Время + + + Message + Сообщение + + + Location + Размещение + + + + QmlProfilerExtension::Internal::FlameGraphModel + + Paint + Отрисовка + + + Compile + Компиляция + + + Create + Создание + + + Binding + Привязка + + + Signal + Сигналы + + + JavaScript + JavaScript + + + Source code not available + Исходники недоступны + + + + QmlProfilerExtension::Internal::FlameGraphView + + Show Full Range + Показать весь диапазон + + + + QmlProfilerExtension::Internal::InputEventsModel + + Mouse Events + События мыши + + + Keyboard Events + События клавиатуры + + + Timestamp + Время + + + Key Press + Нажатие клавиши + + + Key Release + Отжатие клавиши + + + Key + Клавиша + + + Modifiers + Модификатор + + + Double Click + Двойной клик + + + Mouse Press + Нажатие мыши + + + Mouse Release + Отпускание мыши + + + Button + Кнопка + + + Result + Результат + + + Mouse Move + Движение мыши + + + X + X + + + Y + Y + + + Mouse Wheel + Колесо мыши + + + Angle X + Угол X + + + Angle Y + Угол Y + + + Keyboard Event + Событие клавиатуры + + + Mouse Event + Событие мыши + + + + QmlProfilerExtension::Internal::MemoryUsageModel + + Memory Allocation + Выделение памяти + + + Memory Usage + Использование памяти + + + Memory Allocated + Памяти выделено + + + Memory Freed + Памяти освобождено + + + Total + Всего + + + Allocated + Выделено + + + Allocations + Выделений + + + Deallocated + Освобождено + + + Deallocations + Освобождений + + + Type + Тип + + + Location + Размещение + + + Heap Allocation + Выделение в куче + + + Large Item Allocation + Выделение под большие объекты + + + Heap Usage + Использование кучи + + + Unknown + Неизвестно + + + + QmlProfilerExtension::Internal::PixmapCacheModel + + Image Cached + Изображение закэшировано + + + Image Loaded + Изображение загружено + + + Result + Результат + + + Load Error + Ошибка загрузки + + + Duration + Продолжительность + + + Cache Size + Размер кэша + + + File + Файл + + + Width + Ширина + + + Height + Высота + + + + QmlProfilerExtension::Internal::QmlProfilerExtensionPlugin + + Action triggered + Действие сработало + + + This is an action from QmlProfilerExtension. + Это действие из QmlProfilerExtension. + + + + QmlProfilerExtension::Internal::SceneGraphTimelineModel + + Stage + Этап + + + Duration + Продолжительность + + + Glyphs + Глифы + + QmlProfilerRunConfiguration @@ -31107,10 +32444,6 @@ Are you sure you want to continue? Qt Version is meant for QNX QNX %1 - - QNX - QNX - No SDK path was set up. Путь к SDK не задан. @@ -31413,34 +32746,6 @@ For more details, see /etc/sysctl.d/10-ptrace.conf Qt Class Generation Создание класса Qt - - Desktop - Desktop - - - Embedded Linux - Встраиваемый Linux - - - Windows CE - Windows CE - - - Windows Runtime - WinRT - - - Windows Phone - Windows Phone - - - Android - Android - - - iOS - iOS - QtSupport::CustomExecutableRunConfiguration @@ -31522,37 +32827,6 @@ cannot be found in the path. Рабочий каталог: - - QtSupport::Internal::DebuggingHelper - - Used to extract QML type information from library-based plugins. - Используется для извлечения информации о типах QML из модулей. - - - QML Dump: - Дампер QML: - - - Build - Собрать - - - Show compiler output of last build. - Показывать вывод компилятора последней сборки. - - - Show Log - Показать журнал - - - Build All - Собрать всё - - - Compiler: - Компилятор: - - QtSupport::Internal::ExamplesWelcomePage @@ -31673,27 +32947,6 @@ cannot be found in the path. Qmake Not Executable Qmake не запускается - - Helpers: None available - Помощники отсутствуют - - - Helpers: %1. - %1 is list of tool names. - Помощники: %1. - - - <i>Not yet built.</i> - <i>Ещё не создан.</i> - - - <i>Not needed.</i> - <i>Не нужен.</i> - - - <i>Cannot be compiled.</i> - <i>Собрать невозможно.</i> - Qt version %1 for %2 Qt версии %1 для %2 @@ -31714,10 +32967,6 @@ cannot be found in the path. The following ABIs are currently not supported:<ul><li>%1</li></ul> Следующие ABI пока не поддерживаются:<ul><li>%1</li></ul> - - Building Helpers - Сборка помощников - Debugging Helper Build Log for "%1" Журнал помощника отладчика для «%1» @@ -31864,6 +33113,10 @@ cannot be found in the path. unknown неизвестно + + Path to the qmake executable + Путь к программе qmake + QtSupport::QtVersionFactory @@ -31951,24 +33204,6 @@ cannot be found in the path. No qmlscene installed. qmlscene не установлен. - - Cannot determine the installation path for Qt version "%1". - Невозможно определить путь, куда установлена Qt из профиля «%1». - - - Building helper(s) with toolchain "%1"... - - Сборка помощника(ов) инструментарием «%1»... - - - - Build failed. - Сборка не удалась. - - - Build succeeded. - Сборка успешно завершена. - Qt for WinCE Qt Version is meant for WinCE @@ -31999,33 +33234,6 @@ cannot be found in the path. Доступ - - QuickFixFactory - - Create Getter and Setter Member Functions - Создать методы получения и установки значения - - - Create Getter Member Function - Создать метод получения значения - - - Create Setter Member Function - Создать метод установки значения - - - Convert to Stack Variable - Преобразовать в стековую переменную - - - Convert to Pointer - Преобразовать в указатель - - - Generate Missing Q_PROPERTY Members... - Создание отсутствующих членов Q_PROPERTY... - - RadioButtonSpecifics @@ -32277,7 +33485,7 @@ cannot be found in the path. Timeout: - Время ожидания: + Таймаут: s @@ -33146,6 +34354,13 @@ In addition, device connectivity will be tested. Продолжительность + + SessionActionLabel + + Clone + Копировать + + SessionItem @@ -33190,10 +34405,6 @@ In addition, device connectivity will be tested. Qt Account Учётная запись Qt - - Qt Cloud Services - Облачные сервисы Qt - Online Community Онлайн сообщество @@ -33402,7 +34613,7 @@ with a password, which you can enter below. Timeout: - Время ожидания: + Таймаут: s @@ -33974,8 +35185,12 @@ with a password, which you can enter below. Файлы в системе - Directory "%1": - Каталог «%1»: + Directory + Каталог + + + %1 "%2": + %1 «%2»: Path: %1 @@ -33991,12 +35206,12 @@ Filter: %2 &Каталог: - Fi&le pattern: - Ш&аблон: + Directory to Search + Каталог поиска - Directory to search - Каталог поиска + Fi&le pattern: + Ш&аблон: @@ -34005,6 +35220,10 @@ Filter: %2 Font && Colors Шрифт и цвета + + Color Scheme for Qt Creator Theme "%1" + Цветовая схема темы Qt Creator «%1» + Copy Color Scheme Копировать цветовую схему @@ -34282,6 +35501,14 @@ Specifies how backspace interacts with indentation. Pressing Alt displays context-sensitive help or type information as tooltips. При нажатии на Alt показывать справку о контексте или информацию о типе в виде подсказки. + + Using Select Block Up / Down actions will now provide smarter selections. + При использовании выделения блока вверх/вниз использовать умное выделение. + + + Enable smart selection changing + Использовать умное выделение + TextEditor::Internal::CodeStyleDialog @@ -34547,13 +35774,6 @@ Specifies how backspace interacts with indentation. %1 - - TextEditor::Internal::FontSettings - - Customized - Настроенная - - TextEditor::Internal::FontSettingsPage @@ -35289,6 +36509,10 @@ Influences the indentation of continuation lines. Select Block Down Выделить блок вниз + + Ctrl+Shift+Alt+U + Ctrl+Shift+Alt+U + Go to Line Start Перейти в начало строки @@ -35417,6 +36641,33 @@ Influences the indentation of continuation lines. Размер шрифта в точках в текущем документе. + + TextEditor::QuickFixFactory + + Create Getter and Setter Member Functions + Создать методы получения и установки значения + + + Create Getter Member Function + Создать метод получения значения + + + Create Setter Member Function + Создать метод установки значения + + + Convert to Stack Variable + Преобразовать в стековую переменную + + + Convert to Pointer + Преобразовать в указатель + + + Generate Missing Q_PROPERTY Members... + Создание отсутствующих членов Q_PROPERTY... + + TextEditor::TextDocument @@ -35737,10 +36988,6 @@ Applied to text, if no other rules matching. Applied to removed lines in differences (in diff editor). Применяется к удаляемым строкам при сравнении (в редакторе изменений). - - Zoom: %1% - Масштаб: %1% - Disabled Code Отключённый код @@ -35934,6 +37181,10 @@ Will not be applied to whitespace in comments and strings. Select Encoding Выбрать кодировку + + Zoom: %1% + Масштаб: %1% + Delete UTF-8 BOM on Save Удалить UTF-8 BOM при сохранении @@ -36447,6 +37698,25 @@ Will not be applied to whitespace in comments and strings. Не удалось получить код завершения подчинённого процесса: %1 + + Utils::DebuggerMainWindow + + Views + Обзоры + + + Toolbar + Панель инструментов + + + Start + Запустить + + + Stop + Остановить + + Utils::DetailsButton @@ -36842,10 +38112,6 @@ Will not be applied to whitespace in comments and strings. The path must not be empty. Путь не должен быть пустым. - - The path <b>%1</b> is not a directory. - Путь <b>%1</b> не является каталогом. - The path <b>%1</b> is not a file. Путь <b>%1</b> не является файлом. @@ -36888,6 +38154,14 @@ Will not be applied to whitespace in comments and strings. A file with that name already exists. Файл с таким именем уже существует. + + Name is empty. + Имя задано пустым. + + + Name does not match "%1". + Имя не соответствует «%1». + Invalid character "%1" found. Обнаружен недопустимый символ «%1». @@ -37152,6 +38426,10 @@ Will not be applied to whitespace in comments and strings. The file <i>%1</i> has changed outside Qt Creator. Do you want to reload it? Файл <i>%1</i> был изменён вне Qt Creator. Желаете перезагрузить его? + + &Close + &Закрыть + VCS @@ -37509,30 +38787,38 @@ Will not be applied to whitespace in comments and strings. - Valgrind::Internal::CallgrindToolPrivate + Valgrind::Internal::CallgrindTool - Callers - Вызывающие + Valgrind Function Profile uses the Callgrind tool to record function calls when a program runs. + Профайлер функций Valgrind использует утилиту Callgrind для записи вызовов функций при работе программы. - Functions - Функции + Valgrind Function Profiler + Профайлер функций Valgrind - Callees - Вызывемые + Valgrind Function Profiler (External Application) + Профайлер функций Valgrind (внешняя программа) + + + Profile Costs of This Function and Its Callees + Цены функций и тех, кого они вызывают Visualization Визуализация - Go back one step in history. This will select the previously selected item. - Назад на шаг в истории. Выберет предыдущий выбранный элемент. + Callers + Вызывающие - Reset all event counters. - Сбросить все счётчики событий. + Callees + Вызывемые + + + Functions + Функции Load External Log File @@ -37542,10 +38828,18 @@ Will not be applied to whitespace in comments and strings. Request the dumping of profile information. This will update the Callgrind visualization. Запрос на получение данных профилирования. Приведёт к обновлению визуализации Callgrind. + + Reset all event counters. + Сбросить все счётчики событий. + Pause event logging. No events are counted which will speed up program execution during profiling. Приостановить запись событий. События не будут записываться, что повысит скорость выполнения программы при профилировании. + + Go back one step in history. This will select the previously selected item. + Перейти на шаг назад по истории. Выберет предыдущий выбранный элемент. + Go forward one step in history. Перейти на шаг вперёд по истории. @@ -37602,6 +38896,18 @@ Will not be applied to whitespace in comments and strings. Filter... Фильтр... + + Callgrind + Callgrind + + + A Valgrind Callgrind analysis is still in progress. + Анализ Valgrind Callgrind уже выполняется. + + + Start a Valgrind Callgrind analysis. + Запуск анализа Valgrind Callgrind. + Profiling aborted. Профилирование прервано. @@ -37687,10 +38993,48 @@ Will not be applied to whitespace in comments and strings. Invalid Calls to "free()" Неверный вызов «free()» + + Memcheck + Memcheck + Load External XML Log File Загрузить внешний XML файл журнала + + Valgrind Analyze Memory uses the Memcheck tool to find memory leaks. + Анализатор памяти Valgrind использует утилиту Memcheck для обнаружения утечек памяти. + + + Valgrind Memory Analyzer + Анализатор памяти Valgrind + + + Valgrind Memory Analyzer with GDB + Анализатор памяти Valgrind с GDB + + + Valgrind Analyze Memory with GDB uses the Memcheck tool to find memory leaks. +When a problem is detected, the application is interrupted and can be debugged. + Анализатор памяти Valgrind с GDB использует утилиту Memcheck для поиска утечек памяти. +При обнаружении проблем программа останавливается для отладки. + + + Valgrind Memory Analyzer (External Application) + Анализатор памяти Valgrind (внешняя программа) + + + A Valgrind Memcheck analysis is still in progress. + Анализатор памяти Valgrind уже выполняется. + + + Start a Valgrind Memcheck analysis. + Запуск анализатора памяти Valgrind. + + + Start a Valgrind Memcheck with GDB analysis. + Запуск анализатора памяти Valgrind c GDB. + Memcheck: Failed to open file for reading: %1 Memcheck: Не удалось открыть файл для чтения: %1 @@ -37699,6 +39043,22 @@ Will not be applied to whitespace in comments and strings. Memcheck: Error occurred parsing Valgrind output: %1 Memcheck: Ошибка при разборе вывода Valgrind: %1 + + Memory Analyzer Tool finished, %n issues were found. + + Анализ памяти завершён, найдена %n проблема. + Анализ памяти завершён, найдено %n проблемы. + Анализ памяти завершён, найдено %n проблем. + + + + Log file processed, %n issues were found. + + Файл журнала обработан, найдена %n проблема. + Файл журнала обработан, найдено %n проблемы. + Файл журнала обработан, найдено %n проблем. + + Memory Issues Проблемы памяти @@ -37926,47 +39286,6 @@ With cache simulation, further event counters are enabled: Valgrind - - Valgrind::Internal::ValgrindPlugin - - Valgrind Function Profile uses the Callgrind tool to record function calls when a program runs. - Профайлер функций Valgrind использует утилиту Callgrind для записи вызовов функций при работе программы. - - - Valgrind Analyze Memory uses the Memcheck tool to find memory leaks. - Анализатор памяти Valgrind использует утилиту Memcheck для обнаружения утечек памяти. - - - Valgrind Analyze Memory with GDB uses the Memcheck tool to find memory leaks. -When a problem is detected, the application is interrupted and can be debugged. - Анализатор памяти Valgrind с GDB использует утилиту Memcheck для поиска утечек памяти. -При обнаружении проблем программа останавливается для отладки. - - - Valgrind Memory Analyzer - Анализатор памяти Valgrind - - - Valgrind Memory Analyzer with GDB - Анализатор памяти Valgrind с GDB - - - Valgrind Function Profiler - Профайлер функций Valgrind - - - Valgrind Memory Analyzer (External Remote Application) - Анализатор памяти Valgrind (внешняя программа) - - - Valgrind Function Profiler (External Remote Application) - Профайлер функций Valgrind (внешняя программа) - - - Profile Costs of This Function and Its Callees - Цены функций и тех, кого они вызывают - - Valgrind::Internal::ValgrindRunConfigurationAspect @@ -38269,6 +39588,14 @@ should a repository require SSH-authentication (see documentation on SSH and the Файл списка ников в 4-х столбцовом формате mailmap: «имя <email> алиас <email>». + + Reset information about which version control system handles which directory. + Сбросить информацию о системе контроля версий, управляющей этим каталогом. + + + Reset VCS Cache + Сбросить кэш VCS + VcsBase::Internal::EmailTextCursorHandler @@ -38829,17 +40156,13 @@ should a repository require SSH-authentication (see documentation on SSH and the WinRt::Internal::WinRtRunConfigurationWidget - - Arguments: - Параметры: - Launch App Запуск приложения - Uninstall package after stop - Удалить пакет после завершения + Uninstall package after application stops + Удалить пакет после завершения приложения @@ -38934,6 +40257,13 @@ should a repository require SSH-authentication (see documentation on SSH and the Поиск по примерам... + + qmt::ClassItem + + Show Definition + Показать определение + + qmt::DiagramController @@ -39003,6 +40333,10 @@ should a repository require SSH-authentication (see documentation on SSH and the Add Element Добавление элемента + + Relocate Relation + Переместить отношение + qmt::DocumentController @@ -39023,6 +40357,41 @@ should a repository require SSH-authentication (see documentation on SSH and the Создать диаграмму + + qmt::FileCreationException + + Unable to create file. + Не удалось создать файл. + + + + qmt::FileNotFoundException + + File not found. + Файл не найден. + + + + qmt::FileReadError + + Reading from file failed. + Не удалось прочитать из файла. + + + + qmt::FileWriteError + + Writing to file failed. + Не удалось записать в файл. + + + + qmt::IllegalXmlFile + + Illegal XML file. + Неверный файл XML. + + qmt::ModelController @@ -39085,6 +40454,72 @@ should a repository require SSH-authentication (see documentation on SSH and the Удалить + + qmt::NullPointerException + + Unacceptable null object. + Недопустимый нулевой объект. + + + + qmt::ObjectItem + + Open Diagram + Открыть диаграмму + + + Create Diagram + Создать диаграмму + + + Remove + Убрать + + + Delete + Удалить + + + Align Objects + Выровнять объекты + + + Align Left + По левому краю + + + Center Vertically + По центру вертикально + + + Align Right + По правому краю + + + Align Top + По верху + + + Center Horizontally + По центру горизонтально + + + Align Bottom + По низу + + + Same Width + По ширине + + + Same Height + По высоте + + + Same Size + По размеру + + qmt::ProjectController @@ -39214,10 +40649,6 @@ should a repository require SSH-authentication (see documentation on SSH and the Stereotypes: Стереотипы: - - Reverese engineered: - Реконструировано: - Name: Имя: @@ -39238,6 +40669,10 @@ should a repository require SSH-authentication (see documentation on SSH and the Template: Шаблон: + + Clean Up + Очистить + Members: Члены: @@ -39362,6 +40797,10 @@ should a repository require SSH-authentication (see documentation on SSH and the Box Коробкой + + Reverse engineered: + Реконструировано: + Angle Brackets Угловыми скобками @@ -39410,6 +40849,13 @@ should a repository require SSH-authentication (see documentation on SSH and the [без имени] + + qmt::UnknownFileVersion + + Unable to handle file version %1. + Не удалось обработать файл версии %1. + + text diff --git a/src/libs/qmljs/qmljsinterpreter.cpp b/src/libs/qmljs/qmljsinterpreter.cpp index 00959abc307..078ee96ad8c 100644 --- a/src/libs/qmljs/qmljsinterpreter.cpp +++ b/src/libs/qmljs/qmljsinterpreter.cpp @@ -2277,6 +2277,14 @@ ImportInfo ImportInfo::implicitDirectoryImport(const QString &directory) return info; } +ImportInfo ImportInfo::qrcDirectoryImport(const QString &directory) +{ + ImportInfo info; + info.m_type = ImportType::QrcDirectory; + info.m_path = directory; + return info; +} + bool ImportInfo::isValid() const { return m_type != ImportType::Invalid; diff --git a/src/libs/qmljs/qmljsinterpreter.h b/src/libs/qmljs/qmljsinterpreter.h index 3d86a5795eb..f6a143a49ea 100644 --- a/src/libs/qmljs/qmljsinterpreter.h +++ b/src/libs/qmljs/qmljsinterpreter.h @@ -1001,6 +1001,7 @@ public: const QString &as, AST::UiImport *ast = 0); static ImportInfo invalidImport(AST::UiImport *ast = 0); static ImportInfo implicitDirectoryImport(const QString &directory); + static ImportInfo qrcDirectoryImport(const QString &directory); bool isValid() const; ImportType::Enum type() const; diff --git a/src/libs/qmljs/qmljslink.cpp b/src/libs/qmljs/qmljslink.cpp index 1f3045a675a..f46b228547b 100644 --- a/src/libs/qmljs/qmljslink.cpp +++ b/src/libs/qmljs/qmljslink.cpp @@ -575,16 +575,23 @@ void LinkPrivate::loadQmldirComponents(ObjectValue *import, ComponentVersion ver void LinkPrivate::loadImplicitDirectoryImports(Imports *imports, Document::Ptr doc) { - ImportInfo implcitDirectoryImportInfo = ImportInfo::implicitDirectoryImport(doc->path()); - - Import directoryImport = importCache.value(ImportCacheKey(implcitDirectoryImportInfo)); - if (!directoryImport.object) { - directoryImport = importFileOrDirectory(doc, implcitDirectoryImportInfo); + auto processImport = [this, imports, doc](const ImportInfo &importInfo){ + Import directoryImport = importCache.value(ImportCacheKey(importInfo)); + if (!directoryImport.object) { + directoryImport = importFileOrDirectory(doc, importInfo); + if (directoryImport.object) + importCache.insert(ImportCacheKey(importInfo), directoryImport); + } if (directoryImport.object) - importCache.insert(ImportCacheKey(implcitDirectoryImportInfo), directoryImport); + imports->append(directoryImport); + }; + + processImport(ImportInfo::implicitDirectoryImport(doc->path())); + foreach (const QString &path, + ModelManagerInterface::instance()->qrcPathsForFile(doc->fileName())) { + processImport(ImportInfo::qrcDirectoryImport( + QrcParser::qrcDirectoryPathForQrcFilePath(path))); } - if (directoryImport.object) - imports->append(directoryImport); } void LinkPrivate::loadImplicitDefaultImports(Imports *imports) diff --git a/src/libs/qmljs/qmljsmodelmanagerinterface.cpp b/src/libs/qmljs/qmljsmodelmanagerinterface.cpp index de0ad9d61a5..75cea106844 100644 --- a/src/libs/qmljs/qmljsmodelmanagerinterface.cpp +++ b/src/libs/qmljs/qmljsmodelmanagerinterface.cpp @@ -427,46 +427,10 @@ bool pInfoLessThanImports(const ModelManagerInterface::ProjectInfo &p1, const Mo } -QStringList ModelManagerInterface::filesAtQrcPath(const QString &path, const QLocale *locale, - ProjectExplorer::Project *project, - QrcResourceSelector resources) +void ModelManagerInterface::iterateQrcFiles(ProjectExplorer::Project *project, + QrcResourceSelector resources, + std::function callback) { - QString normPath = QrcParser::normalizedQrcFilePath(path); - QList pInfos; - if (project) - pInfos.append(projectInfo(project)); - else - pInfos = projectInfos(); - - QStringList res; - QSet pathsChecked; - foreach (const ModelManagerInterface::ProjectInfo &pInfo, pInfos) { - QStringList qrcFilePaths; - if (resources == ActiveQrcResources) - qrcFilePaths = pInfo.activeResourceFiles; - else - qrcFilePaths = pInfo.allResourceFiles; - foreach (const QString &qrcFilePath, qrcFilePaths) { - if (pathsChecked.contains(qrcFilePath)) - continue; - pathsChecked.insert(qrcFilePath); - QrcParser::ConstPtr qrcFile = m_qrcCache.parsedPath(qrcFilePath); - if (qrcFile.isNull()) - continue; - qrcFile->collectFilesAtPath(normPath, &res, locale); - } - } - res.sort(); // make the result predictable - return res; -} - -QMap ModelManagerInterface::filesInQrcPath(const QString &path, - const QLocale *locale, - ProjectExplorer::Project *project, - bool addDirs, - QrcResourceSelector resources) -{ - QString normPath = QrcParser::normalizedQrcDirectoryPath(path); QList pInfos; if (project) { pInfos.append(projectInfo(project)); @@ -477,7 +441,7 @@ QMap ModelManagerInterface::filesInQrcPath(const QString & else qSort(pInfos.begin(), pInfos.end(), &pInfoLessThanAll); } - QMap res; + QSet pathsChecked; foreach (const ModelManagerInterface::ProjectInfo &pInfo, pInfos) { QStringList qrcFilePaths; @@ -490,12 +454,47 @@ QMap ModelManagerInterface::filesInQrcPath(const QString & continue; pathsChecked.insert(qrcFilePath); QrcParser::ConstPtr qrcFile = m_qrcCache.parsedPath(qrcFilePath); - if (qrcFile.isNull()) continue; - qrcFile->collectFilesInPath(normPath, &res, addDirs, locale); + callback(qrcFile); } } +} + +QStringList ModelManagerInterface::qrcPathsForFile(const QString &file, const QLocale *locale, + ProjectExplorer::Project *project, + QrcResourceSelector resources) +{ + QStringList res; + iterateQrcFiles(project, resources, [&](QrcParser::ConstPtr qrcFile) { + qrcFile->collectResourceFilesForSourceFile(file, &res, locale); + }); + return res; +} + +QStringList ModelManagerInterface::filesAtQrcPath(const QString &path, const QLocale *locale, + ProjectExplorer::Project *project, + QrcResourceSelector resources) +{ + QString normPath = QrcParser::normalizedQrcFilePath(path); + QStringList res; + iterateQrcFiles(project, resources, [&](QrcParser::ConstPtr qrcFile) { + qrcFile->collectFilesAtPath(normPath, &res, locale); + }); + return res; +} + +QMap ModelManagerInterface::filesInQrcPath(const QString &path, + const QLocale *locale, + ProjectExplorer::Project *project, + bool addDirs, + QrcResourceSelector resources) +{ + QString normPath = QrcParser::normalizedQrcDirectoryPath(path); + QMap res; + iterateQrcFiles(project, resources, [&](QrcParser::ConstPtr qrcFile) { + qrcFile->collectFilesInPath(normPath, &res, addDirs, locale); + }); return res; } diff --git a/src/libs/qmljs/qmljsmodelmanagerinterface.h b/src/libs/qmljs/qmljsmodelmanagerinterface.h index 421a06b7b00..142fc54c175 100644 --- a/src/libs/qmljs/qmljsmodelmanagerinterface.h +++ b/src/libs/qmljs/qmljsmodelmanagerinterface.h @@ -152,6 +152,9 @@ public: bool emitDocumentOnDiskChanged); void fileChangedOnDisk(const QString &path); void removeFiles(const QStringList &files); + QStringList qrcPathsForFile(const QString &file, const QLocale *locale = 0, + ProjectExplorer::Project *project = 0, + QrcResourceSelector resources = AllQrcResources); QStringList filesAtQrcPath(const QString &path, const QLocale *locale = 0, ProjectExplorer::Project *project = 0, QrcResourceSelector resources = AllQrcResources); @@ -249,6 +252,9 @@ protected: private: void cleanupFutures(); + void iterateQrcFiles(ProjectExplorer::Project *project, + QrcResourceSelector resources, + std::function callback); mutable QMutex m_mutex; QmlJS::Snapshot m_validSnapshot; diff --git a/src/libs/qmljs/qmljsqrcparser.cpp b/src/libs/qmljs/qmljsqrcparser.cpp index 7439343f71a..6b07fc1d135 100644 --- a/src/libs/qmljs/qmljsqrcparser.cpp +++ b/src/libs/qmljs/qmljsqrcparser.cpp @@ -74,6 +74,9 @@ public: bool hasDirAtPath(const QString &path, const QLocale *locale = 0) const; void collectFilesInPath(const QString &path, QMap *res, bool addDirs = false, const QLocale *locale = 0) const; + void collectResourceFilesForSourceFile(const QString &sourceFile, QStringList *res, + const QLocale *locale = 0) const; + QStringList errorMessages() const; QStringList languages() const; private: @@ -81,6 +84,7 @@ private: QStringList allUiLanguages(const QLocale *locale) const; SMap m_resources; + SMap m_files; QStringList m_languages; QStringList m_errorMessages; }; @@ -130,6 +134,11 @@ QString QrcParser::normalizedQrcDirectoryPath(const QString &path) { return normPath; } +QString QrcParser::qrcDirectoryPathForQrcFilePath(const QString &file) +{ + return file.left(file.lastIndexOf(QLatin1Char('/'))); +} + QrcParser::QrcParser() { d = new Internal::QrcParserPrivate(this); @@ -181,6 +190,12 @@ void QrcParser::collectFilesInPath(const QString &path, QMapcollectFilesInPath(path, res, addDirs, locale); } +void QrcParser::collectResourceFilesForSourceFile(const QString &sourceFile, QStringList *res, + const QLocale *locale) const +{ + d->collectResourceFilesForSourceFile(sourceFile, res, locale); +} + /*! \brief returns the errors found while parsing */ QStringList QrcParser::errorMessages() const @@ -297,13 +312,12 @@ bool QrcParserPrivate::parseFile(const QString &path) accessPath = language + prefix + alias; else accessPath = language + prefix + fileName; - if (m_resources.contains(accessPath)) { - QStringList &val = m_resources[accessPath]; - if (!val.contains(filePath)) - val.append(filePath); - } else { - m_resources.insert(accessPath, QStringList(filePath)); - } + QStringList &resources = m_resources[accessPath]; + if (!resources.contains(filePath)) + resources.append(filePath); + QStringList &files = m_files[filePath]; + if (!files.contains(accessPath)) + files.append(accessPath); } } return true; @@ -388,6 +402,24 @@ void QrcParserPrivate::collectFilesInPath(const QString &path, QMapcontains(resource)) + results->append(resource); + } + } +} + QStringList QrcParserPrivate::errorMessages() const { return m_errorMessages; diff --git a/src/libs/qmljs/qmljsqrcparser.h b/src/libs/qmljs/qmljsqrcparser.h index b52f874e792..0d9e98fc2a8 100644 --- a/src/libs/qmljs/qmljsqrcparser.h +++ b/src/libs/qmljs/qmljsqrcparser.h @@ -52,6 +52,9 @@ public: bool hasDirAtPath(const QString &path, const QLocale *locale = 0) const; void collectFilesInPath(const QString &path, QMap *res, bool addDirs = false, const QLocale *locale = 0) const; + void collectResourceFilesForSourceFile(const QString &sourceFile, QStringList *results, + const QLocale *locale = 0) const; + QStringList errorMessages() const; QStringList languages() const; bool isValid() const; @@ -59,6 +62,7 @@ public: static Ptr parseQrcFile(const QString &path); static QString normalizedQrcFilePath(const QString &path); static QString normalizedQrcDirectoryPath(const QString &path); + static QString qrcDirectoryPathForQrcFilePath(const QString &file); private: QrcParser(); QrcParser(const QrcParser &); diff --git a/src/libs/qtcreatorcdbext/qtcreatorcdbextension.cpp b/src/libs/qtcreatorcdbext/qtcreatorcdbextension.cpp index fd8f84c566b..f3391f7d789 100644 --- a/src/libs/qtcreatorcdbext/qtcreatorcdbextension.cpp +++ b/src/libs/qtcreatorcdbext/qtcreatorcdbextension.cpp @@ -275,7 +275,7 @@ extern "C" HRESULT CALLBACK pid(CIDebugClient *client, PCSTR args) int token; commandTokens(args, &token); - dprintf("Qt Creator CDB extension version 3.6 %d bit.\n", + dprintf("Qt Creator CDB extension version 4.0 %d bit.\n", sizeof(void *) * 8); if (const ULONG pid = currentProcessId(client)) ExtensionContext::instance().report('R', token, 0, "pid", "%u", pid); diff --git a/src/libs/utils/icon.cpp b/src/libs/utils/icon.cpp index e1e641baf73..37b6878c963 100644 --- a/src/libs/utils/icon.cpp +++ b/src/libs/utils/icon.cpp @@ -38,6 +38,9 @@ namespace Utils { +static const qreal PunchEdgeWidth = 0.5; +static const qreal PunchEdgeIntensity = 0.6; + static QPixmap maskToColorAndAlpha(const QPixmap &mask, const QColor &color) { QImage result(mask.toImage().convertToFormat(QImage::Format_ARGB32)); @@ -95,9 +98,9 @@ static QPixmap combinedMask(const MasksAndColors &masks, Icon::IconStyleOptions for (;maskImage != masks.constEnd(); ++maskImage) { if (style & Icon::PunchEdges) { p.save(); - p.setOpacity(0.4); + p.setOpacity(PunchEdgeIntensity); p.setCompositionMode(QPainter::CompositionMode_Lighten); - smearPixmap(&p, maskToColorAndAlpha((*maskImage).first, Qt::white), 0.5); + smearPixmap(&p, maskToColorAndAlpha((*maskImage).first, Qt::white), PunchEdgeWidth); p.restore(); } p.drawPixmap(0, 0, (*maskImage).first); @@ -118,9 +121,9 @@ static QPixmap masksToIcon(const MasksAndColors &masks, const QPixmap &combinedM if (style & Icon::PunchEdges && maskImage != masks.constBegin()) { // Punch a transparent outline around an overlay. p.save(); - p.setOpacity(0.4); + p.setOpacity(PunchEdgeIntensity); p.setCompositionMode(QPainter::CompositionMode_DestinationOut); - smearPixmap(&p, maskToColorAndAlpha((*maskImage).first, Qt::white), 0.5); + smearPixmap(&p, maskToColorAndAlpha((*maskImage).first, Qt::white), PunchEdgeWidth); p.restore(); } p.drawPixmap(0, 0, maskToColorAndAlpha((*maskImage).first, (*maskImage).second)); diff --git a/src/libs/utils/smallstringmemory.h b/src/libs/utils/smallstringmemory.h index f44ff6443be..4b1b3b4c7a4 100644 --- a/src/libs/utils/smallstringmemory.h +++ b/src/libs/utils/smallstringmemory.h @@ -46,13 +46,13 @@ inline void deallocate(char *memory) #ifdef WIN32 _aligned_free(memory); #else -#if defined(__GNUC__) && !defined(__clang__) #pragma GCC diagnostic push +#if defined(__GNUC__) && !defined(__clang__) #pragma GCC diagnostic ignored "-Wfree-nonheap-object" +#endif std::free(memory); #pragma GCC diagnostic pop #endif -#endif } inline char *reallocate(char *oldMemory, std::size_t newSize) diff --git a/src/libs/utils/stylehelper.cpp b/src/libs/utils/stylehelper.cpp index 8de43c24bb3..2a07ffac6c1 100644 --- a/src/libs/utils/stylehelper.cpp +++ b/src/libs/utils/stylehelper.cpp @@ -286,20 +286,14 @@ void StyleHelper::drawArrow(QStyle::PrimitiveElement element, QPainter *painter, return; const qreal devicePixelRatio = painter->device()->devicePixelRatio(); + const bool enabled = option->state & QStyle::State_Enabled; QRect r = option->rect; int size = qMin(r.height(), r.width()); QPixmap pixmap; QString pixmapName; - pixmapName.sprintf("arrow-%s-%d-%d-%d-%lld-%f", - "$qt_ia", - uint(option->state), element, - size, option->palette.cacheKey(), - devicePixelRatio); + pixmapName.sprintf("StyleHelper::drawArrow-%d-%d-%d-%f", + element, size, enabled, devicePixelRatio); if (!QPixmapCache::find(pixmapName, pixmap)) { - const QCommonStyle* const style = qobject_cast(QApplication::style()); - if (!style) - return; - QImage image(size * devicePixelRatio, size * devicePixelRatio, QImage::Format_ARGB32_Premultiplied); image.fill(Qt::transparent); QPainter painter(&image); @@ -307,20 +301,22 @@ void StyleHelper::drawArrow(QStyle::PrimitiveElement element, QPainter *painter, QStyleOption tweakedOption(*option); tweakedOption.state = QStyle::State_Enabled; - if (!(option->state & QStyle::State_Enabled)) { - tweakedOption.palette.setColor(QPalette::ButtonText, option->palette.mid().color()); - tweakedOption.rect = image.rect(); - style->QCommonStyle::drawPrimitive(element, &tweakedOption, &painter); - } else { - tweakedOption.palette.setColor(QPalette::ButtonText, Qt::black); - painter.setOpacity(0.2); - tweakedOption.rect = image.rect().adjusted(0, devicePixelRatio, 0, devicePixelRatio); + auto drawCommonStyleArrow = [&tweakedOption, element, &painter](const QRect &rect, const QColor &color) -> void + { + static const QCommonStyle* const style = qobject_cast(QApplication::style()); + if (!style) + return; + tweakedOption.palette.setColor(QPalette::ButtonText, color.rgb()); + tweakedOption.rect = rect; + painter.setOpacity(color.alphaF()); style->QCommonStyle::drawPrimitive(element, &tweakedOption, &painter); + }; - tweakedOption.palette.setColor(QPalette::ButtonText, QColor(220, 220, 220)); - painter.setOpacity(1); - tweakedOption.rect = image.rect(); - style->QCommonStyle::drawPrimitive(element, &tweakedOption, &painter); + if (!enabled) { + drawCommonStyleArrow(image.rect(), creatorTheme()->color(Theme::IconsDisabledColor)); + } else { + drawCommonStyleArrow(image.rect().translated(0, devicePixelRatio), toolBarDropShadowColor()); + drawCommonStyleArrow(image.rect(), creatorTheme()->color(Theme::IconsBaseColor)); } painter.end(); pixmap = QPixmap::fromImage(image); diff --git a/src/libs/utils/stylehelper.h b/src/libs/utils/stylehelper.h index e6a1da03022..0f99e4bf977 100644 --- a/src/libs/utils/stylehelper.h +++ b/src/libs/utils/stylehelper.h @@ -65,6 +65,8 @@ public: static QColor sidebarHighlight() { return QColor(255, 255, 255, 40); } static QColor sidebarShadow() { return QColor(0, 0, 0, 40); } + static QColor toolBarDropShadowColor() { return QColor(0, 0, 0, 70); } + static QColor notTooBrightHighlightColor(); // Sets the base color and makes sure all top level widgets are updated diff --git a/src/plugins/android/androidtoolchain.cpp b/src/plugins/android/androidtoolchain.cpp index 7ca07b54997..81ce2350cf3 100644 --- a/src/plugins/android/androidtoolchain.cpp +++ b/src/plugins/android/androidtoolchain.cpp @@ -234,7 +234,7 @@ void AndroidToolChain::setSecondaryToolChain(bool b) m_secondaryToolChain = b; } -QList AndroidToolChain::detectSupportedAbis() const +GccToolChain::DetectedAbisResult AndroidToolChain::detectSupportedAbis() const { return QList() << targetAbi(); } diff --git a/src/plugins/android/androidtoolchain.h b/src/plugins/android/androidtoolchain.h index 0f15f2db619..06d0944956e 100644 --- a/src/plugins/android/androidtoolchain.h +++ b/src/plugins/android/androidtoolchain.h @@ -59,7 +59,7 @@ public: void setSecondaryToolChain(bool b); protected: - QList detectSupportedAbis() const override; + DetectedAbisResult detectSupportedAbis() const override; private: explicit AndroidToolChain(const ProjectExplorer::Abi &abi, const QString &ndkToolChainVersion, Detection d); diff --git a/src/plugins/autotest/testcodeparser.cpp b/src/plugins/autotest/testcodeparser.cpp index 6bb9fd89047..682824744e9 100644 --- a/src/plugins/autotest/testcodeparser.cpp +++ b/src/plugins/autotest/testcodeparser.cpp @@ -284,9 +284,10 @@ static QString quickTestSrcDir(const CppTools::CppModelManager *cppMM, return QString(); } -static QString testClass(const CppTools::CppModelManager *modelManager, - CPlusPlus::Document::Ptr &document) +static QString testClass(const CppTools::CppModelManager *modelManager, const QString &fileName) { + const QByteArray &fileContent = getFileContent(fileName); + CPlusPlus::Document::Ptr document = modelManager->document(fileName); const QList macros = document->macroUses(); foreach (const CPlusPlus::Document::MacroUse ¯o, macros) { @@ -295,14 +296,13 @@ static QString testClass(const CppTools::CppModelManager *modelManager, const QByteArray name = macro.macro().name(); if (TestUtils::isQTestMacro(name)) { const CPlusPlus::Document::Block arg = macro.arguments().at(0); - return QLatin1String(getFileContent(document->fileName()) - .mid(arg.bytesBegin(), arg.bytesEnd() - arg.bytesBegin())); + return QLatin1String(fileContent.mid(arg.bytesBegin(), + arg.bytesEnd() - arg.bytesBegin())); } } // check if one has used a self-defined macro or QTest::qExec() directly const CPlusPlus::Snapshot snapshot = modelManager->snapshot(); - const QByteArray fileContent = getFileContent(document->fileName()); - document = snapshot.preprocessedDocument(fileContent, document->fileName()); + document = snapshot.preprocessedDocument(fileContent, fileName); document->check(); CPlusPlus::AST *ast = document->translationUnit()->ast(); TestAstVisitor astVisitor(document); @@ -523,7 +523,7 @@ static void checkDocumentForTestCode(QFutureInterface futureInt } else if (testCaseNames.contains(fileName) // if we do a reparse || (includesQtTest(document, modelManager) && qtTestLibDefined(modelManager, fileName))) { - QString testCaseName(testClass(modelManager, document)); + QString testCaseName(testClass(modelManager, fileName)); // we might be in a reparse without the original entry point with the QTest::qExec() if (testCaseName.isEmpty()) testCaseName = testCaseNames.value(fileName); @@ -537,6 +537,10 @@ static void checkDocumentForTestCode(QFutureInterface futureInt TestVisitor visitor(testCaseName); visitor.accept(declaringDoc->globalNamespace()); + + if (!visitor.resultValid()) + return; + const QMap testFunctions = visitor.privateSlots(); QMap dataTags = diff --git a/src/plugins/autotest/testnavigationwidget.cpp b/src/plugins/autotest/testnavigationwidget.cpp index 963fec32b6f..ddcc53c43c1 100644 --- a/src/plugins/autotest/testnavigationwidget.cpp +++ b/src/plugins/autotest/testnavigationwidget.cpp @@ -77,7 +77,7 @@ TestNavigationWidget::TestNavigationWidget(QWidget *parent) : m_progressTimer = new QTimer(this); m_progressTimer->setSingleShot(true); - m_progressTimer->setInterval(100); // don't display indicator if progress takes less than 100ms + m_progressTimer->setInterval(1000); // don't display indicator if progress takes less than 1s connect(m_model->parser(), &TestCodeParser::parsingStarted, this, &TestNavigationWidget::onParsingStarted); diff --git a/src/plugins/autotest/testsettings.cpp b/src/plugins/autotest/testsettings.cpp index 870b35f124a..7e8d1911b5e 100644 --- a/src/plugins/autotest/testsettings.cpp +++ b/src/plugins/autotest/testsettings.cpp @@ -47,7 +47,7 @@ static const int defaultTimeout = 60000; TestSettings::TestSettings() : timeout(defaultTimeout), metrics(Walltime), omitInternalMssg(true), omitRunConfigWarn(false), - limitResultOutput(true), autoScroll(true), alwaysParse(false) + limitResultOutput(true), autoScroll(true), alwaysParse(true) { } @@ -96,7 +96,7 @@ void TestSettings::fromSettings(const QSettings *s) omitRunConfigWarn = s->value(root + QLatin1String(omitRunConfigWarnKey), false).toBool(); limitResultOutput = s->value(root + QLatin1String(limitResultOutputKey), true).toBool(); autoScroll = s->value(root + QLatin1String(autoScrollKey), true).toBool(); - alwaysParse = s->value(root + QLatin1String(alwaysParseKey), false).toBool(); + alwaysParse = s->value(root + QLatin1String(alwaysParseKey), true).toBool(); gtestRunDisabled = s->value(root + QLatin1String(gtestRunDisabledKey), false).toBool(); gtestRepeat = s->value(root + QLatin1String(gtestRepeatKey), false).toBool(); gtestShuffle = s->value(root + QLatin1String(gtestShuffleKey), false).toBool(); diff --git a/src/plugins/autotest/testvisitor.cpp b/src/plugins/autotest/testvisitor.cpp index c4c9373ca35..a816aa33eb5 100644 --- a/src/plugins/autotest/testvisitor.cpp +++ b/src/plugins/autotest/testvisitor.cpp @@ -73,6 +73,8 @@ bool TestVisitor::visit(CPlusPlus::Class *symbol) if (className != m_className) continue; + m_valid = true; + if (const auto func = type->asFunctionType()) { if (func->isSlot() && member->isPrivate()) { const QString name = o.prettyName(func->name()); diff --git a/src/plugins/autotest/testvisitor.h b/src/plugins/autotest/testvisitor.h index f79d612a4c7..fa2869a44c3 100644 --- a/src/plugins/autotest/testvisitor.h +++ b/src/plugins/autotest/testvisitor.h @@ -51,6 +51,7 @@ public: virtual ~TestVisitor(); QMap privateSlots() const { return m_privSlots; } + bool resultValid() const { return m_valid; } bool visit(CPlusPlus::Class *symbol); @@ -58,6 +59,7 @@ private: CppTools::SymbolFinder m_symbolFinder; QString m_className; QMap m_privSlots; + bool m_valid = false; }; class TestAstVisitor : public CPlusPlus::ASTVisitor diff --git a/src/plugins/beautifier/beautifierplugin.cpp b/src/plugins/beautifier/beautifierplugin.cpp index cbd0b96b8b6..dd1fb2c16f6 100644 --- a/src/plugins/beautifier/beautifierplugin.cpp +++ b/src/plugins/beautifier/beautifierplugin.cpp @@ -59,7 +59,6 @@ #include #include #include -#include #include using namespace TextEditor; @@ -179,6 +178,7 @@ bool BeautifierPlugin::initialize(const QStringList &arguments, QString *errorSt Core::ActionContainer *menu = Core::ActionManager::createMenu(Constants::MENU_ID); menu->menu()->setTitle(QCoreApplication::translate("Beautifier", Constants::OPTION_TR_CATEGORY)); + menu->setOnAllDisabledBehavior(Core::ActionContainer::Show); Core::ActionManager::actionContainer(Core::Constants::M_TOOLS)->addMenu(menu); foreach (BeautifierAbstractTool *tool, m_tools) { @@ -188,9 +188,7 @@ bool BeautifierPlugin::initialize(const QStringList &arguments, QString *errorSt addAutoReleasedObject(object); } - // The single shot is needed, otherwise the menu will stay disabled even - // when the submenu's actions get enabled later on. - QTimer::singleShot(0, this, SLOT(updateActions())); + updateActions(); return true; } diff --git a/src/plugins/clangcodemodel/clangcompletionassistprocessor.cpp b/src/plugins/clangcodemodel/clangcompletionassistprocessor.cpp index a535656c737..c0e8904d1b4 100644 --- a/src/plugins/clangcodemodel/clangcompletionassistprocessor.cpp +++ b/src/plugins/clangcodemodel/clangcompletionassistprocessor.cpp @@ -280,7 +280,6 @@ IAssistProposal *ClangCompletionAssistProcessor::startCompletionHelper() return 0; } -// TODO: Extract duplicated logic from InternalCppCompletionAssistProcessor::startOfOperator int ClangCompletionAssistProcessor::startOfOperator(int positionInDocument, unsigned *kind, bool wantFunctionCall) const @@ -291,96 +290,13 @@ int ClangCompletionAssistProcessor::startOfOperator(int positionInDocument, wantFunctionCall); *kind = activationSequenceProcessor.completionKind(); - int start = activationSequenceProcessor.operatorStartPosition(); - if (start != positionInDocument) { - QTextCursor tc(m_interface->textDocument()); - tc.setPosition(positionInDocument); - // Include completion: make sure the quote character is the first one on the line - if (*kind == T_STRING_LITERAL) { - QTextCursor s = tc; - s.movePosition(QTextCursor::StartOfLine, QTextCursor::KeepAnchor); - QString sel = s.selectedText(); - if (sel.indexOf(QLatin1Char('"')) < sel.length() - 1) { - *kind = T_EOF_SYMBOL; - start = positionInDocument; - } - } - - if (*kind == T_COMMA) { - ExpressionUnderCursor expressionUnderCursor(m_interface->languageFeatures()); - if (expressionUnderCursor.startOfFunctionCall(tc) == -1) { - *kind = T_EOF_SYMBOL; - start = positionInDocument; - } - } - - SimpleLexer tokenize; - tokenize.setLanguageFeatures(m_interface->languageFeatures()); - tokenize.setSkipComments(false); - const Tokens &tokens = tokenize(tc.block().text(), BackwardsScanner::previousBlockState(tc.block())); - const int tokenIdx = SimpleLexer::tokenBefore(tokens, qMax(0, tc.positionInBlock() - 1)); // get the token at the left of the cursor - const Token tk = (tokenIdx == -1) ? Token() : tokens.at(tokenIdx); - - if (*kind == T_DOXY_COMMENT && !(tk.is(T_DOXY_COMMENT) || tk.is(T_CPP_DOXY_COMMENT))) { - *kind = T_EOF_SYMBOL; - start = positionInDocument; - } - // Don't complete in comments or strings, but still check for include completion - else if (tk.is(T_COMMENT) || tk.is(T_CPP_COMMENT) - || tk.is(T_CPP_DOXY_COMMENT) || tk.is(T_DOXY_COMMENT) - || (tk.isLiteral() && (*kind != T_STRING_LITERAL - && *kind != T_ANGLE_STRING_LITERAL - && *kind != T_SLASH))) { - *kind = T_EOF_SYMBOL; - start = positionInDocument; - } - // Include completion: can be triggered by slash, but only in a string - else if (*kind == T_SLASH && (tk.isNot(T_STRING_LITERAL) && tk.isNot(T_ANGLE_STRING_LITERAL))) { - *kind = T_EOF_SYMBOL; - start = positionInDocument; - } - else if (*kind == T_LPAREN) { - if (tokenIdx > 0) { - const Token &previousToken = tokens.at(tokenIdx - 1); // look at the token at the left of T_LPAREN - switch (previousToken.kind()) { - case T_IDENTIFIER: - case T_GREATER: - case T_SIGNAL: - case T_SLOT: - break; // good - - default: - // that's a bad token :) - *kind = T_EOF_SYMBOL; - start = positionInDocument; - } - } - } - // Check for include preprocessor directive - else if (*kind == T_STRING_LITERAL || *kind == T_ANGLE_STRING_LITERAL || *kind == T_SLASH) { - bool include = false; - if (tokens.size() >= 3) { - if (tokens.at(0).is(T_POUND) && tokens.at(1).is(T_IDENTIFIER) && (tokens.at(2).is(T_STRING_LITERAL) || - tokens.at(2).is(T_ANGLE_STRING_LITERAL))) { - const Token &directiveToken = tokens.at(1); - QString directive = tc.block().text().mid(directiveToken.bytesBegin(), - directiveToken.bytes()); - if (directive == QLatin1String("include") || - directive == QLatin1String("include_next") || - directive == QLatin1String("import")) { - include = true; - } - } - } - - if (!include) { - *kind = T_EOF_SYMBOL; - start = positionInDocument; - } - } - } + CppCompletionAssistProcessor::startOfOperator(m_interface->textDocument(), + positionInDocument, + kind, + start, + m_interface->languageFeatures()); return start; } diff --git a/src/plugins/clangstaticanalyzer/clangstaticanalyzerruncontrol.cpp b/src/plugins/clangstaticanalyzer/clangstaticanalyzerruncontrol.cpp index e16c7a46c16..69ff061c833 100644 --- a/src/plugins/clangstaticanalyzer/clangstaticanalyzerruncontrol.cpp +++ b/src/plugins/clangstaticanalyzer/clangstaticanalyzerruncontrol.cpp @@ -80,6 +80,7 @@ ClangStaticAnalyzerRunControl::ClangStaticAnalyzerRunControl( BuildConfiguration *buildConfiguration = target->activeBuildConfiguration(); QTC_ASSERT(buildConfiguration, return); m_environment = buildConfiguration->environment(); + m_targetTriple = ToolChainKitInformation::toolChain(target->kit())->originalTargetTriple(); } static void prependWordWidthArgumentIfNotIncluded(QStringList *arguments, unsigned char wordWidth) @@ -96,11 +97,29 @@ static void prependWordWidthArgumentIfNotIncluded(QStringList *arguments, unsign QTC_CHECK(!arguments->contains(m32Argument) || !arguments->contains(m64Argument)); } +static void prependTargetTripleIfNotIncludedAndNotEmpty(QStringList *arguments, + const QString &targetTriple) +{ + QTC_ASSERT(arguments, return); + + if (targetTriple.isEmpty()) + return; + + const QString targetOption = QLatin1String("-target"); + + if (!arguments->contains(targetOption)) { + arguments->prepend(targetTriple); + arguments->prepend(targetOption); + } +} + // Removes (1) filePath (2) -o . -// Adds -m64/-m32 argument if not already included. +// Prepends -m64/-m32 argument if not already included. +// Prepends -target if not already included. static QStringList tweakedArguments(const QString &filePath, const QStringList &arguments, - unsigned char wordWidth) + unsigned char wordWidth, + const QString &targetTriple) { QStringList newArguments; @@ -121,6 +140,7 @@ static QStringList tweakedArguments(const QString &filePath, QTC_CHECK(skip == false); prependWordWidthArgumentIfNotIncluded(&newArguments, wordWidth); + prependTargetTripleIfNotIncludedAndNotEmpty(&newArguments, targetTriple); return newArguments; } @@ -147,7 +167,8 @@ class ClangStaticAnalyzerOptionsBuilder : public CompilerOptionsBuilder public: static QStringList build(const CppTools::ProjectPart &projectPart, CppTools::ProjectFile::Kind fileKind, - unsigned char wordWidth) + unsigned char wordWidth, + const QString &targetTriple) { ClangStaticAnalyzerOptionsBuilder optionsBuilder(projectPart); optionsBuilder.addLanguageOption(fileKind); @@ -172,6 +193,8 @@ public: QStringList options = optionsBuilder.options(); prependWordWidthArgumentIfNotIncluded(&options, wordWidth); + prependTargetTripleIfNotIncludedAndNotEmpty(&options, targetTriple); + return options; } @@ -217,7 +240,8 @@ private: static AnalyzeUnits unitsToAnalyzeFromCompilerCallData( const ProjectInfo::CompilerCallData &compilerCallData, - unsigned char wordWidth) + unsigned char wordWidth, + const QString &targetTriple) { qCDebug(LOG) << "Taking arguments for analyzing from CompilerCallData."; @@ -229,7 +253,7 @@ static AnalyzeUnits unitsToAnalyzeFromCompilerCallData( const QString file = it.key(); const QList compilerCalls = it.value(); foreach (const QStringList &options, compilerCalls) { - const QStringList arguments = tweakedArguments(file, options, wordWidth); + const QStringList arguments = tweakedArguments(file, options, wordWidth, targetTriple); unitsToAnalyze << AnalyzeUnit(file, arguments); } } @@ -238,7 +262,8 @@ static AnalyzeUnits unitsToAnalyzeFromCompilerCallData( } static AnalyzeUnits unitsToAnalyzeFromProjectParts(const QList projectParts, - unsigned char wordWidth) + unsigned char wordWidth, + const QString &targetTriple) { qCDebug(LOG) << "Taking arguments for analyzing from ProjectParts."; @@ -256,7 +281,8 @@ static AnalyzeUnits unitsToAnalyzeFromProjectParts(const QList const QStringList arguments = ClangStaticAnalyzerOptionsBuilder::build(*projectPart.data(), file.kind, - wordWidth); + wordWidth, + targetTriple); unitsToAnalyze << AnalyzeUnit(file.path, arguments); } } @@ -273,9 +299,12 @@ AnalyzeUnits ClangStaticAnalyzerRunControl::sortedUnitsToAnalyze() const ProjectInfo::CompilerCallData compilerCallData = m_projectInfo.compilerCallData(); if (compilerCallData.isEmpty()) { units = unitsToAnalyzeFromProjectParts(m_projectInfo.projectParts(), - m_wordWidth); + m_wordWidth, + m_targetTriple); } else { - units = unitsToAnalyzeFromCompilerCallData(compilerCallData, m_wordWidth); + units = unitsToAnalyzeFromCompilerCallData(compilerCallData, + m_wordWidth, + m_targetTriple); } Utils::sort(units, [](const AnalyzeUnit &a1, const AnalyzeUnit &a2) -> bool { diff --git a/src/plugins/clangstaticanalyzer/clangstaticanalyzerruncontrol.h b/src/plugins/clangstaticanalyzer/clangstaticanalyzerruncontrol.h index 0d286e17fe4..f1e5e34c02d 100644 --- a/src/plugins/clangstaticanalyzer/clangstaticanalyzerruncontrol.h +++ b/src/plugins/clangstaticanalyzer/clangstaticanalyzerruncontrol.h @@ -82,6 +82,7 @@ private: private: const CppTools::ProjectInfo m_projectInfo; const unsigned char m_wordWidth; + QString m_targetTriple; Utils::Environment m_environment; QString m_clangExecutable; diff --git a/src/plugins/cmakeprojectmanager/builddirmanager.cpp b/src/plugins/cmakeprojectmanager/builddirmanager.cpp index 181ca556a7c..37a0b4c9218 100644 --- a/src/plugins/cmakeprojectmanager/builddirmanager.cpp +++ b/src/plugins/cmakeprojectmanager/builddirmanager.cpp @@ -280,7 +280,9 @@ CMakeConfig BuildDirManager::parsedConfiguration() const CMakeConfig result = parseConfiguration(cacheFile, &errorMessage); if (!errorMessage.isEmpty()) emit errorOccured(errorMessage); - if (CMakeConfigItem::valueOf("CMAKE_HOME_DIRECTORY", result) != sourceDirectory().toString().toUtf8()) + const Utils::FileName sourceOfBuildDir + = Utils::FileName::fromUtf8(CMakeConfigItem::valueOf("CMAKE_HOME_DIRECTORY", result)); + if (sourceOfBuildDir != sourceDirectory()) // Use case-insensitive compare where appropriate emit errorOccured(tr("The build directory is not for %1").arg(sourceDirectory().toUserOutput())); return result; @@ -605,8 +607,10 @@ void BuildDirManager::maybeForceReparse() const QByteArray EXTRA_GENERATOR_KEY = "CMAKE_EXTRA_GENERATOR"; const QByteArray CMAKE_COMMAND_KEY = "CMAKE_COMMAND"; - if (!m_hasData) + if (!m_hasData) { + forceReparse(); return; + } const CMakeConfig currentConfig = parsedConfiguration(); diff --git a/src/plugins/cmakeprojectmanager/cmakebuildconfiguration.cpp b/src/plugins/cmakeprojectmanager/cmakebuildconfiguration.cpp index 36046f91004..93593392e96 100644 --- a/src/plugins/cmakeprojectmanager/cmakebuildconfiguration.cpp +++ b/src/plugins/cmakeprojectmanager/cmakebuildconfiguration.cpp @@ -63,33 +63,7 @@ const char CONFIGURATION_KEY[] = "CMake.Configuration"; CMakeBuildConfiguration::CMakeBuildConfiguration(ProjectExplorer::Target *parent) : BuildConfiguration(parent, Core::Id(Constants::CMAKE_BC_ID)) { - auto project = static_cast(parent->project()); - setBuildDirectory(shadowBuildDirectory(project->projectFilePath(), - parent->kit(), - displayName(), BuildConfiguration::Unknown)); - - m_buildDirManager = new BuildDirManager(this); - connect(m_buildDirManager, &BuildDirManager::dataAvailable, - this, &CMakeBuildConfiguration::dataAvailable); - connect(m_buildDirManager, &BuildDirManager::errorOccured, - this, &CMakeBuildConfiguration::setError); - connect(m_buildDirManager, &BuildDirManager::configurationStarted, - this, [this]() { m_completeConfigurationCache.clear(); emit parsingStarted(); }); - - connect(this, &CMakeBuildConfiguration::environmentChanged, - m_buildDirManager, &BuildDirManager::forceReparse); - connect(this, &CMakeBuildConfiguration::buildDirectoryChanged, - m_buildDirManager, &BuildDirManager::forceReparse); - connect(target(), &Target::kitChanged, this, [this]() { - ProjectExplorer::Kit *k = target()->kit(); - CMakeConfig config = cmakeConfiguration(); - config.append(CMakeConfigurationKitInformation::configuration(k)); // last value wins... - setCMakeConfiguration(config); - m_buildDirManager->maybeForceReparse(); - }); - - connect(this, &CMakeBuildConfiguration::parsingStarted, project, &CMakeProject::handleParsingStarted); - connect(this, &CMakeBuildConfiguration::dataAvailable, project, &CMakeProject::parseCMakeOutput); + ctor(); } CMakeBuildConfiguration::~CMakeBuildConfiguration() @@ -112,7 +86,7 @@ CMakeBuildConfiguration::CMakeBuildConfiguration(ProjectExplorer::Target *parent BuildConfiguration(parent, source), m_configuration(source->m_configuration) { - Q_ASSERT(parent); + ctor(); cloneSteps(source); } @@ -155,6 +129,39 @@ bool CMakeBuildConfiguration::fromMap(const QVariantMap &map) return true; } +void CMakeBuildConfiguration::ctor() +{ + auto project = static_cast(target()->project()); + setBuildDirectory(shadowBuildDirectory(project->projectFilePath(), + target()->kit(), + displayName(), BuildConfiguration::Unknown)); + + m_buildDirManager = new BuildDirManager(this); + connect(m_buildDirManager, &BuildDirManager::dataAvailable, + this, &CMakeBuildConfiguration::dataAvailable); + connect(m_buildDirManager, &BuildDirManager::errorOccured, + this, &CMakeBuildConfiguration::setError); + connect(m_buildDirManager, &BuildDirManager::configurationStarted, + this, [this]() { m_completeConfigurationCache.clear(); emit parsingStarted(); }); + + connect(this, &CMakeBuildConfiguration::environmentChanged, + m_buildDirManager, &BuildDirManager::forceReparse); + connect(this, &CMakeBuildConfiguration::buildDirectoryChanged, + m_buildDirManager, &BuildDirManager::forceReparse); + + connect(this, &CMakeBuildConfiguration::parsingStarted, project, &CMakeProject::handleParsingStarted); + connect(this, &CMakeBuildConfiguration::dataAvailable, project, &CMakeProject::parseCMakeOutput); +} + +void CMakeBuildConfiguration::maybeForceReparse() +{ + ProjectExplorer::Kit *k = target()->kit(); + CMakeConfig config = cmakeConfiguration(); + config.append(CMakeConfigurationKitInformation::configuration(k)); // last value wins... + setCMakeConfiguration(config); + m_buildDirManager->maybeForceReparse(); +} + BuildDirManager *CMakeBuildConfiguration::buildDirManager() const { return m_buildDirManager; @@ -165,11 +172,6 @@ bool CMakeBuildConfiguration::isParsing() const return m_buildDirManager && m_buildDirManager->isParsing(); } -void CMakeBuildConfiguration::parse() -{ - m_buildDirManager->parse(); -} - void CMakeBuildConfiguration::resetData() { m_buildDirManager->resetData(); @@ -197,7 +199,7 @@ FileName CMakeBuildConfiguration::shadowBuildDirectory(const FileName &projectFi QList CMakeBuildConfiguration::completeCMakeConfiguration() const { - if (m_buildDirManager->isParsing()) + if (!m_buildDirManager && m_buildDirManager->isParsing()) return QList(); if (m_completeConfigurationCache.isEmpty()) @@ -409,14 +411,14 @@ ProjectExplorer::BuildConfiguration *CMakeBuildConfigurationFactory::create(Proj auto cleanStep = new CMakeBuildStep(cleanSteps); cleanSteps->insertStep(0, cleanStep); - cleanStep->setBuildTarget(CMakeBuildStep::cleanTarget(), true); + cleanStep->setBuildTarget(CMakeBuildStep::cleanTarget()); bc->setBuildDirectory(copy.buildDirectory); bc->setCMakeConfiguration(copy.configuration); // Default to all - if (project->hasBuildTarget(QLatin1String("all"))) - buildStep->setBuildTarget(QLatin1String("all"), true); + if (project->hasBuildTarget(CMakeBuildStep::allTarget())) + buildStep->setBuildTarget(CMakeBuildStep::allTarget()); return bc; } diff --git a/src/plugins/cmakeprojectmanager/cmakebuildconfiguration.h b/src/plugins/cmakeprojectmanager/cmakebuildconfiguration.h index 1bd00c3b646..01a69102402 100644 --- a/src/plugins/cmakeprojectmanager/cmakebuildconfiguration.h +++ b/src/plugins/cmakeprojectmanager/cmakebuildconfiguration.h @@ -73,7 +73,7 @@ public: bool isParsing() const; - void parse(); + void maybeForceReparse(); void resetData(); bool persistCMakeState(); @@ -92,6 +92,7 @@ protected: bool fromMap(const QVariantMap &map) override; private: + void ctor(); QList completeCMakeConfiguration() const; void setCurrentCMakeConfiguration(const QList &items); diff --git a/src/plugins/cmakeprojectmanager/cmakebuildstep.cpp b/src/plugins/cmakeprojectmanager/cmakebuildstep.cpp index 6d32868a9f1..b4376d86eaf 100644 --- a/src/plugins/cmakeprojectmanager/cmakebuildstep.cpp +++ b/src/plugins/cmakeprojectmanager/cmakebuildstep.cpp @@ -82,9 +82,8 @@ CMakeBuildStep::CMakeBuildStep(BuildStepList *bsl, Core::Id id) : AbstractProces CMakeBuildStep::CMakeBuildStep(BuildStepList *bsl, CMakeBuildStep *bs) : AbstractProcessStep(bsl, bs), - m_buildTargets(bs->m_buildTargets), - m_toolArguments(bs->m_toolArguments), - m_addRunConfigurationArgument(bs->m_addRunConfigurationArgument) + m_buildTarget(bs->m_buildTarget), + m_toolArguments(bs->m_toolArguments) { ctor(bsl); } @@ -125,31 +124,34 @@ CMakeRunConfiguration *CMakeBuildStep::targetsActiveRunConfiguration() const void CMakeBuildStep::handleBuildTargetChanges() { - const QStringList filteredTargets - = Utils::filtered(static_cast(project())->buildTargetTitles(), - [this](const QString &s) { return m_buildTargets.contains(s); }); - setBuildTargets(filteredTargets); + if (static_cast(project())->buildTargetTitles().contains(m_buildTarget)) + setBuildTarget(m_buildTarget); + else + setBuildTarget(CMakeBuildStep::allTarget()); emit buildTargetsChanged(); } QVariantMap CMakeBuildStep::toMap() const { QVariantMap map(AbstractProcessStep::toMap()); - map.insert(QLatin1String(BUILD_TARGETS_KEY), m_buildTargets); + // Use QStringList for compatibility with old files + map.insert(QLatin1String(BUILD_TARGETS_KEY), QStringList(m_buildTarget)); map.insert(QLatin1String(TOOL_ARGUMENTS_KEY), m_toolArguments); - map.insert(QLatin1String(ADD_RUNCONFIGURATION_ARGUMENT_KEY), m_addRunConfigurationArgument); return map; } bool CMakeBuildStep::fromMap(const QVariantMap &map) { if (map.value(QLatin1String(CLEAN_KEY), false).toBool()) { - m_buildTargets = QStringList(CMakeBuildStep::cleanTarget()); + m_buildTarget = CMakeBuildStep::cleanTarget(); } else { - m_buildTargets = map.value(QLatin1String(BUILD_TARGETS_KEY)).toStringList(); + const QStringList targetList = map.value(QLatin1String(BUILD_TARGETS_KEY)).toStringList(); + if (!targetList.isEmpty()) + m_buildTarget = targetList.last(); m_toolArguments = map.value(QLatin1String(TOOL_ARGUMENTS_KEY)).toString(); } - m_addRunConfigurationArgument = map.value(QLatin1String(ADD_RUNCONFIGURATION_ARGUMENT_KEY), false).toBool(); + if (map.value(QLatin1String(ADD_RUNCONFIGURATION_ARGUMENT_KEY), false).toBool()) + m_buildTarget = QLatin1String(ADD_RUNCONFIGURATION_TEXT); return BuildStep::fromMap(map); } @@ -178,7 +180,7 @@ bool CMakeBuildStep::init(QList &earlierSteps) } CMakeRunConfiguration *rc = targetsActiveRunConfiguration(); - if (m_addRunConfigurationArgument && (!rc || rc->title().isEmpty())) { + if ((m_buildTarget == QLatin1String(ADD_RUNCONFIGURATION_TEXT)) && (!rc || rc->title().isEmpty())) { emit addTask(Task(Task::Error, QCoreApplication::translate("ProjectExplorer::Task", "You asked to build the current Run Configuration's build target only, " @@ -196,7 +198,7 @@ bool CMakeBuildStep::init(QList &earlierSteps) QString arguments = allArguments(rc); - setIgnoreReturnValue(m_buildTargets.contains(CMakeBuildStep::cleanTarget())); + setIgnoreReturnValue(m_buildTarget == CMakeBuildStep::cleanTarget()); ProcessParameters *pp = processParameters(); pp->setMacroExpander(bc->macroExpander()); @@ -292,44 +294,27 @@ void CMakeBuildStep::stdOutput(const QString &line) AbstractProcessStep::stdOutput(line); } -QStringList CMakeBuildStep::buildTargets() const +QString CMakeBuildStep::buildTarget() const { - return m_buildTargets; + return m_buildTarget; } bool CMakeBuildStep::buildsBuildTarget(const QString &target) const { - if (target == tr(ADD_RUNCONFIGURATION_TEXT)) - return addRunConfigurationArgument(); - else - return m_buildTargets.contains(target); + return target == m_buildTarget; } -void CMakeBuildStep::setBuildTarget(const QString &buildTarget, bool on) +void CMakeBuildStep::setBuildTarget(const QString &buildTarget) { - if (buildTarget == tr(ADD_RUNCONFIGURATION_TEXT)) { - setAddRunConfigurationArgument(on); - } else { - QStringList old = m_buildTargets; - if (on && !old.contains(buildTarget)) - old << buildTarget; - else if (!on && old.contains(buildTarget)) - old.removeOne(buildTarget); - setBuildTargets(old); - } -} - -void CMakeBuildStep::setBuildTargets(const QStringList &targets) -{ - if (targets != m_buildTargets) { - m_buildTargets = targets; - emit targetsToBuildChanged(); - } + if (m_buildTarget == buildTarget) + return; + m_buildTarget = buildTarget; + emit targetToBuildChanged(); } void CMakeBuildStep::clearBuildTargets() { - m_buildTargets.clear(); + m_buildTarget.clear(); } QString CMakeBuildStep::toolArguments() const @@ -349,18 +334,20 @@ QString CMakeBuildStep::allArguments(const CMakeRunConfiguration *rc) const Utils::QtcProcess::addArg(&arguments, QLatin1String("--build")); Utils::QtcProcess::addArg(&arguments, QLatin1String(".")); - if (m_addRunConfigurationArgument) { - Utils::QtcProcess::addArg(&arguments, QLatin1String("--target")); + QString target; + + if (m_buildTarget == QLatin1String(ADD_RUNCONFIGURATION_TEXT)) { if (rc) - Utils::QtcProcess::addArg(&arguments, rc->title()); + target = rc->title(); else - Utils::QtcProcess::addArg(&arguments, QLatin1String("<") + tr(ADD_RUNCONFIGURATION_TEXT) + QLatin1String(">")); - } - foreach (const QString &t, m_buildTargets) { - Utils::QtcProcess::addArg(&arguments, QLatin1String("--target")); - Utils::QtcProcess::addArg(&arguments, t); + target = QLatin1String("<") + tr(ADD_RUNCONFIGURATION_TEXT) + QLatin1String(">"); + } else { + target = m_buildTarget; } + Utils::QtcProcess::addArg(&arguments, QLatin1String("--target")); + Utils::QtcProcess::addArg(&arguments, target); + if (!m_toolArguments.isEmpty()) { Utils::QtcProcess::addArg(&arguments, QLatin1String("--")); arguments += QLatin1Char(' ') + m_toolArguments; @@ -369,16 +356,6 @@ QString CMakeBuildStep::allArguments(const CMakeRunConfiguration *rc) const return arguments; } -bool CMakeBuildStep::addRunConfigurationArgument() const -{ - return m_addRunConfigurationArgument; -} - -void CMakeBuildStep::setAddRunConfigurationArgument(bool add) -{ - m_addRunConfigurationArgument = add; -} - QString CMakeBuildStep::cmakeCommand() const { CMakeTool *tool = CMakeKitInformation::cmakeTool(target()->kit()); @@ -390,6 +367,11 @@ QString CMakeBuildStep::cleanTarget() return QLatin1String("clean"); } +QString CMakeBuildStep::allTarget() +{ + return QLatin1String("all"); +} + // // CMakeBuildStepConfigWidget // @@ -407,7 +389,6 @@ CMakeBuildStepConfigWidget::CMakeBuildStepConfigWidget(CMakeBuildStep *buildStep fl->addRow(tr("Tool arguments:"), m_toolArguments); m_toolArguments->setText(m_buildStep->toolArguments()); - m_buildTargetsList->setFrameStyle(QFrame::NoFrame); m_buildTargetsList->setMinimumHeight(200); @@ -420,22 +401,7 @@ CMakeBuildStepConfigWidget::CMakeBuildStepConfigWidget(CMakeBuildStep *buildStep fl->addRow(tr("Targets:"), frame); - auto itemAddRunConfigurationArgument = new QListWidgetItem(tr(ADD_RUNCONFIGURATION_TEXT), m_buildTargetsList); - itemAddRunConfigurationArgument->setFlags(itemAddRunConfigurationArgument->flags() | Qt::ItemIsUserCheckable); - itemAddRunConfigurationArgument->setCheckState(m_buildStep->addRunConfigurationArgument() ? Qt::Checked : Qt::Unchecked); - QFont f; - f.setItalic(true); - itemAddRunConfigurationArgument->setFont(f); - - CMakeProject *pro = static_cast(m_buildStep->project()); - QStringList targetList = pro->buildTargetTitles(); - targetList.sort(); - foreach (const QString &buildTarget, targetList) { - auto item = new QListWidgetItem(buildTarget, m_buildTargetsList); - item->setFlags(item->flags() | Qt::ItemIsUserCheckable); - item->setCheckState(m_buildStep->buildsBuildTarget(item->text()) ? Qt::Checked : Qt::Unchecked); - } - + buildTargetsChanged(); updateDetails(); connect(m_toolArguments, &QLineEdit::textEdited, this, &CMakeBuildStepConfigWidget::toolArgumentsEdited); @@ -444,8 +410,9 @@ CMakeBuildStepConfigWidget::CMakeBuildStepConfigWidget(CMakeBuildStep *buildStep this, &CMakeBuildStepConfigWidget::updateDetails); connect(m_buildStep, &CMakeBuildStep::buildTargetsChanged, this, &CMakeBuildStepConfigWidget::buildTargetsChanged); - connect(m_buildStep, &CMakeBuildStep::targetsToBuildChanged, this, &CMakeBuildStepConfigWidget::selectedBuildTargetsChanged); - connect(pro, &CMakeProject::environmentChanged, this, &CMakeBuildStepConfigWidget::updateDetails); + connect(m_buildStep, &CMakeBuildStep::targetToBuildChanged, this, &CMakeBuildStepConfigWidget::selectedBuildTargetsChanged); + connect(static_cast(m_buildStep->project()), &CMakeProject::environmentChanged, + this, &CMakeBuildStepConfigWidget::updateDetails); } void CMakeBuildStepConfigWidget::toolArgumentsEdited() @@ -456,7 +423,9 @@ void CMakeBuildStepConfigWidget::toolArgumentsEdited() void CMakeBuildStepConfigWidget::itemChanged(QListWidgetItem *item) { - m_buildStep->setBuildTarget(item->text(), item->checkState() & Qt::Checked); + const QString target = + (item->checkState() == Qt::Checked) ? item->data(Qt::UserRole).toString() : CMakeBuildStep::allTarget(); + m_buildStep->setBuildTarget(target); updateDetails(); } @@ -467,30 +436,44 @@ QString CMakeBuildStepConfigWidget::displayName() const void CMakeBuildStepConfigWidget::buildTargetsChanged() { - disconnect(m_buildTargetsList, &QListWidget::itemChanged, this, &CMakeBuildStepConfigWidget::itemChanged); - - auto *addRunConfigurationArgumentItem = m_buildTargetsList->takeItem(0); + const bool wasBlocked = m_buildTargetsList->blockSignals(true); m_buildTargetsList->clear(); - m_buildTargetsList->insertItem(0, addRunConfigurationArgumentItem); - CMakeProject *pro = static_cast(m_buildStep->target()->project()); - foreach (const QString& buildTarget, pro->buildTargetTitles()) { + auto item = new QListWidgetItem(tr(ADD_RUNCONFIGURATION_TEXT), m_buildTargetsList); + + item->setData(Qt::UserRole, QString::fromLatin1(ADD_RUNCONFIGURATION_TEXT)); + QFont f; + f.setItalic(true); + item->setFont(f); + + CMakeProject *pro = static_cast(m_buildStep->project()); + QStringList targetList = pro->buildTargetTitles(); + targetList.sort(); + + foreach (const QString &buildTarget, targetList) { auto item = new QListWidgetItem(buildTarget, m_buildTargetsList); - item->setFlags(item->flags() | Qt::ItemIsUserCheckable); - item->setCheckState(m_buildStep->buildsBuildTarget(item->text()) ? Qt::Checked : Qt::Unchecked); + item->setData(Qt::UserRole, buildTarget); } - connect(m_buildTargetsList, &QListWidget::itemChanged, this, &CMakeBuildStepConfigWidget::itemChanged); + + for (int i = 0; i < m_buildTargetsList->count(); ++i) { + QListWidgetItem *item = m_buildTargetsList->item(i); + item->setFlags(item->flags() | Qt::ItemIsUserCheckable); + item->setCheckState(m_buildStep->buildsBuildTarget(item->data(Qt::UserRole).toString()) + ? Qt::Checked : Qt::Unchecked); + } + m_buildTargetsList->blockSignals(wasBlocked); updateSummary(); } void CMakeBuildStepConfigWidget::selectedBuildTargetsChanged() { - disconnect(m_buildTargetsList, &QListWidget::itemChanged, this, &CMakeBuildStepConfigWidget::itemChanged); + const bool wasBlocked = m_buildTargetsList->blockSignals(true); for (int y = 0; y < m_buildTargetsList->count(); ++y) { QListWidgetItem *item = m_buildTargetsList->item(y); - item->setCheckState(m_buildStep->buildsBuildTarget(item->text()) ? Qt::Checked : Qt::Unchecked); + item->setCheckState(m_buildStep->buildsBuildTarget(item->data(Qt::UserRole).toString()) + ? Qt::Checked : Qt::Unchecked); } - connect(m_buildTargetsList, &QListWidget::itemChanged, this, &CMakeBuildStepConfigWidget::itemChanged); + m_buildTargetsList->blockSignals(wasBlocked); updateSummary(); } @@ -541,7 +524,7 @@ BuildStep *CMakeBuildStepFactory::create(BuildStepList *parent, Core::Id id) return 0; auto step = new CMakeBuildStep(parent); if (parent->id() == ProjectExplorer::Constants::BUILDSTEPS_CLEAN) - step->setBuildTarget(CMakeBuildStep::cleanTarget(), true); + step->setBuildTarget(CMakeBuildStep::cleanTarget()); return step; } diff --git a/src/plugins/cmakeprojectmanager/cmakebuildstep.h b/src/plugins/cmakeprojectmanager/cmakebuildstep.h index 7f4260551b8..8249e1f1f25 100644 --- a/src/plugins/cmakeprojectmanager/cmakebuildstep.h +++ b/src/plugins/cmakeprojectmanager/cmakebuildstep.h @@ -61,10 +61,9 @@ public: ProjectExplorer::BuildStepConfigWidget *createConfigWidget() override; bool immutable() const override; - QStringList buildTargets() const; + QString buildTarget() const; bool buildsBuildTarget(const QString &target) const; - void setBuildTarget(const QString &target, bool on); - void setBuildTargets(const QStringList &targets); + void setBuildTarget(const QString &target); void clearBuildTargets(); QString toolArguments() const; @@ -72,18 +71,16 @@ public: QString allArguments(const CMakeRunConfiguration *rc) const; - bool addRunConfigurationArgument() const; - void setAddRunConfigurationArgument(bool add); - QString cmakeCommand() const; QVariantMap toMap() const override; static QString cleanTarget(); + static QString allTarget(); signals: void cmakeCommandChanged(); - void targetsToBuildChanged(); + void targetToBuildChanged(); void buildTargetsChanged(); protected: @@ -112,9 +109,8 @@ private: QRegExp m_percentProgress; QRegExp m_ninjaProgress; QString m_ninjaProgressString; - QStringList m_buildTargets; + QString m_buildTarget; QString m_toolArguments; - bool m_addRunConfigurationArgument = false; bool m_useNinja = false; }; diff --git a/src/plugins/cmakeprojectmanager/cmakelocatorfilter.cpp b/src/plugins/cmakeprojectmanager/cmakelocatorfilter.cpp index 36b4ca661e7..341330c88ba 100644 --- a/src/plugins/cmakeprojectmanager/cmakelocatorfilter.cpp +++ b/src/plugins/cmakeprojectmanager/cmakelocatorfilter.cpp @@ -111,13 +111,13 @@ void CMakeLocatorFilter::accept(Core::LocatorFilterEntry selection) const return; // Change the make step to build only the given target - QStringList oldTargets = buildStep->buildTargets(); + QString oldTarget = buildStep->buildTarget(); buildStep->clearBuildTargets(); - buildStep->setBuildTarget(selection.displayName, true); + buildStep->setBuildTarget(selection.displayName); // Build ProjectExplorerPlugin::buildProject(cmakeProject); - buildStep->setBuildTargets(oldTargets); + buildStep->setBuildTarget(oldTarget); } void CMakeLocatorFilter::refresh(QFutureInterface &future) diff --git a/src/plugins/cmakeprojectmanager/cmakeproject.cpp b/src/plugins/cmakeprojectmanager/cmakeproject.cpp index 1bb32c84c02..4ee11e60743 100644 --- a/src/plugins/cmakeprojectmanager/cmakeproject.cpp +++ b/src/plugins/cmakeprojectmanager/cmakeproject.cpp @@ -92,6 +92,8 @@ CMakeProject::CMakeProject(CMakeManager *manager, const FileName &fileName) setProjectLanguages(Core::Context(ProjectExplorer::Constants::LANG_CXX)); rootProjectNode()->setDisplayName(fileName.parentDir().fileName()); + + connect(this, &CMakeProject::activeTargetChanged, this, &CMakeProject::handleActiveTargetChanged); } CMakeProject::~CMakeProject() @@ -439,10 +441,6 @@ Project::RestoreResult CMakeProject::fromMap(const QVariantMap &map, QString *er RestoreResult result = Project::fromMap(map, errorMessage); if (result != RestoreResult::Ok) return result; - - handleActiveTargetChanged(); - handleActiveBuildConfigurationChanged(); - return RestoreResult::Ok; } @@ -461,7 +459,8 @@ void CMakeProject::handleActiveTargetChanged() if (m_connectedTarget) { disconnect(m_connectedTarget, &Target::activeBuildConfigurationChanged, this, &CMakeProject::handleActiveBuildConfigurationChanged); - + disconnect(m_connectedTarget, &Target::kitChanged, + this, &CMakeProject::handleActiveBuildConfigurationChanged); } m_connectedTarget = activeTarget(); @@ -469,7 +468,11 @@ void CMakeProject::handleActiveTargetChanged() if (m_connectedTarget) { connect(m_connectedTarget, &Target::activeBuildConfigurationChanged, this, &CMakeProject::handleActiveBuildConfigurationChanged); + connect(m_connectedTarget, &Target::kitChanged, + this, &CMakeProject::handleActiveBuildConfigurationChanged); } + + handleActiveBuildConfigurationChanged(); } void CMakeProject::handleActiveBuildConfigurationChanged() @@ -483,7 +486,7 @@ void CMakeProject::handleActiveBuildConfigurationChanged() auto i = qobject_cast(bc); QTC_ASSERT(i, continue); if (i == activeBc) - i->parse(); + i->maybeForceReparse(); else i->resetData(); } diff --git a/src/plugins/coreplugin/core.qrc b/src/plugins/coreplugin/core.qrc index 46e55fb73bc..291038d870f 100644 --- a/src/plugins/coreplugin/core.qrc +++ b/src/plugins/coreplugin/core.qrc @@ -101,16 +101,6 @@ images/dark_fileicon.png images/dark_foldericon.png images/Desktop.png - images/run_overlay_small.png - images/run_overlay_small@2x.png - images/stop_overlay_small.png - images/stop_overlay_small@2x.png - images/debugger_overlay_small.png - images/debugger_overlay_small@2x.png - images/interrupt_overlay_small.png - images/interrupt_overlay_small@2x.png - images/continue_overlay_small.png - images/continue_overlay_small@2x.png images/zoom.png images/zoom@2x.png diff --git a/src/plugins/coreplugin/coreicons.cpp b/src/plugins/coreplugin/coreicons.cpp index 4432a3c7040..3b1d2793344 100644 --- a/src/plugins/coreplugin/coreicons.cpp +++ b/src/plugins/coreplugin/coreicons.cpp @@ -132,18 +132,6 @@ const Icon INFO_TOOLBAR({ {QLatin1String(":/core/images/info.png"), Theme::IconsInfoToolBarColor}}); const Icon EXPAND({ {QLatin1String(":/find/images/expand.png"), Theme::IconsBaseColor}}); -const Icon DEBUG_START_SMALL({ - {QLatin1String(":/core/images/debugger_overlay_small.png"), Theme::IconsDebugColor}, - {QLatin1String(":/core/images/run_overlay_small.png"), Theme::IconsRunColor}}); -const Icon DEBUG_EXIT_SMALL({ - {QLatin1String(":/core/images/debugger_overlay_small.png"), Theme::IconsDebugColor}, - {QLatin1String(":/core/images/stop_overlay_small.png"), Theme::IconsStopColor}}); -const Icon DEBUG_INTERRUPT_SMALL({ - {QLatin1String(":/core/images/debugger_overlay_small.png"), Theme::IconsDebugColor}, - {QLatin1String(":/core/images/interrupt_overlay_small.png"), Theme::IconsInterruptColor}}); -const Icon DEBUG_CONTINUE_SMALL({ - {QLatin1String(":/core/images/debugger_overlay_small.png"), Theme::IconsDebugColor}, - {QLatin1String(":/core/images/continue_overlay_small.png"), Theme::IconsRunColor}}); const Icon ZOOM({ {QLatin1String(":/core/images/zoom.png"), Theme::IconsBaseColor}}); const Icon TOOLBAR_EXTENSION({ diff --git a/src/plugins/coreplugin/coreicons.h b/src/plugins/coreplugin/coreicons.h index b429060546a..25f16636645 100644 --- a/src/plugins/coreplugin/coreicons.h +++ b/src/plugins/coreplugin/coreicons.h @@ -82,10 +82,6 @@ CORE_EXPORT extern const Utils::Icon ERROR_TASKBAR; CORE_EXPORT extern const Utils::Icon INFO; CORE_EXPORT extern const Utils::Icon INFO_TOOLBAR; CORE_EXPORT extern const Utils::Icon EXPAND; -CORE_EXPORT extern const Utils::Icon DEBUG_START_SMALL; -CORE_EXPORT extern const Utils::Icon DEBUG_EXIT_SMALL; -CORE_EXPORT extern const Utils::Icon DEBUG_INTERRUPT_SMALL; -CORE_EXPORT extern const Utils::Icon DEBUG_CONTINUE_SMALL; CORE_EXPORT extern const Utils::Icon ZOOM; CORE_EXPORT extern const Utils::Icon TOOLBAR_EXTENSION; diff --git a/src/plugins/coreplugin/manhattanstyle.cpp b/src/plugins/coreplugin/manhattanstyle.cpp index 735eb9e83e3..e25346785db 100644 --- a/src/plugins/coreplugin/manhattanstyle.cpp +++ b/src/plugins/coreplugin/manhattanstyle.cpp @@ -666,11 +666,15 @@ void ManhattanStyle::drawControl(ControlElement element, const QStyleOption *opt if (act) { // Fill| - QColor baseColor = StyleHelper::baseColor(); - QLinearGradient grad(option->rect.topLeft(), option->rect.bottomLeft()); - grad.setColorAt(0, baseColor.lighter(120)); - grad.setColorAt(1, baseColor.lighter(130)); - painter->fillRect(option->rect, grad); + if (creatorTheme()->flag(Theme::FlatMenuBar)) { + painter->fillRect(option->rect, creatorTheme()->color(Theme::FancyToolButtonHoverColor)); + } else { + QColor baseColor = StyleHelper::baseColor(); + QLinearGradient grad(option->rect.topLeft(), option->rect.bottomLeft()); + grad.setColorAt(0, baseColor.lighter(120)); + grad.setColorAt(1, baseColor.lighter(130)); + painter->fillRect(option->rect, grad); + } QPalette pal = mbi->palette; uint alignment = Qt::AlignCenter | Qt::TextShowMnemonic | Qt::TextDontClip | Qt::TextSingleLine; @@ -732,7 +736,7 @@ void ManhattanStyle::drawControl(ControlElement element, const QStyleOption *opt if (creatorTheme()->flag(Theme::ComboBoxDrawTextShadow) && (option->state & State_Enabled)) { - painter->setPen(QColor(0, 0, 0, 70)); + painter->setPen(StyleHelper::toolBarDropShadowColor()); painter->drawText(editRect.adjusted(1, 0, -1, 0), Qt::AlignLeft | Qt::AlignVCenter, text); } if (!(option->state & State_Enabled)) diff --git a/src/plugins/coreplugin/variablechooser.cpp b/src/plugins/coreplugin/variablechooser.cpp index a420301303f..bf58630a613 100644 --- a/src/plugins/coreplugin/variablechooser.cpp +++ b/src/plugins/coreplugin/variablechooser.cpp @@ -240,14 +240,17 @@ VariableChooserPrivate::VariableChooserPrivate(VariableChooser *parent) : q(parent), m_lineEdit(0), m_textEdit(0), - m_plainTextEdit(0) + m_plainTextEdit(0), + m_iconButton(0), + m_variableTree(0), + m_variableDescription(0) { m_defaultDescription = VariableChooser::tr("Select a variable to insert."); m_variableTree = new VariableTreeView(q, this); - m_variableTree->setModel(&m_model); - m_variableDescription = new QLabel(q); + + m_variableTree->setModel(&m_model); m_variableDescription->setText(m_defaultDescription); m_variableDescription->setMinimumSize(QSize(0, 60)); m_variableDescription->setAlignment(Qt::AlignLeft|Qt::AlignTop); @@ -403,7 +406,8 @@ void VariableChooser::addSupportForChildWidgets(QWidget *parent, MacroExpander * */ void VariableChooserPrivate::updateDescription(const QModelIndex &index) { - m_variableDescription->setText(m_model.data(index, Qt::ToolTipRole).toString()); + if (m_variableDescription) + m_variableDescription->setText(m_model.data(index, Qt::ToolTipRole).toString()); } /*! diff --git a/src/plugins/cppeditor/cppincludehierarchy_test.cpp b/src/plugins/cppeditor/cppincludehierarchy_test.cpp index ffef3a8b35e..8bb29f4123e 100644 --- a/src/plugins/cppeditor/cppincludehierarchy_test.cpp +++ b/src/plugins/cppeditor/cppincludehierarchy_test.cpp @@ -35,8 +35,6 @@ #include #include -Q_DECLARE_METATYPE(QList) - using namespace CPlusPlus; using namespace CppTools; diff --git a/src/plugins/cppeditor/cppquickfix_test.cpp b/src/plugins/cppeditor/cppquickfix_test.cpp index b592d9f9da8..ddd2b5097d4 100644 --- a/src/plugins/cppeditor/cppquickfix_test.cpp +++ b/src/plugins/cppeditor/cppquickfix_test.cpp @@ -315,8 +315,6 @@ typedef QSharedPointer CppQuickFixFactoryPtr; } // namespace CppEditor -Q_DECLARE_METATYPE(CppEditor::CppQuickFixFactoryPtr) - namespace CppEditor { namespace Internal { diff --git a/src/plugins/cppeditor/followsymbol_switchmethoddecldef_test.cpp b/src/plugins/cppeditor/followsymbol_switchmethoddecldef_test.cpp index c5bbf1f4499..b2e1c982949 100644 --- a/src/plugins/cppeditor/followsymbol_switchmethoddecldef_test.cpp +++ b/src/plugins/cppeditor/followsymbol_switchmethoddecldef_test.cpp @@ -89,7 +89,6 @@ public: }; typedef QList OverrideItemList; Q_DECLARE_METATYPE(OverrideItem) -Q_DECLARE_METATYPE(OverrideItemList) inline bool operator==(const OverrideItem &lhs, const OverrideItem &rhs) { diff --git a/src/plugins/cpptools/cppcompletion_test.cpp b/src/plugins/cpptools/cppcompletion_test.cpp index ad12c5b621d..27cb35739ea 100644 --- a/src/plugins/cpptools/cppcompletion_test.cpp +++ b/src/plugins/cpptools/cppcompletion_test.cpp @@ -24,6 +24,7 @@ ****************************************************************************/ #include "cppcompletionassist.h" +#include "cppdoxygen.h" #include "cppmodelmanager.h" #include "cpptoolsplugin.h" #include "cpptoolstestcase.h" @@ -110,6 +111,8 @@ public: ExplicitlyInvoked, m_snapshot, ProjectPartHeaderPaths(), languageFeatures); + ai->prepareForAsyncUse(); + ai->recreateTextDocument(); InternalCppCompletionAssistProcessor processor; const Tests::IAssistProposalScopedPointer proposal(processor.perform(ai)); @@ -171,6 +174,17 @@ bool isProbablyGlobalCompletion(const QStringList &list) && list.contains(QLatin1String("bool")); } +bool isDoxygenTagCompletion(const QStringList &list) +{ + for (int i = 1; i < T_DOXY_LAST_TAG; ++i) { + const QString doxygenTag = QString::fromLatin1(doxygenTagSpell(i)); + if (!list.contains(doxygenTag)) + return false; + } + + return true; +} + } // anonymous namespace void CppToolsPlugin::test_completion_basic_1() @@ -384,6 +398,34 @@ void CppToolsPlugin::test_global_completion() QVERIFY(completions.toSet().contains(requiredCompletionItems.toSet())); } +void CppToolsPlugin::test_doxygen_tag_completion_data() +{ + QTest::addColumn("code"); + + QTest::newRow("C++ comment") + << _("/// @"); + + QTest::newRow("C comment single line") + << _("/*! @ */"); + + QTest::newRow("C comment multi line") + << _("/*! text\n" + " * @\n" + " */\n"); +} + +void CppToolsPlugin::test_doxygen_tag_completion() +{ + QFETCH(QByteArray, code); + + const QByteArray prefix = "\\"; + + CompletionTestCase test(code, prefix); + QVERIFY(test.succeededSoFar()); + const QStringList completions = test.getCompletions(); + QVERIFY(isDoxygenTagCompletion(completions)); +} + static void enumTestCase(const QByteArray &tag, const QByteArray &source, const QByteArray &prefix = QByteArray()) { diff --git a/src/plugins/cpptools/cppcompletionassist.cpp b/src/plugins/cpptools/cppcompletionassist.cpp index b5b986eed79..c801fd71003 100644 --- a/src/plugins/cpptools/cppcompletionassist.cpp +++ b/src/plugins/cpptools/cppcompletionassist.cpp @@ -941,118 +941,35 @@ IAssistProposal *InternalCppCompletionAssistProcessor::createHintProposal( return proposal; } -int InternalCppCompletionAssistProcessor::startOfOperator(int pos, +int InternalCppCompletionAssistProcessor::startOfOperator(int positionInDocument, unsigned *kind, bool wantFunctionCall) const { - const QChar ch = pos > -1 ? m_interface->characterAt(pos - 1) : QChar(); - const QChar ch2 = pos > 0 ? m_interface->characterAt(pos - 2) : QChar(); - const QChar ch3 = pos > 1 ? m_interface->characterAt(pos - 3) : QChar(); + const QChar ch = m_interface->characterAt(positionInDocument - 1); + const QChar ch2 = m_interface->characterAt(positionInDocument - 2); + const QChar ch3 = m_interface->characterAt(positionInDocument - 3); - int start = pos - CppCompletionAssistProvider::activationSequenceChar(ch, ch2, ch3, kind, - wantFunctionCall, /*wantQt5SignalSlots*/ true); - if (start != pos) { - QTextCursor tc(m_interface->textDocument()); - tc.setPosition(pos); + int start = positionInDocument + - CppCompletionAssistProvider::activationSequenceChar(ch, ch2, ch3, kind, + wantFunctionCall, + /*wantQt5SignalSlots*/ true); - // Include completion: make sure the quote character is the first one on the line - if (*kind == T_STRING_LITERAL) { - QTextCursor s = tc; - s.movePosition(QTextCursor::StartOfLine, QTextCursor::KeepAnchor); - QString sel = s.selectedText(); - if (sel.indexOf(QLatin1Char('"')) < sel.length() - 1) { - *kind = T_EOF_SYMBOL; - start = pos; - } - } - - if (*kind == T_COMMA) { - ExpressionUnderCursor expressionUnderCursor(m_interface->languageFeatures()); - if (expressionUnderCursor.startOfFunctionCall(tc) == -1) { - *kind = T_EOF_SYMBOL; - start = pos; - } - } - - SimpleLexer tokenize; - tokenize.setLanguageFeatures(m_interface->languageFeatures()); - tokenize.setSkipComments(false); - const Tokens &tokens = tokenize(tc.block().text(), BackwardsScanner::previousBlockState(tc.block())); - const int tokenIdx = SimpleLexer::tokenBefore(tokens, qMax(0, tc.positionInBlock() - 1)); // get the token at the left of the cursor - const Token tk = (tokenIdx == -1) ? Token() : tokens.at(tokenIdx); - - if (*kind == T_AMPER && tokenIdx > 0) { - const Token &previousToken = tokens.at(tokenIdx - 1); - if (previousToken.kind() == T_COMMA) - start = pos - (tk.utf16charOffset - previousToken.utf16charOffset) - 1; - } else if (*kind == T_DOXY_COMMENT && !(tk.is(T_DOXY_COMMENT) || tk.is(T_CPP_DOXY_COMMENT))) { - *kind = T_EOF_SYMBOL; - start = pos; - } - // Don't complete in comments or strings, but still check for include completion - else if (tk.is(T_COMMENT) || tk.is(T_CPP_COMMENT) - || tk.is(T_CPP_DOXY_COMMENT) || tk.is(T_DOXY_COMMENT) - || (tk.isLiteral() && (*kind != T_STRING_LITERAL - && *kind != T_ANGLE_STRING_LITERAL - && *kind != T_SLASH - && *kind != T_DOT))) { - *kind = T_EOF_SYMBOL; - start = pos; - // Include completion: can be triggered by slash, but only in a string - } else if (*kind == T_SLASH && (tk.isNot(T_STRING_LITERAL) && tk.isNot(T_ANGLE_STRING_LITERAL))) { - *kind = T_EOF_SYMBOL; - start = pos; - } else if (*kind == T_LPAREN) { - if (tokenIdx > 0) { - const Token &previousToken = tokens.at(tokenIdx - 1); // look at the token at the left of T_LPAREN - switch (previousToken.kind()) { - case T_IDENTIFIER: - case T_GREATER: - case T_SIGNAL: - case T_SLOT: - break; // good - - default: - // that's a bad token :) - *kind = T_EOF_SYMBOL; - start = pos; - } - } - } - // Check for include preprocessor directive - else if (*kind == T_STRING_LITERAL || *kind == T_ANGLE_STRING_LITERAL|| *kind == T_SLASH - || (*kind == T_DOT && (tk.is(T_STRING_LITERAL) || tk.is(T_ANGLE_STRING_LITERAL)))) { - bool include = false; - if (tokens.size() >= 3) { - if (tokens.at(0).is(T_POUND) && tokens.at(1).is(T_IDENTIFIER) && (tokens.at(2).is(T_STRING_LITERAL) || - tokens.at(2).is(T_ANGLE_STRING_LITERAL))) { - const Token &directiveToken = tokens.at(1); - QString directive = tc.block().text().mid(directiveToken.utf16charsBegin(), - directiveToken.utf16chars()); - if (directive == QLatin1String("include") || - directive == QLatin1String("include_next") || - directive == QLatin1String("import")) { - include = true; - } - } - } - - if (!include) { - *kind = T_EOF_SYMBOL; - start = pos; - } else { - if (*kind == T_DOT) { - start = findStartOfName(start); - const QChar ch4 = start > -1 ? m_interface->characterAt(start - 1) : QChar(); - const QChar ch5 = start > 0 ? m_interface->characterAt(start - 2) : QChar(); - const QChar ch6 = start > 1 ? m_interface->characterAt(start - 3) : QChar(); - start = start - CppCompletionAssistProvider::activationSequenceChar( - ch4, ch5, ch6, kind, wantFunctionCall, false); - } - } - } - } + const auto dotAtIncludeCompletionHandler = [this](int &start, unsigned *kind) { + start = findStartOfName(start); + const QChar ch4 = m_interface->characterAt(start - 1); + const QChar ch5 = m_interface->characterAt(start - 2); + const QChar ch6 = m_interface->characterAt(start - 3); + start = start - CppCompletionAssistProvider::activationSequenceChar( + ch4, ch5, ch6, kind, false, false); + }; + CppCompletionAssistProcessor::startOfOperator(m_interface->textDocument(), + positionInDocument, + kind, + start, + m_interface->languageFeatures(), + /*adjustForQt5SignalSlotCompletion=*/ true, + dotAtIncludeCompletionHandler); return start; } diff --git a/src/plugins/cpptools/cppcompletionassist.h b/src/plugins/cpptools/cppcompletionassist.h index 14a9e9190cb..809a5a1005c 100644 --- a/src/plugins/cpptools/cppcompletionassist.h +++ b/src/plugins/cpptools/cppcompletionassist.h @@ -105,7 +105,7 @@ private: TextEditor::IAssistProposal *createHintProposal(QList symbols) const; bool accepts() const; - int startOfOperator(int pos, unsigned *kind, bool wantFunctionCall) const; + int startOfOperator(int positionInDocument, unsigned *kind, bool wantFunctionCall) const; int findStartOfName(int pos = -1) const; int startCompletionHelper(); bool tryObjCCompletion(); diff --git a/src/plugins/cpptools/cppcompletionassistprocessor.cpp b/src/plugins/cpptools/cppcompletionassistprocessor.cpp index bcc7e9507df..5dd52285388 100644 --- a/src/plugins/cpptools/cppcompletionassistprocessor.cpp +++ b/src/plugins/cpptools/cppcompletionassistprocessor.cpp @@ -27,6 +27,17 @@ #include +#include +#include +#include +#include + +#include +#include +#include + +using namespace CPlusPlus; + namespace CppTools { CppCompletionAssistProcessor::CppCompletionAssistProcessor() @@ -70,4 +81,118 @@ void CppCompletionAssistProcessor::addSnippets() m_completions.append(m_snippetCollector.collect()); } +static bool isDoxygenTagCompletionCharacter(const QChar &character) +{ + return character == QLatin1Char('\\') + || character == QLatin1Char('@') ; +} + +void CppCompletionAssistProcessor::startOfOperator(QTextDocument *textDocument, + int positionInDocument, + unsigned *kind, + int &start, + const CPlusPlus::LanguageFeatures &languageFeatures, + bool adjustForQt5SignalSlotCompletion, + DotAtIncludeCompletionHandler dotAtIncludeCompletionHandler) +{ + if (start != positionInDocument) { + QTextCursor tc(textDocument); + tc.setPosition(positionInDocument); + + // Include completion: make sure the quote character is the first one on the line + if (*kind == T_STRING_LITERAL) { + QTextCursor s = tc; + s.movePosition(QTextCursor::StartOfLine, QTextCursor::KeepAnchor); + QString sel = s.selectedText(); + if (sel.indexOf(QLatin1Char('"')) < sel.length() - 1) { + *kind = T_EOF_SYMBOL; + start = positionInDocument; + } + } + + if (*kind == T_COMMA) { + ExpressionUnderCursor expressionUnderCursor(languageFeatures); + if (expressionUnderCursor.startOfFunctionCall(tc) == -1) { + *kind = T_EOF_SYMBOL; + start = positionInDocument; + } + } + + SimpleLexer tokenize; + tokenize.setLanguageFeatures(languageFeatures); + tokenize.setSkipComments(false); + const Tokens &tokens = tokenize(tc.block().text(), BackwardsScanner::previousBlockState(tc.block())); + const int tokenIdx = SimpleLexer::tokenBefore(tokens, qMax(0, tc.positionInBlock() - 1)); // get the token at the left of the cursor + const Token tk = (tokenIdx == -1) ? Token() : tokens.at(tokenIdx); + const QChar characterBeforePositionInDocument + = textDocument->characterAt(positionInDocument - 1); + + if (adjustForQt5SignalSlotCompletion && *kind == T_AMPER && tokenIdx > 0) { + const Token &previousToken = tokens.at(tokenIdx - 1); + if (previousToken.kind() == T_COMMA) + start = positionInDocument - (tk.utf16charOffset - previousToken.utf16charOffset) - 1; + } else if (*kind == T_DOXY_COMMENT && !(tk.is(T_DOXY_COMMENT) || tk.is(T_CPP_DOXY_COMMENT))) { + *kind = T_EOF_SYMBOL; + start = positionInDocument; + // Do not complete in comments, except in doxygen comments for doxygen commands. + // Do not complete in strings, except it is for include completion. + } else if (tk.is(T_COMMENT) || tk.is(T_CPP_COMMENT) + || ((tk.is(T_CPP_DOXY_COMMENT) || tk.is(T_DOXY_COMMENT)) + && !isDoxygenTagCompletionCharacter(characterBeforePositionInDocument)) + || (tk.isLiteral() && (*kind != T_STRING_LITERAL + && *kind != T_ANGLE_STRING_LITERAL + && *kind != T_SLASH + && *kind != T_DOT))) { + *kind = T_EOF_SYMBOL; + start = positionInDocument; + // Include completion: can be triggered by slash, but only in a string + } else if (*kind == T_SLASH && (tk.isNot(T_STRING_LITERAL) && tk.isNot(T_ANGLE_STRING_LITERAL))) { + *kind = T_EOF_SYMBOL; + start = positionInDocument; + } else if (*kind == T_LPAREN) { + if (tokenIdx > 0) { + const Token &previousToken = tokens.at(tokenIdx - 1); // look at the token at the left of T_LPAREN + switch (previousToken.kind()) { + case T_IDENTIFIER: + case T_GREATER: + case T_SIGNAL: + case T_SLOT: + break; // good + + default: + // that's a bad token :) + *kind = T_EOF_SYMBOL; + start = positionInDocument; + } + } + } + // Check for include preprocessor directive + else if (*kind == T_STRING_LITERAL || *kind == T_ANGLE_STRING_LITERAL || *kind == T_SLASH + || (*kind == T_DOT + && (tk.is(T_STRING_LITERAL) || tk.is(T_ANGLE_STRING_LITERAL)))) { + bool include = false; + if (tokens.size() >= 3) { + if (tokens.at(0).is(T_POUND) && tokens.at(1).is(T_IDENTIFIER) && (tokens.at(2).is(T_STRING_LITERAL) || + tokens.at(2).is(T_ANGLE_STRING_LITERAL))) { + const Token &directiveToken = tokens.at(1); + QString directive = tc.block().text().mid(directiveToken.utf16charsBegin(), + directiveToken.utf16chars()); + if (directive == QLatin1String("include") || + directive == QLatin1String("include_next") || + directive == QLatin1String("import")) { + include = true; + } + } + } + + if (!include) { + *kind = T_EOF_SYMBOL; + start = positionInDocument; + } else if (*kind == T_DOT && dotAtIncludeCompletionHandler){ + dotAtIncludeCompletionHandler(start, kind); + } + } + } +} + } // namespace CppTools diff --git a/src/plugins/cpptools/cppcompletionassistprocessor.h b/src/plugins/cpptools/cppcompletionassistprocessor.h index 49634539ce7..6db68e1a1a9 100644 --- a/src/plugins/cpptools/cppcompletionassistprocessor.h +++ b/src/plugins/cpptools/cppcompletionassistprocessor.h @@ -32,6 +32,16 @@ #include +#include + +QT_BEGIN_NAMESPACE +class QTextDocument; +QT_END_NAMESPACE + +namespace CPlusPlus { +struct LanguageFeatures; +} + namespace CppTools { class CPPTOOLS_EXPORT CppCompletionAssistProcessor : public TextEditor::IAssistProcessor @@ -42,6 +52,16 @@ public: protected: void addSnippets(); + using DotAtIncludeCompletionHandler = std::function; + static void startOfOperator(QTextDocument *textDocument, + int positionInDocument, + unsigned *kind, + int &start, + const CPlusPlus::LanguageFeatures &languageFeatures, + bool adjustForQt5SignalSlotCompletion = false, + DotAtIncludeCompletionHandler dotAtIncludeCompletionHandler + = DotAtIncludeCompletionHandler()); + int m_positionForProposal; QList m_completions; QStringList m_preprocessorCompletions; diff --git a/src/plugins/cpptools/cppdoxygen.cpp b/src/plugins/cpptools/cppdoxygen.cpp index 64a92c4c553..363e6840107 100644 --- a/src/plugins/cpptools/cppdoxygen.cpp +++ b/src/plugins/cpptools/cppdoxygen.cpp @@ -23,6 +23,24 @@ ** ****************************************************************************/ +// +// W A R N I N G +// ------------- +// +// Main parts of this file are generated by "cplusplus-keywordgen". +// Use the tool to update new keywords/identifiers: +// +// 1. Update the input file cppdoxygen.kwgen with new keywords/identifiers. +// 2. Run the tool with the input file: +// $ INPUT_FILE=${QTC_SOURCE}/src/plugins/cpptools/cppdoxygen.kwgen +// $ OUTPUT_FILE=/tmp/new.cpp +// $ TOOL=${QTC_BUILD}/bin/cplusplus-keywordgen +// $ cat $INPUT_FILE | $TOOL > $OUTPUT_FILE +// 3. Copy over the classify* functions from $OUTPUT_FILE to this file, +// update the doxy_token_spell array in this file and the enums in the +// header. +// + #include "cppdoxygen.h" #include @@ -43,270 +61,353 @@ using namespace CppTools; static const char *doxy_token_spell[] = { "identifier", + + "a", + "abstract", + "addindex", + "addtogroup", + "anchor", + "annotatedlist", "arg", "attention", "author", - "callgraph", - "code", - "dot", - "else", - "endcode", - "endcond", - "enddot", - "endhtmlonly", - "endif", - "endlatexonly", - "endlink", - "endmanonly", - "endverbatim", - "endxmlonly", - "hideinitializer", - "htmlonly", - "interface", - "internal", - "invariant", - "latexonly", - "li", - "manonly", - "n", - "nosubgrouping", - "note", - "only", - "post", - "pre", - "remarks", - "return", - "returns", - "sa", - "see", - "showinitializer", - "since", - "test", - "todo", - "verbatim", - "warning", - "xmlonly", - "a", - "addtogroup", - "anchor", + "authors", "b", - "c", - "class", - "cond", - "copydoc", - "def", - "dontinclude", - "dotfile", - "e", - "elseif", - "em", - "enum", - "example", - "exception", - "exceptions", - "file", - "htmlinclude", - "if", - "ifnot", - "include", - "link", - "namespace", - "p", - "package", - "ref", - "relates", - "relatesalso", - "retval", - "throw", - "throws", - "verbinclude", - "version", - "xrefitem", - "param", - "image", - "defgroup", - "page", - "paragraph", - "section", - "struct", - "subsection", - "subsubsection", - "union", - "weakgroup", - "addindex", - "brief", - "bug", - "date", - "deprecated", - "fn", - "ingroup", - "line", - "mainpage", - "name", - "overload", - "par", - "short", - "skip", - "skipline", - "typedef", - "until", - "var", - "abstract", "badcode", "basename", "bold", + "brief", + "bug", + "c", + "callergraph", + "callgraph", "caption", + "category", "chapter", + "cite", + "class", + "code", "codeline", + "compat", + "cond", + "contentspage", + "copybrief", + "copydetails", + "copydoc", + "copyright", + "corelib", + "date", + "def", + "default", + "defgroup", + "deprecated", + "details", + "diafile", + "dir", + "div", + "docbookonly", + "dontinclude", + "dot", + "dotfile", "dots", + "e", + "else", + "elseif", + "em", "endabstract", "endchapter", + "endcode", + "endcond", + "enddocbookonly", + "enddot", "endfootnote", + "endhtmlonly", + "endif", + "endinternal", + "endlatexonly", "endlegalese", + "endlink", "endlist", + "endmanonly", + "endmsc", "endomit", + "endparblock", "endpart", "endquotation", "endraw", + "endrtfonly", + "endsecreflist", "endsection1", "endsection2", "endsection3", "endsection4", "endsidebar", "endtable", + "enduml", + "endverbatim", + "endxmlonly", + "enum", + "example", + "exception", + "exceptions", "expire", + "extends", + "externalpage", + "file", + "fn", "footnote", "generatelist", "granularity", + "group", + "gui", "header", + "headerfile", + "hidecallergraph", + "hidecallgraph", + "hideinitializer", + "htmlinclude", + "htmlonly", "i", + "idlexcept", + "if", + "ifnot", + "image", + "implements", + "include", + "includelineno", "index", + "indexpage", + "ingroup", + "inheaderfile", + "inherits", "inlineimage", + "inmodule", + "inpublicgroup", + "inqmlmodule", + "instantiates", + "interface", + "internal", + "invariant", "keyword", "l", + "latexinclude", + "latexonly", "legalese", + "li", + "line", + "link", "list", + "macro", + "mainclass", + "mainpage", + "manonly", + "memberof", "meta", + "module", + "msc", + "mscfile", + "n", + "name", + "namespace", + "network", "newcode", + "nextpage", + "noautolist", + "nonreentrant", + "nosubgrouping", + "note", "o", + "obsolete", "oldcode", "omit", "omitvalue", + "only", + "opengl", + "overload", + "p", + "package", + "page", + "par", + "paragraph", + "param", + "parblock", "part", + "post", + "pre", + "preliminary", + "previouspage", "printline", "printto", "printuntil", + "private", + "privatesection", + "property", + "protected", + "protectedsection", + "protocol", + "public", + "publicsection", + "pure", + "qmlabstract", + "qmlattachedproperty", + "qmlattachedsignal", + "qmlbasictype", + "qmlclass", + "qmlmethod", + "qmlmodule", + "qmlproperty", + "qmlsignal", + "qmltype", + "qt3support", + "qtestlib", "quotation", "quotefile", "quotefromfile", "quotefunction", "raw", + "reentrant", + "ref", + "refitem", + "reimp", + "related", + "relatedalso", + "relates", + "relatesalso", + "remark", + "remarks", + "result", + "return", + "returns", + "retval", "row", + "rtfonly", + "sa", + "secreflist", + "section", "section1", "section2", "section3", "section4", + "see", + "service", + "short", + "showinitializer", "sidebar", + "since", + "skip", + "skipline", "skipto", "skipuntil", "snippet", + "span", + "sql", + "startpage", + "startuml", + "struct", "sub", + "subpage", + "subsection", + "subsubsection", + "subtitle", "sup", + "svg", "table", "tableofcontents", "target", + "test", + "threadsafe", + "throw", + "throws", + "title", + "todo", + "tparam", "tt", + "typedef", + "uicontrol", + "uitools", "underline", "unicode", + "union", + "until", "value", - "contentspage", - "externalpage", - "group", - "headerfile", - "indexpage", - "inheaderfile", - "macro", - "module", - "nextpage", - "previouspage", - "property", - "reimp", - "service", - "startpage", + "var", "variable", - "compat", - "inmodule", - "mainclass", - "nonreentrant", - "obsolete", - "preliminary", - "inpublicgroup", - "reentrant", - "subtitle", - "threadsafe", - "title", - "corelib", - "uitools", - "gui", - "network", - "opengl", - "qt3support", - "svg", - "sql", - "qtestlib", + "verbatim", + "verbinclude", + "version", + "vhdlflow", + "warning", + "weakgroup", "webkit", - "xml" + "xml", + "xmlonly", + "xrefitem", }; const char *CppTools::doxygenTagSpell(int index) { return doxy_token_spell[index]; } static inline int classify1(const QChar *s) { - if (s[0].unicode() == 'a') + if (s[0].unicode() == 'a') { return T_DOXY_A; - else if (s[0].unicode() == 'b') + } + else if (s[0].unicode() == 'b') { return T_DOXY_B; - else if (s[0].unicode() == 'c') + } + else if (s[0].unicode() == 'c') { return T_DOXY_C; - else if (s[0].unicode() == 'e') + } + else if (s[0].unicode() == 'e') { return T_DOXY_E; - else if (s[0].unicode() == 'i') + } + else if (s[0].unicode() == 'i') { return T_DOXY_I; - else if (s[0].unicode() == 'l') + } + else if (s[0].unicode() == 'l') { return T_DOXY_L; - else if (s[0].unicode() == 'n') + } + else if (s[0].unicode() == 'n') { return T_DOXY_N; - else if (s[0].unicode() == 'o') + } + else if (s[0].unicode() == 'o') { return T_DOXY_O; - else if (s[0].unicode() == 'p') + } + else if (s[0].unicode() == 'p') { return T_DOXY_P; + } return T_DOXY_IDENTIFIER; } static inline int classify2(const QChar *s) { if (s[0].unicode() == 'e') { - if (s[1].unicode() == 'm') + if (s[1].unicode() == 'm') { return T_DOXY_EM; + } } else if (s[0].unicode() == 'f') { - if (s[1].unicode() == 'n') + if (s[1].unicode() == 'n') { return T_DOXY_FN; + } } else if (s[0].unicode() == 'i') { - if (s[1].unicode() == 'f') + if (s[1].unicode() == 'f') { return T_DOXY_IF; + } } else if (s[0].unicode() == 'l') { - if (s[1].unicode() == 'i') + if (s[1].unicode() == 'i') { return T_DOXY_LI; + } } else if (s[0].unicode() == 's') { - if (s[1].unicode() == 'a') + if (s[1].unicode() == 'a') { return T_DOXY_SA; + } } else if (s[0].unicode() == 't') { - if (s[1].unicode() == 't') + if (s[1].unicode() == 't') { return T_DOXY_TT; + } } return T_DOXY_IDENTIFIER; } @@ -314,86 +415,118 @@ static inline int classify2(const QChar *s) { static inline int classify3(const QChar *s) { if (s[0].unicode() == 'a') { if (s[1].unicode() == 'r') { - if (s[2].unicode() == 'g') + if (s[2].unicode() == 'g') { return T_DOXY_ARG; + } } } else if (s[0].unicode() == 'b') { if (s[1].unicode() == 'u') { - if (s[2].unicode() == 'g') + if (s[2].unicode() == 'g') { return T_DOXY_BUG; + } } } else if (s[0].unicode() == 'd') { if (s[1].unicode() == 'e') { - if (s[2].unicode() == 'f') + if (s[2].unicode() == 'f') { return T_DOXY_DEF; + } + } + else if (s[1].unicode() == 'i') { + if (s[2].unicode() == 'r') { + return T_DOXY_DIR; + } + else if (s[2].unicode() == 'v') { + return T_DOXY_DIV; + } } else if (s[1].unicode() == 'o') { - if (s[2].unicode() == 't') + if (s[2].unicode() == 't') { return T_DOXY_DOT; + } } } else if (s[0].unicode() == 'g') { if (s[1].unicode() == 'u') { - if (s[2].unicode() == 'i') + if (s[2].unicode() == 'i') { return T_DOXY_GUI; + } + } + } + else if (s[0].unicode() == 'm') { + if (s[1].unicode() == 's') { + if (s[2].unicode() == 'c') { + return T_DOXY_MSC; + } } } else if (s[0].unicode() == 'p') { if (s[1].unicode() == 'a') { - if (s[2].unicode() == 'r') + if (s[2].unicode() == 'r') { return T_DOXY_PAR; + } } else if (s[1].unicode() == 'r') { - if (s[2].unicode() == 'e') + if (s[2].unicode() == 'e') { return T_DOXY_PRE; + } } } else if (s[0].unicode() == 'r') { if (s[1].unicode() == 'a') { - if (s[2].unicode() == 'w') + if (s[2].unicode() == 'w') { return T_DOXY_RAW; + } } else if (s[1].unicode() == 'e') { - if (s[2].unicode() == 'f') + if (s[2].unicode() == 'f') { return T_DOXY_REF; + } } else if (s[1].unicode() == 'o') { - if (s[2].unicode() == 'w') + if (s[2].unicode() == 'w') { return T_DOXY_ROW; + } } } else if (s[0].unicode() == 's') { if (s[1].unicode() == 'e') { - if (s[2].unicode() == 'e') + if (s[2].unicode() == 'e') { return T_DOXY_SEE; + } } else if (s[1].unicode() == 'q') { - if (s[2].unicode() == 'l') + if (s[2].unicode() == 'l') { return T_DOXY_SQL; + } } else if (s[1].unicode() == 'u') { - if (s[2].unicode() == 'b') + if (s[2].unicode() == 'b') { return T_DOXY_SUB; - else if (s[2].unicode() == 'p') + } + else if (s[2].unicode() == 'p') { return T_DOXY_SUP; + } } else if (s[1].unicode() == 'v') { - if (s[2].unicode() == 'g') + if (s[2].unicode() == 'g') { return T_DOXY_SVG; + } } } else if (s[0].unicode() == 'v') { if (s[1].unicode() == 'a') { - if (s[2].unicode() == 'r') + if (s[2].unicode() == 'r') { return T_DOXY_VAR; + } } } else if (s[0].unicode() == 'x') { if (s[1].unicode() == 'm') { - if (s[2].unicode() == 'l') + if (s[2].unicode() == 'l') { return T_DOXY_XML; + } } } return T_DOXY_IDENTIFIER; @@ -403,146 +536,189 @@ static inline int classify4(const QChar *s) { if (s[0].unicode() == 'b') { if (s[1].unicode() == 'o') { if (s[2].unicode() == 'l') { - if (s[3].unicode() == 'd') + if (s[3].unicode() == 'd') { return T_DOXY_BOLD; + } } } } else if (s[0].unicode() == 'c') { - if (s[1].unicode() == 'o') { + if (s[1].unicode() == 'i') { + if (s[2].unicode() == 't') { + if (s[3].unicode() == 'e') { + return T_DOXY_CITE; + } + } + } + else if (s[1].unicode() == 'o') { if (s[2].unicode() == 'd') { - if (s[3].unicode() == 'e') + if (s[3].unicode() == 'e') { return T_DOXY_CODE; + } } else if (s[2].unicode() == 'n') { - if (s[3].unicode() == 'd') + if (s[3].unicode() == 'd') { return T_DOXY_COND; + } } } } else if (s[0].unicode() == 'd') { if (s[1].unicode() == 'a') { if (s[2].unicode() == 't') { - if (s[3].unicode() == 'e') + if (s[3].unicode() == 'e') { return T_DOXY_DATE; + } } } else if (s[1].unicode() == 'o') { if (s[2].unicode() == 't') { - if (s[3].unicode() == 's') + if (s[3].unicode() == 's') { return T_DOXY_DOTS; + } } } } else if (s[0].unicode() == 'e') { if (s[1].unicode() == 'l') { if (s[2].unicode() == 's') { - if (s[3].unicode() == 'e') + if (s[3].unicode() == 'e') { return T_DOXY_ELSE; + } } } else if (s[1].unicode() == 'n') { if (s[2].unicode() == 'u') { - if (s[3].unicode() == 'm') + if (s[3].unicode() == 'm') { return T_DOXY_ENUM; + } } } } else if (s[0].unicode() == 'f') { if (s[1].unicode() == 'i') { if (s[2].unicode() == 'l') { - if (s[3].unicode() == 'e') + if (s[3].unicode() == 'e') { return T_DOXY_FILE; + } } } } else if (s[0].unicode() == 'l') { if (s[1].unicode() == 'i') { if (s[2].unicode() == 'n') { - if (s[3].unicode() == 'e') + if (s[3].unicode() == 'e') { return T_DOXY_LINE; - else if (s[3].unicode() == 'k') + } + else if (s[3].unicode() == 'k') { return T_DOXY_LINK; + } } else if (s[2].unicode() == 's') { - if (s[3].unicode() == 't') + if (s[3].unicode() == 't') { return T_DOXY_LIST; + } } } } else if (s[0].unicode() == 'm') { if (s[1].unicode() == 'e') { if (s[2].unicode() == 't') { - if (s[3].unicode() == 'a') + if (s[3].unicode() == 'a') { return T_DOXY_META; + } } } } else if (s[0].unicode() == 'n') { if (s[1].unicode() == 'a') { if (s[2].unicode() == 'm') { - if (s[3].unicode() == 'e') + if (s[3].unicode() == 'e') { return T_DOXY_NAME; + } } } else if (s[1].unicode() == 'o') { if (s[2].unicode() == 't') { - if (s[3].unicode() == 'e') + if (s[3].unicode() == 'e') { return T_DOXY_NOTE; + } } } } else if (s[0].unicode() == 'o') { if (s[1].unicode() == 'm') { if (s[2].unicode() == 'i') { - if (s[3].unicode() == 't') + if (s[3].unicode() == 't') { return T_DOXY_OMIT; + } } } else if (s[1].unicode() == 'n') { if (s[2].unicode() == 'l') { - if (s[3].unicode() == 'y') + if (s[3].unicode() == 'y') { return T_DOXY_ONLY; + } } } } else if (s[0].unicode() == 'p') { if (s[1].unicode() == 'a') { if (s[2].unicode() == 'g') { - if (s[3].unicode() == 'e') + if (s[3].unicode() == 'e') { return T_DOXY_PAGE; + } } else if (s[2].unicode() == 'r') { - if (s[3].unicode() == 't') + if (s[3].unicode() == 't') { return T_DOXY_PART; + } } } else if (s[1].unicode() == 'o') { if (s[2].unicode() == 's') { - if (s[3].unicode() == 't') + if (s[3].unicode() == 't') { return T_DOXY_POST; + } + } + } + else if (s[1].unicode() == 'u') { + if (s[2].unicode() == 'r') { + if (s[3].unicode() == 'e') { + return T_DOXY_PURE; + } } } } else if (s[0].unicode() == 's') { if (s[1].unicode() == 'k') { if (s[2].unicode() == 'i') { - if (s[3].unicode() == 'p') + if (s[3].unicode() == 'p') { return T_DOXY_SKIP; + } + } + } + else if (s[1].unicode() == 'p') { + if (s[2].unicode() == 'a') { + if (s[3].unicode() == 'n') { + return T_DOXY_SPAN; + } } } } else if (s[0].unicode() == 't') { if (s[1].unicode() == 'e') { if (s[2].unicode() == 's') { - if (s[3].unicode() == 't') + if (s[3].unicode() == 't') { return T_DOXY_TEST; + } } } else if (s[1].unicode() == 'o') { if (s[2].unicode() == 'd') { - if (s[3].unicode() == 'o') + if (s[3].unicode() == 'o') { return T_DOXY_TODO; + } } } } @@ -554,8 +730,9 @@ static inline int classify5(const QChar *s) { if (s[1].unicode() == 'r') { if (s[2].unicode() == 'i') { if (s[3].unicode() == 'e') { - if (s[4].unicode() == 'f') + if (s[4].unicode() == 'f') { return T_DOXY_BRIEF; + } } } } @@ -564,8 +741,9 @@ static inline int classify5(const QChar *s) { if (s[1].unicode() == 'l') { if (s[2].unicode() == 'a') { if (s[3].unicode() == 's') { - if (s[4].unicode() == 's') + if (s[4].unicode() == 's') { return T_DOXY_CLASS; + } } } } @@ -574,8 +752,9 @@ static inline int classify5(const QChar *s) { if (s[1].unicode() == 'n') { if (s[2].unicode() == 'd') { if (s[3].unicode() == 'i') { - if (s[4].unicode() == 'f') + if (s[4].unicode() == 'f') { return T_DOXY_ENDIF; + } } } } @@ -584,8 +763,9 @@ static inline int classify5(const QChar *s) { if (s[1].unicode() == 'r') { if (s[2].unicode() == 'o') { if (s[3].unicode() == 'u') { - if (s[4].unicode() == 'p') + if (s[4].unicode() == 'p') { return T_DOXY_GROUP; + } } } } @@ -594,24 +774,27 @@ static inline int classify5(const QChar *s) { if (s[1].unicode() == 'f') { if (s[2].unicode() == 'n') { if (s[3].unicode() == 'o') { - if (s[4].unicode() == 't') + if (s[4].unicode() == 't') { return T_DOXY_IFNOT; + } } } } else if (s[1].unicode() == 'm') { if (s[2].unicode() == 'a') { if (s[3].unicode() == 'g') { - if (s[4].unicode() == 'e') + if (s[4].unicode() == 'e') { return T_DOXY_IMAGE; + } } } } else if (s[1].unicode() == 'n') { if (s[2].unicode() == 'd') { if (s[3].unicode() == 'e') { - if (s[4].unicode() == 'x') + if (s[4].unicode() == 'x') { return T_DOXY_INDEX; + } } } } @@ -620,8 +803,9 @@ static inline int classify5(const QChar *s) { if (s[1].unicode() == 'a') { if (s[2].unicode() == 'c') { if (s[3].unicode() == 'r') { - if (s[4].unicode() == 'o') + if (s[4].unicode() == 'o') { return T_DOXY_MACRO; + } } } } @@ -630,8 +814,9 @@ static inline int classify5(const QChar *s) { if (s[1].unicode() == 'a') { if (s[2].unicode() == 'r') { if (s[3].unicode() == 'a') { - if (s[4].unicode() == 'm') + if (s[4].unicode() == 'm') { return T_DOXY_PARAM; + } } } } @@ -640,8 +825,9 @@ static inline int classify5(const QChar *s) { if (s[1].unicode() == 'e') { if (s[2].unicode() == 'i') { if (s[3].unicode() == 'm') { - if (s[4].unicode() == 'p') + if (s[4].unicode() == 'p') { return T_DOXY_REIMP; + } } } } @@ -650,16 +836,18 @@ static inline int classify5(const QChar *s) { if (s[1].unicode() == 'h') { if (s[2].unicode() == 'o') { if (s[3].unicode() == 'r') { - if (s[4].unicode() == 't') + if (s[4].unicode() == 't') { return T_DOXY_SHORT; + } } } } else if (s[1].unicode() == 'i') { if (s[2].unicode() == 'n') { if (s[3].unicode() == 'c') { - if (s[4].unicode() == 'e') + if (s[4].unicode() == 'e') { return T_DOXY_SINCE; + } } } } @@ -668,24 +856,27 @@ static inline int classify5(const QChar *s) { if (s[1].unicode() == 'a') { if (s[2].unicode() == 'b') { if (s[3].unicode() == 'l') { - if (s[4].unicode() == 'e') + if (s[4].unicode() == 'e') { return T_DOXY_TABLE; + } } } } else if (s[1].unicode() == 'h') { if (s[2].unicode() == 'r') { if (s[3].unicode() == 'o') { - if (s[4].unicode() == 'w') + if (s[4].unicode() == 'w') { return T_DOXY_THROW; + } } } } else if (s[1].unicode() == 'i') { if (s[2].unicode() == 't') { if (s[3].unicode() == 'l') { - if (s[4].unicode() == 'e') + if (s[4].unicode() == 'e') { return T_DOXY_TITLE; + } } } } @@ -694,14 +885,16 @@ static inline int classify5(const QChar *s) { if (s[1].unicode() == 'n') { if (s[2].unicode() == 'i') { if (s[3].unicode() == 'o') { - if (s[4].unicode() == 'n') + if (s[4].unicode() == 'n') { return T_DOXY_UNION; + } } } else if (s[2].unicode() == 't') { if (s[3].unicode() == 'i') { - if (s[4].unicode() == 'l') + if (s[4].unicode() == 'l') { return T_DOXY_UNTIL; + } } } } @@ -710,8 +903,9 @@ static inline int classify5(const QChar *s) { if (s[1].unicode() == 'a') { if (s[2].unicode() == 'l') { if (s[3].unicode() == 'u') { - if (s[4].unicode() == 'e') + if (s[4].unicode() == 'e') { return T_DOXY_VALUE; + } } } } @@ -725,8 +919,9 @@ static inline int classify6(const QChar *s) { if (s[2].unicode() == 'c') { if (s[3].unicode() == 'h') { if (s[4].unicode() == 'o') { - if (s[5].unicode() == 'r') + if (s[5].unicode() == 'r') { return T_DOXY_ANCHOR; + } } } } @@ -735,8 +930,9 @@ static inline int classify6(const QChar *s) { if (s[2].unicode() == 't') { if (s[3].unicode() == 'h') { if (s[4].unicode() == 'o') { - if (s[5].unicode() == 'r') + if (s[5].unicode() == 'r') { return T_DOXY_AUTHOR; + } } } } @@ -747,8 +943,9 @@ static inline int classify6(const QChar *s) { if (s[2].unicode() == 'm') { if (s[3].unicode() == 'p') { if (s[4].unicode() == 'a') { - if (s[5].unicode() == 't') + if (s[5].unicode() == 't') { return T_DOXY_COMPAT; + } } } } @@ -759,8 +956,9 @@ static inline int classify6(const QChar *s) { if (s[2].unicode() == 's') { if (s[3].unicode() == 'e') { if (s[4].unicode() == 'i') { - if (s[5].unicode() == 'f') + if (s[5].unicode() == 'f') { return T_DOXY_ELSEIF; + } } } } @@ -769,14 +967,30 @@ static inline int classify6(const QChar *s) { if (s[2].unicode() == 'd') { if (s[3].unicode() == 'd') { if (s[4].unicode() == 'o') { - if (s[5].unicode() == 't') + if (s[5].unicode() == 't') { return T_DOXY_ENDDOT; + } + } + } + else if (s[3].unicode() == 'm') { + if (s[4].unicode() == 's') { + if (s[5].unicode() == 'c') { + return T_DOXY_ENDMSC; + } } } else if (s[3].unicode() == 'r') { if (s[4].unicode() == 'a') { - if (s[5].unicode() == 'w') + if (s[5].unicode() == 'w') { return T_DOXY_ENDRAW; + } + } + } + else if (s[3].unicode() == 'u') { + if (s[4].unicode() == 'm') { + if (s[5].unicode() == 'l') { + return T_DOXY_ENDUML; + } } } } @@ -785,8 +999,9 @@ static inline int classify6(const QChar *s) { if (s[2].unicode() == 'p') { if (s[3].unicode() == 'i') { if (s[4].unicode() == 'r') { - if (s[5].unicode() == 'e') + if (s[5].unicode() == 'e') { return T_DOXY_EXPIRE; + } } } } @@ -797,8 +1012,9 @@ static inline int classify6(const QChar *s) { if (s[2].unicode() == 'a') { if (s[3].unicode() == 'd') { if (s[4].unicode() == 'e') { - if (s[5].unicode() == 'r') + if (s[5].unicode() == 'r') { return T_DOXY_HEADER; + } } } } @@ -809,8 +1025,9 @@ static inline int classify6(const QChar *s) { if (s[2].unicode() == 'd') { if (s[3].unicode() == 'u') { if (s[4].unicode() == 'l') { - if (s[5].unicode() == 'e') + if (s[5].unicode() == 'e') { return T_DOXY_MODULE; + } } } } @@ -821,8 +1038,22 @@ static inline int classify6(const QChar *s) { if (s[2].unicode() == 'e') { if (s[3].unicode() == 'n') { if (s[4].unicode() == 'g') { - if (s[5].unicode() == 'l') + if (s[5].unicode() == 'l') { return T_DOXY_OPENGL; + } + } + } + } + } + } + else if (s[0].unicode() == 'p') { + if (s[1].unicode() == 'u') { + if (s[2].unicode() == 'b') { + if (s[3].unicode() == 'l') { + if (s[4].unicode() == 'i') { + if (s[5].unicode() == 'c') { + return T_DOXY_PUBLIC; + } } } } @@ -830,17 +1061,37 @@ static inline int classify6(const QChar *s) { } else if (s[0].unicode() == 'r') { if (s[1].unicode() == 'e') { - if (s[2].unicode() == 't') { + if (s[2].unicode() == 'm') { + if (s[3].unicode() == 'a') { + if (s[4].unicode() == 'r') { + if (s[5].unicode() == 'k') { + return T_DOXY_REMARK; + } + } + } + } + else if (s[2].unicode() == 's') { + if (s[3].unicode() == 'u') { + if (s[4].unicode() == 'l') { + if (s[5].unicode() == 't') { + return T_DOXY_RESULT; + } + } + } + } + else if (s[2].unicode() == 't') { if (s[3].unicode() == 'u') { if (s[4].unicode() == 'r') { - if (s[5].unicode() == 'n') + if (s[5].unicode() == 'n') { return T_DOXY_RETURN; + } } } else if (s[3].unicode() == 'v') { if (s[4].unicode() == 'a') { - if (s[5].unicode() == 'l') + if (s[5].unicode() == 'l') { return T_DOXY_RETVAL; + } } } } @@ -851,8 +1102,9 @@ static inline int classify6(const QChar *s) { if (s[2].unicode() == 'i') { if (s[3].unicode() == 'p') { if (s[4].unicode() == 't') { - if (s[5].unicode() == 'o') + if (s[5].unicode() == 'o') { return T_DOXY_SKIPTO; + } } } } @@ -861,8 +1113,9 @@ static inline int classify6(const QChar *s) { if (s[2].unicode() == 'r') { if (s[3].unicode() == 'u') { if (s[4].unicode() == 'c') { - if (s[5].unicode() == 't') + if (s[5].unicode() == 't') { return T_DOXY_STRUCT; + } } } } @@ -873,8 +1126,9 @@ static inline int classify6(const QChar *s) { if (s[2].unicode() == 'r') { if (s[3].unicode() == 'g') { if (s[4].unicode() == 'e') { - if (s[5].unicode() == 't') + if (s[5].unicode() == 't') { return T_DOXY_TARGET; + } } } } @@ -883,8 +1137,20 @@ static inline int classify6(const QChar *s) { if (s[2].unicode() == 'r') { if (s[3].unicode() == 'o') { if (s[4].unicode() == 'w') { - if (s[5].unicode() == 's') + if (s[5].unicode() == 's') { return T_DOXY_THROWS; + } + } + } + } + } + else if (s[1].unicode() == 'p') { + if (s[2].unicode() == 'a') { + if (s[3].unicode() == 'r') { + if (s[4].unicode() == 'a') { + if (s[5].unicode() == 'm') { + return T_DOXY_TPARAM; + } } } } @@ -895,8 +1161,9 @@ static inline int classify6(const QChar *s) { if (s[2].unicode() == 'b') { if (s[3].unicode() == 'k') { if (s[4].unicode() == 'i') { - if (s[5].unicode() == 't') + if (s[5].unicode() == 't') { return T_DOXY_WEBKIT; + } } } } @@ -906,14 +1173,30 @@ static inline int classify6(const QChar *s) { } static inline int classify7(const QChar *s) { - if (s[0].unicode() == 'b') { + if (s[0].unicode() == 'a') { + if (s[1].unicode() == 'u') { + if (s[2].unicode() == 't') { + if (s[3].unicode() == 'h') { + if (s[4].unicode() == 'o') { + if (s[5].unicode() == 'r') { + if (s[6].unicode() == 's') { + return T_DOXY_AUTHORS; + } + } + } + } + } + } + } + else if (s[0].unicode() == 'b') { if (s[1].unicode() == 'a') { if (s[2].unicode() == 'd') { if (s[3].unicode() == 'c') { if (s[4].unicode() == 'o') { if (s[5].unicode() == 'd') { - if (s[6].unicode() == 'e') + if (s[6].unicode() == 'e') { return T_DOXY_BADCODE; + } } } } @@ -926,8 +1209,9 @@ static inline int classify7(const QChar *s) { if (s[3].unicode() == 't') { if (s[4].unicode() == 'i') { if (s[5].unicode() == 'o') { - if (s[6].unicode() == 'n') + if (s[6].unicode() == 'n') { return T_DOXY_CAPTION; + } } } } @@ -938,8 +1222,9 @@ static inline int classify7(const QChar *s) { if (s[3].unicode() == 'p') { if (s[4].unicode() == 't') { if (s[5].unicode() == 'e') { - if (s[6].unicode() == 'r') + if (s[6].unicode() == 'r') { return T_DOXY_CHAPTER; + } } } } @@ -950,8 +1235,9 @@ static inline int classify7(const QChar *s) { if (s[3].unicode() == 'y') { if (s[4].unicode() == 'd') { if (s[5].unicode() == 'o') { - if (s[6].unicode() == 'c') + if (s[6].unicode() == 'c') { return T_DOXY_COPYDOC; + } } } } @@ -960,8 +1246,9 @@ static inline int classify7(const QChar *s) { if (s[3].unicode() == 'e') { if (s[4].unicode() == 'l') { if (s[5].unicode() == 'i') { - if (s[6].unicode() == 'b') + if (s[6].unicode() == 'b') { return T_DOXY_CORELIB; + } } } } @@ -969,13 +1256,51 @@ static inline int classify7(const QChar *s) { } } else if (s[0].unicode() == 'd') { - if (s[1].unicode() == 'o') { + if (s[1].unicode() == 'e') { + if (s[2].unicode() == 'f') { + if (s[3].unicode() == 'a') { + if (s[4].unicode() == 'u') { + if (s[5].unicode() == 'l') { + if (s[6].unicode() == 't') { + return T_DOXY_DEFAULT; + } + } + } + } + } + else if (s[2].unicode() == 't') { + if (s[3].unicode() == 'a') { + if (s[4].unicode() == 'i') { + if (s[5].unicode() == 'l') { + if (s[6].unicode() == 's') { + return T_DOXY_DETAILS; + } + } + } + } + } + } + else if (s[1].unicode() == 'i') { + if (s[2].unicode() == 'a') { + if (s[3].unicode() == 'f') { + if (s[4].unicode() == 'i') { + if (s[5].unicode() == 'l') { + if (s[6].unicode() == 'e') { + return T_DOXY_DIAFILE; + } + } + } + } + } + } + else if (s[1].unicode() == 'o') { if (s[2].unicode() == 't') { if (s[3].unicode() == 'f') { if (s[4].unicode() == 'i') { if (s[5].unicode() == 'l') { - if (s[6].unicode() == 'e') + if (s[6].unicode() == 'e') { return T_DOXY_DOTFILE; + } } } } @@ -988,40 +1313,46 @@ static inline int classify7(const QChar *s) { if (s[3].unicode() == 'c') { if (s[4].unicode() == 'o') { if (s[5].unicode() == 'd') { - if (s[6].unicode() == 'e') + if (s[6].unicode() == 'e') { return T_DOXY_ENDCODE; + } } else if (s[5].unicode() == 'n') { - if (s[6].unicode() == 'd') + if (s[6].unicode() == 'd') { return T_DOXY_ENDCOND; + } } } } else if (s[3].unicode() == 'l') { if (s[4].unicode() == 'i') { if (s[5].unicode() == 'n') { - if (s[6].unicode() == 'k') + if (s[6].unicode() == 'k') { return T_DOXY_ENDLINK; + } } else if (s[5].unicode() == 's') { - if (s[6].unicode() == 't') + if (s[6].unicode() == 't') { return T_DOXY_ENDLIST; + } } } } else if (s[3].unicode() == 'o') { if (s[4].unicode() == 'm') { if (s[5].unicode() == 'i') { - if (s[6].unicode() == 't') + if (s[6].unicode() == 't') { return T_DOXY_ENDOMIT; + } } } } else if (s[3].unicode() == 'p') { if (s[4].unicode() == 'a') { if (s[5].unicode() == 'r') { - if (s[6].unicode() == 't') + if (s[6].unicode() == 't') { return T_DOXY_ENDPART; + } } } } @@ -1032,8 +1363,20 @@ static inline int classify7(const QChar *s) { if (s[3].unicode() == 'm') { if (s[4].unicode() == 'p') { if (s[5].unicode() == 'l') { - if (s[6].unicode() == 'e') + if (s[6].unicode() == 'e') { return T_DOXY_EXAMPLE; + } + } + } + } + } + else if (s[2].unicode() == 't') { + if (s[3].unicode() == 'e') { + if (s[4].unicode() == 'n') { + if (s[5].unicode() == 'd') { + if (s[6].unicode() == 's') { + return T_DOXY_EXTENDS; + } } } } @@ -1046,8 +1389,9 @@ static inline int classify7(const QChar *s) { if (s[3].unicode() == 'l') { if (s[4].unicode() == 'u') { if (s[5].unicode() == 'd') { - if (s[6].unicode() == 'e') + if (s[6].unicode() == 'e') { return T_DOXY_INCLUDE; + } } } } @@ -1056,8 +1400,9 @@ static inline int classify7(const QChar *s) { if (s[3].unicode() == 'r') { if (s[4].unicode() == 'o') { if (s[5].unicode() == 'u') { - if (s[6].unicode() == 'p') + if (s[6].unicode() == 'p') { return T_DOXY_INGROUP; + } } } } @@ -1070,8 +1415,9 @@ static inline int classify7(const QChar *s) { if (s[3].unicode() == 'w') { if (s[4].unicode() == 'o') { if (s[5].unicode() == 'r') { - if (s[6].unicode() == 'd') + if (s[6].unicode() == 'd') { return T_DOXY_KEYWORD; + } } } } @@ -1084,8 +1430,22 @@ static inline int classify7(const QChar *s) { if (s[3].unicode() == 'o') { if (s[4].unicode() == 'n') { if (s[5].unicode() == 'l') { - if (s[6].unicode() == 'y') + if (s[6].unicode() == 'y') { return T_DOXY_MANONLY; + } + } + } + } + } + } + else if (s[1].unicode() == 's') { + if (s[2].unicode() == 'c') { + if (s[3].unicode() == 'f') { + if (s[4].unicode() == 'i') { + if (s[5].unicode() == 'l') { + if (s[6].unicode() == 'e') { + return T_DOXY_MSCFILE; + } } } } @@ -1098,8 +1458,9 @@ static inline int classify7(const QChar *s) { if (s[3].unicode() == 'w') { if (s[4].unicode() == 'o') { if (s[5].unicode() == 'r') { - if (s[6].unicode() == 'k') + if (s[6].unicode() == 'k') { return T_DOXY_NETWORK; + } } } } @@ -1108,8 +1469,9 @@ static inline int classify7(const QChar *s) { if (s[3].unicode() == 'c') { if (s[4].unicode() == 'o') { if (s[5].unicode() == 'd') { - if (s[6].unicode() == 'e') + if (s[6].unicode() == 'e') { return T_DOXY_NEWCODE; + } } } } @@ -1122,8 +1484,9 @@ static inline int classify7(const QChar *s) { if (s[3].unicode() == 'c') { if (s[4].unicode() == 'o') { if (s[5].unicode() == 'd') { - if (s[6].unicode() == 'e') + if (s[6].unicode() == 'e') { return T_DOXY_OLDCODE; + } } } } @@ -1136,8 +1499,9 @@ static inline int classify7(const QChar *s) { if (s[3].unicode() == 'k') { if (s[4].unicode() == 'a') { if (s[5].unicode() == 'g') { - if (s[6].unicode() == 'e') + if (s[6].unicode() == 'e') { return T_DOXY_PACKAGE; + } } } } @@ -1148,8 +1512,33 @@ static inline int classify7(const QChar *s) { if (s[3].unicode() == 'n') { if (s[4].unicode() == 't') { if (s[5].unicode() == 't') { - if (s[6].unicode() == 'o') + if (s[6].unicode() == 'o') { return T_DOXY_PRINTTO; + } + } + } + } + else if (s[3].unicode() == 'v') { + if (s[4].unicode() == 'a') { + if (s[5].unicode() == 't') { + if (s[6].unicode() == 'e') { + return T_DOXY_PRIVATE; + } + } + } + } + } + } + } + else if (s[0].unicode() == 'q') { + if (s[1].unicode() == 'm') { + if (s[2].unicode() == 'l') { + if (s[3].unicode() == 't') { + if (s[4].unicode() == 'y') { + if (s[5].unicode() == 'p') { + if (s[6].unicode() == 'e') { + return T_DOXY_QMLTYPE; + } } } } @@ -1158,12 +1547,27 @@ static inline int classify7(const QChar *s) { } else if (s[0].unicode() == 'r') { if (s[1].unicode() == 'e') { - if (s[2].unicode() == 'l') { + if (s[2].unicode() == 'f') { + if (s[3].unicode() == 'i') { + if (s[4].unicode() == 't') { + if (s[5].unicode() == 'e') { + if (s[6].unicode() == 'm') { + return T_DOXY_REFITEM; + } + } + } + } + } + else if (s[2].unicode() == 'l') { if (s[3].unicode() == 'a') { if (s[4].unicode() == 't') { if (s[5].unicode() == 'e') { - if (s[6].unicode() == 's') + if (s[6].unicode() == 'd') { + return T_DOXY_RELATED; + } + else if (s[6].unicode() == 's') { return T_DOXY_RELATES; + } } } } @@ -1172,8 +1576,9 @@ static inline int classify7(const QChar *s) { if (s[3].unicode() == 'a') { if (s[4].unicode() == 'r') { if (s[5].unicode() == 'k') { - if (s[6].unicode() == 's') + if (s[6].unicode() == 's') { return T_DOXY_REMARKS; + } } } } @@ -1182,8 +1587,22 @@ static inline int classify7(const QChar *s) { if (s[3].unicode() == 'u') { if (s[4].unicode() == 'r') { if (s[5].unicode() == 'n') { - if (s[6].unicode() == 's') + if (s[6].unicode() == 's') { return T_DOXY_RETURNS; + } + } + } + } + } + } + else if (s[1].unicode() == 't') { + if (s[2].unicode() == 'f') { + if (s[3].unicode() == 'o') { + if (s[4].unicode() == 'n') { + if (s[5].unicode() == 'l') { + if (s[6].unicode() == 'y') { + return T_DOXY_RTFONLY; + } } } } @@ -1196,8 +1615,9 @@ static inline int classify7(const QChar *s) { if (s[3].unicode() == 't') { if (s[4].unicode() == 'i') { if (s[5].unicode() == 'o') { - if (s[6].unicode() == 'n') + if (s[6].unicode() == 'n') { return T_DOXY_SECTION; + } } } } @@ -1206,8 +1626,9 @@ static inline int classify7(const QChar *s) { if (s[3].unicode() == 'v') { if (s[4].unicode() == 'i') { if (s[5].unicode() == 'c') { - if (s[6].unicode() == 'e') + if (s[6].unicode() == 'e') { return T_DOXY_SERVICE; + } } } } @@ -1218,8 +1639,9 @@ static inline int classify7(const QChar *s) { if (s[3].unicode() == 'e') { if (s[4].unicode() == 'b') { if (s[5].unicode() == 'a') { - if (s[6].unicode() == 'r') + if (s[6].unicode() == 'r') { return T_DOXY_SIDEBAR; + } } } } @@ -1230,8 +1652,22 @@ static inline int classify7(const QChar *s) { if (s[3].unicode() == 'p') { if (s[4].unicode() == 'p') { if (s[5].unicode() == 'e') { - if (s[6].unicode() == 't') + if (s[6].unicode() == 't') { return T_DOXY_SNIPPET; + } + } + } + } + } + } + else if (s[1].unicode() == 'u') { + if (s[2].unicode() == 'b') { + if (s[3].unicode() == 'p') { + if (s[4].unicode() == 'a') { + if (s[5].unicode() == 'g') { + if (s[6].unicode() == 'e') { + return T_DOXY_SUBPAGE; + } } } } @@ -1244,8 +1680,9 @@ static inline int classify7(const QChar *s) { if (s[3].unicode() == 'e') { if (s[4].unicode() == 'd') { if (s[5].unicode() == 'e') { - if (s[6].unicode() == 'f') + if (s[6].unicode() == 'f') { return T_DOXY_TYPEDEF; + } } } } @@ -1258,8 +1695,9 @@ static inline int classify7(const QChar *s) { if (s[3].unicode() == 'o') { if (s[4].unicode() == 'o') { if (s[5].unicode() == 'l') { - if (s[6].unicode() == 's') + if (s[6].unicode() == 's') { return T_DOXY_UITOOLS; + } } } } @@ -1270,8 +1708,9 @@ static inline int classify7(const QChar *s) { if (s[3].unicode() == 'c') { if (s[4].unicode() == 'o') { if (s[5].unicode() == 'd') { - if (s[6].unicode() == 'e') + if (s[6].unicode() == 'e') { return T_DOXY_UNICODE; + } } } } @@ -1284,8 +1723,9 @@ static inline int classify7(const QChar *s) { if (s[3].unicode() == 's') { if (s[4].unicode() == 'i') { if (s[5].unicode() == 'o') { - if (s[6].unicode() == 'n') + if (s[6].unicode() == 'n') { return T_DOXY_VERSION; + } } } } @@ -1298,8 +1738,9 @@ static inline int classify7(const QChar *s) { if (s[3].unicode() == 'n') { if (s[4].unicode() == 'i') { if (s[5].unicode() == 'n') { - if (s[6].unicode() == 'g') + if (s[6].unicode() == 'g') { return T_DOXY_WARNING; + } } } } @@ -1312,8 +1753,9 @@ static inline int classify7(const QChar *s) { if (s[3].unicode() == 'o') { if (s[4].unicode() == 'n') { if (s[5].unicode() == 'l') { - if (s[6].unicode() == 'y') + if (s[6].unicode() == 'y') { return T_DOXY_XMLONLY; + } } } } @@ -1331,8 +1773,9 @@ static inline int classify8(const QChar *s) { if (s[4].unicode() == 'r') { if (s[5].unicode() == 'a') { if (s[6].unicode() == 'c') { - if (s[7].unicode() == 't') + if (s[7].unicode() == 't') { return T_DOXY_ABSTRACT; + } } } } @@ -1345,8 +1788,9 @@ static inline int classify8(const QChar *s) { if (s[4].unicode() == 'n') { if (s[5].unicode() == 'd') { if (s[6].unicode() == 'e') { - if (s[7].unicode() == 'x') + if (s[7].unicode() == 'x') { return T_DOXY_ADDINDEX; + } } } } @@ -1361,8 +1805,9 @@ static inline int classify8(const QChar *s) { if (s[4].unicode() == 'n') { if (s[5].unicode() == 'a') { if (s[6].unicode() == 'm') { - if (s[7].unicode() == 'e') + if (s[7].unicode() == 'e') { return T_DOXY_BASENAME; + } } } } @@ -1371,14 +1816,30 @@ static inline int classify8(const QChar *s) { } } else if (s[0].unicode() == 'c') { - if (s[1].unicode() == 'o') { + if (s[1].unicode() == 'a') { + if (s[2].unicode() == 't') { + if (s[3].unicode() == 'e') { + if (s[4].unicode() == 'g') { + if (s[5].unicode() == 'o') { + if (s[6].unicode() == 'r') { + if (s[7].unicode() == 'y') { + return T_DOXY_CATEGORY; + } + } + } + } + } + } + } + else if (s[1].unicode() == 'o') { if (s[2].unicode() == 'd') { if (s[3].unicode() == 'e') { if (s[4].unicode() == 'l') { if (s[5].unicode() == 'i') { if (s[6].unicode() == 'n') { - if (s[7].unicode() == 'e') + if (s[7].unicode() == 'e') { return T_DOXY_CODELINE; + } } } } @@ -1393,8 +1854,9 @@ static inline int classify8(const QChar *s) { if (s[4].unicode() == 'r') { if (s[5].unicode() == 'o') { if (s[6].unicode() == 'u') { - if (s[7].unicode() == 'p') + if (s[7].unicode() == 'p') { return T_DOXY_DEFGROUP; + } } } } @@ -1409,8 +1871,9 @@ static inline int classify8(const QChar *s) { if (s[4].unicode() == 'a') { if (s[5].unicode() == 'b') { if (s[6].unicode() == 'l') { - if (s[7].unicode() == 'e') + if (s[7].unicode() == 'e') { return T_DOXY_ENDTABLE; + } } } } @@ -1425,8 +1888,9 @@ static inline int classify8(const QChar *s) { if (s[4].unicode() == 'n') { if (s[5].unicode() == 'o') { if (s[6].unicode() == 't') { - if (s[7].unicode() == 'e') + if (s[7].unicode() == 'e') { return T_DOXY_FOOTNOTE; + } } } } @@ -1441,8 +1905,9 @@ static inline int classify8(const QChar *s) { if (s[4].unicode() == 'o') { if (s[5].unicode() == 'n') { if (s[6].unicode() == 'l') { - if (s[7].unicode() == 'y') + if (s[7].unicode() == 'y') { return T_DOXY_HTMLONLY; + } } } } @@ -1452,13 +1917,27 @@ static inline int classify8(const QChar *s) { } else if (s[0].unicode() == 'i') { if (s[1].unicode() == 'n') { - if (s[2].unicode() == 'm') { + if (s[2].unicode() == 'h') { + if (s[3].unicode() == 'e') { + if (s[4].unicode() == 'r') { + if (s[5].unicode() == 'i') { + if (s[6].unicode() == 't') { + if (s[7].unicode() == 's') { + return T_DOXY_INHERITS; + } + } + } + } + } + } + else if (s[2].unicode() == 'm') { if (s[3].unicode() == 'o') { if (s[4].unicode() == 'd') { if (s[5].unicode() == 'u') { if (s[6].unicode() == 'l') { - if (s[7].unicode() == 'e') + if (s[7].unicode() == 'e') { return T_DOXY_INMODULE; + } } } } @@ -1469,8 +1948,9 @@ static inline int classify8(const QChar *s) { if (s[4].unicode() == 'r') { if (s[5].unicode() == 'n') { if (s[6].unicode() == 'a') { - if (s[7].unicode() == 'l') + if (s[7].unicode() == 'l') { return T_DOXY_INTERNAL; + } } } } @@ -1485,8 +1965,9 @@ static inline int classify8(const QChar *s) { if (s[4].unicode() == 'l') { if (s[5].unicode() == 'e') { if (s[6].unicode() == 's') { - if (s[7].unicode() == 'e') + if (s[7].unicode() == 'e') { return T_DOXY_LEGALESE; + } } } } @@ -1501,8 +1982,24 @@ static inline int classify8(const QChar *s) { if (s[4].unicode() == 'p') { if (s[5].unicode() == 'a') { if (s[6].unicode() == 'g') { - if (s[7].unicode() == 'e') + if (s[7].unicode() == 'e') { return T_DOXY_MAINPAGE; + } + } + } + } + } + } + } + else if (s[1].unicode() == 'e') { + if (s[2].unicode() == 'm') { + if (s[3].unicode() == 'b') { + if (s[4].unicode() == 'e') { + if (s[5].unicode() == 'r') { + if (s[6].unicode() == 'o') { + if (s[7].unicode() == 'f') { + return T_DOXY_MEMBEROF; + } } } } @@ -1517,8 +2014,9 @@ static inline int classify8(const QChar *s) { if (s[4].unicode() == 'p') { if (s[5].unicode() == 'a') { if (s[6].unicode() == 'g') { - if (s[7].unicode() == 'e') + if (s[7].unicode() == 'e') { return T_DOXY_NEXTPAGE; + } } } } @@ -1533,8 +2031,9 @@ static inline int classify8(const QChar *s) { if (s[4].unicode() == 'l') { if (s[5].unicode() == 'e') { if (s[6].unicode() == 't') { - if (s[7].unicode() == 'e') + if (s[7].unicode() == 'e') { return T_DOXY_OBSOLETE; + } } } } @@ -1547,8 +2046,9 @@ static inline int classify8(const QChar *s) { if (s[4].unicode() == 'l') { if (s[5].unicode() == 'o') { if (s[6].unicode() == 'a') { - if (s[7].unicode() == 'd') + if (s[7].unicode() == 'd') { return T_DOXY_OVERLOAD; + } } } } @@ -1557,14 +2057,41 @@ static inline int classify8(const QChar *s) { } } else if (s[0].unicode() == 'p') { - if (s[1].unicode() == 'r') { + if (s[1].unicode() == 'a') { + if (s[2].unicode() == 'r') { + if (s[3].unicode() == 'b') { + if (s[4].unicode() == 'l') { + if (s[5].unicode() == 'o') { + if (s[6].unicode() == 'c') { + if (s[7].unicode() == 'k') { + return T_DOXY_PARBLOCK; + } + } + } + } + } + } + } + else if (s[1].unicode() == 'r') { if (s[2].unicode() == 'o') { if (s[3].unicode() == 'p') { if (s[4].unicode() == 'e') { if (s[5].unicode() == 'r') { if (s[6].unicode() == 't') { - if (s[7].unicode() == 'y') + if (s[7].unicode() == 'y') { return T_DOXY_PROPERTY; + } + } + } + } + } + else if (s[3].unicode() == 't') { + if (s[4].unicode() == 'o') { + if (s[5].unicode() == 'c') { + if (s[6].unicode() == 'o') { + if (s[7].unicode() == 'l') { + return T_DOXY_PROTOCOL; + } } } } @@ -1573,14 +2100,30 @@ static inline int classify8(const QChar *s) { } } else if (s[0].unicode() == 'q') { - if (s[1].unicode() == 't') { + if (s[1].unicode() == 'm') { + if (s[2].unicode() == 'l') { + if (s[3].unicode() == 'c') { + if (s[4].unicode() == 'l') { + if (s[5].unicode() == 'a') { + if (s[6].unicode() == 's') { + if (s[7].unicode() == 's') { + return T_DOXY_QMLCLASS; + } + } + } + } + } + } + } + else if (s[1].unicode() == 't') { if (s[2].unicode() == 'e') { if (s[3].unicode() == 's') { if (s[4].unicode() == 't') { if (s[5].unicode() == 'l') { if (s[6].unicode() == 'i') { - if (s[7].unicode() == 'b') + if (s[7].unicode() == 'b') { return T_DOXY_QTESTLIB; + } } } } @@ -1595,14 +2138,18 @@ static inline int classify8(const QChar *s) { if (s[4].unicode() == 'i') { if (s[5].unicode() == 'o') { if (s[6].unicode() == 'n') { - if (s[7].unicode() == '1') + if (s[7].unicode() == '1') { return T_DOXY_SECTION1; - else if (s[7].unicode() == '2') + } + else if (s[7].unicode() == '2') { return T_DOXY_SECTION2; - else if (s[7].unicode() == '3') + } + else if (s[7].unicode() == '3') { return T_DOXY_SECTION3; - else if (s[7].unicode() == '4') + } + else if (s[7].unicode() == '4') { return T_DOXY_SECTION4; + } } } } @@ -1615,8 +2162,24 @@ static inline int classify8(const QChar *s) { if (s[4].unicode() == 'l') { if (s[5].unicode() == 'i') { if (s[6].unicode() == 'n') { - if (s[7].unicode() == 'e') + if (s[7].unicode() == 'e') { return T_DOXY_SKIPLINE; + } + } + } + } + } + } + } + else if (s[1].unicode() == 't') { + if (s[2].unicode() == 'a') { + if (s[3].unicode() == 'r') { + if (s[4].unicode() == 't') { + if (s[5].unicode() == 'u') { + if (s[6].unicode() == 'm') { + if (s[7].unicode() == 'l') { + return T_DOXY_STARTUML; + } } } } @@ -1629,8 +2192,9 @@ static inline int classify8(const QChar *s) { if (s[4].unicode() == 'i') { if (s[5].unicode() == 't') { if (s[6].unicode() == 'l') { - if (s[7].unicode() == 'e') + if (s[7].unicode() == 'e') { return T_DOXY_SUBTITLE; + } } } } @@ -1645,8 +2209,9 @@ static inline int classify8(const QChar *s) { if (s[4].unicode() == 'a') { if (s[5].unicode() == 'b') { if (s[6].unicode() == 'l') { - if (s[7].unicode() == 'e') + if (s[7].unicode() == 'e') { return T_DOXY_VARIABLE; + } } } } @@ -1659,8 +2224,24 @@ static inline int classify8(const QChar *s) { if (s[4].unicode() == 'a') { if (s[5].unicode() == 't') { if (s[6].unicode() == 'i') { - if (s[7].unicode() == 'm') + if (s[7].unicode() == 'm') { return T_DOXY_VERBATIM; + } + } + } + } + } + } + } + else if (s[1].unicode() == 'h') { + if (s[2].unicode() == 'd') { + if (s[3].unicode() == 'l') { + if (s[4].unicode() == 'f') { + if (s[5].unicode() == 'l') { + if (s[6].unicode() == 'o') { + if (s[7].unicode() == 'w') { + return T_DOXY_VHDLFLOW; + } } } } @@ -1675,8 +2256,9 @@ static inline int classify8(const QChar *s) { if (s[4].unicode() == 'i') { if (s[5].unicode() == 't') { if (s[6].unicode() == 'e') { - if (s[7].unicode() == 'm') + if (s[7].unicode() == 'm') { return T_DOXY_XREFITEM; + } } } } @@ -1696,8 +2278,9 @@ static inline int classify9(const QChar *s) { if (s[5].unicode() == 't') { if (s[6].unicode() == 'i') { if (s[7].unicode() == 'o') { - if (s[8].unicode() == 'n') + if (s[8].unicode() == 'n') { return T_DOXY_ATTENTION; + } } } } @@ -1714,8 +2297,37 @@ static inline int classify9(const QChar *s) { if (s[5].unicode() == 'r') { if (s[6].unicode() == 'a') { if (s[7].unicode() == 'p') { - if (s[8].unicode() == 'h') + if (s[8].unicode() == 'h') { return T_DOXY_CALLGRAPH; + } + } + } + } + } + } + } + } + else if (s[1].unicode() == 'o') { + if (s[2].unicode() == 'p') { + if (s[3].unicode() == 'y') { + if (s[4].unicode() == 'b') { + if (s[5].unicode() == 'r') { + if (s[6].unicode() == 'i') { + if (s[7].unicode() == 'e') { + if (s[8].unicode() == 'f') { + return T_DOXY_COPYBRIEF; + } + } + } + } + } + else if (s[4].unicode() == 'r') { + if (s[5].unicode() == 'i') { + if (s[6].unicode() == 'g') { + if (s[7].unicode() == 'h') { + if (s[8].unicode() == 't') { + return T_DOXY_COPYRIGHT; + } } } } @@ -1732,8 +2344,9 @@ static inline int classify9(const QChar *s) { if (s[5].unicode() == 't') { if (s[6].unicode() == 'i') { if (s[7].unicode() == 'o') { - if (s[8].unicode() == 'n') + if (s[8].unicode() == 'n') { return T_DOXY_EXCEPTION; + } } } } @@ -1743,15 +2356,33 @@ static inline int classify9(const QChar *s) { } } else if (s[0].unicode() == 'i') { - if (s[1].unicode() == 'n') { + if (s[1].unicode() == 'd') { + if (s[2].unicode() == 'l') { + if (s[3].unicode() == 'e') { + if (s[4].unicode() == 'x') { + if (s[5].unicode() == 'c') { + if (s[6].unicode() == 'e') { + if (s[7].unicode() == 'p') { + if (s[8].unicode() == 't') { + return T_DOXY_IDLEXCEPT; + } + } + } + } + } + } + } + } + else if (s[1].unicode() == 'n') { if (s[2].unicode() == 'd') { if (s[3].unicode() == 'e') { if (s[4].unicode() == 'x') { if (s[5].unicode() == 'p') { if (s[6].unicode() == 'a') { if (s[7].unicode() == 'g') { - if (s[8].unicode() == 'e') + if (s[8].unicode() == 'e') { return T_DOXY_INDEXPAGE; + } } } } @@ -1764,8 +2395,9 @@ static inline int classify9(const QChar *s) { if (s[5].unicode() == 'f') { if (s[6].unicode() == 'a') { if (s[7].unicode() == 'c') { - if (s[8].unicode() == 'e') + if (s[8].unicode() == 'e') { return T_DOXY_INTERFACE; + } } } } @@ -1778,8 +2410,9 @@ static inline int classify9(const QChar *s) { if (s[5].unicode() == 'i') { if (s[6].unicode() == 'a') { if (s[7].unicode() == 'n') { - if (s[8].unicode() == 't') + if (s[8].unicode() == 't') { return T_DOXY_INVARIANT; + } } } } @@ -1796,8 +2429,9 @@ static inline int classify9(const QChar *s) { if (s[5].unicode() == 'o') { if (s[6].unicode() == 'n') { if (s[7].unicode() == 'l') { - if (s[8].unicode() == 'y') + if (s[8].unicode() == 'y') { return T_DOXY_LATEXONLY; + } } } } @@ -1814,8 +2448,9 @@ static inline int classify9(const QChar *s) { if (s[5].unicode() == 'l') { if (s[6].unicode() == 'a') { if (s[7].unicode() == 's') { - if (s[8].unicode() == 's') + if (s[8].unicode() == 's') { return T_DOXY_MAINCLASS; + } } } } @@ -1832,8 +2467,9 @@ static inline int classify9(const QChar *s) { if (s[5].unicode() == 'p') { if (s[6].unicode() == 'a') { if (s[7].unicode() == 'c') { - if (s[8].unicode() == 'e') + if (s[8].unicode() == 'e') { return T_DOXY_NAMESPACE; + } } } } @@ -1850,8 +2486,9 @@ static inline int classify9(const QChar *s) { if (s[5].unicode() == 'a') { if (s[6].unicode() == 'l') { if (s[7].unicode() == 'u') { - if (s[8].unicode() == 'e') + if (s[8].unicode() == 'e') { return T_DOXY_OMITVALUE; + } } } } @@ -1868,8 +2505,9 @@ static inline int classify9(const QChar *s) { if (s[5].unicode() == 'r') { if (s[6].unicode() == 'a') { if (s[7].unicode() == 'p') { - if (s[8].unicode() == 'h') + if (s[8].unicode() == 'h') { return T_DOXY_PARAGRAPH; + } } } } @@ -1884,8 +2522,24 @@ static inline int classify9(const QChar *s) { if (s[5].unicode() == 'l') { if (s[6].unicode() == 'i') { if (s[7].unicode() == 'n') { - if (s[8].unicode() == 'e') + if (s[8].unicode() == 'e') { return T_DOXY_PRINTLINE; + } + } + } + } + } + } + } + else if (s[2].unicode() == 'o') { + if (s[3].unicode() == 't') { + if (s[4].unicode() == 'e') { + if (s[5].unicode() == 'c') { + if (s[6].unicode() == 't') { + if (s[7].unicode() == 'e') { + if (s[8].unicode() == 'd') { + return T_DOXY_PROTECTED; + } } } } @@ -1895,15 +2549,57 @@ static inline int classify9(const QChar *s) { } } else if (s[0].unicode() == 'q') { - if (s[1].unicode() == 'u') { + if (s[1].unicode() == 'm') { + if (s[2].unicode() == 'l') { + if (s[3].unicode() == 'm') { + if (s[4].unicode() == 'e') { + if (s[5].unicode() == 't') { + if (s[6].unicode() == 'h') { + if (s[7].unicode() == 'o') { + if (s[8].unicode() == 'd') { + return T_DOXY_QMLMETHOD; + } + } + } + } + } + else if (s[4].unicode() == 'o') { + if (s[5].unicode() == 'd') { + if (s[6].unicode() == 'u') { + if (s[7].unicode() == 'l') { + if (s[8].unicode() == 'e') { + return T_DOXY_QMLMODULE; + } + } + } + } + } + } + else if (s[3].unicode() == 's') { + if (s[4].unicode() == 'i') { + if (s[5].unicode() == 'g') { + if (s[6].unicode() == 'n') { + if (s[7].unicode() == 'a') { + if (s[8].unicode() == 'l') { + return T_DOXY_QMLSIGNAL; + } + } + } + } + } + } + } + } + else if (s[1].unicode() == 'u') { if (s[2].unicode() == 'o') { if (s[3].unicode() == 't') { if (s[4].unicode() == 'a') { if (s[5].unicode() == 't') { if (s[6].unicode() == 'i') { if (s[7].unicode() == 'o') { - if (s[8].unicode() == 'n') + if (s[8].unicode() == 'n') { return T_DOXY_QUOTATION; + } } } } @@ -1912,8 +2608,9 @@ static inline int classify9(const QChar *s) { if (s[5].unicode() == 'f') { if (s[6].unicode() == 'i') { if (s[7].unicode() == 'l') { - if (s[8].unicode() == 'e') + if (s[8].unicode() == 'e') { return T_DOXY_QUOTEFILE; + } } } } @@ -1930,8 +2627,9 @@ static inline int classify9(const QChar *s) { if (s[5].unicode() == 'r') { if (s[6].unicode() == 'a') { if (s[7].unicode() == 'n') { - if (s[8].unicode() == 't') + if (s[8].unicode() == 't') { return T_DOXY_REENTRANT; + } } } } @@ -1948,8 +2646,9 @@ static inline int classify9(const QChar *s) { if (s[5].unicode() == 'n') { if (s[6].unicode() == 't') { if (s[7].unicode() == 'i') { - if (s[8].unicode() == 'l') + if (s[8].unicode() == 'l') { return T_DOXY_SKIPUNTIL; + } } } } @@ -1964,8 +2663,9 @@ static inline int classify9(const QChar *s) { if (s[5].unicode() == 'p') { if (s[6].unicode() == 'a') { if (s[7].unicode() == 'g') { - if (s[8].unicode() == 'e') + if (s[8].unicode() == 'e') { return T_DOXY_STARTPAGE; + } } } } @@ -1975,15 +2675,33 @@ static inline int classify9(const QChar *s) { } } else if (s[0].unicode() == 'u') { - if (s[1].unicode() == 'n') { + if (s[1].unicode() == 'i') { + if (s[2].unicode() == 'c') { + if (s[3].unicode() == 'o') { + if (s[4].unicode() == 'n') { + if (s[5].unicode() == 't') { + if (s[6].unicode() == 'r') { + if (s[7].unicode() == 'o') { + if (s[8].unicode() == 'l') { + return T_DOXY_UICONTROL; + } + } + } + } + } + } + } + } + else if (s[1].unicode() == 'n') { if (s[2].unicode() == 'd') { if (s[3].unicode() == 'e') { if (s[4].unicode() == 'r') { if (s[5].unicode() == 'l') { if (s[6].unicode() == 'i') { if (s[7].unicode() == 'n') { - if (s[8].unicode() == 'e') + if (s[8].unicode() == 'e') { return T_DOXY_UNDERLINE; + } } } } @@ -2000,8 +2718,9 @@ static inline int classify9(const QChar *s) { if (s[5].unicode() == 'r') { if (s[6].unicode() == 'o') { if (s[7].unicode() == 'u') { - if (s[8].unicode() == 'p') + if (s[8].unicode() == 'p') { return T_DOXY_WEAKGROUP; + } } } } @@ -2023,8 +2742,9 @@ static inline int classify10(const QChar *s) { if (s[6].unicode() == 'r') { if (s[7].unicode() == 'o') { if (s[8].unicode() == 'u') { - if (s[9].unicode() == 'p') + if (s[9].unicode() == 'p') { return T_DOXY_ADDTOGROUP; + } } } } @@ -2043,8 +2763,9 @@ static inline int classify10(const QChar *s) { if (s[6].unicode() == 'a') { if (s[7].unicode() == 't') { if (s[8].unicode() == 'e') { - if (s[9].unicode() == 'd') + if (s[9].unicode() == 'd') { return T_DOXY_DEPRECATED; + } } } } @@ -2063,8 +2784,9 @@ static inline int classify10(const QChar *s) { if (s[6].unicode() == 'p') { if (s[7].unicode() == 't') { if (s[8].unicode() == 'e') { - if (s[9].unicode() == 'r') + if (s[9].unicode() == 'r') { return T_DOXY_ENDCHAPTER; + } } } } @@ -2077,8 +2799,24 @@ static inline int classify10(const QChar *s) { if (s[6].unicode() == 'o') { if (s[7].unicode() == 'n') { if (s[8].unicode() == 'l') { - if (s[9].unicode() == 'y') + if (s[9].unicode() == 'y') { return T_DOXY_ENDMANONLY; + } + } + } + } + } + } + } + else if (s[3].unicode() == 'r') { + if (s[4].unicode() == 't') { + if (s[5].unicode() == 'f') { + if (s[6].unicode() == 'o') { + if (s[7].unicode() == 'n') { + if (s[8].unicode() == 'l') { + if (s[9].unicode() == 'y') { + return T_DOXY_ENDRTFONLY; + } } } } @@ -2091,8 +2829,9 @@ static inline int classify10(const QChar *s) { if (s[6].unicode() == 'e') { if (s[7].unicode() == 'b') { if (s[8].unicode() == 'a') { - if (s[9].unicode() == 'r') + if (s[9].unicode() == 'r') { return T_DOXY_ENDSIDEBAR; + } } } } @@ -2105,8 +2844,9 @@ static inline int classify10(const QChar *s) { if (s[6].unicode() == 'o') { if (s[7].unicode() == 'n') { if (s[8].unicode() == 'l') { - if (s[9].unicode() == 'y') + if (s[9].unicode() == 'y') { return T_DOXY_ENDXMLONLY; + } } } } @@ -2123,8 +2863,9 @@ static inline int classify10(const QChar *s) { if (s[6].unicode() == 'i') { if (s[7].unicode() == 'o') { if (s[8].unicode() == 'n') { - if (s[9].unicode() == 's') + if (s[9].unicode() == 's') { return T_DOXY_EXCEPTIONS; + } } } } @@ -2143,8 +2884,51 @@ static inline int classify10(const QChar *s) { if (s[6].unicode() == 'f') { if (s[7].unicode() == 'i') { if (s[8].unicode() == 'l') { - if (s[9].unicode() == 'e') + if (s[9].unicode() == 'e') { return T_DOXY_HEADERFILE; + } + } + } + } + } + } + } + } + } + } + else if (s[0].unicode() == 'i') { + if (s[1].unicode() == 'm') { + if (s[2].unicode() == 'p') { + if (s[3].unicode() == 'l') { + if (s[4].unicode() == 'e') { + if (s[5].unicode() == 'm') { + if (s[6].unicode() == 'e') { + if (s[7].unicode() == 'n') { + if (s[8].unicode() == 't') { + if (s[9].unicode() == 's') { + return T_DOXY_IMPLEMENTS; + } + } + } + } + } + } + } + } + } + } + else if (s[0].unicode() == 'n') { + if (s[1].unicode() == 'o') { + if (s[2].unicode() == 'a') { + if (s[3].unicode() == 'u') { + if (s[4].unicode() == 't') { + if (s[5].unicode() == 'o') { + if (s[6].unicode() == 'l') { + if (s[7].unicode() == 'i') { + if (s[8].unicode() == 's') { + if (s[9].unicode() == 't') { + return T_DOXY_NOAUTOLIST; + } } } } @@ -2163,8 +2947,9 @@ static inline int classify10(const QChar *s) { if (s[6].unicode() == 'n') { if (s[7].unicode() == 't') { if (s[8].unicode() == 'i') { - if (s[9].unicode() == 'l') + if (s[9].unicode() == 'l') { return T_DOXY_PRINTUNTIL; + } } } } @@ -2183,8 +2968,9 @@ static inline int classify10(const QChar *s) { if (s[6].unicode() == 'p') { if (s[7].unicode() == 'o') { if (s[8].unicode() == 'r') { - if (s[9].unicode() == 't') + if (s[9].unicode() == 't') { return T_DOXY_QT3SUPPORT; + } } } } @@ -2195,7 +2981,26 @@ static inline int classify10(const QChar *s) { } } else if (s[0].unicode() == 's') { - if (s[1].unicode() == 'u') { + if (s[1].unicode() == 'e') { + if (s[2].unicode() == 'c') { + if (s[3].unicode() == 'r') { + if (s[4].unicode() == 'e') { + if (s[5].unicode() == 'f') { + if (s[6].unicode() == 'l') { + if (s[7].unicode() == 'i') { + if (s[8].unicode() == 's') { + if (s[9].unicode() == 't') { + return T_DOXY_SECREFLIST; + } + } + } + } + } + } + } + } + } + else if (s[1].unicode() == 'u') { if (s[2].unicode() == 'b') { if (s[3].unicode() == 's') { if (s[4].unicode() == 'e') { @@ -2203,8 +3008,9 @@ static inline int classify10(const QChar *s) { if (s[6].unicode() == 't') { if (s[7].unicode() == 'i') { if (s[8].unicode() == 'o') { - if (s[9].unicode() == 'n') + if (s[9].unicode() == 'n') { return T_DOXY_SUBSECTION; + } } } } @@ -2223,8 +3029,9 @@ static inline int classify10(const QChar *s) { if (s[6].unicode() == 's') { if (s[7].unicode() == 'a') { if (s[8].unicode() == 'f') { - if (s[9].unicode() == 'e') + if (s[9].unicode() == 'e') { return T_DOXY_THREADSAFE; + } } } } @@ -2238,9 +3045,72 @@ static inline int classify10(const QChar *s) { } static inline int classify11(const QChar *s) { - if (s[0].unicode() == 'd') { + if (s[0].unicode() == 'c') { + if (s[1].unicode() == 'a') { + if (s[2].unicode() == 'l') { + if (s[3].unicode() == 'l') { + if (s[4].unicode() == 'e') { + if (s[5].unicode() == 'r') { + if (s[6].unicode() == 'g') { + if (s[7].unicode() == 'r') { + if (s[8].unicode() == 'a') { + if (s[9].unicode() == 'p') { + if (s[10].unicode() == 'h') { + return T_DOXY_CALLERGRAPH; + } + } + } + } + } + } + } + } + } + } + else if (s[1].unicode() == 'o') { + if (s[2].unicode() == 'p') { + if (s[3].unicode() == 'y') { + if (s[4].unicode() == 'd') { + if (s[5].unicode() == 'e') { + if (s[6].unicode() == 't') { + if (s[7].unicode() == 'a') { + if (s[8].unicode() == 'i') { + if (s[9].unicode() == 'l') { + if (s[10].unicode() == 's') { + return T_DOXY_COPYDETAILS; + } + } + } + } + } + } + } + } + } + } + } + else if (s[0].unicode() == 'd') { if (s[1].unicode() == 'o') { - if (s[2].unicode() == 'n') { + if (s[2].unicode() == 'c') { + if (s[3].unicode() == 'b') { + if (s[4].unicode() == 'o') { + if (s[5].unicode() == 'o') { + if (s[6].unicode() == 'k') { + if (s[7].unicode() == 'o') { + if (s[8].unicode() == 'n') { + if (s[9].unicode() == 'l') { + if (s[10].unicode() == 'y') { + return T_DOXY_DOCBOOKONLY; + } + } + } + } + } + } + } + } + } + else if (s[2].unicode() == 'n') { if (s[3].unicode() == 't') { if (s[4].unicode() == 'i') { if (s[5].unicode() == 'n') { @@ -2248,8 +3118,9 @@ static inline int classify11(const QChar *s) { if (s[7].unicode() == 'l') { if (s[8].unicode() == 'u') { if (s[9].unicode() == 'd') { - if (s[10].unicode() == 'e') + if (s[10].unicode() == 'e') { return T_DOXY_DONTINCLUDE; + } } } } @@ -2270,8 +3141,9 @@ static inline int classify11(const QChar *s) { if (s[7].unicode() == 'r') { if (s[8].unicode() == 'a') { if (s[9].unicode() == 'c') { - if (s[10].unicode() == 't') + if (s[10].unicode() == 't') { return T_DOXY_ENDABSTRACT; + } } } } @@ -2286,8 +3158,9 @@ static inline int classify11(const QChar *s) { if (s[7].unicode() == 'n') { if (s[8].unicode() == 'o') { if (s[9].unicode() == 't') { - if (s[10].unicode() == 'e') + if (s[10].unicode() == 'e') { return T_DOXY_ENDFOOTNOTE; + } } } } @@ -2302,8 +3175,26 @@ static inline int classify11(const QChar *s) { if (s[7].unicode() == 'o') { if (s[8].unicode() == 'n') { if (s[9].unicode() == 'l') { - if (s[10].unicode() == 'y') + if (s[10].unicode() == 'y') { return T_DOXY_ENDHTMLONLY; + } + } + } + } + } + } + } + } + else if (s[3].unicode() == 'i') { + if (s[4].unicode() == 'n') { + if (s[5].unicode() == 't') { + if (s[6].unicode() == 'e') { + if (s[7].unicode() == 'r') { + if (s[8].unicode() == 'n') { + if (s[9].unicode() == 'a') { + if (s[10].unicode() == 'l') { + return T_DOXY_ENDINTERNAL; + } } } } @@ -2318,8 +3209,26 @@ static inline int classify11(const QChar *s) { if (s[7].unicode() == 'l') { if (s[8].unicode() == 'e') { if (s[9].unicode() == 's') { - if (s[10].unicode() == 'e') + if (s[10].unicode() == 'e') { return T_DOXY_ENDLEGALESE; + } + } + } + } + } + } + } + } + else if (s[3].unicode() == 'p') { + if (s[4].unicode() == 'a') { + if (s[5].unicode() == 'r') { + if (s[6].unicode() == 'b') { + if (s[7].unicode() == 'l') { + if (s[8].unicode() == 'o') { + if (s[9].unicode() == 'c') { + if (s[10].unicode() == 'k') { + return T_DOXY_ENDPARBLOCK; + } } } } @@ -2334,14 +3243,18 @@ static inline int classify11(const QChar *s) { if (s[7].unicode() == 'i') { if (s[8].unicode() == 'o') { if (s[9].unicode() == 'n') { - if (s[10].unicode() == '1') + if (s[10].unicode() == '1') { return T_DOXY_ENDSECTION1; - else if (s[10].unicode() == '2') + } + else if (s[10].unicode() == '2') { return T_DOXY_ENDSECTION2; - else if (s[10].unicode() == '3') + } + else if (s[10].unicode() == '3') { return T_DOXY_ENDSECTION3; - else if (s[10].unicode() == '4') + } + else if (s[10].unicode() == '4') { return T_DOXY_ENDSECTION4; + } } } } @@ -2356,8 +3269,9 @@ static inline int classify11(const QChar *s) { if (s[7].unicode() == 'a') { if (s[8].unicode() == 't') { if (s[9].unicode() == 'i') { - if (s[10].unicode() == 'm') + if (s[10].unicode() == 'm') { return T_DOXY_ENDVERBATIM; + } } } } @@ -2378,8 +3292,9 @@ static inline int classify11(const QChar *s) { if (s[7].unicode() == 'r') { if (s[8].unicode() == 'i') { if (s[9].unicode() == 't') { - if (s[10].unicode() == 'y') + if (s[10].unicode() == 'y') { return T_DOXY_GRANULARITY; + } } } } @@ -2400,8 +3315,9 @@ static inline int classify11(const QChar *s) { if (s[7].unicode() == 'l') { if (s[8].unicode() == 'u') { if (s[9].unicode() == 'd') { - if (s[10].unicode() == 'e') + if (s[10].unicode() == 'e') { return T_DOXY_HTMLINCLUDE; + } } } } @@ -2422,8 +3338,28 @@ static inline int classify11(const QChar *s) { if (s[7].unicode() == 'm') { if (s[8].unicode() == 'a') { if (s[9].unicode() == 'g') { - if (s[10].unicode() == 'e') + if (s[10].unicode() == 'e') { return T_DOXY_INLINEIMAGE; + } + } + } + } + } + } + } + } + } + else if (s[2].unicode() == 'q') { + if (s[3].unicode() == 'm') { + if (s[4].unicode() == 'l') { + if (s[5].unicode() == 'm') { + if (s[6].unicode() == 'o') { + if (s[7].unicode() == 'd') { + if (s[8].unicode() == 'u') { + if (s[9].unicode() == 'l') { + if (s[10].unicode() == 'e') { + return T_DOXY_INQMLMODULE; + } } } } @@ -2444,8 +3380,49 @@ static inline int classify11(const QChar *s) { if (s[7].unicode() == 'n') { if (s[8].unicode() == 'a') { if (s[9].unicode() == 'r') { - if (s[10].unicode() == 'y') + if (s[10].unicode() == 'y') { return T_DOXY_PRELIMINARY; + } + } + } + } + } + } + } + } + } + } + } + else if (s[0].unicode() == 'q') { + if (s[1].unicode() == 'm') { + if (s[2].unicode() == 'l') { + if (s[3].unicode() == 'a') { + if (s[4].unicode() == 'b') { + if (s[5].unicode() == 's') { + if (s[6].unicode() == 't') { + if (s[7].unicode() == 'r') { + if (s[8].unicode() == 'a') { + if (s[9].unicode() == 'c') { + if (s[10].unicode() == 't') { + return T_DOXY_QMLABSTRACT; + } + } + } + } + } + } + } + } + else if (s[3].unicode() == 'p') { + if (s[4].unicode() == 'r') { + if (s[5].unicode() == 'o') { + if (s[6].unicode() == 'p') { + if (s[7].unicode() == 'e') { + if (s[8].unicode() == 'r') { + if (s[9].unicode() == 't') { + if (s[10].unicode() == 'y') { + return T_DOXY_QMLPROPERTY; + } } } } @@ -2462,12 +3439,24 @@ static inline int classify11(const QChar *s) { if (s[3].unicode() == 'a') { if (s[4].unicode() == 't') { if (s[5].unicode() == 'e') { - if (s[6].unicode() == 's') { + if (s[6].unicode() == 'd') { if (s[7].unicode() == 'a') { if (s[8].unicode() == 'l') { if (s[9].unicode() == 's') { - if (s[10].unicode() == 'o') + if (s[10].unicode() == 'o') { + return T_DOXY_RELATEDALSO; + } + } + } + } + } + else if (s[6].unicode() == 's') { + if (s[7].unicode() == 'a') { + if (s[8].unicode() == 'l') { + if (s[9].unicode() == 's') { + if (s[10].unicode() == 'o') { return T_DOXY_RELATESALSO; + } } } } @@ -2488,8 +3477,9 @@ static inline int classify11(const QChar *s) { if (s[7].unicode() == 'l') { if (s[8].unicode() == 'u') { if (s[9].unicode() == 'd') { - if (s[10].unicode() == 'e') + if (s[10].unicode() == 'e') { return T_DOXY_VERBINCLUDE; + } } } } @@ -2515,8 +3505,9 @@ static inline int classify12(const QChar *s) { if (s[8].unicode() == 'p') { if (s[9].unicode() == 'a') { if (s[10].unicode() == 'g') { - if (s[11].unicode() == 'e') + if (s[11].unicode() == 'e') { return T_DOXY_CONTENTSPAGE; + } } } } @@ -2539,8 +3530,9 @@ static inline int classify12(const QChar *s) { if (s[8].unicode() == 'o') { if (s[9].unicode() == 'n') { if (s[10].unicode() == 'l') { - if (s[11].unicode() == 'y') + if (s[11].unicode() == 'y') { return T_DOXY_ENDLATEXONLY; + } } } } @@ -2557,8 +3549,9 @@ static inline int classify12(const QChar *s) { if (s[8].unicode() == 't') { if (s[9].unicode() == 'i') { if (s[10].unicode() == 'o') { - if (s[11].unicode() == 'n') + if (s[11].unicode() == 'n') { return T_DOXY_ENDQUOTATION; + } } } } @@ -2579,8 +3572,9 @@ static inline int classify12(const QChar *s) { if (s[8].unicode() == 'p') { if (s[9].unicode() == 'a') { if (s[10].unicode() == 'g') { - if (s[11].unicode() == 'e') + if (s[11].unicode() == 'e') { return T_DOXY_EXTERNALPAGE; + } } } } @@ -2603,8 +3597,9 @@ static inline int classify12(const QChar *s) { if (s[8].unicode() == 'l') { if (s[9].unicode() == 'i') { if (s[10].unicode() == 's') { - if (s[11].unicode() == 't') + if (s[11].unicode() == 't') { return T_DOXY_GENERATELIST; + } } } } @@ -2627,8 +3622,55 @@ static inline int classify12(const QChar *s) { if (s[8].unicode() == 'f') { if (s[9].unicode() == 'i') { if (s[10].unicode() == 'l') { - if (s[11].unicode() == 'e') + if (s[11].unicode() == 'e') { return T_DOXY_INHEADERFILE; + } + } + } + } + } + } + } + } + } + } + else if (s[2].unicode() == 's') { + if (s[3].unicode() == 't') { + if (s[4].unicode() == 'a') { + if (s[5].unicode() == 'n') { + if (s[6].unicode() == 't') { + if (s[7].unicode() == 'i') { + if (s[8].unicode() == 'a') { + if (s[9].unicode() == 't') { + if (s[10].unicode() == 'e') { + if (s[11].unicode() == 's') { + return T_DOXY_INSTANTIATES; + } + } + } + } + } + } + } + } + } + } + } + } + else if (s[0].unicode() == 'l') { + if (s[1].unicode() == 'a') { + if (s[2].unicode() == 't') { + if (s[3].unicode() == 'e') { + if (s[4].unicode() == 'x') { + if (s[5].unicode() == 'i') { + if (s[6].unicode() == 'n') { + if (s[7].unicode() == 'c') { + if (s[8].unicode() == 'l') { + if (s[9].unicode() == 'u') { + if (s[10].unicode() == 'd') { + if (s[11].unicode() == 'e') { + return T_DOXY_LATEXINCLUDE; + } } } } @@ -2651,8 +3693,9 @@ static inline int classify12(const QChar *s) { if (s[8].unicode() == 'r') { if (s[9].unicode() == 'a') { if (s[10].unicode() == 'n') { - if (s[11].unicode() == 't') + if (s[11].unicode() == 't') { return T_DOXY_NONREENTRANT; + } } } } @@ -2675,8 +3718,34 @@ static inline int classify12(const QChar *s) { if (s[8].unicode() == 'p') { if (s[9].unicode() == 'a') { if (s[10].unicode() == 'g') { - if (s[11].unicode() == 'e') + if (s[11].unicode() == 'e') { return T_DOXY_PREVIOUSPAGE; + } + } + } + } + } + } + } + } + } + } + } + } + else if (s[0].unicode() == 'q') { + if (s[1].unicode() == 'm') { + if (s[2].unicode() == 'l') { + if (s[3].unicode() == 'b') { + if (s[4].unicode() == 'a') { + if (s[5].unicode() == 's') { + if (s[6].unicode() == 'i') { + if (s[7].unicode() == 'c') { + if (s[8].unicode() == 't') { + if (s[9].unicode() == 'y') { + if (s[10].unicode() == 'p') { + if (s[11].unicode() == 'e') { + return T_DOXY_QMLBASICTYPE; + } } } } @@ -2692,9 +3761,113 @@ static inline int classify12(const QChar *s) { } static inline int classify13(const QChar *s) { - if (s[0].unicode() == 'i') { + if (s[0].unicode() == 'a') { if (s[1].unicode() == 'n') { - if (s[2].unicode() == 'p') { + if (s[2].unicode() == 'n') { + if (s[3].unicode() == 'o') { + if (s[4].unicode() == 't') { + if (s[5].unicode() == 'a') { + if (s[6].unicode() == 't') { + if (s[7].unicode() == 'e') { + if (s[8].unicode() == 'd') { + if (s[9].unicode() == 'l') { + if (s[10].unicode() == 'i') { + if (s[11].unicode() == 's') { + if (s[12].unicode() == 't') { + return T_DOXY_ANNOTATEDLIST; + } + } + } + } + } + } + } + } + } + } + } + } + } + else if (s[0].unicode() == 'e') { + if (s[1].unicode() == 'n') { + if (s[2].unicode() == 'd') { + if (s[3].unicode() == 's') { + if (s[4].unicode() == 'e') { + if (s[5].unicode() == 'c') { + if (s[6].unicode() == 'r') { + if (s[7].unicode() == 'e') { + if (s[8].unicode() == 'f') { + if (s[9].unicode() == 'l') { + if (s[10].unicode() == 'i') { + if (s[11].unicode() == 's') { + if (s[12].unicode() == 't') { + return T_DOXY_ENDSECREFLIST; + } + } + } + } + } + } + } + } + } + } + } + } + } + else if (s[0].unicode() == 'h') { + if (s[1].unicode() == 'i') { + if (s[2].unicode() == 'd') { + if (s[3].unicode() == 'e') { + if (s[4].unicode() == 'c') { + if (s[5].unicode() == 'a') { + if (s[6].unicode() == 'l') { + if (s[7].unicode() == 'l') { + if (s[8].unicode() == 'g') { + if (s[9].unicode() == 'r') { + if (s[10].unicode() == 'a') { + if (s[11].unicode() == 'p') { + if (s[12].unicode() == 'h') { + return T_DOXY_HIDECALLGRAPH; + } + } + } + } + } + } + } + } + } + } + } + } + } + else if (s[0].unicode() == 'i') { + if (s[1].unicode() == 'n') { + if (s[2].unicode() == 'c') { + if (s[3].unicode() == 'l') { + if (s[4].unicode() == 'u') { + if (s[5].unicode() == 'd') { + if (s[6].unicode() == 'e') { + if (s[7].unicode() == 'l') { + if (s[8].unicode() == 'i') { + if (s[9].unicode() == 'n') { + if (s[10].unicode() == 'e') { + if (s[11].unicode() == 'n') { + if (s[12].unicode() == 'o') { + return T_DOXY_INCLUDELINENO; + } + } + } + } + } + } + } + } + } + } + } + else if (s[2].unicode() == 'p') { if (s[3].unicode() == 'u') { if (s[4].unicode() == 'b') { if (s[5].unicode() == 'l') { @@ -2704,8 +3877,9 @@ static inline int classify13(const QChar *s) { if (s[9].unicode() == 'r') { if (s[10].unicode() == 'o') { if (s[11].unicode() == 'u') { - if (s[12].unicode() == 'p') + if (s[12].unicode() == 'p') { return T_DOXY_INPUBLICGROUP; + } } } } @@ -2730,8 +3904,36 @@ static inline int classify13(const QChar *s) { if (s[9].unicode() == 'p') { if (s[10].unicode() == 'i') { if (s[11].unicode() == 'n') { - if (s[12].unicode() == 'g') + if (s[12].unicode() == 'g') { return T_DOXY_NOSUBGROUPING; + } + } + } + } + } + } + } + } + } + } + } + } + } + else if (s[0].unicode() == 'p') { + if (s[1].unicode() == 'u') { + if (s[2].unicode() == 'b') { + if (s[3].unicode() == 'l') { + if (s[4].unicode() == 'i') { + if (s[5].unicode() == 'c') { + if (s[6].unicode() == 's') { + if (s[7].unicode() == 'e') { + if (s[8].unicode() == 'c') { + if (s[9].unicode() == 't') { + if (s[10].unicode() == 'i') { + if (s[11].unicode() == 'o') { + if (s[12].unicode() == 'n') { + return T_DOXY_PUBLICSECTION; + } } } } @@ -2756,8 +3958,9 @@ static inline int classify13(const QChar *s) { if (s[9].unicode() == 'f') { if (s[10].unicode() == 'i') { if (s[11].unicode() == 'l') { - if (s[12].unicode() == 'e') + if (s[12].unicode() == 'e') { return T_DOXY_QUOTEFROMFILE; + } } } } @@ -2770,8 +3973,9 @@ static inline int classify13(const QChar *s) { if (s[9].unicode() == 't') { if (s[10].unicode() == 'i') { if (s[11].unicode() == 'o') { - if (s[12].unicode() == 'n') + if (s[12].unicode() == 'n') { return T_DOXY_QUOTEFUNCTION; + } } } } @@ -2796,8 +4000,71 @@ static inline int classify13(const QChar *s) { if (s[9].unicode() == 't') { if (s[10].unicode() == 'i') { if (s[11].unicode() == 'o') { - if (s[12].unicode() == 'n') + if (s[12].unicode() == 'n') { return T_DOXY_SUBSUBSECTION; + } + } + } + } + } + } + } + } + } + } + } + } + } + return T_DOXY_IDENTIFIER; +} + +static inline int classify14(const QChar *s) { + if (s[0].unicode() == 'e') { + if (s[1].unicode() == 'n') { + if (s[2].unicode() == 'd') { + if (s[3].unicode() == 'd') { + if (s[4].unicode() == 'o') { + if (s[5].unicode() == 'c') { + if (s[6].unicode() == 'b') { + if (s[7].unicode() == 'o') { + if (s[8].unicode() == 'o') { + if (s[9].unicode() == 'k') { + if (s[10].unicode() == 'o') { + if (s[11].unicode() == 'n') { + if (s[12].unicode() == 'l') { + if (s[13].unicode() == 'y') { + return T_DOXY_ENDDOCBOOKONLY; + } + } + } + } + } + } + } + } + } + } + } + } + } + } + else if (s[0].unicode() == 'p') { + if (s[1].unicode() == 'r') { + if (s[2].unicode() == 'i') { + if (s[3].unicode() == 'v') { + if (s[4].unicode() == 'a') { + if (s[5].unicode() == 't') { + if (s[6].unicode() == 'e') { + if (s[7].unicode() == 's') { + if (s[8].unicode() == 'e') { + if (s[9].unicode() == 'c') { + if (s[10].unicode() == 't') { + if (s[11].unicode() == 'i') { + if (s[12].unicode() == 'o') { + if (s[13].unicode() == 'n') { + return T_DOXY_PRIVATESECTION; + } + } } } } @@ -2818,7 +4085,30 @@ static inline int classify15(const QChar *s) { if (s[1].unicode() == 'i') { if (s[2].unicode() == 'd') { if (s[3].unicode() == 'e') { - if (s[4].unicode() == 'i') { + if (s[4].unicode() == 'c') { + if (s[5].unicode() == 'a') { + if (s[6].unicode() == 'l') { + if (s[7].unicode() == 'l') { + if (s[8].unicode() == 'e') { + if (s[9].unicode() == 'r') { + if (s[10].unicode() == 'g') { + if (s[11].unicode() == 'r') { + if (s[12].unicode() == 'a') { + if (s[13].unicode() == 'p') { + if (s[14].unicode() == 'h') { + return T_DOXY_HIDECALLERGRAPH; + } + } + } + } + } + } + } + } + } + } + } + else if (s[4].unicode() == 'i') { if (s[5].unicode() == 'n') { if (s[6].unicode() == 'i') { if (s[7].unicode() == 't') { @@ -2828,8 +4118,9 @@ static inline int classify15(const QChar *s) { if (s[11].unicode() == 'i') { if (s[12].unicode() == 'z') { if (s[13].unicode() == 'e') { - if (s[14].unicode() == 'r') + if (s[14].unicode() == 'r') { return T_DOXY_HIDEINITIALIZER; + } } } } @@ -2858,8 +4149,9 @@ static inline int classify15(const QChar *s) { if (s[11].unicode() == 'i') { if (s[12].unicode() == 'z') { if (s[13].unicode() == 'e') { - if (s[14].unicode() == 'r') + if (s[14].unicode() == 'r') { return T_DOXY_SHOWINITIALIZER; + } } } } @@ -2888,8 +4180,128 @@ static inline int classify15(const QChar *s) { if (s[11].unicode() == 'e') { if (s[12].unicode() == 'n') { if (s[13].unicode() == 't') { - if (s[14].unicode() == 's') + if (s[14].unicode() == 's') { return T_DOXY_TABLEOFCONTENTS; + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + return T_DOXY_IDENTIFIER; +} + +static inline int classify16(const QChar *s) { + if (s[0].unicode() == 'p') { + if (s[1].unicode() == 'r') { + if (s[2].unicode() == 'o') { + if (s[3].unicode() == 't') { + if (s[4].unicode() == 'e') { + if (s[5].unicode() == 'c') { + if (s[6].unicode() == 't') { + if (s[7].unicode() == 'e') { + if (s[8].unicode() == 'd') { + if (s[9].unicode() == 's') { + if (s[10].unicode() == 'e') { + if (s[11].unicode() == 'c') { + if (s[12].unicode() == 't') { + if (s[13].unicode() == 'i') { + if (s[14].unicode() == 'o') { + if (s[15].unicode() == 'n') { + return T_DOXY_PROTECTEDSECTION; + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + return T_DOXY_IDENTIFIER; +} + +static inline int classify17(const QChar *s) { + if (s[0].unicode() == 'q') { + if (s[1].unicode() == 'm') { + if (s[2].unicode() == 'l') { + if (s[3].unicode() == 'a') { + if (s[4].unicode() == 't') { + if (s[5].unicode() == 't') { + if (s[6].unicode() == 'a') { + if (s[7].unicode() == 'c') { + if (s[8].unicode() == 'h') { + if (s[9].unicode() == 'e') { + if (s[10].unicode() == 'd') { + if (s[11].unicode() == 's') { + if (s[12].unicode() == 'i') { + if (s[13].unicode() == 'g') { + if (s[14].unicode() == 'n') { + if (s[15].unicode() == 'a') { + if (s[16].unicode() == 'l') { + return T_DOXY_QMLATTACHEDSIGNAL; + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + return T_DOXY_IDENTIFIER; +} + +static inline int classify19(const QChar *s) { + if (s[0].unicode() == 'q') { + if (s[1].unicode() == 'm') { + if (s[2].unicode() == 'l') { + if (s[3].unicode() == 'a') { + if (s[4].unicode() == 't') { + if (s[5].unicode() == 't') { + if (s[6].unicode() == 'a') { + if (s[7].unicode() == 'c') { + if (s[8].unicode() == 'h') { + if (s[9].unicode() == 'e') { + if (s[10].unicode() == 'd') { + if (s[11].unicode() == 'p') { + if (s[12].unicode() == 'r') { + if (s[13].unicode() == 'o') { + if (s[14].unicode() == 'p') { + if (s[15].unicode() == 'e') { + if (s[16].unicode() == 'r') { + if (s[17].unicode() == 't') { + if (s[18].unicode() == 'y') { + return T_DOXY_QMLATTACHEDPROPERTY; + } + } + } + } + } } } } @@ -2922,8 +4334,11 @@ int CppTools::classifyDoxygenTag(const QChar *s, int n) { case 11: return classify11(s); case 12: return classify12(s); case 13: return classify13(s); + case 14: return classify14(s); case 15: return classify15(s); + case 16: return classify16(s); + case 17: return classify17(s); + case 19: return classify19(s); default: return T_DOXY_IDENTIFIER; } // switch } - diff --git a/src/plugins/cpptools/cppdoxygen.h b/src/plugins/cpptools/cppdoxygen.h index 2eb8b001f1c..f1e708bd98e 100644 --- a/src/plugins/cpptools/cppdoxygen.h +++ b/src/plugins/cpptools/cppdoxygen.h @@ -33,222 +33,287 @@ namespace CppTools { enum DoxygenReservedWord { T_DOXY_IDENTIFIER, + + T_DOXY_A, + T_DOXY_ABSTRACT, + T_DOXY_ADDINDEX, + T_DOXY_ADDTOGROUP, + T_DOXY_ANCHOR, + T_DOXY_ANNOTATEDLIST, T_DOXY_ARG, T_DOXY_ATTENTION, T_DOXY_AUTHOR, - T_DOXY_CALLGRAPH, - T_DOXY_CODE, - T_DOXY_DOT, - T_DOXY_ELSE, - T_DOXY_ENDCODE, - T_DOXY_ENDCOND, - T_DOXY_ENDDOT, - T_DOXY_ENDHTMLONLY, - T_DOXY_ENDIF, - T_DOXY_ENDLATEXONLY, - T_DOXY_ENDLINK, - T_DOXY_ENDMANONLY, - T_DOXY_ENDVERBATIM, - T_DOXY_ENDXMLONLY, - T_DOXY_HIDEINITIALIZER, - T_DOXY_HTMLONLY, - T_DOXY_INTERFACE, - T_DOXY_INTERNAL, - T_DOXY_INVARIANT, - T_DOXY_LATEXONLY, - T_DOXY_LI, - T_DOXY_MANONLY, - T_DOXY_N, - T_DOXY_NOSUBGROUPING, - T_DOXY_NOTE, - T_DOXY_ONLY, - T_DOXY_POST, - T_DOXY_PRE, - T_DOXY_REMARKS, - T_DOXY_RETURN, - T_DOXY_RETURNS, - T_DOXY_SA, - T_DOXY_SEE, - T_DOXY_SHOWINITIALIZER, - T_DOXY_SINCE, - T_DOXY_TEST, - T_DOXY_TODO, - T_DOXY_VERBATIM, - T_DOXY_WARNING, - T_DOXY_XMLONLY, - T_DOXY_A, - T_DOXY_ADDTOGROUP, - T_DOXY_ANCHOR, + T_DOXY_AUTHORS, T_DOXY_B, - T_DOXY_C, - T_DOXY_CLASS, - T_DOXY_COND, - T_DOXY_COPYDOC, - T_DOXY_DEF, - T_DOXY_DONTINCLUDE, - T_DOXY_DOTFILE, - T_DOXY_E, - T_DOXY_ELSEIF, - T_DOXY_EM, - T_DOXY_ENUM, - T_DOXY_EXAMPLE, - T_DOXY_EXCEPTION, - T_DOXY_EXCEPTIONS, - T_DOXY_FILE, - T_DOXY_HTMLINCLUDE, - T_DOXY_IF, - T_DOXY_IFNOT, - T_DOXY_INCLUDE, - T_DOXY_LINK, - T_DOXY_NAMESPACE, - T_DOXY_P, - T_DOXY_PACKAGE, - T_DOXY_REF, - T_DOXY_RELATES, - T_DOXY_RELATESALSO, - T_DOXY_RETVAL, - T_DOXY_THROW, - T_DOXY_THROWS, - T_DOXY_VERBINCLUDE, - T_DOXY_VERSION, - T_DOXY_XREFITEM, - T_DOXY_PARAM, - T_DOXY_IMAGE, - T_DOXY_DEFGROUP, - T_DOXY_PAGE, - T_DOXY_PARAGRAPH, - T_DOXY_SECTION, - T_DOXY_STRUCT, - T_DOXY_SUBSECTION, - T_DOXY_SUBSUBSECTION, - T_DOXY_UNION, - T_DOXY_WEAKGROUP, - T_DOXY_ADDINDEX, - T_DOXY_BRIEF, - T_DOXY_BUG, - T_DOXY_DATE, - T_DOXY_DEPRECATED, - T_DOXY_FN, - T_DOXY_INGROUP, - T_DOXY_LINE, - T_DOXY_MAINPAGE, - T_DOXY_NAME, - T_DOXY_OVERLOAD, - T_DOXY_PAR, - T_DOXY_SHORT, - T_DOXY_SKIP, - T_DOXY_SKIPLINE, - T_DOXY_TYPEDEF, - T_DOXY_UNTIL, - T_DOXY_VAR, - - T_FIRST_QDOC_TAG, - - T_DOXY_ABSTRACT = T_FIRST_QDOC_TAG, T_DOXY_BADCODE, T_DOXY_BASENAME, T_DOXY_BOLD, + T_DOXY_BRIEF, + T_DOXY_BUG, + T_DOXY_C, + T_DOXY_CALLERGRAPH, + T_DOXY_CALLGRAPH, T_DOXY_CAPTION, + T_DOXY_CATEGORY, T_DOXY_CHAPTER, + T_DOXY_CITE, + T_DOXY_CLASS, + T_DOXY_CODE, T_DOXY_CODELINE, + T_DOXY_COMPAT, + T_DOXY_COND, + T_DOXY_CONTENTSPAGE, + T_DOXY_COPYBRIEF, + T_DOXY_COPYDETAILS, + T_DOXY_COPYDOC, + T_DOXY_COPYRIGHT, + T_DOXY_CORELIB, + T_DOXY_DATE, + T_DOXY_DEF, + T_DOXY_DEFAULT, + T_DOXY_DEFGROUP, + T_DOXY_DEPRECATED, + T_DOXY_DETAILS, + T_DOXY_DIAFILE, + T_DOXY_DIR, + T_DOXY_DIV, + T_DOXY_DOCBOOKONLY, + T_DOXY_DONTINCLUDE, + T_DOXY_DOT, + T_DOXY_DOTFILE, T_DOXY_DOTS, + T_DOXY_E, + T_DOXY_ELSE, + T_DOXY_ELSEIF, + T_DOXY_EM, T_DOXY_ENDABSTRACT, T_DOXY_ENDCHAPTER, + T_DOXY_ENDCODE, + T_DOXY_ENDCOND, + T_DOXY_ENDDOCBOOKONLY, + T_DOXY_ENDDOT, T_DOXY_ENDFOOTNOTE, + T_DOXY_ENDHTMLONLY, + T_DOXY_ENDIF, + T_DOXY_ENDINTERNAL, + T_DOXY_ENDLATEXONLY, T_DOXY_ENDLEGALESE, + T_DOXY_ENDLINK, T_DOXY_ENDLIST, + T_DOXY_ENDMANONLY, + T_DOXY_ENDMSC, T_DOXY_ENDOMIT, + T_DOXY_ENDPARBLOCK, T_DOXY_ENDPART, T_DOXY_ENDQUOTATION, T_DOXY_ENDRAW, + T_DOXY_ENDRTFONLY, + T_DOXY_ENDSECREFLIST, T_DOXY_ENDSECTION1, T_DOXY_ENDSECTION2, T_DOXY_ENDSECTION3, T_DOXY_ENDSECTION4, T_DOXY_ENDSIDEBAR, T_DOXY_ENDTABLE, + T_DOXY_ENDUML, + T_DOXY_ENDVERBATIM, + T_DOXY_ENDXMLONLY, + T_DOXY_ENUM, + T_DOXY_EXAMPLE, + T_DOXY_EXCEPTION, + T_DOXY_EXCEPTIONS, T_DOXY_EXPIRE, + T_DOXY_EXTENDS, + T_DOXY_EXTERNALPAGE, + T_DOXY_FILE, + T_DOXY_FN, T_DOXY_FOOTNOTE, T_DOXY_GENERATELIST, T_DOXY_GRANULARITY, + T_DOXY_GROUP, + T_DOXY_GUI, T_DOXY_HEADER, + T_DOXY_HEADERFILE, + T_DOXY_HIDECALLERGRAPH, + T_DOXY_HIDECALLGRAPH, + T_DOXY_HIDEINITIALIZER, + T_DOXY_HTMLINCLUDE, + T_DOXY_HTMLONLY, T_DOXY_I, + T_DOXY_IDLEXCEPT, + T_DOXY_IF, + T_DOXY_IFNOT, + T_DOXY_IMAGE, + T_DOXY_IMPLEMENTS, + T_DOXY_INCLUDE, + T_DOXY_INCLUDELINENO, T_DOXY_INDEX, + T_DOXY_INDEXPAGE, + T_DOXY_INGROUP, + T_DOXY_INHEADERFILE, + T_DOXY_INHERITS, T_DOXY_INLINEIMAGE, + T_DOXY_INMODULE, + T_DOXY_INPUBLICGROUP, + T_DOXY_INQMLMODULE, + T_DOXY_INSTANTIATES, + T_DOXY_INTERFACE, + T_DOXY_INTERNAL, + T_DOXY_INVARIANT, T_DOXY_KEYWORD, T_DOXY_L, + T_DOXY_LATEXINCLUDE, + T_DOXY_LATEXONLY, T_DOXY_LEGALESE, + T_DOXY_LI, + T_DOXY_LINE, + T_DOXY_LINK, T_DOXY_LIST, + T_DOXY_MACRO, + T_DOXY_MAINCLASS, + T_DOXY_MAINPAGE, + T_DOXY_MANONLY, + T_DOXY_MEMBEROF, T_DOXY_META, + T_DOXY_MODULE, + T_DOXY_MSC, + T_DOXY_MSCFILE, + T_DOXY_N, + T_DOXY_NAME, + T_DOXY_NAMESPACE, + T_DOXY_NETWORK, T_DOXY_NEWCODE, + T_DOXY_NEXTPAGE, + T_DOXY_NOAUTOLIST, + T_DOXY_NONREENTRANT, + T_DOXY_NOSUBGROUPING, + T_DOXY_NOTE, T_DOXY_O, + T_DOXY_OBSOLETE, T_DOXY_OLDCODE, T_DOXY_OMIT, T_DOXY_OMITVALUE, + T_DOXY_ONLY, + T_DOXY_OPENGL, + T_DOXY_OVERLOAD, + T_DOXY_P, + T_DOXY_PACKAGE, + T_DOXY_PAGE, + T_DOXY_PAR, + T_DOXY_PARAGRAPH, + T_DOXY_PARAM, + T_DOXY_PARBLOCK, T_DOXY_PART, + T_DOXY_POST, + T_DOXY_PRE, + T_DOXY_PRELIMINARY, + T_DOXY_PREVIOUSPAGE, T_DOXY_PRINTLINE, T_DOXY_PRINTTO, T_DOXY_PRINTUNTIL, + T_DOXY_PRIVATE, + T_DOXY_PRIVATESECTION, + T_DOXY_PROPERTY, + T_DOXY_PROTECTED, + T_DOXY_PROTECTEDSECTION, + T_DOXY_PROTOCOL, + T_DOXY_PUBLIC, + T_DOXY_PUBLICSECTION, + T_DOXY_PURE, + T_DOXY_QMLABSTRACT, + T_DOXY_QMLATTACHEDPROPERTY, + T_DOXY_QMLATTACHEDSIGNAL, + T_DOXY_QMLBASICTYPE, + T_DOXY_QMLCLASS, + T_DOXY_QMLMETHOD, + T_DOXY_QMLMODULE, + T_DOXY_QMLPROPERTY, + T_DOXY_QMLSIGNAL, + T_DOXY_QMLTYPE, + T_DOXY_QT3SUPPORT, + T_DOXY_QTESTLIB, T_DOXY_QUOTATION, T_DOXY_QUOTEFILE, T_DOXY_QUOTEFROMFILE, T_DOXY_QUOTEFUNCTION, T_DOXY_RAW, + T_DOXY_REENTRANT, + T_DOXY_REF, + T_DOXY_REFITEM, + T_DOXY_REIMP, + T_DOXY_RELATED, + T_DOXY_RELATEDALSO, + T_DOXY_RELATES, + T_DOXY_RELATESALSO, + T_DOXY_REMARK, + T_DOXY_REMARKS, + T_DOXY_RESULT, + T_DOXY_RETURN, + T_DOXY_RETURNS, + T_DOXY_RETVAL, T_DOXY_ROW, + T_DOXY_RTFONLY, + T_DOXY_SA, + T_DOXY_SECREFLIST, + T_DOXY_SECTION, T_DOXY_SECTION1, T_DOXY_SECTION2, T_DOXY_SECTION3, T_DOXY_SECTION4, + T_DOXY_SEE, + T_DOXY_SERVICE, + T_DOXY_SHORT, + T_DOXY_SHOWINITIALIZER, T_DOXY_SIDEBAR, + T_DOXY_SINCE, + T_DOXY_SKIP, + T_DOXY_SKIPLINE, T_DOXY_SKIPTO, T_DOXY_SKIPUNTIL, T_DOXY_SNIPPET, + T_DOXY_SPAN, + T_DOXY_SQL, + T_DOXY_STARTPAGE, + T_DOXY_STARTUML, + T_DOXY_STRUCT, T_DOXY_SUB, + T_DOXY_SUBPAGE, + T_DOXY_SUBSECTION, + T_DOXY_SUBSUBSECTION, + T_DOXY_SUBTITLE, T_DOXY_SUP, + T_DOXY_SVG, T_DOXY_TABLE, T_DOXY_TABLEOFCONTENTS, T_DOXY_TARGET, + T_DOXY_TEST, + T_DOXY_THREADSAFE, + T_DOXY_THROW, + T_DOXY_THROWS, + T_DOXY_TITLE, + T_DOXY_TODO, + T_DOXY_TPARAM, T_DOXY_TT, + T_DOXY_TYPEDEF, + T_DOXY_UICONTROL, + T_DOXY_UITOOLS, T_DOXY_UNDERLINE, T_DOXY_UNICODE, + T_DOXY_UNION, + T_DOXY_UNTIL, T_DOXY_VALUE, - T_DOXY_CONTENTSPAGE, - T_DOXY_EXTERNALPAGE, - T_DOXY_GROUP, - T_DOXY_HEADERFILE, - T_DOXY_INDEXPAGE, - T_DOXY_INHEADERFILE, - T_DOXY_MACRO, - T_DOXY_MODULE, - T_DOXY_NEXTPAGE, - T_DOXY_PREVIOUSPAGE, - T_DOXY_PROPERTY, - T_DOXY_REIMP, - T_DOXY_SERVICE, - T_DOXY_STARTPAGE, + T_DOXY_VAR, T_DOXY_VARIABLE, - T_DOXY_COMPAT, - T_DOXY_INMODULE, - T_DOXY_MAINCLASS, - T_DOXY_NONREENTRANT, - T_DOXY_OBSOLETE, - T_DOXY_PRELIMINARY, - T_DOXY_INPUBLICGROUP, - T_DOXY_REENTRANT, - T_DOXY_SUBTITLE, - T_DOXY_THREADSAFE, - T_DOXY_TITLE, - T_DOXY_CORELIB, - T_DOXY_UITOOLS, - T_DOXY_GUI, - T_DOXY_NETWORK, - T_DOXY_OPENGL, - T_DOXY_QT3SUPPORT, - T_DOXY_SVG, - T_DOXY_SQL, - T_DOXY_QTESTLIB, + T_DOXY_VERBATIM, + T_DOXY_VERBINCLUDE, + T_DOXY_VERSION, + T_DOXY_VHDLFLOW, + T_DOXY_WARNING, + T_DOXY_WEAKGROUP, T_DOXY_WEBKIT, T_DOXY_XML, + T_DOXY_XMLONLY, + T_DOXY_XREFITEM, T_DOXY_LAST_TAG }; diff --git a/src/plugins/cpptools/cppdoxygen.kwgen b/src/plugins/cpptools/cppdoxygen.kwgen new file mode 100644 index 00000000000..bb8995f110f --- /dev/null +++ b/src/plugins/cpptools/cppdoxygen.kwgen @@ -0,0 +1,286 @@ +%token-prefix=T_DOXY_ +%toupper +%char-type=QChar +%unicode-function=.unicode() + +%% +a +abstract +addindex +addtogroup +anchor +annotatedlist +arg +attention +author +authors +b +badcode +basename +bold +brief +bug +c +callergraph +callgraph +caption +category +chapter +cite +class +code +codeline +compat +cond +contentspage +copybrief +copydetails +copydoc +copyright +corelib +date +def +default +defgroup +deprecated +details +diafile +dir +div +docbookonly +dontinclude +dot +dotfile +dots +e +else +elseif +em +endabstract +endchapter +endcode +endcond +enddocbookonly +enddot +endfootnote +endhtmlonly +endif +endinternal +endlatexonly +endlegalese +endlink +endlist +endmanonly +endmsc +endomit +endparblock +endpart +endquotation +endraw +endrtfonly +endsecreflist +endsection1 +endsection2 +endsection3 +endsection4 +endsidebar +endtable +enduml +endverbatim +endxmlonly +enum +example +exception +exceptions +expire +extends +externalpage +file +fn +footnote +generatelist +granularity +group +gui +header +headerfile +hidecallergraph +hidecallgraph +hideinitializer +htmlinclude +htmlonly +i +idlexcept +if +ifnot +image +implements +include +includelineno +index +indexpage +ingroup +inheaderfile +inherits +inlineimage +inmodule +inpublicgroup +inqmlmodule +instantiates +interface +internal +invariant +keyword +l +latexinclude +latexonly +legalese +li +line +link +list +macro +mainclass +mainpage +manonly +memberof +meta +module +msc +mscfile +n +name +namespace +network +newcode +nextpage +noautolist +nonreentrant +nosubgrouping +note +o +obsolete +oldcode +omit +omitvalue +only +opengl +overload +p +package +page +par +paragraph +param +parblock +part +post +pre +preliminary +previouspage +printline +printto +printuntil +private +privatesection +property +protected +protectedsection +protocol +public +publicsection +pure +qmlabstract +qmlattachedproperty +qmlattachedsignal +qmlbasictype +qmlclass +qmlmethod +qmlmodule +qmlproperty +qmlsignal +qmltype +qt3support +qtestlib +quotation +quotefile +quotefromfile +quotefunction +raw +reentrant +ref +refitem +reimp +related +relatedalso +relates +relatesalso +remark +remarks +result +return +returns +retval +row +rtfonly +sa +secreflist +section +section1 +section2 +section3 +section4 +see +service +short +showinitializer +sidebar +since +skip +skipline +skipto +skipuntil +snippet +span +sql +startpage +startuml +struct +sub +subpage +subsection +subsubsection +subtitle +sup +svg +table +tableofcontents +target +test +threadsafe +throw +throws +title +todo +tparam +tt +typedef +uicontrol +uitools +underline +unicode +union +until +value +var +variable +verbatim +verbinclude +version +vhdlflow +warning +weakgroup +webkit +xml +xmlonly +xrefitem diff --git a/src/plugins/cpptools/cpplocalsymbols_test.cpp b/src/plugins/cpptools/cpplocalsymbols_test.cpp index 7fb8a921e20..9183c9bfcdd 100644 --- a/src/plugins/cpptools/cpplocalsymbols_test.cpp +++ b/src/plugins/cpptools/cpplocalsymbols_test.cpp @@ -115,7 +115,6 @@ struct Result } // anonymous namespace Q_DECLARE_METATYPE(Result) -Q_DECLARE_METATYPE(QList) QT_BEGIN_NAMESPACE namespace QTest { diff --git a/src/plugins/cpptools/cpplocatorfilter_test.cpp b/src/plugins/cpptools/cpplocatorfilter_test.cpp index b9b08f3d547..27258855d80 100644 --- a/src/plugins/cpptools/cpplocatorfilter_test.cpp +++ b/src/plugins/cpptools/cpplocatorfilter_test.cpp @@ -48,8 +48,6 @@ using namespace CppTools::Internal; using namespace ExtensionSystem; using namespace Utils; -Q_DECLARE_METATYPE(ILocatorFilter *) - namespace { enum { debug = 0 }; diff --git a/src/plugins/cpptools/cppmodelmanager.cpp b/src/plugins/cpptools/cppmodelmanager.cpp index cdf5922e424..13b582cfed0 100644 --- a/src/plugins/cpptools/cppmodelmanager.cpp +++ b/src/plugins/cpptools/cppmodelmanager.cpp @@ -67,8 +67,6 @@ #include #endif -Q_DECLARE_METATYPE(QSet) - static const bool DumpProjectInfo = qgetenv("QTC_DUMP_PROJECT_INFO") == "1"; using namespace CppTools; diff --git a/src/plugins/cpptools/cppmodelmanager_test.cpp b/src/plugins/cpptools/cppmodelmanager_test.cpp index 23042216310..92bbebf91da 100644 --- a/src/plugins/cpptools/cppmodelmanager_test.cpp +++ b/src/plugins/cpptools/cppmodelmanager_test.cpp @@ -57,7 +57,7 @@ using namespace ProjectExplorer; typedef CPlusPlus::Document Document; -Q_DECLARE_METATYPE(QVector) +Q_DECLARE_METATYPE(ProjectFile) namespace { diff --git a/src/plugins/cpptools/cpptoolsplugin.h b/src/plugins/cpptools/cpptoolsplugin.h index c26df354f4e..b4d55b9927a 100644 --- a/src/plugins/cpptools/cpptoolsplugin.h +++ b/src/plugins/cpptools/cpptoolsplugin.h @@ -108,6 +108,9 @@ private slots: void test_global_completion_data(); void test_global_completion(); + void test_doxygen_tag_completion_data(); + void test_doxygen_tag_completion(); + void test_completion_member_access_operator_data(); void test_completion_member_access_operator(); diff --git a/src/plugins/cpptools/functionutils.cpp b/src/plugins/cpptools/functionutils.cpp index dd26c80f25d..b8224923a06 100644 --- a/src/plugins/cpptools/functionutils.cpp +++ b/src/plugins/cpptools/functionutils.cpp @@ -175,8 +175,6 @@ typedef QList VirtualityList; } // CppTools namespace Q_DECLARE_METATYPE(CppTools::Internal::Virtuality) -Q_DECLARE_METATYPE(CppTools::Internal::VirtualityList) -Q_DECLARE_METATYPE(QList) namespace CppTools { namespace Internal { diff --git a/src/plugins/cpptools/modelmanagertesthelper.cpp b/src/plugins/cpptools/modelmanagertesthelper.cpp index 38573fcf07e..f347cd81af4 100644 --- a/src/plugins/cpptools/modelmanagertesthelper.cpp +++ b/src/plugins/cpptools/modelmanagertesthelper.cpp @@ -33,8 +33,6 @@ #include -Q_DECLARE_METATYPE(QSet) - using namespace CppTools::Internal; using namespace CppTools::Tests; diff --git a/src/plugins/cpptools/symbolsearcher_test.cpp b/src/plugins/cpptools/symbolsearcher_test.cpp index 1eae1a9b9a7..dc71fa1562c 100644 --- a/src/plugins/cpptools/symbolsearcher_test.cpp +++ b/src/plugins/cpptools/symbolsearcher_test.cpp @@ -126,7 +126,6 @@ private: } // anonymous namespace Q_DECLARE_METATYPE(ResultData) -Q_DECLARE_METATYPE(ResultDataList) QT_BEGIN_NAMESPACE namespace QTest { diff --git a/src/plugins/debugger/console/console.cpp b/src/plugins/debugger/console/console.cpp index 25bed9768bf..3ea294ef3e5 100644 --- a/src/plugins/debugger/console/console.cpp +++ b/src/plugins/debugger/console/console.cpp @@ -57,7 +57,7 @@ namespace Internal { Console::Console() { - m_consoleItemModel = new ConsoleItemModel; + m_consoleItemModel = new ConsoleItemModel(this); m_consoleWidget = new QWidget; m_consoleWidget->setWindowTitle(displayName()); diff --git a/src/plugins/debugger/debugger.qrc b/src/plugins/debugger/debugger.qrc index 00d902ea0d9..cea824430d2 100644 --- a/src/plugins/debugger/debugger.qrc +++ b/src/plugins/debugger/debugger.qrc @@ -6,6 +6,12 @@ images/debugger_continue@2x.png images/debugger_continue_mask.png images/debugger_continue_mask@2x.png + images/stop_overlay_small.png + images/stop_overlay_small@2x.png + images/interrupt_overlay_small.png + images/interrupt_overlay_small@2x.png + images/continue_overlay_small.png + images/continue_overlay_small@2x.png images/debugger_empty_14.png images/debugger_interrupt.png images/debugger_interrupt@2x.png diff --git a/src/plugins/debugger/debuggericons.h b/src/plugins/debugger/debuggericons.h index 10c77df10f1..fd2d1837c4b 100644 --- a/src/plugins/debugger/debuggericons.h +++ b/src/plugins/debugger/debuggericons.h @@ -47,11 +47,20 @@ const Utils::Icon CONTINUE( const Utils::Icon CONTINUE_FLAT({ {QLatin1String(":/projectexplorer/images/debugger_beetle_mask.png"), Utils::Theme::IconsDebugColor}, {QLatin1String(":/debugger/images/debugger_continue_mask.png"), Utils::Theme::IconsRunColor}}); +const Utils::Icon DEBUG_CONTINUE_SMALL({ + {QLatin1String(":/projectexplorer/images/debugger_overlay_small.png"), Utils::Theme::IconsDebugColor}, + {QLatin1String(":/debugger/images/continue_overlay_small.png"), Utils::Theme::IconsRunColor}}); const Utils::Icon INTERRUPT( QLatin1String(":/debugger/images/debugger_interrupt.png")); const Utils::Icon INTERRUPT_FLAT({ {QLatin1String(":/projectexplorer/images/debugger_beetle_mask.png"), Utils::Theme::IconsDebugColor}, {QLatin1String(":/debugger/images/debugger_interrupt_mask.png"), Utils::Theme::IconsInterruptColor}}); +const Utils::Icon DEBUG_INTERRUPT_SMALL({ + {QLatin1String(":/projectexplorer/images/debugger_overlay_small.png"), Utils::Theme::IconsDebugColor}, + {QLatin1String(":/debugger/images/interrupt_overlay_small.png"), Utils::Theme::IconsInterruptColor}}); +const Utils::Icon DEBUG_EXIT_SMALL({ + {QLatin1String(":/projectexplorer/images/debugger_overlay_small.png"), Utils::Theme::IconsDebugColor}, + {QLatin1String(":/debugger/images/stop_overlay_small.png"), Utils::Theme::IconsStopColor}}); const Utils::Icon LOCATION( QLatin1String(":/debugger/images/location_16.png")); const Utils::Icon SNAPSHOT( diff --git a/src/plugins/debugger/debuggermainwindow.cpp b/src/plugins/debugger/debuggermainwindow.cpp index 54390d844d1..ea9ed897c2b 100644 --- a/src/plugins/debugger/debuggermainwindow.cpp +++ b/src/plugins/debugger/debuggermainwindow.cpp @@ -79,11 +79,24 @@ DebuggerMainWindow::DebuggerMainWindow() DebuggerMainWindow::~DebuggerMainWindow() { - // as we have to setParent(0) on dock widget that are not selected, - // we keep track of all and make sure we don't leak any - foreach (const DockPtr &ptr, m_dockWidgets) { - if (ptr) - delete ptr.data(); + // We keep track of widgets for operations that haven't been activated, yet, and make sure we + // don't leak any. + foreach (const Perspective &perspective, m_perspectiveForPerspectiveId) { + foreach (const Perspective::Operation &operation, perspective.operations()) { + if (operation.widget) { + // There are two possible states: Either addDockForWidget(widget) has + // been called on an operation.widget (e.g. when the perspective gets + // activated for the first time), or not. In the first case we don't + // have to explicitly delete it as we have called setParent(this) on + // it. In the second case, if the widget didn't have a parent before, + // we have to delete it. + if (!operation.widget->parentWidget()) { + // These are from perspectives that were never activated and didn't + // have a parent to begin with. + delete operation.widget; + } + } + } } } @@ -119,11 +132,6 @@ QDockWidget *DebuggerMainWindow::dockWidget(const QByteArray &dockId) const return m_dockForDockId.value(dockId); } -QWidget *DebuggerMainWindow::modeWindow() -{ - return m_modeWindow; -} - void DebuggerMainWindow::resetCurrentPerspective() { loadPerspectiveHelper(m_currentPerspectiveId, false); @@ -140,7 +148,7 @@ void DebuggerMainWindow::restorePerspective(const QByteArray &perspectiveId) m_perspectiveChooser->setCurrentIndex(index); } -void DebuggerMainWindow::finalizeSetup(Core::IMode *mode, QWidget *central) +void DebuggerMainWindow::finalizeSetup() { auto viewButton = new QToolButton; viewButton->setText(tr("Views")); @@ -195,7 +203,10 @@ void DebuggerMainWindow::finalizeSetup(Core::IMode *mode, QWidget *central) m_toolbarDock = dock; addDockWidget(Qt::BottomDockWidgetArea, dock); +} +QWidget *createModeWindow(Core::IMode *mode, DebuggerMainWindow *mainWindow, QWidget *central) +{ if (!central) central = new EditorManagerPlaceHolder(mode); @@ -225,7 +236,7 @@ void DebuggerMainWindow::finalizeSetup(Core::IMode *mode, QWidget *central) // Right-side window with editor, output etc. auto mainWindowSplitter = new MiniSplitter; - mainWindowSplitter->addWidget(this); + mainWindowSplitter->addWidget(mainWindow); mainWindowSplitter->addWidget(new OutputPanePlaceHolder(mode, mainWindowSplitter)); auto outputPane = new OutputPanePlaceHolder(mode, mainWindowSplitter); outputPane->setObjectName(QLatin1String("DebuggerOutputPanePlaceHolder")); @@ -242,9 +253,9 @@ void DebuggerMainWindow::finalizeSetup(Core::IMode *mode, QWidget *central) splitter->setStretchFactor(0, 0); splitter->setStretchFactor(1, 1); splitter->setObjectName(QLatin1String("DebugModeWidget")); - setCentralWidget(centralEditorWidget); + mainWindow->setCentralWidget(centralEditorWidget); - m_modeWindow = splitter; + return splitter; } void DebuggerMainWindow::loadPerspectiveHelper(const QByteArray &perspectiveId, bool fromStoredSettings) @@ -254,10 +265,10 @@ void DebuggerMainWindow::loadPerspectiveHelper(const QByteArray &perspectiveId, saveCurrentPerspective(); foreach (QDockWidget *dockWidget, m_dockForDockId) { QTC_ASSERT(dockWidget, continue); + dockWidget->setFloating(false); + dockWidget->setParent(this); removeDockWidget(dockWidget); dockWidget->hide(); - // Prevent saveState storing the data of the wrong children. - dockWidget->setParent(0); } ICore::removeAdditionalContext(Context(Id::fromName(m_currentPerspectiveId))); @@ -350,8 +361,7 @@ QDockWidget *DebuggerMainWindow::registerDockWidget(const QByteArray &dockId, QW { QTC_ASSERT(!widget->objectName().isEmpty(), return 0); QDockWidget *dockWidget = addDockForWidget(widget); - dockWidget->setParent(0); - m_dockWidgets.append(DebuggerMainWindow::DockPtr(dockWidget)); + dockWidget->setParent(this); m_dockForDockId[dockId] = dockWidget; return dockWidget; } diff --git a/src/plugins/debugger/debuggermainwindow.h b/src/plugins/debugger/debuggermainwindow.h index c52870cf384..5f0bc39a7ad 100644 --- a/src/plugins/debugger/debuggermainwindow.h +++ b/src/plugins/debugger/debuggermainwindow.h @@ -60,7 +60,7 @@ public: Qt::DockWidgetArea area = Qt::BottomDockWidgetArea); QByteArray dockId; - QWidget *widget = 0; + QPointer widget; QByteArray anchorDockId; OperationType operationType; bool visibleByDefault; @@ -114,14 +114,12 @@ public: void resetCurrentPerspective(); void restorePerspective(const QByteArray &perspectiveId); - void finalizeSetup(Core::IMode *mode, QWidget *central = 0); + void finalizeSetup(); void showStatusMessage(const QString &message, int timeoutMS); QDockWidget *dockWidget(const QByteArray &dockId) const; QByteArray currentPerspective() const { return m_currentPerspectiveId; } - QWidget *modeWindow(); - private: QDockWidget *registerDockWidget(const QByteArray &dockId, QWidget *widget); void loadPerspectiveHelper(const QByteArray &perspectiveId, bool fromStoredSettings = true); @@ -135,12 +133,8 @@ private: QHash m_dockForDockId; QHash m_toolbarForPerspectiveId; QHash m_perspectiveForPerspectiveId; - - // list of dock widgets to prevent memory leak - typedef QPointer DockPtr; - QList m_dockWidgets; - - QWidget *m_modeWindow = 0; }; +QWidget *createModeWindow(Core::IMode *mode, DebuggerMainWindow *mainWindow, QWidget *central); + } // Utils diff --git a/src/plugins/debugger/debuggerplugin.cpp b/src/plugins/debugger/debuggerplugin.cpp index 466912b119f..da9e4a6d862 100644 --- a/src/plugins/debugger/debuggerplugin.cpp +++ b/src/plugins/debugger/debuggerplugin.cpp @@ -486,41 +486,27 @@ bool DummyEngine::hasCapability(unsigned cap) const class DebugModeContext : public IContext { public: - DebugModeContext(DebuggerMainWindow *mainWindow) : m_mainWindow(mainWindow) + DebugModeContext(QWidget *modeWindow) { setContext(Context(CC::C_EDITORMANAGER)); + setWidget(modeWindow); ICore::addContextObject(this); } - - QWidget *widget() const override { return m_mainWindow->modeWindow(); } - - DebuggerMainWindow *m_mainWindow; }; class DebugMode : public IMode { public: - DebugMode(DebuggerMainWindow *mainWindow) : m_mainWindow(mainWindow) + DebugMode() { setObjectName(QLatin1String("DebugMode")); setContext(Context(C_DEBUGMODE, CC::C_NAVIGATION_PANE)); setDisplayName(DebuggerPlugin::tr("Debug")); setIcon(Utils::Icon::modeIcon(Icons::MODE_DEBUGGER_CLASSIC, Icons::MODE_DEBUGGER_FLAT, Icons::MODE_DEBUGGER_FLAT_ACTIVE)); -// setIcon(Utils::Icon::modeIcon(Icons::MODE_ANALYZE_CLASSIC, -// Icons::MODE_ANALYZE_FLAT, Icons::MODE_ANALYZE_FLAT_ACTIVE)); setPriority(85); setId(MODE_DEBUG); } - - QWidget *widget() const override { return m_mainWindow->modeWindow(); } - - ~DebugMode() - { -// delete m_widget; - } - - DebuggerMainWindow *m_mainWindow; }; /////////////////////////////////////////////////////////////////////// @@ -924,7 +910,9 @@ public: void updateActiveLanguages(); public: - DebuggerMainWindow *m_mainWindow = 0; + QPointer m_mainWindow; + QPointer m_modeWindow; + QPointer m_mode; QHash m_descriptions; ActionContainer *m_menu = 0; @@ -1051,11 +1039,6 @@ DebuggerPluginPrivate::~DebuggerPluginPrivate() delete m_breakHandler; m_breakHandler = 0; - -// delete m_debugMode; -// m_debugMode = 0; - delete m_mainWindow; - m_mainWindow = 0; } DebuggerEngine *DebuggerPluginPrivate::dummyEngine() @@ -1073,6 +1056,42 @@ static QString msgParameterMissing(const QString &a) return DebuggerPlugin::tr("Option \"%1\" is missing the parameter.").arg(a); } +static Kit *guessKitFromParameters(const DebuggerRunParameters &rp) +{ + Kit *kit = 0; + + // Try to find a kit via ABI. + QList abis; + if (rp.toolChainAbi.isValid()) + abis.push_back(rp.toolChainAbi); + else if (!rp.inferior.executable.isEmpty()) + abis = Abi::abisOfBinary(FileName::fromString(rp.inferior.executable)); + + if (!abis.isEmpty()) { + // Try exact abis. + kit = KitManager::find(KitMatcher([abis](const Kit *k) -> bool { + if (const ToolChain *tc = ToolChainKitInformation::toolChain(k)) + return abis.contains(tc->targetAbi()) && DebuggerKitInformation::isValidDebugger(k); + return false; + })); + if (!kit) { + // Or something compatible. + kit = KitManager::find(KitMatcher([abis](const Kit *k) -> bool { + if (const ToolChain *tc = ToolChainKitInformation::toolChain(k)) + foreach (const Abi &a, abis) + if (a.isCompatibleWith(tc->targetAbi()) && DebuggerKitInformation::isValidDebugger(k)) + return true; + return false; + })); + } + } + + if (!kit) + kit = KitManager::defaultKit(); + + return kit; +} + bool DebuggerPluginPrivate::parseArgument(QStringList::const_iterator &it, const QStringList::const_iterator &cend, QString *errorMessage) { @@ -1135,6 +1154,9 @@ bool DebuggerPluginPrivate::parseArgument(QStringList::const_iterator &it, rp.inferior.environment = Utils::Environment::systemEnvironment(); rp.stubEnvironment = Utils::Environment::systemEnvironment(); rp.debuggerEnvironment = Utils::Environment::systemEnvironment(); + + if (!kit) + kit = guessKitFromParameters(rp); m_scheduledStarts.append(QPair(rp, kit)); return true; } @@ -1323,14 +1345,14 @@ bool DebuggerPluginPrivate::initialize(const QStringList &arguments, this, &DebuggerPluginPrivate::updateWatchersHeader, Qt::QueuedConnection); auto act = m_continueAction = new QAction(tr("Continue"), this); - act->setIcon(Icon::combinedIcon({Core::Icons::DEBUG_CONTINUE_SMALL.icon(), continueSideBarIcon})); + act->setIcon(Icon::combinedIcon({Icons::DEBUG_CONTINUE_SMALL.icon(), continueSideBarIcon})); connect(act, &QAction::triggered, this, &DebuggerPluginPrivate::handleExecContinue); act = m_exitAction = new QAction(tr("Stop Debugger"), this); - act->setIcon(Core::Icons::DEBUG_EXIT_SMALL.icon()); + act->setIcon(Icons::DEBUG_EXIT_SMALL.icon()); connect(act, &QAction::triggered, this, &DebuggerPluginPrivate::handleExecExit); - auto interruptIcon = Icon::combinedIcon({Core::Icons::DEBUG_INTERRUPT_SMALL.icon(), interruptSideBarIcon}); + auto interruptIcon = Icon::combinedIcon({Icons::DEBUG_INTERRUPT_SMALL.icon(), interruptSideBarIcon}); act = m_interruptAction = new QAction(tr("Interrupt"), this); act->setIcon(interruptIcon); connect(act, &QAction::triggered, this, &DebuggerPluginPrivate::handleExecInterrupt); @@ -1417,7 +1439,7 @@ bool DebuggerPluginPrivate::initialize(const QStringList &arguments, act = m_startAction = new QAction(this); const QIcon sideBarIcon = Icon::sideBarIcon(ProjectExplorer::Icons::DEBUG_START, ProjectExplorer::Icons::DEBUG_START_FLAT); - const QIcon debuggerIcon = Icon::combinedIcon({Core::Icons::DEBUG_START_SMALL.icon(), sideBarIcon}); + const QIcon debuggerIcon = Icon::combinedIcon({ProjectExplorer::Icons::DEBUG_START_SMALL.icon(), sideBarIcon}); act->setIcon(debuggerIcon); act->setText(tr("Start Debugging")); connect(act, &QAction::triggered, [] { ProjectExplorerPlugin::runStartupProject(ProjectExplorer::Constants::DEBUG_RUN_MODE); }); @@ -1709,13 +1731,16 @@ bool DebuggerPluginPrivate::initialize(const QStringList &arguments, connect(ProjectExplorerPlugin::instance(), &ProjectExplorerPlugin::settingsChanged, this, &DebuggerPluginPrivate::updateDebugWithoutDeployMenu); + m_mainWindow->finalizeSetup(); + // Debug mode setup - auto mode = new DebugMode(m_mainWindow); + m_mode = new DebugMode; + m_modeWindow = createModeWindow(m_mode, m_mainWindow, 0); + m_mode->setWidget(m_modeWindow); - (void) new DebugModeContext(m_mainWindow); - m_mainWindow->finalizeSetup(mode); + m_plugin->addAutoReleasedObject(new DebugModeContext(m_mainWindow)); - m_plugin->addAutoReleasedObject(mode); + m_plugin->addObject(m_mode); connect(SessionManager::instance(), &SessionManager::startupProjectChanged, @@ -2074,6 +2099,8 @@ void DebuggerPlugin::attachExternalApplication(RunControl *rc) if (const RunConfiguration *runConfiguration = rc->runConfiguration()) if (const Target *target = runConfiguration->target()) kit = target->kit(); + if (!kit) + kit = guessKitFromParameters(rp); createAndScheduleRun(rp, kit); } @@ -3005,6 +3032,23 @@ void DebuggerPluginPrivate::aboutToShutdown() disconnect(SessionManager::instance(), SIGNAL(startupProjectChanged(ProjectExplorer::Project*)), this, 0); + + m_mainWindow->saveCurrentPerspective(); + delete m_mainWindow; + m_mainWindow = 0; + + // removeObject leads to aboutToRemoveObject, which leads to + // ModeManager::aboutToRemove, which leads to the mode manager + // removing the mode's widget from the stackwidget + // (currently by index, but possibly the stackwidget resets the + // parent and stuff on the widget) + m_plugin->removeObject(m_mode); + + delete m_modeWindow; + m_modeWindow = 0; + + delete m_mode; + m_mode = 0; } void updateState(DebuggerEngine *engine) @@ -3172,7 +3216,6 @@ IPlugin::ShutdownFlag DebuggerPlugin::aboutToShutdown() { removeObject(this); dd->aboutToShutdown(); - dd->m_mainWindow->saveCurrentPerspective(); return SynchronousShutdown; } @@ -3479,15 +3522,15 @@ void registerToolbar(const QByteArray &perspectiveId, const ToolbarDescription & QAction *createStartAction() { - auto action = new QAction(DebuggerMainWindow::tr("Start"), 0); - action->setIcon(Debugger::Icons::ANALYZER_CONTROL_START.icon()); + auto action = new QAction(DebuggerMainWindow::tr("Start"), DebuggerPlugin::instance()); + action->setIcon(Icons::ANALYZER_CONTROL_START.icon()); action->setEnabled(true); return action; } QAction *createStopAction() { - auto action = new QAction(DebuggerMainWindow::tr("Stop"), 0); + auto action = new QAction(DebuggerMainWindow::tr("Stop"), DebuggerPlugin::instance()); action->setIcon(ProjectExplorer::Icons::STOP_SMALL.icon()); action->setEnabled(true); return action; diff --git a/src/plugins/debugger/debuggerruncontrol.cpp b/src/plugins/debugger/debuggerruncontrol.cpp index ce539d358fb..5b2a8cbecb3 100644 --- a/src/plugins/debugger/debuggerruncontrol.cpp +++ b/src/plugins/debugger/debuggerruncontrol.cpp @@ -43,6 +43,7 @@ #include // For the environment #include #include +#include #include #include #include @@ -54,7 +55,6 @@ #include #include #include -#include #include #include @@ -111,7 +111,7 @@ DebuggerRunControl::DebuggerRunControl(RunConfiguration *runConfig, DebuggerEngi m_engine(engine), m_running(false) { - setIcon(Core::Icons::DEBUG_START_SMALL); + setIcon(ProjectExplorer::Icons::DEBUG_START_SMALL); connect(this, &RunControl::finished, this, &DebuggerRunControl::handleFinished); connect(engine, &DebuggerEngine::requestRemoteSetup, @@ -321,6 +321,7 @@ void DebuggerRunControlCreator::initialize(const DebuggerStartParameters &sp) void DebuggerRunControlCreator::enrich(const RunConfiguration *runConfig, const Kit *kit) { m_runConfig = runConfig; + QTC_ASSERT(kit, return); Target *target = 0; Project *project = 0; @@ -329,13 +330,6 @@ void DebuggerRunControlCreator::enrich(const RunConfiguration *runConfig, const if (m_runConfig) target = m_runConfig->target(); - if (!kit && target) - kit = target->kit(); - - // Make sure we have something sensible to start with. - m_rp.inferior.runMode = ApplicationLauncher::Console; - m_rp.useTerminal = false; - // Extract as much as possible from available RunConfiguration. if (m_runConfig && m_runConfig->runnable().is()) { m_rp.inferior = m_runConfig->runnable().as(); @@ -351,46 +345,6 @@ void DebuggerRunControlCreator::enrich(const RunConfiguration *runConfig, const m_rp.inferior.executable = p.exe; } - if (!kit) { - // This code can only be reached when starting via the command line - // (-debug pid or executable) or attaching from runconfiguration - // without specifying a kit. Try to find a kit via ABI. - QList abis; - if (m_rp.toolChainAbi.isValid()) { - abis.push_back(m_rp.toolChainAbi); - } else if (!m_rp.inferior.executable.isEmpty()) { - abis = Abi::abisOfBinary(FileName::fromString(m_rp.inferior.executable)); - } - - if (!abis.isEmpty()) { - // Try exact abis. - kit = KitManager::find(KitMatcher([abis](const Kit *k) -> bool { - if (const ToolChain *tc = ToolChainKitInformation::toolChain(k)) - return abis.contains(tc->targetAbi()) && DebuggerKitInformation::isValidDebugger(k); - return false; - })); - if (!kit) { - // Or something compatible. - kit = KitManager::find(KitMatcher([abis](const Kit *k) -> bool { - if (const ToolChain *tc = ToolChainKitInformation::toolChain(k)) - foreach (const Abi &a, abis) - if (a.isCompatibleWith(tc->targetAbi()) && DebuggerKitInformation::isValidDebugger(k)) - return true; - return false; - })); - } - } - } - - if (!kit) - kit = KitManager::defaultKit(); - - // We really should have a kit now. - if (!kit) { - m_errors.append(DebuggerKitInformation::tr("No kit found.")); - return; - } - m_rp.macroExpander = kit->macroExpander(); if (m_runConfig) { @@ -416,7 +370,7 @@ void DebuggerRunControlCreator::enrich(const RunConfiguration *runConfig, const if (project && m_rp.projectSourceFiles.isEmpty()) m_rp.projectSourceFiles = project->files(Project::SourceFiles); - if (false && project && kit) { + if (false && project) { const QtSupport::BaseQtVersion *version = QtSupport::QtKitInformation::qtVersion(kit); m_rp.nativeMixedEnabled = version && version->qtVersion() >= QtSupport::QtVersionNumber(5, 7, 0); } @@ -622,7 +576,7 @@ public: // We cover only local setup here. Remote setups are handled by the // RunControl factories in the target specific plugins. DebuggerRunControlCreator creator; - creator.enrich(runConfig, 0); + creator.enrich(runConfig, runConfig->target()->kit()); creator.createRunControl(mode); if (errorMessage) *errorMessage = creator.fullError(); @@ -660,6 +614,7 @@ QObject *createDebuggerRunControlFactory(QObject *parent) */ DebuggerRunControl *createAndScheduleRun(const DebuggerRunParameters &rp, const Kit *kit) { + QTC_ASSERT(kit, return 0); // Caller needs to look for a suitable kit. DebuggerRunControlCreator creator; creator.m_rp = rp; creator.enrich(0, kit); @@ -683,9 +638,10 @@ DebuggerRunControl *createDebuggerRunControl(const DebuggerStartParameters &sp, QString *errorMessage, Core::Id runMode) { + QTC_ASSERT(runConfig, return 0); DebuggerRunControlCreator creator; creator.initialize(sp); - creator.enrich(runConfig, 0); + creator.enrich(runConfig, runConfig->target()->kit()); creator.createRunControl(runMode); if (errorMessage) *errorMessage = creator.fullError(); diff --git a/src/plugins/coreplugin/images/continue_overlay_small.png b/src/plugins/debugger/images/continue_overlay_small.png similarity index 100% rename from src/plugins/coreplugin/images/continue_overlay_small.png rename to src/plugins/debugger/images/continue_overlay_small.png diff --git a/src/plugins/coreplugin/images/continue_overlay_small@2x.png b/src/plugins/debugger/images/continue_overlay_small@2x.png similarity index 100% rename from src/plugins/coreplugin/images/continue_overlay_small@2x.png rename to src/plugins/debugger/images/continue_overlay_small@2x.png diff --git a/src/plugins/coreplugin/images/interrupt_overlay_small.png b/src/plugins/debugger/images/interrupt_overlay_small.png similarity index 100% rename from src/plugins/coreplugin/images/interrupt_overlay_small.png rename to src/plugins/debugger/images/interrupt_overlay_small.png diff --git a/src/plugins/coreplugin/images/interrupt_overlay_small@2x.png b/src/plugins/debugger/images/interrupt_overlay_small@2x.png similarity index 100% rename from src/plugins/coreplugin/images/interrupt_overlay_small@2x.png rename to src/plugins/debugger/images/interrupt_overlay_small@2x.png diff --git a/src/plugins/coreplugin/images/stop_overlay_small.png b/src/plugins/debugger/images/stop_overlay_small.png similarity index 100% rename from src/plugins/coreplugin/images/stop_overlay_small.png rename to src/plugins/debugger/images/stop_overlay_small.png diff --git a/src/plugins/coreplugin/images/stop_overlay_small@2x.png b/src/plugins/debugger/images/stop_overlay_small@2x.png similarity index 100% rename from src/plugins/coreplugin/images/stop_overlay_small@2x.png rename to src/plugins/debugger/images/stop_overlay_small@2x.png diff --git a/src/plugins/debugger/watchhandler.cpp b/src/plugins/debugger/watchhandler.cpp index 1337cb864f8..4852bf1c978 100644 --- a/src/plugins/debugger/watchhandler.cpp +++ b/src/plugins/debugger/watchhandler.cpp @@ -1078,16 +1078,24 @@ Qt::ItemFlags WatchModel::flags(const QModelIndex &idx) const const Qt::ItemFlags notEditable = Qt::ItemIsSelectable | Qt::ItemIsEnabled; const Qt::ItemFlags editable = notEditable | Qt::ItemIsEditable; + bool isRunning = true; + switch (state) { + case InferiorStopOk: + case InferiorUnrunnable: + case DebuggerNotReady: + case DebuggerFinished: + isRunning = false; + break; + default: + break; + } if (item->isWatcher()) { if (state == InferiorUnrunnable) return (column == 0 && item->iname.count('.') == 1) ? editable : notEditable; - if (state != InferiorStopOk - && state != DebuggerNotReady - && state != DebuggerFinished - && !m_engine->hasCapability(AddWatcherWhileRunningCapability)) - return Qt::ItemFlags(); + if (isRunning && !m_engine->hasCapability(AddWatcherWhileRunningCapability)) + return notEditable; if (column == 0 && item->iname.count('.') == 1) return editable; // Watcher names are editable. if (column == 1 && item->arrayIndex >= 0) @@ -1101,8 +1109,10 @@ Qt::ItemFlags WatchModel::flags(const QModelIndex &idx) const return editable; // Watcher values are sometimes editable. } } else if (item->isLocal()) { - if (state != InferiorStopOk && !m_engine->hasCapability(AddWatcherWhileRunningCapability)) - return Qt::ItemFlags(); + if (state == InferiorUnrunnable) + return notEditable; + if (isRunning && !m_engine->hasCapability(AddWatcherWhileRunningCapability)) + return notEditable; if (column == 1 && item->valueEditable && !item->elided) return editable; // Locals values are sometimes editable. if (column == 1 && item->arrayIndex >= 0) @@ -1787,7 +1797,7 @@ static void showInEditorHelper(const WatchItem *item, QTextStream &ts, int depth { const QChar tab = QLatin1Char('\t'); const QChar nl = QLatin1Char('\n'); - ts << QString(depth, tab) << item->name << tab << item->value << tab + ts << QString(depth, tab) << item->name << tab << displayValue(item) << tab << item->type << nl; foreach (const TreeItem *child, item->children()) showInEditorHelper(static_cast(child), ts, depth + 1); diff --git a/src/plugins/help/help.qrc b/src/plugins/help/help.qrc index a0b727d945b..0532deb7822 100644 --- a/src/plugins/help/help.qrc +++ b/src/plugins/help/help.qrc @@ -3,7 +3,9 @@ images/find.png images/book.png images/home.png + images/home@2x.png images/bookmark.png + images/bookmark@2x.png images/category_help.png images/mode_help.png images/mode_help@2x.png diff --git a/src/plugins/help/images/bookmark.png b/src/plugins/help/images/bookmark.png index 57e57e343ba..4e2a562ac01 100644 Binary files a/src/plugins/help/images/bookmark.png and b/src/plugins/help/images/bookmark.png differ diff --git a/src/plugins/help/images/bookmark@2x.png b/src/plugins/help/images/bookmark@2x.png new file mode 100644 index 00000000000..6281a74230b Binary files /dev/null and b/src/plugins/help/images/bookmark@2x.png differ diff --git a/src/plugins/help/images/home.png b/src/plugins/help/images/home.png index 9cee3025d07..45b92a001e3 100644 Binary files a/src/plugins/help/images/home.png and b/src/plugins/help/images/home.png differ diff --git a/src/plugins/help/images/home@2x.png b/src/plugins/help/images/home@2x.png new file mode 100644 index 00000000000..72629cb719c Binary files /dev/null and b/src/plugins/help/images/home@2x.png differ diff --git a/src/plugins/help/qtwebkithelpviewer.cpp b/src/plugins/help/qtwebkithelpviewer.cpp index 6b3541a2732..395a89df9c0 100644 --- a/src/plugins/help/qtwebkithelpviewer.cpp +++ b/src/plugins/help/qtwebkithelpviewer.cpp @@ -136,9 +136,9 @@ QNetworkReply *HelpNetworkAccessManager::createRequest(Operation op, return new HelpNetworkReply(request, data.data, data.mimeType); } -// - HelpPage +// - QtWebKitHelpPage -HelpPage::HelpPage(QObject *parent) +QtWebKitHelpPage::QtWebKitHelpPage(QObject *parent) : QWebPage(parent) , closeNewTabIfNeeded(false) , m_pressedButtons(Qt::NoButton) @@ -149,18 +149,18 @@ HelpPage::HelpPage(QObject *parent) SLOT(onHandleUnsupportedContent(QNetworkReply*))); } -QWebPage *HelpPage::createWindow(QWebPage::WebWindowType) +QWebPage *QtWebKitHelpPage::createWindow(QWebPage::WebWindowType) { // TODO: ensure that we'll get a QtWebKitHelpViewer here QtWebKitHelpViewer* viewer = static_cast(OpenPagesManager::instance() .createPage()); - HelpPage *newPage = viewer->page(); + QtWebKitHelpPage *newPage = viewer->page(); newPage->closeNewTabIfNeeded = closeNewTabIfNeeded; closeNewTabIfNeeded = false; return newPage; } -void HelpPage::triggerAction(WebAction action, bool checked) +void QtWebKitHelpPage::triggerAction(WebAction action, bool checked) { switch (action) { case OpenLinkInNewWindow: @@ -171,7 +171,7 @@ void HelpPage::triggerAction(WebAction action, bool checked) } } -bool HelpPage::acceptNavigationRequest(QWebFrame *frame, const QNetworkRequest &request, +bool QtWebKitHelpPage::acceptNavigationRequest(QWebFrame *frame, const QNetworkRequest &request, QWebPage::NavigationType type) { const bool closeNewTab = closeNewTabIfNeeded; @@ -198,7 +198,7 @@ bool HelpPage::acceptNavigationRequest(QWebFrame *frame, const QNetworkRequest & return true; } -void HelpPage::onHandleUnsupportedContent(QNetworkReply *reply) +void QtWebKitHelpPage::onHandleUnsupportedContent(QNetworkReply *reply) { // sub resource of this page if (m_loadingUrl != reply->url()) { @@ -254,7 +254,7 @@ QtWebKitHelpWidget::QtWebKitHelpWidget(QtWebKitHelpViewer *parent) QWebSettings::globalSettings()->setAttribute(QWebSettings::DnsPrefetchEnabled, true); - setPage(new HelpPage(this)); + setPage(new QtWebKitHelpPage(this)); HelpNetworkAccessManager *manager = new HelpNetworkAccessManager(this); page()->setNetworkAccessManager(manager); connect(manager, SIGNAL(finished(QNetworkReply*)), this, @@ -323,7 +323,7 @@ void QtWebKitHelpWidget::mousePressEvent(QMouseEvent *event) if (Utils::HostOsInfo::isLinuxHost() && m_parent->handleForwardBackwardMouseButtons(event)) return; - if (HelpPage *currentPage = static_cast(page())) { + if (QtWebKitHelpPage *currentPage = static_cast(page())) { currentPage->m_pressedButtons = event->buttons(); currentPage->m_keyboardModifiers = event->modifiers(); } @@ -402,7 +402,7 @@ QtWebKitHelpViewer::QtWebKitHelpViewer(QWidget *parent) connect(m_webView->page(), SIGNAL(printRequested(QWebFrame*)), this, SIGNAL(printRequested())); connect(m_webView, SIGNAL(backwardAvailable(bool)), this, SIGNAL(backwardAvailable(bool))); connect(m_webView, SIGNAL(forwardAvailable(bool)), this, SIGNAL(forwardAvailable(bool))); - connect(page(), &HelpPage::linkHovered, this, &QtWebKitHelpViewer::setToolTip); + connect(page(), &QtWebKitHelpPage::linkHovered, this, &QtWebKitHelpViewer::setToolTip); } QFont QtWebKitHelpViewer::viewerFont() const @@ -582,9 +582,9 @@ bool QtWebKitHelpViewer::findText(const QString &text, FindFlags flags, return found; } -HelpPage *QtWebKitHelpViewer::page() const +QtWebKitHelpPage *QtWebKitHelpViewer::page() const { - return static_cast(m_webView->page()); + return static_cast(m_webView->page()); } void QtWebKitHelpViewer::copy() diff --git a/src/plugins/help/qtwebkithelpviewer.h b/src/plugins/help/qtwebkithelpviewer.h index 186d6f4b183..ff85a92a28c 100644 --- a/src/plugins/help/qtwebkithelpviewer.h +++ b/src/plugins/help/qtwebkithelpviewer.h @@ -35,7 +35,7 @@ namespace Help { namespace Internal { -class HelpPage; +class QtWebKitHelpPage; class QtWebKitHelpWidget; class QtWebKitHelpViewer : public HelpViewer @@ -69,7 +69,7 @@ public: bool findText(const QString &text, Core::FindFlags flags, bool incremental, bool fromSearch, bool *wrapped = 0); - HelpPage *page() const; + QtWebKitHelpPage *page() const; public slots: void scaleUp(); @@ -127,11 +127,11 @@ private: QtWebKitHelpViewer *m_parent; }; -class HelpPage : public QWebPage +class QtWebKitHelpPage : public QWebPage { Q_OBJECT public: - HelpPage(QObject *parent); + QtWebKitHelpPage(QObject *parent); protected: virtual QWebPage *createWindow(QWebPage::WebWindowType); diff --git a/src/plugins/help/textbrowserhelpviewer.h b/src/plugins/help/textbrowserhelpviewer.h index cbe56524eca..fccf79a5326 100644 --- a/src/plugins/help/textbrowserhelpviewer.h +++ b/src/plugins/help/textbrowserhelpviewer.h @@ -81,8 +81,6 @@ private slots: void goToHistoryItem(); private: - QVariant loadResource(int type, const QUrl &name); - TextBrowserHelpWidget *m_textBrowser; }; @@ -109,11 +107,11 @@ private: QString linkAt(const QPoint& pos); void openLink(const QUrl &url, bool newPage); -public: int zoomCount; bool forceFont; bool m_openInNewPageActionVisible; TextBrowserHelpViewer *m_parent; + friend class Help::Internal::TextBrowserHelpViewer; }; } // namespace Internal diff --git a/src/plugins/help/webenginehelpviewer.cpp b/src/plugins/help/webenginehelpviewer.cpp index 5d2e2d2f356..55ebc4e57e9 100644 --- a/src/plugins/help/webenginehelpviewer.cpp +++ b/src/plugins/help/webenginehelpviewer.cpp @@ -73,7 +73,7 @@ WebEngineHelpViewer::WebEngineHelpViewer(QWidget *parent) : HelpViewer(parent), m_widget(new WebView(this)) { - m_widget->setPage(new HelpPage(this)); + m_widget->setPage(new WebEngineHelpPage(this)); auto layout = new QVBoxLayout; setLayout(layout); layout->setContentsMargins(0, 0, 0, 0); @@ -226,9 +226,9 @@ bool WebEngineHelpViewer::findText(const QString &text, Core::FindFlags flags, b return true; } -HelpPage *WebEngineHelpViewer::page() const +WebEngineHelpPage *WebEngineHelpViewer::page() const { - return static_cast(m_widget->page()); + return static_cast(m_widget->page()); } void WebEngineHelpViewer::scaleUp() @@ -271,12 +271,12 @@ void WebEngineHelpViewer::print(QPrinter *printer) Q_UNUSED(printer) } -HelpPage::HelpPage(QObject *parent) +WebEngineHelpPage::WebEngineHelpPage(QObject *parent) : QWebEnginePage(parent) { } -QWebEnginePage *HelpPage::createWindow(QWebEnginePage::WebWindowType) +QWebEnginePage *WebEngineHelpPage::createWindow(QWebEnginePage::WebWindowType) { auto viewer = static_cast(OpenPagesManager::instance().createPage()); return viewer->page(); diff --git a/src/plugins/help/webenginehelpviewer.h b/src/plugins/help/webenginehelpviewer.h index 7d777ab4875..ba8d0adfb38 100644 --- a/src/plugins/help/webenginehelpviewer.h +++ b/src/plugins/help/webenginehelpviewer.h @@ -40,10 +40,10 @@ public: void requestStarted(QWebEngineUrlRequestJob *job) override; }; -class HelpPage : public QWebEnginePage +class WebEngineHelpPage : public QWebEnginePage { public: - explicit HelpPage(QObject *parent = 0); + explicit WebEngineHelpPage(QObject *parent = 0); QWebEnginePage *createWindow(QWebEnginePage::WebWindowType) override; }; @@ -83,7 +83,7 @@ public: void setOpenInNewPageActionVisible(bool visible) override; bool findText(const QString &text, Core::FindFlags flags, bool incremental, bool fromSearch, bool *wrapped) override; - HelpPage *page() const; + WebEngineHelpPage *page() const; public slots: void scaleUp() override; diff --git a/src/plugins/ios/iosruncontrol.cpp b/src/plugins/ios/iosruncontrol.cpp index 90b276119c4..47e019a6e6b 100644 --- a/src/plugins/ios/iosruncontrol.cpp +++ b/src/plugins/ios/iosruncontrol.cpp @@ -28,8 +28,8 @@ #include "iosrunconfiguration.h" #include "iosrunner.h" -#include #include +#include using namespace ProjectExplorer; @@ -41,7 +41,7 @@ IosRunControl::IosRunControl(IosRunConfiguration *rc) , m_runner(new IosRunner(this, rc, false, QmlDebug::NoQmlDebugServices)) , m_running(false) { - setIcon(Core::Icons::DEBUG_START_SMALL); + setIcon(Icons::RUN_SMALL); } IosRunControl::~IosRunControl() diff --git a/src/plugins/projectexplorer/appoutputpane.cpp b/src/plugins/projectexplorer/appoutputpane.cpp index 0ca23e9e7d6..4084290281b 100644 --- a/src/plugins/projectexplorer/appoutputpane.cpp +++ b/src/plugins/projectexplorer/appoutputpane.cpp @@ -181,7 +181,7 @@ AppOutputPane::AppOutputPane() : // Attach m_attachButton->setToolTip(msgAttachDebuggerTooltip()); m_attachButton->setEnabled(false); - m_attachButton->setIcon(Core::Icons::DEBUG_START_SMALL.icon()); + m_attachButton->setIcon(Icons::DEBUG_START_SMALL.icon()); m_attachButton->setAutoRaise(true); connect(m_attachButton, &QAbstractButton::clicked, diff --git a/src/plugins/projectexplorer/gcctoolchain.cpp b/src/plugins/projectexplorer/gcctoolchain.cpp index f1f3d5dbbdc..b65ee827766 100644 --- a/src/plugins/projectexplorer/gcctoolchain.cpp +++ b/src/plugins/projectexplorer/gcctoolchain.cpp @@ -62,6 +62,7 @@ static const char compilerCommandKeyC[] = "ProjectExplorer.GccToolChain.Path"; static const char compilerPlatformCodeGenFlagsKeyC[] = "ProjectExplorer.GccToolChain.PlatformCodeGenFlags"; static const char compilerPlatformLinkerFlagsKeyC[] = "ProjectExplorer.GccToolChain.PlatformLinkerFlags"; static const char targetAbiKeyC[] = "ProjectExplorer.GccToolChain.TargetAbi"; +static const char originalTargetTripleKeyC[] = "ProjectExplorer.GccToolChain.OriginalTargetTriple"; static const char supportedAbisKeyC[] = "ProjectExplorer.GccToolChain.SupportedAbis"; static QByteArray runGcc(const FileName &gcc, const QStringList &arguments, const QStringList &env) @@ -214,19 +215,20 @@ static QList guessGccAbi(const QString &m, const QByteArray ¯os) return abiList; } -static QList guessGccAbi(const FileName &path, const QStringList &env, - const QByteArray ¯os, - const QStringList &extraArgs = QStringList()) + +static GccToolChain::DetectedAbisResult guessGccAbi(const FileName &path, const QStringList &env, + const QByteArray ¯os, + const QStringList &extraArgs = QStringList()) { if (path.isEmpty()) - return QList(); + return GccToolChain::DetectedAbisResult(); QStringList arguments = extraArgs; arguments << QLatin1String("-dumpmachine"); QString machine = QString::fromLocal8Bit(runGcc(path, arguments, env)).trimmed(); if (machine.isEmpty()) - return QList(); // no need to continue if running failed once... - return guessGccAbi(machine, macros); + return GccToolChain::DetectedAbisResult(); // no need to continue if running failed once... + return GccToolChain::DetectedAbisResult(guessGccAbi(machine, macros), machine); } static QString gccVersion(const FileName &path, const QStringList &env) @@ -260,6 +262,11 @@ void GccToolChain::setSupportedAbis(const QList &m_abis) m_supportedAbis = m_abis; } +void GccToolChain::setOriginalTargetTriple(const QString &targetTriple) +{ + m_originalTargetTriple = targetTriple; +} + void GccToolChain::setMacroCache(const QStringList &allCxxflags, const QByteArray ¯os) const { if (macros.isNull()) @@ -318,6 +325,11 @@ Abi GccToolChain::targetAbi() const return m_targetAbi; } +QString GccToolChain::originalTargetTriple() const +{ + return m_originalTargetTriple; +} + QString GccToolChain::version() const { if (m_version.isEmpty()) @@ -620,7 +632,9 @@ void GccToolChain::resetToolChain(const FileName &path) setCompilerCommand(path); Abi currentAbi = m_targetAbi; - m_supportedAbis = detectSupportedAbis(); + const DetectedAbisResult detectedAbis = detectSupportedAbis(); + m_supportedAbis = detectedAbis.supportedAbis; + m_originalTargetTriple = detectedAbis.originalTargetTriple; m_targetAbi = Abi(); if (!m_supportedAbis.isEmpty()) { @@ -687,6 +701,7 @@ QVariantMap GccToolChain::toMap() const data.insert(QLatin1String(compilerPlatformCodeGenFlagsKeyC), m_platformCodeGenFlags); data.insert(QLatin1String(compilerPlatformLinkerFlagsKeyC), m_platformLinkerFlags); data.insert(QLatin1String(targetAbiKeyC), m_targetAbi.toString()); + data.insert(QLatin1String(originalTargetTripleKeyC), m_originalTargetTriple); QStringList abiList = Utils::transform(m_supportedAbis, &Abi::toString); data.insert(QLatin1String(supportedAbisKeyC), abiList); return data; @@ -701,6 +716,7 @@ bool GccToolChain::fromMap(const QVariantMap &data) m_platformCodeGenFlags = data.value(QLatin1String(compilerPlatformCodeGenFlagsKeyC)).toStringList(); m_platformLinkerFlags = data.value(QLatin1String(compilerPlatformLinkerFlagsKeyC)).toStringList(); m_targetAbi = Abi(data.value(QLatin1String(targetAbiKeyC)).toString()); + m_originalTargetTriple = data.value(QLatin1String(originalTargetTripleKeyC)).toString(); QStringList abiList = data.value(QLatin1String(supportedAbisKeyC)).toStringList(); m_supportedAbis.clear(); foreach (const QString &a, abiList) { @@ -730,11 +746,14 @@ ToolChainConfigWidget *GccToolChain::configurationWidget() void GccToolChain::updateSupportedAbis() const { - if (m_supportedAbis.isEmpty()) - m_supportedAbis = detectSupportedAbis(); + if (m_supportedAbis.isEmpty()) { + const DetectedAbisResult detected = detectSupportedAbis(); + m_supportedAbis = detected.supportedAbis; + m_originalTargetTriple = detected.originalTargetTriple; + } } -QList GccToolChain::detectSupportedAbis() const +GccToolChain::DetectedAbisResult GccToolChain::detectSupportedAbis() const { Environment env = Environment::systemEnvironment(); addToEnvironment(env); @@ -827,7 +846,10 @@ QList GccToolChainFactory::autoDetectToolchains(const QString &comp GccToolChain::addCommandPathToEnvironment(compilerPath, systemEnvironment); QByteArray macros = gccPredefinedMacros(compilerPath, gccPredefinedMacrosOptions(), systemEnvironment.toStringList()); - QList abiList = guessGccAbi(compilerPath, systemEnvironment.toStringList(), macros); + const GccToolChain::DetectedAbisResult detectedAbis = guessGccAbi(compilerPath, + systemEnvironment.toStringList(), + macros); + QList abiList = detectedAbis.supportedAbis; if (!abiList.contains(requiredAbi)) { if (requiredAbi.wordWidth() != 64 || !abiList.contains(Abi(requiredAbi.architecture(), requiredAbi.os(), requiredAbi.osFlavor(), @@ -844,6 +866,7 @@ QList GccToolChainFactory::autoDetectToolchains(const QString &comp tc->setCompilerCommand(compilerPath); tc->setSupportedAbis(abiList); tc->setTargetAbi(abi); + tc->setOriginalTargetTriple(detectedAbis.originalTargetTriple); tc->setDisplayName(tc->defaultDisplayName()); // reset displayname result.append(tc.take()); @@ -902,6 +925,7 @@ void GccToolChainConfigWidget::applyImpl() tc->setCompilerCommand(m_compilerCommand->fileName()); tc->setSupportedAbis(m_abiWidget->supportedAbis()); tc->setTargetAbi(m_abiWidget->currentAbi()); + tc->setOriginalTargetTriple(tc->detectSupportedAbis().originalTargetTriple); tc->setDisplayName(displayName); // reset display name tc->setPlatformCodeGenFlags(splitString(m_platformCodeGenFlagsLineEdit->text())); tc->setPlatformLinkerFlags(splitString(m_platformLinkerFlagsLineEdit->text())); @@ -975,7 +999,7 @@ void GccToolChainConfigWidget::handleCompilerCommandChange() QStringList args = gccPredefinedMacrosOptions() + splitString(m_platformCodeGenFlagsLineEdit->text()); m_macros = gccPredefinedMacros(path, args, env.toStringList()); abiList = guessGccAbi(path, env.toStringList(), m_macros, - splitString(m_platformCodeGenFlagsLineEdit->text())); + splitString(m_platformCodeGenFlagsLineEdit->text())).supportedAbis; } m_abiWidget->setEnabled(haveCompiler); diff --git a/src/plugins/projectexplorer/gcctoolchain.h b/src/plugins/projectexplorer/gcctoolchain.h index 849bee9f103..33c900537af 100644 --- a/src/plugins/projectexplorer/gcctoolchain.h +++ b/src/plugins/projectexplorer/gcctoolchain.h @@ -54,6 +54,7 @@ public: GccToolChain(Core::Id typeId, Detection d); QString typeDisplayName() const override; Abi targetAbi() const override; + QString originalTargetTriple() const override; QString version() const; QList supportedAbis() const; void setTargetAbi(const Abi &); @@ -89,6 +90,19 @@ public: static void addCommandPathToEnvironment(const Utils::FileName &command, Utils::Environment &env); + class DetectedAbisResult { + public: + DetectedAbisResult() = default; + DetectedAbisResult(const QList &supportedAbis, + const QString &originalTargetTriple = QString()) + : supportedAbis(supportedAbis) + , originalTargetTriple(originalTargetTriple) + {} + + QList supportedAbis; + QString originalTargetTriple; + }; + protected: typedef QList > GccCache; @@ -98,13 +112,14 @@ protected: void setCompilerCommand(const Utils::FileName &path); void setSupportedAbis(const QList &m_abis); + void setOriginalTargetTriple(const QString &targetTriple); void setMacroCache(const QStringList &allCxxflags, const QByteArray ¯oCache) const; QByteArray macroCache(const QStringList &allCxxflags) const; virtual QString defaultDisplayName() const; virtual CompilerFlags defaultCompilerFlags() const; - virtual QList detectSupportedAbis() const; + virtual DetectedAbisResult detectSupportedAbis() const; virtual QString detectVersion() const; // Reinterpret options for compiler drivers inheriting from GccToolChain (e.g qcc) to apply -Wp option @@ -139,6 +154,7 @@ private: Abi m_targetAbi; mutable QList m_supportedAbis; + mutable QString m_originalTargetTriple; mutable QList m_headerPaths; mutable QString m_version; diff --git a/src/plugins/coreplugin/images/debugger_overlay_small.png b/src/plugins/projectexplorer/images/debugger_overlay_small.png similarity index 100% rename from src/plugins/coreplugin/images/debugger_overlay_small.png rename to src/plugins/projectexplorer/images/debugger_overlay_small.png diff --git a/src/plugins/coreplugin/images/debugger_overlay_small@2x.png b/src/plugins/projectexplorer/images/debugger_overlay_small@2x.png similarity index 100% rename from src/plugins/coreplugin/images/debugger_overlay_small@2x.png rename to src/plugins/projectexplorer/images/debugger_overlay_small@2x.png diff --git a/src/plugins/coreplugin/images/run_overlay_small.png b/src/plugins/projectexplorer/images/run_overlay_small.png similarity index 100% rename from src/plugins/coreplugin/images/run_overlay_small.png rename to src/plugins/projectexplorer/images/run_overlay_small.png diff --git a/src/plugins/coreplugin/images/run_overlay_small@2x.png b/src/plugins/projectexplorer/images/run_overlay_small@2x.png similarity index 100% rename from src/plugins/coreplugin/images/run_overlay_small@2x.png rename to src/plugins/projectexplorer/images/run_overlay_small@2x.png diff --git a/src/plugins/projectexplorer/projectexplorer.cpp b/src/plugins/projectexplorer/projectexplorer.cpp index 8e92a6613c2..0448ad2e151 100644 --- a/src/plugins/projectexplorer/projectexplorer.cpp +++ b/src/plugins/projectexplorer/projectexplorer.cpp @@ -1352,6 +1352,15 @@ bool ProjectExplorerPlugin::initialize(const QStringList &arguments, QString *er return bc ? bc->displayName() : QString(); }); + expander->registerVariable(Constants::VAR_CURRENTRUN_NAME, + tr("The currently active run configuration's name."), + [this]() -> QString { + if (Target *target = activeTarget()) { + if (RunConfiguration *rc = target->activeRunConfiguration()) + return rc->displayName(); + } + return QString(); + }); expander->registerVariable(Constants::VAR_CURRENTBUILD_TYPE, tr("The currently active build configuration's type."), @@ -3232,32 +3241,35 @@ void ProjectExplorerPluginPrivate::handleRenameFile() void ProjectExplorerPlugin::renameFile(Node *node, const QString &newFilePath) { - QString orgFilePath = node->filePath().toFileInfo().absoluteFilePath(); + const QString oldFilePath = node->filePath().toFileInfo().absoluteFilePath(); FolderNode *folderNode = node->parentFolderNode(); - QString projectFileName = folderNode->projectNode()->filePath().fileName(); + const QString projectFileName = folderNode->projectNode()->filePath().fileName(); - if (!folderNode->canRenameFile(orgFilePath, newFilePath)) { - QTimer::singleShot(0, [orgFilePath, newFilePath, projectFileName] { + if (oldFilePath == newFilePath) + return; + + if (!folderNode->canRenameFile(oldFilePath, newFilePath)) { + QTimer::singleShot(0, [oldFilePath, newFilePath, projectFileName] { int res = QMessageBox::question(ICore::mainWindow(), tr("Project Editing Failed"), tr("The project file %1 cannot be automatically changed.\n\n" "Rename %2 to %3 anyway?") .arg(projectFileName) - .arg(QDir::toNativeSeparators(orgFilePath)) + .arg(QDir::toNativeSeparators(oldFilePath)) .arg(QDir::toNativeSeparators(newFilePath))); if (res == QMessageBox::Yes) - FileUtils::renameFile(orgFilePath, newFilePath); + FileUtils::renameFile(oldFilePath, newFilePath); }); return; } - if (FileUtils::renameFile(orgFilePath, newFilePath)) { + if (FileUtils::renameFile(oldFilePath, newFilePath)) { // Tell the project plugin about rename - if (!folderNode->renameFile(orgFilePath, newFilePath)) { + if (!folderNode->renameFile(oldFilePath, newFilePath)) { const QString renameFileError = tr("The file %1 was renamed to %2, but the project file %3 could not be automatically changed.") - .arg(QDir::toNativeSeparators(orgFilePath)) + .arg(QDir::toNativeSeparators(oldFilePath)) .arg(QDir::toNativeSeparators(newFilePath)) .arg(projectFileName); @@ -3269,7 +3281,7 @@ void ProjectExplorerPlugin::renameFile(Node *node, const QString &newFilePath) } } else { const QString renameFileError = tr("The file %1 could not be renamed %2.") - .arg(QDir::toNativeSeparators(orgFilePath)) + .arg(QDir::toNativeSeparators(oldFilePath)) .arg(QDir::toNativeSeparators(newFilePath)); QTimer::singleShot(0, [renameFileError]() { diff --git a/src/plugins/projectexplorer/projectexplorer.qrc b/src/plugins/projectexplorer/projectexplorer.qrc index f86e9005949..e8d0044e3ff 100644 --- a/src/plugins/projectexplorer/projectexplorer.qrc +++ b/src/plugins/projectexplorer/projectexplorer.qrc @@ -24,6 +24,10 @@ images/run_mask@2x.png images/run_small.png images/run_small@2x.png + images/debugger_overlay_small.png + images/debugger_overlay_small@2x.png + images/run_overlay_small.png + images/run_overlay_small@2x.png images/session.png images/targetrunselected.png images/targetrunselected@2x.png diff --git a/src/plugins/projectexplorer/projectexplorerconstants.h b/src/plugins/projectexplorer/projectexplorerconstants.h index 740e8190250..15c657b2491 100644 --- a/src/plugins/projectexplorer/projectexplorerconstants.h +++ b/src/plugins/projectexplorer/projectexplorerconstants.h @@ -236,6 +236,7 @@ const char VAR_CURRENTKIT_FILESYSTEMNAME[] = "CurrentKit:FileSystemName"; const char VAR_CURRENTKIT_ID[] = "CurrentKit:Id"; const char VAR_CURRENTBUILD_NAME[] = "CurrentBuild:Name"; const char VAR_CURRENTBUILD_TYPE[] = "CurrentBuild:Type"; +const char VAR_CURRENTRUN_NAME[] = "CurrentRun:Name"; const char VAR_CURRENTDEVICE_HOSTADDRESS[] = "CurrentDevice:HostAddress"; const char VAR_CURRENTDEVICE_SSHPORT[] = "CurrentDevice:SshPort"; const char VAR_CURRENTDEVICE_USERNAME[] = "CurrentDevice:UserName"; diff --git a/src/plugins/projectexplorer/projectexplorericons.h b/src/plugins/projectexplorer/projectexplorericons.h index 447c94ea5e1..05a2ce3c364 100644 --- a/src/plugins/projectexplorer/projectexplorericons.h +++ b/src/plugins/projectexplorer/projectexplorericons.h @@ -57,6 +57,9 @@ const Utils::Icon DEBUG_START( const Utils::Icon DEBUG_START_FLAT({ {QLatin1String(":/projectexplorer/images/debugger_beetle_mask.png"), Utils::Theme::IconsDebugColor}, {QLatin1String(":/projectexplorer/images/debugger_run_mask.png"), Utils::Theme::IconsRunColor}}); +const Utils::Icon DEBUG_START_SMALL({ + {QLatin1String(":/projectexplorer/images/debugger_overlay_small.png"), Utils::Theme::IconsDebugColor}, + {QLatin1String(":/projectexplorer/images/run_overlay_small.png"), Utils::Theme::IconsRunColor}}); const Utils::Icon BUILDSTEP_MOVEUP({ {QLatin1String(":/projectexplorer/images/buildstepmoveup.png"), Utils::Theme::PanelTextColorDark}}, Utils::Icon::Tint); diff --git a/src/plugins/projectexplorer/runconfiguration.cpp b/src/plugins/projectexplorer/runconfiguration.cpp index 14fb83641ba..c83c064de52 100644 --- a/src/plugins/projectexplorer/runconfiguration.cpp +++ b/src/plugins/projectexplorer/runconfiguration.cpp @@ -256,6 +256,9 @@ void RunConfiguration::ctor() BuildConfiguration *bc = target()->activeBuildConfiguration(); return bc ? bc->macroExpander() : target()->macroExpander(); }); + expander->registerVariable(Constants::VAR_CURRENTRUN_NAME, + QCoreApplication::translate("ProjectExplorer", "The currently active run configuration's name."), + [this] { return displayName(); }, false); } /*! diff --git a/src/plugins/projectexplorer/toolchain.h b/src/plugins/projectexplorer/toolchain.h index e00c2136aad..cac15dce6a8 100644 --- a/src/plugins/projectexplorer/toolchain.h +++ b/src/plugins/projectexplorer/toolchain.h @@ -80,6 +80,7 @@ public: Core::Id typeId() const; virtual QString typeDisplayName() const = 0; virtual Abi targetAbi() const = 0; + virtual QString originalTargetTriple() const { return QString(); } virtual bool isValid() const = 0; diff --git a/src/plugins/qbsprojectmanager/qbsprojectparser.cpp b/src/plugins/qbsprojectmanager/qbsprojectparser.cpp index 5192ad38ef7..e4fc351edf1 100644 --- a/src/plugins/qbsprojectmanager/qbsprojectparser.cpp +++ b/src/plugins/qbsprojectmanager/qbsprojectparser.cpp @@ -103,6 +103,8 @@ void QbsProjectParser::parse(const QVariantMap &config, const Environment &env, params.setSearchPaths(prefs.searchPaths(resourcesBaseDirectory())); params.setPluginPaths(prefs.pluginPaths(pluginsBaseDirectory())); params.setLibexecPath(libExecDirectory()); + params.setProductErrorMode(qbs::ErrorHandlingMode::Relaxed); + params.setPropertyCheckingMode(qbs::ErrorHandlingMode::Relaxed); m_qbsSetupProjectJob = m_project.setupProject(params, QbsManager::logSink(), 0); diff --git a/src/plugins/qmakeprojectmanager/qmakeprojectmanager.cpp b/src/plugins/qmakeprojectmanager/qmakeprojectmanager.cpp index d83879e6da9..2bdf16f76c7 100644 --- a/src/plugins/qmakeprojectmanager/qmakeprojectmanager.cpp +++ b/src/plugins/qmakeprojectmanager/qmakeprojectmanager.cpp @@ -53,10 +53,6 @@ using namespace TextEditor; namespace QmakeProjectManager { -QmakeManager::~QmakeManager() -{ -} - void QmakeManager::registerProject(QmakeProject *project) { m_projects.append(project); diff --git a/src/plugins/qmakeprojectmanager/qmakeprojectmanager.h b/src/plugins/qmakeprojectmanager/qmakeprojectmanager.h index ece682f76d5..28b8014bb6f 100644 --- a/src/plugins/qmakeprojectmanager/qmakeprojectmanager.h +++ b/src/plugins/qmakeprojectmanager/qmakeprojectmanager.h @@ -48,8 +48,6 @@ class QMAKEPROJECTMANAGER_EXPORT QmakeManager : public ProjectExplorer::IProject Q_OBJECT public: - ~QmakeManager(); - void registerProject(QmakeProject *project); void unregisterProject(QmakeProject *project); void notifyChanged(const Utils::FileName &name); diff --git a/src/plugins/qmakeprojectmanager/qmakeprojectmanagerplugin.cpp b/src/plugins/qmakeprojectmanager/qmakeprojectmanagerplugin.cpp index 97c691c4f6d..43a8d57030c 100644 --- a/src/plugins/qmakeprojectmanager/qmakeprojectmanagerplugin.cpp +++ b/src/plugins/qmakeprojectmanager/qmakeprojectmanagerplugin.cpp @@ -125,7 +125,7 @@ bool QmakeProjectManagerPlugin::initialize(const QStringList &arguments, QString ActionManager::actionContainer(ProjectExplorer::Constants::M_FILECONTEXT); //register actions - Command *command; + Command *command = nullptr; m_buildSubProjectContextMenu = new Utils::ParameterAction(tr("Build"), tr("Build \"%1\""), Utils::ParameterAction::AlwaysEnabled/*handled manually*/, @@ -303,7 +303,7 @@ void QmakeProjectManagerPlugin::updateRunQMakeAction() bool enable = true; if (BuildManager::isBuilding(m_previousStartupProject)) enable = false; - QmakeProject *pro = qobject_cast(m_previousStartupProject); + auto pro = qobject_cast(m_previousStartupProject); m_runQMakeAction->setVisible(pro); if (!pro || !pro->activeTarget() @@ -317,20 +317,20 @@ void QmakeProjectManagerPlugin::updateContextActions(ProjectExplorer::Node *node { m_addLibraryActionContextMenu->setEnabled(dynamic_cast(node)); - QmakeProFileNode *proFileNode = dynamic_cast(node); - QmakeProject *qmakeProject = qobject_cast(project); - QmakeProFileNode *subProjectNode = 0; + auto proFileNode = dynamic_cast(node); + auto qmakeProject = qobject_cast(project); + QmakeProFileNode *subProjectNode = nullptr; if (node) { - if (QmakePriFileNode *subPriFileNode = dynamic_cast(node->projectNode())) + if (auto subPriFileNode = dynamic_cast(node->projectNode())) subProjectNode = subPriFileNode->proFileNode(); } - ProjectExplorer::FileNode *fileNode = node ? node->asFileNode() : 0; + ProjectExplorer::FileNode *fileNode = node ? node->asFileNode() : nullptr; bool buildFilePossible = subProjectNode && fileNode && (fileNode->fileType() == ProjectExplorer::SourceType); m_qmakeProjectManager->setContextNode(subProjectNode); m_qmakeProjectManager->setContextProject(qmakeProject); - m_qmakeProjectManager->setContextFile(buildFilePossible ? fileNode : 0); + m_qmakeProjectManager->setContextFile(buildFilePossible ? fileNode : nullptr); bool subProjectActionsVisible = qmakeProject && subProjectNode && (subProjectNode != qmakeProject->rootProjectNode()); @@ -344,8 +344,8 @@ void QmakeProjectManagerPlugin::updateContextActions(ProjectExplorer::Node *node m_buildSubProjectContextMenu->setParameter(subProjectName); m_buildFileAction->setParameter(buildFilePossible ? fileNode->filePath().fileName() : QString()); - QmakeBuildConfiguration *buildConfiguration = (qmakeProject && qmakeProject->activeTarget()) ? - static_cast(qmakeProject->activeTarget()->activeBuildConfiguration()) : 0; + auto buildConfiguration = (qmakeProject && qmakeProject->activeTarget()) ? + static_cast(qmakeProject->activeTarget()->activeBuildConfiguration()) : nullptr; bool isProjectNode = qmakeProject && proFileNode && buildConfiguration; bool isBuilding = BuildManager::isBuilding(project); bool enabled = subProjectActionsVisible && !isBuilding; diff --git a/src/plugins/qmldesigner/components/navigator/navigatortreeview.cpp b/src/plugins/qmldesigner/components/navigator/navigatortreeview.cpp index 40ee9645dcb..72de3a7cd0d 100644 --- a/src/plugins/qmldesigner/components/navigator/navigatortreeview.cpp +++ b/src/plugins/qmldesigner/components/navigator/navigatortreeview.cpp @@ -34,6 +34,7 @@ #include "metainfo.h" #include +#include #include #include @@ -169,18 +170,23 @@ NavigatorTreeView::NavigatorTreeView(QWidget *parent) void NavigatorTreeView::drawSelectionBackground(QPainter *painter, const QStyleOption &option) { painter->save(); - QLinearGradient gradient; - - QColor highlightColor = Utils::StyleHelper::notTooBrightHighlightColor(); - gradient.setColorAt(0, highlightColor.lighter(130)); - gradient.setColorAt(1, highlightColor.darker(130)); - gradient.setStart(option.rect.topLeft()); - gradient.setFinalStop(option.rect.bottomLeft()); - painter->fillRect(option.rect, gradient); - painter->setPen(highlightColor.lighter()); - painter->drawLine(option.rect.topLeft(),option.rect.topRight()); - painter->setPen(highlightColor.darker()); - painter->drawLine(option.rect.bottomLeft(),option.rect.bottomRight()); + if (Utils::creatorTheme()->widgetStyle() == Utils::Theme::StyleFlat) { + painter->setOpacity(0.5); + painter->fillRect(option.rect, option.palette.color(QPalette::Highlight)); + } else { + const QColor highlightColor = Utils::StyleHelper::notTooBrightHighlightColor(); + QLinearGradient gradient; + gradient.setColorAt(0, highlightColor.lighter(130)); + gradient.setColorAt(1, highlightColor.darker(130)); + gradient.setStart(option.rect.topLeft()); + gradient.setFinalStop(option.rect.bottomLeft()); + painter->fillRect(option.rect, gradient); + painter->setPen(highlightColor.lighter()); + const QRectF innerRect = QRectF(option.rect).adjusted(0.5, 0.5, -0.5, -0.5); + painter->drawLine(innerRect.topLeft(), innerRect.topRight()); + painter->setPen(highlightColor.darker()); + painter->drawLine(innerRect.bottomLeft(), innerRect.bottomRight()); + } painter->restore(); } diff --git a/src/plugins/qmlprofiler/qmlprofilertraceview.cpp b/src/plugins/qmlprofiler/qmlprofilertraceview.cpp index 048a76033f9..552a8ad18cf 100644 --- a/src/plugins/qmlprofiler/qmlprofilertraceview.cpp +++ b/src/plugins/qmlprofiler/qmlprofilertraceview.cpp @@ -71,16 +71,10 @@ class QmlProfilerTraceView::QmlProfilerTraceViewPrivate public: QmlProfilerTraceViewPrivate(QmlProfilerTraceView *qq) : q(qq) {} QmlProfilerTraceView *q; - QmlProfilerViewManager *m_viewContainer; - - QSize m_sizeHint; - QQuickWidget *m_mainView; QmlProfilerModelManager *m_modelManager; Timeline::TimelineModelAggregator *m_modelProxy; - - Timeline::TimelineZoomControl *m_zoomControl; }; diff --git a/src/plugins/qmlprofiler/qmlprofilerviewmanager.cpp b/src/plugins/qmlprofiler/qmlprofilerviewmanager.cpp index 1c4a67e5b93..22fb59934ed 100644 --- a/src/plugins/qmlprofiler/qmlprofilerviewmanager.cpp +++ b/src/plugins/qmlprofiler/qmlprofilerviewmanager.cpp @@ -34,7 +34,6 @@ #include #include -#include #include #include @@ -81,8 +80,6 @@ void QmlProfilerViewManager::createViews() QTC_ASSERT(d->profilerModelManager, return); QTC_ASSERT(d->profilerState, return); - //Utils::FancyMainWindow *mw = Debugger::mainWindow(); - d->traceView = new QmlProfilerTraceView(0, this, d->profilerModelManager); d->traceView->setWindowTitle(tr("Timeline")); connect(d->traceView, &QmlProfilerTraceView::gotoSourceLocation, @@ -103,11 +100,6 @@ void QmlProfilerViewManager::createViews() if (d->eventsViewFactory) d->eventsViews.append(d->eventsViewFactory->create(0, d->profilerModelManager)); - // Clear settings if the new views aren't there yet. Otherwise we get glitches - QSettings *settings = Core::ICore::settings(); - settings->beginGroup(QLatin1String("AnalyzerViewSettings_") + - QLatin1String(QmlProfiler::Constants::QmlProfilerPerspectiveId)); - foreach (QmlProfilerEventsView *view, d->eventsViews) { connect(view, &QmlProfilerEventsView::typeSelected, this, &QmlProfilerViewManager::typeSelected); @@ -122,14 +114,9 @@ void QmlProfilerViewManager::createViews() QByteArray dockId = view->objectName().toLatin1(); perspective.addOperation({dockId, view, Constants::QmlProfilerTimelineDockId, Perspective::AddToTab}); new QmlProfilerStateWidget(d->profilerState, d->profilerModelManager, view); - -// if (!settings->contains(view->parent()->objectName())) // parent() is QDockWidget. -// settings->remove(QString()); } perspective.addOperation({Constants::QmlProfilerTimelineDockId, 0, {}, Perspective::Raise}); Debugger::registerPerspective(Constants::QmlProfilerPerspectiveId, perspective); - - settings->endGroup(); } bool QmlProfilerViewManager::hasValidSelection() const diff --git a/src/plugins/qnx/qnxtoolchain.cpp b/src/plugins/qnx/qnxtoolchain.cpp index 9c0970618cf..32245219771 100644 --- a/src/plugins/qnx/qnxtoolchain.cpp +++ b/src/plugins/qnx/qnxtoolchain.cpp @@ -116,7 +116,7 @@ void QnxToolChain::setNdkPath(const QString &ndkPath) } // qcc doesn't support a "-dumpmachine" option to get supported abis -QList QnxToolChain::detectSupportedAbis() const +GccToolChain::DetectedAbisResult QnxToolChain::detectSupportedAbis() const { return qccSupportedAbis(); } diff --git a/src/plugins/qnx/qnxtoolchain.h b/src/plugins/qnx/qnxtoolchain.h index 8314b9f62f1..193e7e36f8c 100644 --- a/src/plugins/qnx/qnxtoolchain.h +++ b/src/plugins/qnx/qnxtoolchain.h @@ -50,7 +50,7 @@ public: void setNdkPath(const QString &ndkPath); protected: - virtual QList detectSupportedAbis() const override; + virtual DetectedAbisResult detectSupportedAbis() const override; QStringList reinterpretOptions(const QStringList &args) const override; diff --git a/src/plugins/texteditor/basefilefind.cpp b/src/plugins/texteditor/basefilefind.cpp index facac8a9c05..66d1e1f4457 100644 --- a/src/plugins/texteditor/basefilefind.cpp +++ b/src/plugins/texteditor/basefilefind.cpp @@ -285,10 +285,11 @@ void BaseFileFind::writeCommonSettings(QSettings *settings) void BaseFileFind::readCommonSettings(QSettings *settings, const QString &defaultFilter) { QStringList filters = settings->value(QLatin1String("filters")).toStringList(); - d->m_filterSetting = settings->value(QLatin1String("currentFilter")).toString(); + const QVariant currentFilter = settings->value(QLatin1String("currentFilter")); + d->m_filterSetting = currentFilter.toString(); if (filters.isEmpty()) filters << defaultFilter; - if (d->m_filterSetting.isEmpty()) + if (!currentFilter.isValid()) d->m_filterSetting = filters.first(); d->m_filterStrings.setStringList(filters); if (d->m_filterCombo) diff --git a/src/plugins/texteditor/codeassist/assistinterface.cpp b/src/plugins/texteditor/codeassist/assistinterface.cpp index 06e65d34d7e..42670678895 100644 --- a/src/plugins/texteditor/codeassist/assistinterface.cpp +++ b/src/plugins/texteditor/codeassist/assistinterface.cpp @@ -93,9 +93,12 @@ using namespace TextEditor; #include +#include #include #include +#include + namespace TextEditor { AssistInterface::AssistInterface(QTextDocument *textDocument, @@ -128,6 +131,9 @@ QString AssistInterface::textAt(int pos, int length) const void AssistInterface::prepareForAsyncUse() { m_text = m_textDocument->toPlainText(); + m_userStates.reserve(m_textDocument->blockCount()); + for (QTextBlock block = m_textDocument->firstBlock(); block.isValid(); block = block.next()) + m_userStates.append(block.userState()); m_textDocument = 0; m_isAsync = true; } @@ -136,6 +142,11 @@ void AssistInterface::recreateTextDocument() { m_textDocument = new QTextDocument(m_text); m_text.clear(); + + QTC_CHECK(m_textDocument->blockCount() == m_userStates.count()); + QTextBlock block = m_textDocument->firstBlock(); + for (int i = 0; i < m_userStates.count() && block.isValid(); ++i, block = block.next()) + block.setUserState(m_userStates[i]); } AssistReason AssistInterface::reason() const diff --git a/src/plugins/texteditor/codeassist/assistinterface.h b/src/plugins/texteditor/codeassist/assistinterface.h index 5daa611deea..340713fc244 100644 --- a/src/plugins/texteditor/codeassist/assistinterface.h +++ b/src/plugins/texteditor/codeassist/assistinterface.h @@ -29,8 +29,8 @@ #include - #include +#include QT_BEGIN_NAMESPACE class QTextDocument; @@ -63,6 +63,7 @@ private: QString m_fileName; AssistReason m_reason; QString m_text; + QVector m_userStates; }; } // namespace TextEditor diff --git a/src/plugins/valgrind/callgrindtool.cpp b/src/plugins/valgrind/callgrindtool.cpp index d13659146e2..246fe188830 100644 --- a/src/plugins/valgrind/callgrindtool.cpp +++ b/src/plugins/valgrind/callgrindtool.cpp @@ -412,7 +412,6 @@ CallgrindTool::CallgrindTool(QObject *parent) // Cost formatting { - auto menu = new QMenu; auto group = new QActionGroup(this); // Show costs as absolute numbers @@ -422,7 +421,6 @@ CallgrindTool::CallgrindTool(QObject *parent) m_costAbsolute->setChecked(true); connect(m_costAbsolute, &QAction::toggled, this, &CallgrindTool::updateCostFormat); group->addAction(m_costAbsolute); - menu->addAction(m_costAbsolute); // Show costs in percentages m_costRelative = new QAction(tr("Relative Costs"), this); @@ -430,7 +428,6 @@ CallgrindTool::CallgrindTool(QObject *parent) m_costRelative->setCheckable(true); connect(m_costRelative, &QAction::toggled, this, &CallgrindTool::updateCostFormat); group->addAction(m_costRelative); - menu->addAction(m_costRelative); // Show costs relative to parent m_costRelativeToParent = new QAction(tr("Relative Costs to Parent"), this); @@ -438,10 +435,9 @@ CallgrindTool::CallgrindTool(QObject *parent) m_costRelativeToParent->setCheckable(true); connect(m_costRelativeToParent, &QAction::toggled, this, &CallgrindTool::updateCostFormat); group->addAction(m_costRelativeToParent); - menu->addAction(m_costRelativeToParent); auto button = new QToolButton; - button->setMenu(menu); + button->addActions(group->actions()); button->setPopupMode(QToolButton::InstantPopup); button->setText(QLatin1String("$")); button->setToolTip(tr("Cost Format")); @@ -503,7 +499,6 @@ CallgrindTool::CallgrindTool(QObject *parent) CallgrindTool::~CallgrindTool() { qDeleteAll(m_textMarks); - doClear(false); } void CallgrindTool::slotGoToOverview() diff --git a/src/plugins/valgrind/memchecktool.cpp b/src/plugins/valgrind/memchecktool.cpp index a0e4b539d1d..412418d2023 100644 --- a/src/plugins/valgrind/memchecktool.cpp +++ b/src/plugins/valgrind/memchecktool.cpp @@ -249,8 +249,6 @@ class MemcheckTool : public QObject public: MemcheckTool(QObject *parent); - void createWidgets(); - MemcheckRunControl *createRunControl(ProjectExplorer::RunConfiguration *runConfiguration, Core::Id runMode); diff --git a/src/shared/help/helpicons.h b/src/shared/help/helpicons.h index cc9ea64df15..f4406f031f9 100644 --- a/src/shared/help/helpicons.h +++ b/src/shared/help/helpicons.h @@ -30,10 +30,10 @@ namespace Help { namespace Icons { -const Utils::Icon BOOKMARK( - QLatin1String(":/help/images/bookmark.png")); -const Utils::Icon HOME( - QLatin1String(":/help/images/home.png")); +const Utils::Icon BOOKMARK({ + {QLatin1String(":/help/images/bookmark.png"), Utils::Theme::IconsBaseColor}}); +const Utils::Icon HOME({ + {QLatin1String(":/help/images/home.png"), Utils::Theme::IconsBaseColor}}); const Utils::Icon MODE_HELP_CLASSIC( QLatin1String(":/help/images/mode_help.png")); const Utils::Icon MODE_HELP_FLAT({ diff --git a/src/shared/qbs b/src/shared/qbs index 0741b2c662b..ed37fd99438 160000 --- a/src/shared/qbs +++ b/src/shared/qbs @@ -1 +1 @@ -Subproject commit 0741b2c662babaeb19983259c659c52fb78bbfeb +Subproject commit ed37fd99438a2053d18b31ecd2366305bbc3ae03 diff --git a/src/tools/clangbackend/ipcsource/clangtranslationunit.h b/src/tools/clangbackend/ipcsource/clangtranslationunit.h index 893e469f097..c4b25d53c51 100644 --- a/src/tools/clangbackend/ipcsource/clangtranslationunit.h +++ b/src/tools/clangbackend/ipcsource/clangtranslationunit.h @@ -138,6 +138,8 @@ public: SkippedSourceRanges skippedSourceRanges() const; + static uint defaultOptions(); + private: void setDirty(); void checkIfNull() const; @@ -151,7 +153,6 @@ private: void reparseTranslationUnit() const; void reparseTranslationUnitIfFilesAreChanged() const; void updateIncludeFilePaths() const; - static uint defaultOptions(); static void includeCallback(CXFile included_file, CXSourceLocation * /*inclusion_stack*/, unsigned /*include_len*/, diff --git a/src/tools/clangbackend/ipcsource/codecompleter.cpp b/src/tools/clangbackend/ipcsource/codecompleter.cpp index 691686d0479..7381ac2d27f 100644 --- a/src/tools/clangbackend/ipcsource/codecompleter.cpp +++ b/src/tools/clangbackend/ipcsource/codecompleter.cpp @@ -84,15 +84,13 @@ ClangCodeCompleteResults CodeCompleter::complete(uint line, CXUnsavedFile *unsavedFiles, unsigned unsavedFileCount) { - const auto options = CXCodeComplete_IncludeMacros | CXCodeComplete_IncludeCodePatterns; - return clang_codeCompleteAt(translationUnit.cxTranslationUnitWithoutReparsing(), translationUnit.filePath().constData(), line, column, unsavedFiles, unsavedFileCount, - options); + defaultOptions()); } bool CodeCompleter::hasDotAt(uint line, uint column) const @@ -103,6 +101,17 @@ bool CodeCompleter::hasDotAt(uint line, uint column) const return unsavedFile.hasCharacterAt(location.offset(), '.'); } +uint CodeCompleter::defaultOptions() const +{ + uint options = CXCodeComplete_IncludeMacros + | CXCodeComplete_IncludeCodePatterns; + + if (translationUnit.defaultOptions() & CXTranslationUnit_IncludeBriefCommentsInCodeCompletion) + options |= CXCodeComplete_IncludeBriefComments; + + return options; +} + ClangCodeCompleteResults CodeCompleter::completeWithArrowInsteadOfDot(uint line, uint column) { ClangCodeCompleteResults results; diff --git a/src/tools/clangbackend/ipcsource/codecompleter.h b/src/tools/clangbackend/ipcsource/codecompleter.h index 2139da926d6..313323a9d93 100644 --- a/src/tools/clangbackend/ipcsource/codecompleter.h +++ b/src/tools/clangbackend/ipcsource/codecompleter.h @@ -49,6 +49,8 @@ public: // for tests bool hasDotAt(uint line, uint column) const; private: + uint defaultOptions() const; + ClangCodeCompleteResults complete(uint line, uint column, CXUnsavedFile *unsavedFiles, diff --git a/src/tools/cplusplus-keywordgen/cplusplus-keywordgen.cpp b/src/tools/cplusplus-keywordgen/cplusplus-keywordgen.cpp new file mode 100644 index 00000000000..8219c390e9f --- /dev/null +++ b/src/tools/cplusplus-keywordgen/cplusplus-keywordgen.cpp @@ -0,0 +1,332 @@ +// Copyright (c) 2007 Roberto Raggi +// +// Permission is hereby granted, free of charge, to any person obtaining a copy of +// this software and associated documentation files (the "Software"), to deal in +// the Software without restriction, including without limitation the rights to +// use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +// the Software, and to permit persons to whom the Software is furnished to do so, +// subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in all +// copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +// FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +// COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +// IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +// ### TODO: Rewrite me. + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +class State; +class DottedItem; + +typedef std::list RuleList; +typedef RuleList::iterator RulePtr; +typedef std::list StateList; +typedef StateList::iterator StatePtr; +typedef std::string::iterator Dot; +typedef std::vector::iterator DottedItemPtr; + +class DottedItem { +public: + RulePtr rule; + Dot dot; + + DottedItem() {} + + DottedItem(RulePtr rule, Dot dot): + rule(rule), dot(dot) {} + + bool operator == (const DottedItem &other) const { + return rule == other.rule && dot == other.dot; + } + + bool operator != (const DottedItem &other) const { + return ! operator == (other); + } + + bool terminal() const { + return dot == rule->end(); + } + + DottedItem next() const { + DottedItem item; + item.rule = rule; + item.dot = dot; + ++item.dot; + return item; + } +}; + +struct State { +public: + State() {} + + template + State(_ForwardIterator first, _ForwardIterator last) { + _items.insert(_items.end(), first, last); + } + + static State &intern(const State &state) { + StatePtr ptr = std::find(first_state(), last_state(), state); + if (ptr == last_state()) + ptr = states().insert(last_state(), state); + return *ptr; + } + + State &next(char ch) { + std::vector n; + for (DottedItemPtr it = first_item(); it != last_item(); ++it) { + if (! it->terminal() && *it->dot == ch) + n.push_back(it->next()); + } + return intern(State(n.begin(), n.end())); + } + + std::set firsts() { + std::set s; + for (DottedItemPtr it = first_item(); it != last_item(); ++it) { + if (! it->terminal()) + s.insert(*it->dot); + } + return s; + } + + size_t item_count() const { return _items.size(); } + + DottedItemPtr first_item() { return _items.begin(); } + DottedItemPtr last_item() { return _items.end(); } + + static StatePtr first_state() { return states().begin(); } + static StatePtr last_state() { return states().end(); } + + bool operator == (const State &other) const { return _items == other._items; } + bool operator != (const State &other) const { return _items != other._items; } + + template + static State &start(_Iterator first, _Iterator last) { + std::vector items; + for (; first != last; ++first) + items.push_back(DottedItem(first, first->begin())); + return intern(State(items.begin(), items.end())); + } + + static void reset() { + states().clear(); + } + +private: + static StateList &states() { + static StateList _states; + return _states; + } + +private: + std::vector _items; +}; + +static bool option_no_enums = false; +static bool option_toupper = false; +static std::string option_namespace_name; +static std::string option_token_prefix = "Token_"; +static std::string option_char_type = "char"; +static std::string option_unicode_function = ""; + +std::string token_id(const std::string &id) +{ + std::string token = option_token_prefix; + + if (! option_toupper) + token += id; + else { + for (size_t i = 0; i < id.size(); ++i) + token += toupper(id[i]); + } + + return token; +} + +bool starts_with(const std::string &line, const std::string &text) { + if (text.length() < line.length()) { + return std::equal(line.begin(), line.begin() + text.size(), text.begin()); + } + return false; +} + +void doit(State &state) +{ + static int depth{0}; + + ++depth; + + std::string indent(depth * 2, ' '); + + std::set firsts = state.firsts(); + for (std::set::iterator it = firsts.begin(); it != firsts.end(); ++it) { + std::string _else = it == firsts.begin() ? "" : "else "; + std::cout << indent << _else << "if (s[" << (depth - 1) << "]" << option_unicode_function << " == '" << *it << "') {" << std::endl; + State &next_state = state.next(*it); + + bool found = false; + for (DottedItemPtr item = next_state.first_item(); item != next_state.last_item(); ++item) { + if (item->terminal()) { + if (found) { + std::cerr << "*** Error. Too many accepting states" << std::endl; + exit(EXIT_FAILURE); + } + found = true; + std::cout << indent << " return " << option_namespace_name << token_id(*item->rule) << ";" << std::endl; + } + } + + if (! found) + doit(next_state); + + std::cout << indent << "}" << std::endl; + } + + --depth; +} + +void gen_classify_n(State &start_state, int N) +{ + std::cout << "static inline int classify" << N << "(const " << option_char_type << " *s) {" << std::endl; + doit(start_state); + std::cout << " return " << option_namespace_name << token_id("identifier") << ";" << std::endl + << "}" << std::endl << std::endl; +} + +void gen_classify(const std::multimap &keywords) +{ + std::cout << "int " << option_namespace_name << "classify(const " << option_char_type << " *s, int n) {" << std::endl + << " switch (n) {" << std::endl; + std::multimap::const_iterator it = keywords.begin(); + while (it != keywords.end()) { + size_t size = it->first; + std::cout << " case " << size << ": return classify" << size << "(s);" << std::endl; + do { ++it; } while (it != keywords.end() && it->first == size); + } + std::cout << " default: return " << option_namespace_name << token_id("identifier") << ";" << std::endl + << " } // switch" << std::endl + << "}" << std::endl << std::endl; +} + +void gen_enums(const std::multimap &keywords) +{ + std::cout << "enum {" << std::endl; + std::multimap::const_iterator it = keywords.begin(); + for (; it != keywords.end(); ++it) { + std::cout << " " << token_id(it->second) << "," << std::endl; + } + std::cout << " " << token_id("identifier") << std::endl + << "};" << std::endl << std::endl; +} + +inline bool not_whitespace_p(char ch) { + return ! std::isspace(ch); +} + +int main(int argc, char *argv[]) { + const std::string ns = "--namespace="; + + for (int i = 0; i < argc; ++i) { + const std::string arg(argv[i]); + if (arg == "--no-enums") + option_no_enums = true; + else if (starts_with(arg, ns)) { + option_namespace_name.assign(arg.begin() + ns.size(), arg.end()); + option_namespace_name += "::"; + } + } + + std::multimap keywords; + std::string textline; + + bool readKeywords = false; + + const std::string opt_no_enums = "%no-enums"; + const std::string opt_toupper = "%toupper"; + const std::string opt_ns = "%namespace="; + const std::string opt_tok_prefix = "%token-prefix="; + const std::string opt_char_type = "%char-type="; + const std::string opt_unicode_function = "%unicode-function="; + + while (getline(std::cin, textline)) { + + // remove trailing spaces + textline.assign(textline.begin(), std::find_if(textline.rbegin(), textline.rend(), not_whitespace_p).base()); + + if (! readKeywords) { + if (textline.size() >= 2 && textline[0] == '%') { + if (textline[1] == '%') { + readKeywords = true; + } else if (textline == opt_no_enums) { + option_no_enums = true; + } else if (textline == opt_toupper) { + option_toupper = true; + } else if (starts_with(textline, opt_tok_prefix)) { + option_token_prefix.assign(textline.begin() + opt_tok_prefix.size(), textline.end()); + } else if (starts_with(textline, opt_char_type)) { + option_char_type.assign(textline.begin() + opt_char_type.size(), textline.end()); + } else if (starts_with(textline, opt_unicode_function)) { + option_unicode_function.assign(textline.begin() + opt_unicode_function.size(), textline.end()); + } else if (starts_with(textline, opt_ns)) { + option_namespace_name.assign(textline.begin() + opt_ns.size(), textline.end()); + option_namespace_name += "::"; + } + + continue; + } + std::cout << textline << std::endl; + } else { + if (textline.empty()) + continue; + + std::string::iterator start = textline.begin(); + while (start != textline.end() && std::isspace(*start)) + ++start; + + std::string::iterator stop = start; + while (stop != textline.end() && (std::isalnum(*stop) || *stop == '_')) + ++stop; + + if (start != stop) { + std::string keyword(start, stop); + if (keyword == "identifier") { + std::cerr << "*** Error. `identifier' is reserved" << std::endl; + exit(EXIT_FAILURE); + } + + keywords.insert(std::make_pair(keyword.size(), keyword)); + } + } + } + + if (! option_no_enums) + gen_enums(keywords); + + std::multimap::iterator it = keywords.begin(); + while (it != keywords.end()) { + size_t size = it->first; + RuleList rules; + do { rules.push_back(it->second); ++it; } + while (it != keywords.end() && it->first == size); + gen_classify_n(State::start(rules.begin(), rules.end()), size); + State::reset(); + } + + gen_classify(keywords); +} diff --git a/src/tools/cplusplus-keywordgen/cplusplus-keywordgen.pro b/src/tools/cplusplus-keywordgen/cplusplus-keywordgen.pro new file mode 100644 index 00000000000..7d647775398 --- /dev/null +++ b/src/tools/cplusplus-keywordgen/cplusplus-keywordgen.pro @@ -0,0 +1,3 @@ +include(../cplusplus-shared/tool.pri) + +SOURCES += cplusplus-keywordgen.cpp diff --git a/src/tools/cplusplus-keywordgen/cplusplus-keywordgen.qbs b/src/tools/cplusplus-keywordgen/cplusplus-keywordgen.qbs new file mode 100644 index 00000000000..a101414e2e1 --- /dev/null +++ b/src/tools/cplusplus-keywordgen/cplusplus-keywordgen.qbs @@ -0,0 +1,7 @@ +import "../cplusplus-shared/CPlusPlusTool.qbs" as CPlusPlusTool + +CPlusPlusTool { + name: "cplusplus-keywordgen" + + files: "cplusplus-keywordgen.cpp" +} diff --git a/src/tools/cplusplustools.qbs b/src/tools/cplusplustools.qbs index fe2fc5cf161..ee17e6baa63 100644 --- a/src/tools/cplusplustools.qbs +++ b/src/tools/cplusplustools.qbs @@ -7,6 +7,7 @@ Project { references: [ "cplusplus-ast2png/cplusplus-ast2png.qbs", "cplusplus-frontend/cplusplus-frontend.qbs", + "cplusplus-keywordgen/cplusplus-keywordgen.qbs", "cplusplus-mkvisitor/cplusplus-mkvisitor.qbs", "cplusplus-update-frontend/cplusplus-update-frontend.qbs", ] diff --git a/src/tools/icons/export.py b/src/tools/icons/export.py index 351942fb47a..6f140997146 100644 --- a/src/tools/icons/export.py +++ b/src/tools/icons/export.py @@ -30,7 +30,7 @@ # Each images is generated as normal and high resolution variant. # Each png file is afterwards optimized with optipng. -import sys, os, subprocess, xml.etree.ElementTree as ET +import sys, os, subprocess, re, xml.etree.ElementTree as ET from distutils import spawn scriptDir = os.path.dirname(os.path.abspath(sys.argv[0])) + '/' @@ -39,6 +39,10 @@ scriptDir = os.path.dirname(os.path.abspath(sys.argv[0])) + '/' qtcSourceRoot = os.getenv('QTC_SRC', os.path.abspath(scriptDir + '../../..')) \ .replace('\\', '/') + '/' +svgElementFilter = "" +if len(sys.argv) > 1: + svgElementFilter = sys.argv[1] + # Inkscape is required by this script inkscapeExecutable = spawn.find_executable("inkscape") if not inkscapeExecutable: @@ -55,7 +59,12 @@ for svgElement in svgTreeRoot.iter(): try: svgElementID = svgElement.attrib['id'] if svgElementID.startswith(('src/', 'share/')): - svgIDs.append(svgElementID) + if svgElementFilter != "": + pattern = re.compile(svgElementFilter) + if pattern.match(svgElementID): + svgIDs.append(svgElementID) + else: + svgIDs.append(svgElementID) except: pass diff --git a/src/tools/icons/qtcreatoricons.svg b/src/tools/icons/qtcreatoricons.svg index d0708b3f25f..21bfa82a241 100644 --- a/src/tools/icons/qtcreatoricons.svg +++ b/src/tools/icons/qtcreatoricons.svg @@ -2231,7 +2231,7 @@ y="570" /> + + + + + + + + + + = 0x50400) #ifdef Q_OS_WIN diff --git a/tests/system/README b/tests/system/README index 2ff437e743d..f7900deb136 100644 --- a/tests/system/README +++ b/tests/system/README @@ -2,8 +2,7 @@ Prerequisites - general information ----------------------------------- Squish tests inside this folder have several prerequisites to get them running. -First - and most important - you have to own a valid Squish license. Currently it's recommended to use Squish 5.1.3. -For Squish on Mac it's necessary to change the used Python version to 2.6 inside the /etc/paths.ini +First - and most important - you have to own a valid Squish license. Currently it's recommended to use Squish 6.0. Second - some of the test suites/test cases expect an installed Qt 4 SDK in its default location. On Linux/Mac this is ~/QtSDK, and on Windows this is C:\QtSDK. diff --git a/tests/system/objects.map b/tests/system/objects.map index fc44e46139c..9e491290e79 100644 --- a/tests/system/objects.map +++ b/tests/system/objects.map @@ -55,17 +55,18 @@ :Core__Internal__GeneralSettings.User Interface_QGroupBox {container=':qt_tabwidget_stackedwidget.Core__Internal__GeneralSettings_QWidget' name='interfaceBox' title='User Interface' type='QGroupBox' visible='1'} :CppTools__Internal__CompletionSettingsPage.Behavior_QGroupBox {container=':qt_tabwidget_stackedwidget.CppTools__Internal__CompletionSettingsPage_QWidget' name='groupBox' title='Behavior' type='QGroupBox' visible='1'} :DebugModeWidget.Debugger Log_QDockWidget {container=':Qt Creator.DebugModeWidget_QSplitter' name='Debugger.Docks.OutputDockWidget' type='QDockWidget' visible='1'} -:DebugModeWidget.Debugger Toolbar_QDockWidget {container=':Qt Creator.DebugModeWidget_QSplitter' name='Debugger Toolbar' type='QDockWidget' visible='1' windowTitle='Debugger Toolbar'} :DebugModeWidget.Debugger.Docks.BreakDockWidget_QDockWidget {container=':Qt Creator.DebugModeWidget_QSplitter' name='Debugger.Docks.BreakDockWidget' type='QDockWidget' visible='1'} -:DebugModeWidget.Locals and Expressions_QDockWidget {container=':Qt Creator.DebugModeWidget_QSplitter' name='Debugger.Docks.LocalsAndWatchers' type='QDockWidget' visible='1' windowTitle='Locals and Expressions'} +:DebugModeWidget.Debugger.Docks.LocalsAndWatchersDockWidget_QDockWidget {container=':Qt Creator.DebugModeWidget_QSplitter' name='Debugger.Docks.LocalsAndWatchersDockWidget' type='QDockWidget' visible='1'} :DebugModeWidget.OK_QPushButton {container=':Qt Creator.DebugModeWidget_QSplitter' text='OK' type='QPushButton' unnamed='1' visible='1'} :DebugModeWidget.Toolbar_QDockWidget {container=':Qt Creator.DebugModeWidget_QSplitter' name='Toolbar' type='QDockWidget' visible='1'} -:DebugModeWidget_QComboBox {container=':Qt Creator.DebugModeWidget_QSplitter' occurrence='2' type='QComboBox' unnamed='1' visible='1'} :DebugModeWidget_Debugger::Internal::ConsoleView {container=':Qt Creator.DebugModeWidget_QSplitter' type='Debugger::Internal::ConsoleView' unnamed='1' visible='1'} +:DebugModeWidget_QComboBox {container=':Qt Creator.DebugModeWidget_QSplitter' occurrence='2' type='QComboBox' unnamed='1' visible='1'} :Debugger Toolbar.Continue_QToolButton {container=':DebugModeWidget.Toolbar_QDockWidget' text='Continue' type='QToolButton' unnamed='1' visible='1'} -:Debugger Toolbar.Exit Debugger_QToolButton {container=':DebugModeWidget.Debugger Toolbar_QDockWidget' text='Stop Debugger' type='QToolButton' unnamed='1' visible='1'} +:Debugger Toolbar.Exit Debugger_QToolButton {container=':DebugModeWidget.Toolbar_QDockWidget' text='Stop Debugger' type='QToolButton' unnamed='1' visible='1'} :Debugger Toolbar.StatusText_Utils::StatusLabel {container=':DebugModeWidget.Toolbar_QDockWidget' type='Utils::StatusLabel' unnamed='1'} :Debugger.Docks.BreakDockWidget.Debugger.Docks.Break_QFrame {container=':DebugModeWidget.Debugger.Docks.BreakDockWidget_QDockWidget' name='Debugger.Docks.Break' type='QFrame' visible='1'} +:Debugger.Docks.LocalsAndWatchersDockWidget.Inspector_QFrame {container=':DebugModeWidget.Debugger.Docks.LocalsAndWatchersDockWidget_QDockWidget' name='Inspector' type='QFrame' visible='1'} +:Debugger::Internal::ConsoleEdit {columnIndex='0' container=':DebugModeWidget_Debugger::Internal::ConsoleView' rowIndex='0' type='Debugger::Internal::ConsoleEdit' unnamed='1' visible='1'} :Description.description_Utils::CompletingTextEdit {container=':splitter.Description_QGroupBox' name='description' type='Utils::CompletingTextEdit' visible='1'} :Dialog.OK_QPushButton {text='OK' type='QPushButton' unnamed='1' visible='1' window=':Dialog_QmlJSEditor::Internal::ComponentNameDialog'} :Dialog.componentNameEdit_QLineEdit {name='componentNameEdit' type='Utils::ClassNameValidatingLineEdit' visible='1' window=':Dialog_QmlJSEditor::Internal::ComponentNameDialog'} @@ -99,7 +100,7 @@ :Hits_QCLuceneResultWidget {aboveWidget=':Hits_QLabel' type='QCLuceneResultWidget' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'} :Hits_QLabel {text~='\\\\d+ - \\\\d+ of \\\\d+ Hits' type='QLabel' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'} :Kits_QtVersion_QComboBox {container=':qt_tabwidget_stackedwidget_QWidget' leftWidget=':QtVersionLabel_KitPage' type='QComboBox' unnamed='1' visible='1'} -:Locals and Expressions_Debugger::Internal::WatchTreeView {container=':DebugModeWidget.Locals and Expressions_QDockWidget' name='WatchWindow' type='Debugger::Internal::WatchTreeView' visible='1' windowTitle='Locals and Expressions'} +:Locals and Expressions_Debugger::Internal::WatchTreeView {container=':Debugger.Docks.LocalsAndWatchersDockWidget.Inspector_QFrame' name='WatchWindow' type='Debugger::Internal::WatchTreeView' visible='1'} :Minimal required Qt version:_QLabel {text='Minimal required Qt version:' type='QLabel' unnamed='1' visible='1' window=':New Text File_ProjectExplorer::JsonWizard'} :New Text File.Add to project:_QLabel {name='projectLabel' text='Add to project:' type='QLabel' visible='1' window=':New Text File_ProjectExplorer::JsonWizard'} :New Text File.nameLineEdit_Utils::FileNameValidatingLineEdit {name='nameLineEdit' type='Utils::FileNameValidatingLineEdit' visible='1' window=':New Text File_ProjectExplorer::JsonWizard'} @@ -119,7 +120,6 @@ :Path.Utils_BaseValidatingLineEdit {container=':qt_tabwidget_stackedwidget_QWidget' name='LineEdit' type='Utils::FancyLineEdit' visible='1'} :QML Debugging.No_QPushButton {text='No' type='QPushButton' unnamed='1' visible='1' window=':QML Debugging_QMessageBox'} :QML Debugging_QMessageBox {text='The option will only take effect if the project is recompiled. Do you want to recompile now?' type='QMessageBox' unnamed='1' visible='1'} -:Debugger::Internal::ConsoleEdit {columnIndex='0' container=':DebugModeWidget_Debugger::Internal::ConsoleView' rowIndex='0' type='Debugger::Internal::ConsoleEdit' unnamed='1' visible='1'} :Qt Creator.Add Bookmark_QToolButton {text='Add Bookmark' type='QToolButton' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'} :Qt Creator.CloseDoc_QToolButton {toolTip?='Close Document *' type='QToolButton' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'} :Qt Creator.CloseFind_QToolButton {name='close' type='QToolButton' visible='1' window=':Qt Creator_Core::Internal::MainWindow'} @@ -133,8 +133,6 @@ :Qt Creator.Replace All_QToolButton {name='replaceAllButton' text='Replace All' type='QToolButton' visible='1' window=':Qt Creator_Core::Internal::MainWindow'} :Qt Creator.Replace_QToolButton {name='replaceButton' text='Replace' type='QToolButton' visible='1' window=':Qt Creator_Core::Internal::MainWindow'} :Qt Creator.Stop_QToolButton {text='Stop' type='QToolButton' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'} -:Qt Creator.WelcomePageStyledBar_QWindowContainer {aboveWidget=':Qt Creator.WelcomePageStyledBar_Utils::StyledBar' type='QWindowContainer' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'} -:Qt Creator.WelcomePageStyledBar_Utils::StyledBar {name='WelcomePageStyledBar' type='Utils::StyledBar' visible='1' window=':Qt Creator_Core::Internal::MainWindow'} :Qt Creator.WelcomePage_QQuickWidget {name='WelcomePage' type='QQuickWidget' visible='1' window=':Qt Creator_Core::Internal::MainWindow'} :Qt Creator.replaceEdit_Utils::FilterLineEdit {name='replaceEdit' type='Utils::FancyLineEdit' visible='1' window=':Qt Creator_Core::Internal::MainWindow'} :Qt Creator.scrollArea_QScrollArea {type='ProjectExplorer::PanelsWidget' visible='1' window=':Qt Creator_Core::Internal::MainWindow'} @@ -202,7 +200,6 @@ :Session Manager_ProjectExplorer::Internal::SessionDialog {name='ProjectExplorer__Internal__SessionDialog' type='ProjectExplorer::Internal::SessionDialog' visible='1' windowTitle='Session Manager'} :Startup.contextHelpComboBox_QComboBox {container=':Form.Startup_QGroupBox' name='contextHelpComboBox' type='QComboBox' visible='1'} :User Interface.languageBox_QComboBox {container=':Core__Internal__GeneralSettings.User Interface_QGroupBox' name='languageBox' type='QComboBox' visible='1'} -:WelcomePageStyledBar.WelcomePage_QQuickView {container=':Qt Creator.WelcomePageStyledBar_QWindowContainer' name='WelcomePage' type='QQuickView' visible='true'} :Widget Box_qdesigner_internal::WidgetBoxTreeWidget {container=':*Qt Creator.Widget Box_QDockWidget' type='qdesigner_internal::WidgetBoxTreeWidget' unnamed='1' visible='1'} :Working Copy_Utils::BaseValidatingLineEdit {type='Utils::FancyLineEdit' unnamed='1' visible='1' window=':New Text File_ProjectExplorer::JsonWizard'} :WritePermissions_Core::Internal::ReadOnlyFilesDialog {name='Core__Internal__ReadOnlyFilesDialog' type='Core::ReadOnlyFilesDialog' visible='1' windowTitle='Files Without Write Permissions'} diff --git a/tests/system/shared/project.py b/tests/system/shared/project.py index d3515afb71f..6cfda639cab 100644 --- a/tests/system/shared/project.py +++ b/tests/system/shared/project.py @@ -34,10 +34,7 @@ def openQbsProject(projectPath): def openQmakeProject(projectPath, targets=Targets.desktopTargetClasses(), fromWelcome=False): cleanUpUserFiles(projectPath) if fromWelcome: - if isQt54Build: - welcomePage = ":WelcomePageStyledBar.WelcomePage_QQuickView" - else: - welcomePage = ":Qt Creator.WelcomePage_QQuickWidget" + welcomePage = ":Qt Creator.WelcomePage_QQuickWidget" mouseClick(waitForObject("{clip='false' container='%s' enabled='true' text='Open Project' " "type='Button' unnamed='1' visible='true'}" % welcomePage), 5, 5, 0, Qt.LeftButton) @@ -87,10 +84,7 @@ def openCmakeProject(projectPath, buildDir): # this list can be used in __chooseTargets__() def __createProjectOrFileSelectType__(category, template, fromWelcome = False, isProject=True): if fromWelcome: - if isQt54Build: - welcomePage = ":WelcomePageStyledBar.WelcomePage_QQuickView" - else: - welcomePage = ":Qt Creator.WelcomePage_QQuickWidget" + welcomePage = ":Qt Creator.WelcomePage_QQuickWidget" mouseClick(waitForObject("{clip='false' container='%s' enabled='true' text='New Project' " "type='Button' unnamed='1' visible='true'}" % welcomePage), 5, 5, 0, Qt.LeftButton) diff --git a/tests/system/shared/qtcreator.py b/tests/system/shared/qtcreator.py index 797235904f7..116826df391 100644 --- a/tests/system/shared/qtcreator.py +++ b/tests/system/shared/qtcreator.py @@ -34,8 +34,6 @@ import sys import errno; from datetime import datetime,timedelta; -isQt54Build = os.getenv("SYSTEST_ISQT54BUILD") != "0" - srcPath = '' SettingsPath = '' tmpSettingsDir = '' diff --git a/tests/system/suite_CSUP/tst_CSUP06/test.py b/tests/system/suite_CSUP/tst_CSUP06/test.py index 34ab0c98351..d721790e7e7 100644 --- a/tests/system/suite_CSUP/tst_CSUP06/test.py +++ b/tests/system/suite_CSUP/tst_CSUP06/test.py @@ -58,7 +58,7 @@ def performAutoCompletionTest(editor, lineToStartRegEx, linePrefix, testFunc, *f type(editor, bol) currentLine = moveDownToNextNonEmptyLine(editor) -def checkIncludeCompletion(editor): +def checkIncludeCompletion(editor, isClangCodeModel): test.log("Check auto-completion of include statements.") # define special handlings noProposal = ["vec", "detail/hea", "dum"] @@ -76,8 +76,12 @@ def checkIncludeCompletion(editor): missing, noProposal, specialHandling = args inclSnippet = currentLine.split("//#include")[-1].strip().strip('<"') propShown = waitFor("object.exists(':popupFrame_TextEditor::GenericProposalWidget')", 2500) - test.compare(not propShown, inclSnippet in missing or inclSnippet in noProposal, - "Proposal widget is (not) shown as expected (%s)" % inclSnippet) + if isClangCodeModel and inclSnippet in noProposal and JIRA.isBugStillOpen(15710): + test.xcompare(propShown, False, ("Proposal widget should not be shown for (%s) " + "but because of QTCREATORBUG-15710 it currently is") % inclSnippet) + else: + test.compare(not propShown, inclSnippet in missing or inclSnippet in noProposal, + "Proposal widget is (not) shown as expected (%s)" % inclSnippet) if propShown: proposalListView = waitForObject(':popupFrame_Proposal_QListView') if inclSnippet in specialHandling: @@ -127,8 +131,12 @@ def checkSymbolCompletion(editor, isClangCodeModel): if isClangCodeModel and JIRA.isBugStillOpen(15639): timeout = 5000 propShown = waitFor("object.exists(':popupFrame_TextEditor::GenericProposalWidget')", timeout) - test.compare(not propShown, symbol in missing, - "Proposal widget is (not) shown as expected (%s)" % symbol) + if isClangCodeModel and symbol in missing and not "(" in symbol and JIRA.isBugStillOpen(15710): + test.xcompare(propShown, False, ("Proposal widget should not be shown for (%s) " + "but because of QTCREATORBUG-15710 it currently is") % symbol) + else: + test.compare(not propShown, symbol in missing, + "Proposal widget is (not) shown as expected (%s)" % symbol) found = [] if propShown: proposalListView = waitForObject(':popupFrame_Proposal_QListView') @@ -173,7 +181,7 @@ def main(): return editor = getEditorForFileSuffix("main.cpp") if editor: - checkIncludeCompletion(editor) + checkIncludeCompletion(editor, useClang) checkSymbolCompletion(editor, useClang) invokeMenuItem('File', 'Revert "main.cpp" to Saved') clickButton(waitForObject(":Revert to Saved.Proceed_QPushButton")) diff --git a/tests/system/suite_WELP/tst_WELP01/test.py b/tests/system/suite_WELP/tst_WELP01/test.py index 69f99419ea2..c752c65b1cc 100755 --- a/tests/system/suite_WELP/tst_WELP01/test.py +++ b/tests/system/suite_WELP/tst_WELP01/test.py @@ -26,10 +26,7 @@ source("../../shared/qtcreator.py") source("../../shared/suites_qtta.py") -if isQt54Build: - welcomePage = ":WelcomePageStyledBar.WelcomePage_QQuickView" -else: - welcomePage = ":Qt Creator.WelcomePage_QQuickWidget" +welcomePage = ":Qt Creator.WelcomePage_QQuickWidget" gettingStartedText = getQmlItem("Button", welcomePage, False, "text='Get Started Now' id='gettingStartedButton'") @@ -83,11 +80,10 @@ def main(): textUrls = {'Online Community':'http://forum.qt.io', 'Blogs':'http://planet.qt.io', 'Qt Account':'https://account.qt.io', - 'Qt Cloud Services':'https://developer.qtcloudservices.com', 'User Guide':'qthelp://org.qt-project.qtcreator/doc/index.html' } for text, url in textUrls.items(): - qmlItem = getQmlItem("LinkedText", welcomePage, False, "text='%s'" % text) + qmlItem = getQmlItem("Text", welcomePage, False, "text='%s'" % text) if test.verify(checkIfObjectExists(qmlItem), "Verifying: Link to %s exists." % text): itemObj = findObject(qmlItem) diff --git a/tests/system/suite_WELP/tst_WELP02/test.py b/tests/system/suite_WELP/tst_WELP02/test.py index 0dcc5aaf780..17aacc64978 100644 --- a/tests/system/suite_WELP/tst_WELP02/test.py +++ b/tests/system/suite_WELP/tst_WELP02/test.py @@ -26,10 +26,7 @@ source("../../shared/qtcreator.py") source("../../shared/suites_qtta.py") -if isQt54Build: - welcomePage = ":WelcomePageStyledBar.WelcomePage_QQuickView" -else: - welcomePage = ":Qt Creator.WelcomePage_QQuickWidget" +welcomePage = ":Qt Creator.WelcomePage_QQuickWidget" def checkTypeAndProperties(typePropertiesDetails): for (qType, props, detail) in typePropertiesDetails: @@ -53,7 +50,7 @@ def main(): typePropDet = (("Button", "text='Get Started Now' id='gettingStartedButton'", "Get Started Now button"), ("Text", "text='Sessions' id='sessionsTitle'", "Sessions section"), - ("Text", "text='default' id='text'", "default session listed"), + ("Text", "text='default'", "default session listed"), ("Text", "text='Recent Projects' id='recentProjectsTitle'", "Projects section"), ) checkTypeAndProperties(typePropDet) @@ -66,10 +63,10 @@ def main(): # go to "Welcome page" again and verify updated information switchViewTo(ViewConstants.WELCOME) typePropDet = (("Text", "text='Sessions' id='sessionsTitle'", "Sessions section"), - ("Text", "text='default (current session)' id='text'", + ("Text", "text='default (current session)'", "default session as current listed"), ("Text", "text='Recent Projects' id='recentProjectsTitle'", "Projects section"), - ("LinkedText", "text='SampleApp' id='projectNameText'", + ("Text", "text='SampleApp'", "current project listed in projects section") ) checkTypeAndProperties(typePropDet) @@ -83,10 +80,10 @@ def main(): "Verifying: The project is opened in 'Edit' mode after configuring.") # go to "Welcome page" again and check if there is an information about recent projects switchViewTo(ViewConstants.WELCOME) - test.verify(checkIfObjectExists(getQmlItem("LinkedText", welcomePage, False, - "text='propertyanimation' id='projectNameText'")) and - checkIfObjectExists(getQmlItem("LinkedText", welcomePage, False, - "text='SampleApp' id='projectNameText'")), + test.verify(checkIfObjectExists(getQmlItem("Text", welcomePage, False, + "text='propertyanimation'")) and + checkIfObjectExists(getQmlItem("Text", welcomePage, False, + "text='SampleApp'")), "Verifying: 'Welcome page' displays information about recently created and " "opened projects.") # exit Qt Creator diff --git a/tests/system/suite_WELP/tst_WELP03/test.py b/tests/system/suite_WELP/tst_WELP03/test.py index 8baa26b6356..724397cb9a8 100644 --- a/tests/system/suite_WELP/tst_WELP03/test.py +++ b/tests/system/suite_WELP/tst_WELP03/test.py @@ -45,10 +45,7 @@ def main(): test.log("Welcome mode is not scriptable with this Squish version") return global sdkPath - if isQt54Build: - welcomePage = ":WelcomePageStyledBar.WelcomePage_QQuickView" - else: - welcomePage = ":Qt Creator.WelcomePage_QQuickWidget" + welcomePage = ":Qt Creator.WelcomePage_QQuickWidget" # open Qt Creator startApplication("qtcreator" + SettingsPath) if not startedWithoutPluginError(): diff --git a/tests/system/suite_WELP/tst_WELP04/test.py b/tests/system/suite_WELP/tst_WELP04/test.py index 97e0794d2d3..7b185aa70e2 100644 --- a/tests/system/suite_WELP/tst_WELP04/test.py +++ b/tests/system/suite_WELP/tst_WELP04/test.py @@ -30,10 +30,7 @@ def main(): if not canTestEmbeddedQtQuick(): test.log("Welcome mode is not scriptable with this Squish version") return - if isQt54Build: - welcomePage = ":WelcomePageStyledBar.WelcomePage_QQuickView" - else: - welcomePage = ":Qt Creator.WelcomePage_QQuickWidget" + welcomePage = ":Qt Creator.WelcomePage_QQuickWidget" # open Qt Creator startApplication("qtcreator" + SettingsPath) if not startedWithoutPluginError(): diff --git a/tests/system/suite_general/tst_session_handling/test.py b/tests/system/suite_general/tst_session_handling/test.py index 89500e720e7..0290baafb91 100644 --- a/tests/system/suite_general/tst_session_handling/test.py +++ b/tests/system/suite_general/tst_session_handling/test.py @@ -106,10 +106,7 @@ def createAndSwitchToSession(toSession): "window=%s}" % sessionInputDialog)) def checkWelcomePage(sessionName, isCurrent=False): - if isQt54Build: - welcomePage = ":WelcomePageStyledBar.WelcomePage_QQuickView" - else: - welcomePage = ":Qt Creator.WelcomePage_QQuickWidget" + welcomePage = ":Qt Creator.WelcomePage_QQuickWidget" switchViewTo(ViewConstants.WELCOME) mouseClick(waitForObject("{container='%s' text='Projects' type='Button' " "unnamed='1' visible='true'}" % welcomePage)) @@ -120,7 +117,7 @@ def checkWelcomePage(sessionName, isCurrent=False): else: sessions = ["default (current session)", sessionName] for sessionName in sessions: - test.verify(object.exists("{container='%s' enabled='true' type='LinkedText' unnamed='1' " + test.verify(object.exists("{container='%s' enabled='true' type='Text' unnamed='1' " "visible='true' text='%s'}" % (welcomePage, sessionName)), "Verifying session '%s' exists." % sessionName)