From dc91a0949a2a963b5c41a02c3f5f4d2adb6a932e Mon Sep 17 00:00:00 2001 From: Sergey Belyashov Date: Mon, 14 Jun 2010 13:39:35 +0200 Subject: [PATCH 1/7] Russian translation update Merge-request: 150 Reviewed-by: Oswald Buddenhagen --- share/qtcreator/translations/qtcreator_ru.ts | 630 +++++++++---------- 1 file changed, 315 insertions(+), 315 deletions(-) diff --git a/share/qtcreator/translations/qtcreator_ru.ts b/share/qtcreator/translations/qtcreator_ru.ts index b297f8692ce..762aa60690b 100644 --- a/share/qtcreator/translations/qtcreator_ru.ts +++ b/share/qtcreator/translations/qtcreator_ru.ts @@ -23,14 +23,14 @@ Невозможно отправить параметры командной строки запущенному процессу. Похоже, процесс не отвечает. - + Could not find 'Core.pluginspec' in %1 - Не удалось найти 'Core.pluginspec' в %1 + Не удалось найти "Core.pluginspec" в %1 Qt Creator - Plugin loader messages - Qt Creator - Сообщения загрузчика модулей + Qt Creator - Сообщения загрузчика надстроек @@ -110,7 +110,7 @@ BINEditor::Internal::BinEditorPlugin - + &Undo От&менить @@ -491,7 +491,7 @@ CMakeProjectManager::Internal::CMakeBuildConfigurationFactory - + Build Сборка @@ -525,7 +525,7 @@ CMakeProjectManager::Internal::CMakeRunConfiguration - + Clean Environment Чистая среда @@ -539,11 +539,16 @@ Build Environment Среда сборки + + + (disabled) + (отключено) + CMakeProjectManager::Internal::CMakeRunConfigurationWidget - + Arguments: Параметры: @@ -1815,7 +1820,7 @@ name <email> alias <email> Core::BaseFileWizard - + Unable to create the directory %1. Невозможно создать каталог %1. @@ -1839,17 +1844,17 @@ name <email> alias <email> - + Existing files Существующие файлы - + Failed to open an editor for '%1'. Не удалось открыть редактор для '%1'. - + [read only] [только для чтения] @@ -1864,7 +1869,7 @@ name <email> alias <email> [символьная ссылка] - + The project directory %1 contains files which cannot be overwritten: %2. Каталог проекта %1 содержит файлы, которые не могут быть перезаписаны: @@ -2214,7 +2219,7 @@ Would you like to overwrite them? Core::FileManager - + Cannot save file Не удалось сохранить файл @@ -2633,7 +2638,7 @@ Would you like to overwrite them? About &Plugins... - О модул&ях... + О &надстройках... @@ -2842,17 +2847,17 @@ Would you like to overwrite them? Installed Plugins - Установленные модули + Установленные надстройки Plugin Details of %1 - Подробнее о модуле %1 + Подробнее о надстройке %1 Plugin Errors of %1 - Ошибки модуля %1 + Ошибки надстройки %1 @@ -3079,7 +3084,7 @@ Would you like to overwrite them? Сортировать по алфавиту - + This change cannot be undone. Данное изменение невозможно отменить. @@ -3468,12 +3473,12 @@ Would you like to overwrite them? - + Interrupt Прервать - + Step Over Перейти через @@ -3581,7 +3586,7 @@ Would you like to overwrite them? Завершён - + Save Debugger Log Сохранить журнал отладчика @@ -4324,7 +4329,7 @@ Would you like to terminate it? Debugger::Internal::DebuggerOutputWindow - + Debugger Отладчик @@ -4889,7 +4894,7 @@ You can choose between waiting longer or abort debugging. Библиотека помощника отладчика не обнаружена в %1. - + Unable to start gdb '%1': %2 Не удалось запустить gdb '%1': %2 @@ -4934,12 +4939,12 @@ Do you want to stop the debugged process and load the selected snapshot?Закончено получение данных - + There is no gdb binary available for '%1' Отсутствует программа gdb для "%1" - + Cannot find debugger initialization script Не удалось найти скрипт инициализации отладчика @@ -4969,7 +4974,7 @@ Do you want to stop the debugged process and load the selected snapshot? - + An unknown error in the Gdb process occurred. Неизвестная ошибка возникла у процесса Gdb. @@ -5036,21 +5041,21 @@ Do you want to stop the debugged process and load the selected snapshot? - + Execution Error Ошибка выполнения - + - + Cannot continue debugged process: Невозможно продолжить отлаживаемый процесс: - + Failed to shut down application Не удалось закрыть приложение @@ -5075,7 +5080,7 @@ Do you want to stop the debugged process and load the selected snapshot?Потребован шаг через инструкцию... - + Finish function requested... Потребован выход из функции... @@ -5107,7 +5112,7 @@ Do you want to stop the debugged process and load the selected snapshot? ATTEMPT BREAKPOINT SYNC - + ПОПЫТКА СОГЛАСОВАНИЯ ТОЧЕК ОСТАНОВА @@ -5264,7 +5269,7 @@ Do you want to stop the debugged process and load the selected snapshot? The memory contents cannot be shown as no viewer plugin for binary data has been loaded. - Не удаётся отобразить содержимое памяти, так как модуль просмотра двоичных данных не загружен. + Невозможно отобразить содержимое памяти, так как надстройка просмотра двоичных данных не загружена. @@ -6223,7 +6228,7 @@ Do you want to stop the debugged process and load the selected snapshot? DebuggerPane - + Clear Contents Очистить содержимое @@ -6470,17 +6475,17 @@ Rebuilding the project might help. Форма Qt Designer - + Creates a Qt Designer form along with a matching class (C++ header and source file) for implementation purposes. You can add the form and class to an existing Qt C++ Project. Создание формы дизайнера Qt и соответствующего класса (исходный и заголовочный файлы C++) для реализации. Их можно будет добавить к существующему проекту Qt C++. - + Creates a Qt Designer form that you can add to a Qt C++ project. This is useful if you already have an existing class for the UI business logic. Создание формы дизайнера Qt для добавления к существующему проекту Qt C++. Это полезно в случае, если уже имеется класс бизнес-логики интерфеса пользователя. - + Qt Designer Form Class Класс формы Qt Designer @@ -6488,35 +6493,35 @@ Rebuilding the project might help. Designer::Internal::FormEditorW - + Widget Box Панель виджетов - - + + Object Inspector Инспектор объектов - - + + Property Editor Редактор свойств - - + + Action Editor Редактор действий - + Widget box Панель виджетов - + For&m Editor Редактор &форм @@ -6571,8 +6576,8 @@ Rebuilding the project might help. - - + + Signals && Slots Editor Редактор сигналов и слотов @@ -6604,7 +6609,7 @@ Rebuilding the project might help. About Qt Designer plugins.... - О модулях Qt Designer... + О надстройках Qt Designer... @@ -6651,7 +6656,7 @@ Rebuilding the project might help. Ошибка сохранения %1 - + Unable to open %1: %2 Не удалось открыть %1: %2 @@ -6682,7 +6687,7 @@ Rebuilding the project might help. Не удалось найти в %2 определение класса '%1'. - + Error finding/adding a slot. Ошибка поиска/добавления слота. @@ -6964,7 +6969,7 @@ Rebuilding the project might help. Plugin's initialization method succeeded - Инициализация модуля завершилась успешно + Инициализация надстройки завершилась успешно @@ -6974,7 +6979,7 @@ Rebuilding the project might help. Plugin successfully loaded and running - Модуль успешно загружен и запущен + Надстройка успешно загружена и запущена @@ -6984,7 +6989,7 @@ Rebuilding the project might help. Plugin was shut down - Модуль был выключен + Надстройка была выключена @@ -6994,7 +6999,7 @@ Rebuilding the project might help. Plugin ended its life cycle and was deleted - Модуль закончил свой жизненный цикл и был удалён + Надстройка закончила свой жизненный цикл и была удалена @@ -7023,7 +7028,7 @@ Rebuilding the project might help. Cannot load plugin because dependency failed to load: %1(%2) Reason: %3 - Не удалось загрузить модуль, так как его зависимость не загрузилась: %1(%2) + Невозможно загрузить надстройку, так как её зависимость не загрузилась: %1(%2) Причина: %3 @@ -7032,12 +7037,12 @@ Reason: %3 - + Load on Startup Загружать при запуске - + Utilities Утилиты @@ -7054,27 +7059,22 @@ Reason: %3 Read .vimrc Загрузить .vimrc - - - FakeVim properties... - Настройки FakeVim... - FakeVim::Internal::FakeVimExCommandsPage - + Ex Command Mapping Расширенное связывание команд - + FakeVim FakeVim - + Ex Trigger Expression Выражение запуска @@ -7092,17 +7092,12 @@ Reason: %3 FakeVim::Internal::FakeVimHandler - + Not implemented in FakeVim Не реализовано в FakeVim - - E20: Mark '%1' not set - E20: Отметка '%1' не установлена - - - + %1%2% %1%2% @@ -7112,27 +7107,13 @@ Reason: %3 %1Все - - File '%1' exists (add ! to override) - Файл '%1' уже существует (добавьте !, чтобы перезаписать) - - - - Cannot open file '%1' for writing - Не удалось открыть файл '%1' для записи - - - + + "%1" %2 %3L, %4C written "%1" %2 %3L, %4C записано - - Cannot open file '%1' for reading - Не удалось открыть файл '%1' для чтения - - - + "%1" %2L, %3C "%1" %2L, %3C @@ -7145,55 +7126,83 @@ Reason: %3 %n строк соответствуют шаблону - - - %n lines >ed %1 time - - %n строка сдвинута вправо %1 раз - %n строки сдвинуто вправо %1 раз - %n строк сдвинуто вправо %1 раз - - - + Can't open file %1 Невозможно открыть файл %1 - - E512: Unknown option: - E512: Неизвестный параметр: - - - + search hit BOTTOM, continuing at TOP поиск дошёл до НИЗА и продолжился СВЕРХУ - + search hit TOP, continuing at BOTTOM поиск дошёл до ВЕРХА и продолжился СНИЗУ - + Pattern not found: Шаблон не найден: - + + Mark '%1' not set + Отметить "%1" не установленным + + + + Unknown option: + Неизвестный параметр: + + + + File "%1" exists (add ! to override) + Файл "%1" уже существует (добавьте ! для перезаписи) + + + + Cannot open file "%1" for writing + Не удалось открыть файл "%1" для записи + + + + Cannot open file "%1" for reading + Не удалось открыть файл "%1" для чтения + + + + %n lines %1ed %2 time + + %n строка сдвинута %1 %2 раз + %n строки сдвинуто %1 %2 раз + %n строк сдвинуто %1 %2 раз + + + + Already at oldest change Уже на первом изменении - + Already at newest change Уже на последнем изменении + + FakeVim::Internal::FakeVimHandler::Private + + + Not an editor command: %1 + Не команда редактора: %1 + + FakeVim::Internal::FakeVimOptionPage - + General Основное @@ -7206,7 +7215,7 @@ Reason: %3 FakeVim::Internal::FakeVimPluginPrivate - + Switch to next file Перейти к следующему файлу @@ -7216,13 +7225,18 @@ Reason: %3 Перейти к предыдущему файлу - - + + Quit FakeVim Покинуть FakeVim - + + File not saved + Файл не сохранён + + + Saving succeeded Сохранение выполнено успешно @@ -7236,12 +7250,7 @@ Reason: %3 - - Not an editor command: %1 - Не команда редактора: %1 - - - + FakeVim Information Информация о FakeVim @@ -7331,7 +7340,8 @@ Reason: %3 Copy Text Editor Settings - Копировать настройки редактора + Скопировать настройки +текстового редактора @@ -7343,6 +7353,11 @@ Reason: %3 Set Plain Style Простой стиль + + + Show position of text marks + Отображать положение текстовых меток + FileWidget @@ -7651,12 +7666,12 @@ Add, modify, and remove document filters, which determine the documentation set Try to set breakpoints in plugins always automatically. - Всегда автоматически ставить точки останова. + Всегда автоматически ставить точки останова в надстройках. Try to set breakpoints in selected plugins - Ставить точки останова в выбранных модулях + Ставить точки останова в выбранных надстройках @@ -7666,7 +7681,7 @@ Add, modify, and remove document filters, which determine the documentation set Never set breakpoints in plugins automatically - Некогда не ставить автоматически + Никогда не ставить точки останова автоматически @@ -7674,7 +7689,7 @@ Add, modify, and remove document filters, which determine the documentation set to extract full path information for all source files from gdb. This is a slow process but enables setting breakpoints in files with the same file name in different directories. - Когда эта опция включена, то плагин отладчика будет пытаться + Когда эта опция включена, то надстройка отладчика будет пытаться получать информацию о полных путях для всех исходных файлов от gdb. Это замедляет процесс, но позволяет устанавливать точки останова в файлах, имена которых дублируются в других каталогах. @@ -7733,7 +7748,7 @@ on slow machines. In this case, the value should be increased. Behavior of Breakpoint Setting in Plugins - Поведение точек останова, устанавливаемых в модулях + Поведение точек останова, устанавливаемых в надстройках @@ -8161,7 +8176,7 @@ on slow machines. In this case, the value should be increased. Note that the git plugin for QtCreator is not able to interact with the server so far. Thus, manual ssh-identification etc. will not work. - Следует иметь в виду, что модуль Git до сих пор не умеет работать с сервером. Поэтому, ручная настройка ssh-авторизации и другое не будет работать. + Следует иметь в виду, что надстройка Git до сих пор не умеет работать с сервером. Поэтому, ручная настройка ssh-авторизации и другое не будет работать. @@ -8182,7 +8197,7 @@ on slow machines. In this case, the value should be increased. Ожидание данных... - + Git Diff Git - Сравнение @@ -9110,7 +9125,7 @@ You can choose between stashing the changes or discarding them. GitClient - + Unable to determine the repository for %1. Не удалось определить хранилище для %1. @@ -9969,7 +9984,7 @@ You can choose between stashing the changes or discarding them. Help::Internal::SearchWidget - + Indexing Индексация @@ -11493,7 +11508,12 @@ To do this, you type this shortcut and a space in the Locator entry field, and t Qt Project include file - Включаемый файл проекта Qt + Подключаемый к проекту Qt файл + + + + Qt Project feature file + Файл опции проекта Qt @@ -11501,7 +11521,7 @@ To do this, you type this shortcut and a space in the Locator entry field, and t Исходный файл перевода - + Qt Script file Файл сценария Qt @@ -11511,7 +11531,7 @@ To do this, you type this shortcut and a space in the Locator entry field, and t Файл проекта QML - + Qt Resource file Файл ресурсов Qt @@ -11842,7 +11862,7 @@ To do this, you type this shortcut and a space in the Locator entry field, and t <p>Note that the plugin will use this for posting as well as fetching.</p></body></html> <html><head/><body> <p><a href="http://pastebin.com">pastebin.com</a> позволяет отправлять данные на пользовательские субдомены (например, creator.pastebin.com). Поэтому укажите желаемый префикс.</p> -<p>Внимание! Модуль будет использовать его как для отправки, так и для получения.</p></body></html> +<p>Надстройка будет использовать его как для отправки, так и для получения.</p></body></html> @@ -12252,7 +12272,7 @@ To do this, you type this shortcut and a space in the Locator entry field, and t Процесс завершился с кодом %1. - + p4 submit failed: %1 Не удалось выполнить фиксацию perforce: %1 @@ -12279,7 +12299,7 @@ To do this, you type this shortcut and a space in the Locator entry field, and t Perforce: Не удалось распознать хранилище: %1 - + The process terminated abnormally. Процесс завершился аварийно. @@ -12304,7 +12324,7 @@ To do this, you type this shortcut and a space in the Locator entry field, and t Perforce некорректно настроен. - + p4 diff %1 p4 diff %1 @@ -12489,17 +12509,17 @@ To do this, you type this shortcut and a space in the Locator entry field, and t Installed Plugins - Установленные модули + Установленные надстройки Plugin Details of %1 - Подробнее о модуле %1 + Подробнее о надстройке %1 Plugin Errors of %1 - Ошибки модуля %1 + Ошибки надстройки %1 @@ -12508,7 +12528,7 @@ To do this, you type this shortcut and a space in the Locator entry field, and t The plugin '%1' does not exist. - Модуль '%1' не существует. + Надстройка "%1" не существует. @@ -12524,7 +12544,7 @@ To do this, you type this shortcut and a space in the Locator entry field, and t Failed Plugins - Проблемные модули + Проблемные надстройки @@ -12577,22 +12597,22 @@ To do this, you type this shortcut and a space in the Locator entry field, and t Plugin is not valid (does not derive from IPlugin) - Некорретный модуль (не потомок IPlugin) + Неправильная надстройка (не потомок IPlugin) Initializing the plugin failed because state != Loaded - Не удалось инициализировать модуль, так как state != Loaded + Не удалось инициализировать надстройку, так как state != Loaded Internal error: have no plugin instance to initialize - Внутренняя ошибка: отсутствует экземпляр модуля для инициализации + Внутренняя ошибка: отсутствует экземпляр надстройки для инициализации Plugin initialization failed: %1 - Не удалось инициализировать модуль: %1 + Не удалось инициализировать надстройку: %1 @@ -12602,7 +12622,7 @@ To do this, you type this shortcut and a space in the Locator entry field, and t Internal error: have no plugin instance to perform extensionsInitialized - Внутренняя ошибка: отсутствует экземпляр модуля для выполнения extensionsInitialized + Внутренняя ошибка: отсутствует экземпляр надстройки для выполнения extensionsInitialized @@ -12621,31 +12641,31 @@ To do this, you type this shortcut and a space in the Locator entry field, and t ProjectExplorer::AbstractProcessStep - - <font color="#0000ff">Starting: "%1" %2</font> + + Starting: "%1" %2 - <font color="#0000ff">Запускается: "%1" %2</font> + Запускается "%1" %2 - - <font color="#0000ff">The process "%1" exited normally.</font> - <font color="#0000ff">Процесс "%1" завершился нормально.</font> + + The process "%1" exited normally. + Процесс "%1" завершился нормально. - - <font color="#ff0000"><b>The process "%1" exited with code %2.</b></font> - <font color="#ff0000"><b>Процесс "%1" завершился с кодом %2.</b></font> + + The process "%1" exited with code %2. + Процесс "%1" завершился с кодом %2. - - <font color="#ff0000"><b>The process "%1" crashed.</b></font> - <font color="#ff0000"><b>Процесс "%1" завершился крахом.</b></font> + + The process "%1" crashed. + Процесс "%1" завершился крахом. - - <font color="#ff0000"><b>Could not start process "%1"</b></font> - <font color="#ff0000"><b>Невозможно запустить процесс "%1"</b></font> + + Could not start process "%1" + Невозможно запустить процесс "%1" @@ -12721,23 +12741,14 @@ To do this, you type this shortcut and a space in the Locator entry field, and t Система сборки - - - <font color="#ff0000">Error while building project %1 (target: %2)</font> - <font color="#ff0000">Возникла ошибка при сборке проекта %1 (цель: %2)</font> - - - + + + Error while building project %1 (target: %2) Возникла ошибка при сборке проекта %1 (цель: %2) - - - <font color="#ff0000">Canceled build.</font> - <font color="#ff0000">Сборка прервана.</font> - - + Finished %1 of %n build steps Завершено %1 из %n этапа сборки @@ -12746,20 +12757,25 @@ To do this, you type this shortcut and a space in the Locator entry field, and t - + + Canceled build. + Сборка прервана. + + + Build Сборка - - - <font color="#ff0000">When executing build step '%1'</font> - <font color="#ff0000">Во время выполнения сборки на этапе '%1'</font> + + + When executing build step '%1' + Во время выполнения сборки на этапе "%1" - - <b>Running build steps for project %2...</b> - <b>Выполняется сборка проекта %2...</b> + + Running build steps for project %1... + Выполняется сборка проекта %1... @@ -12821,32 +12837,11 @@ To do this, you type this shortcut and a space in the Locator entry field, and t Default short title for custom wizard page to be shown in the progress pane of the wizard. Подробнее - - - Creates a C++ plugin to extend the funtionality of the QML runtime. - Создание на С++ модуля для расширения функциональности среды исполнения QML. - - - - - QML Runtime Plug-in - Модуль среды выполнения QML - - - - QML Runtime Plug-in Parameters - Параметры модуля среды выполнения QML - - - - Example Object Class-name: - Имя класса объекта примера: - ProjectExplorer::DebuggingHelperLibrary - + The target directory %1 could not be created. Не удалось создать целевой каталог %1. @@ -13167,7 +13162,7 @@ Reason: %2 ProjectExplorer::Internal::CompileOutputWindow - + Compile Output Консоль сборки @@ -13634,11 +13629,6 @@ Reason: %2 Use jom instead of nmake Использовать jom вместо nmake - - - <i>jom</i> is a drop-in replacement for <i>nmake</i> which distributes the compilation process to multiple CPU cores. For more details, see the <a href="http://qt.gitorious.org/qt-labs/jom/">jom Homepage</a>. Disable it if you experience problems with your builds. - <i>jom</i> - это замена <i>nmake</i>, распределяющая процесс компиляции на несколько ядер процессора. Более подробную информацию о ней можно получить на <a href="http://qt.gitorious.org/qt-labs/jom/">домашней странице jom</a>. Если возникнут проблемы с вашими файлами Makefile, то просто выключите её использование. - Current directory @@ -13679,6 +13669,11 @@ Reason: %2 Clear old application output on a new run Очищать старый вывод приложения при новом запуске + + + <i>jom</i> is a drop-in replacement for <i>nmake</i> which distributes the compilation process to multiple CPU cores. The latest binary is available at <a href="ftp://ftp.qt.nokia.com/jom/">ftp://ftp.qt.nokia.com/jom/</a>. Disable it if you experience problems with your builds. + <i>jom</i> - это замена <i>nmake</i>, распределяющая процесс компиляции на несколько ядер процессора. Свежайшая сборка доступна на <a href="ftp://ftp.qt.nokia.com/jom/">ftp://ftp.qt.nokia.com/jom/</a>. Отключите использование jom вместо nmake в случае проблем со сборкой. + ProjectExplorer::Internal::ProjectFileFactory @@ -13912,11 +13907,6 @@ No project selected Session Manager Управление сессиями - - - <a href="qthelp://com.nokia.qtcreator/doc/creator-quick-tour.html#session-management-in-qt-creator">What is a Session?</a> - <a href="qthelp://com.nokia.qtcreator/doc/creator-quick-tour.html#session-management-in-qt-creator">Что такое сессия?</a> - &New @@ -13953,6 +13943,11 @@ No project selected Rename session Переименование сессии + + + <a href="qthelp://com.nokia.qtcreator/doc/creator-project-managing-sessions.html">What is a Session?</a> + <a href="qthelp://com.nokia.qtcreator/doc/creator-project-managing-sessions.html">Что такое сессия?</a> + ProjectExplorer::Internal::SessionFile @@ -14020,7 +14015,7 @@ No project selected ProjectExplorer::Internal::TaskDelegate - + File not found: %1 Файл не найден: %1 @@ -14085,7 +14080,7 @@ No project selected Проекты - + &Build &Сборка @@ -14304,7 +14299,7 @@ No project selected Новый проект - + Always save files before build Всегда сохранять файлы перед сборкой @@ -14430,7 +14425,7 @@ to version control (%2)? ProjectExplorer::TaskWindow - + Build Issues Сообщения сборки @@ -14768,7 +14763,7 @@ to version control (%2)? Add watch expression... - Добавить выражение для наблюдения... + Добавить выражение для наблюдения... @@ -15001,7 +14996,7 @@ Please check your project settings. Show bounding rectangles (A) - Отображать прямоугольники границы (A) + Отображать границы (A) @@ -15262,7 +15257,7 @@ Please check your project settings. Библиотека - + Items Title of library items view Элементы @@ -15302,7 +15297,7 @@ Please check your project settings. About plugins - О модулях + О надстройках @@ -15316,7 +15311,7 @@ Please check your project settings. QmlDesigner::QmlModelView - + Invalid Id Неверный идентификатор @@ -15396,7 +15391,7 @@ Please check your project settings. unknown value for enum - неизвестное значение для перечисления + неизвестное значение для enum @@ -15411,12 +15406,12 @@ Please check your project settings. value might be 'undefined' - значение возможно не определено + значение возможно 'undefined' enum value is not a string or number - значение перечисления не строка или число + значение перечисление не строка или число @@ -15483,7 +15478,7 @@ Please check your project settings. У <%1> нет корректного атрибута %2 - + %1: %2 @@ -15543,12 +15538,12 @@ Please check your project settings. Qt Creator -> About Plugins... - Qt Creator -> О модулях... + Qt Creator -> О надстройках... Help -> About Plugins... - Справка -> О модулях... + Справка -> О надстройках... @@ -15771,7 +15766,7 @@ QML application projects are executed through the QML runtime and do not need to List of plugin directories passed to QML runtime qmlproject Template Comment added to generated .qmlproject file - Список каталогов модулей передаваемый среде исполнения QML + Список каталогов надстроек передаваемый среде исполнения QML @@ -15818,7 +15813,7 @@ QML application projects are executed through the QML runtime and do not need to List of plugin directories passed to QML runtime qmlproject Template Comment added to generated .qmlproject file - Список каталогов модулей передаваемый среде исполнения QML + Список каталогов надстроек передаваемый среде исполнения QML @@ -15905,7 +15900,7 @@ QML application projects are executed through the QML runtime and do not need to QmlProjectManager::QmlProjectRunConfiguration - + QML Viewer QMLRunConfiguration display name. Просмотр QML @@ -15989,7 +15984,7 @@ QML application projects are executed through the QML runtime and do not need to Qt4ProjectManager - + Qt4 Qt4 @@ -16121,17 +16116,17 @@ QML application projects are executed through the QML runtime and do not need to Widget project &file: - &Файл проекта: + &Файл проекта виджета: Widget h&eader file: - &Заголовочный файл: + &Заголовочный файл виджета: Widge&t source file: - И&сходный файл: + Файл &реализации виджета: @@ -16146,17 +16141,17 @@ QML application projects are executed through the QML runtime and do not need to Plugin class &name: - Имя класса &модуля: + Имя класса &надстройки: Plugin &header file: - За&головочный файл: + За&головочный файл надстройки: Plugin sou&rce file: - Ис&ходный файл модуля: + Файл реализа&ции надстройки: @@ -16282,12 +16277,12 @@ Preselects a desktop Qt for building the application if available. Plugin and Collection Class Information - Информация о модуле и классе набора + Информация о надстройке и классе набора Specify the properties of the plugin library and the collection class. - Укажите свойства библиотеки модуля и класса набора. + Укажите свойства библиотеки надстройки и класса набора. @@ -16307,7 +16302,7 @@ Preselects a desktop Qt for building the application if available. Plugin name: - Название модуля: + Название надстройки: @@ -16376,7 +16371,7 @@ Preselects a desktop Qt for building the application if available. Plugin Details - Подробнее о модуле + Подробнее о надстройке @@ -16465,15 +16460,25 @@ Preselects a desktop Qt for building the application if available. Знаете ли вы, что? - + The Qt Creator User Interface Интерфейс пользователя Qt Creator + + + Building and Running an Example + Сборка и запуск примера + Creating a Qt C++ Application Создание приложения Qt на С++ + + + Creating a Mobile Application + Создание мобильного приложения + Creating a Qt Quick Application @@ -16486,14 +16491,14 @@ Preselects a desktop Qt for building the application if available. Выберите пример... - + Copy Project to writable Location? Скопировать проект в каталог с правами на запись? <p>The project you are about to open is located in the write-protected location:</p><blockquote>%1</blockquote><p>Please select a writable location below and click "Copy Project and Open" to open a modifiable copy of the project or click "Keep Project and Open" to open the project in location.</p><p><b>Note:</b> You will not be able to alter or compile your project in the current location.</p> - <p>Открываемый проект находится в защищённом от записи каталоге:</p><blockquote>%1</blockquote><p>Ниже выберите каталог, в который разрешена запись, и щёлкните "Скопировать и открыть", для открытия изменяемой копии проекта, или "Открыть для чтения", чтобы открыть проект в текущем каталоге.</p><p><b>Замечание:</b> изменение и сборка проекта, расположенного в данном каталоге, недоступны.</p> + <p>Открываемый проект находится в защищённом от записи каталоге:</p><blockquote>%1</blockquote><p>Ниже выберите каталог, в который разрешена запись, и щёлкните "Скопировать и открыть", для открытия изменяемой копии проекта, или "Открыть для чтения", чтобы открыть проект в текущем каталоге.</p><p><b>Изменение и сборка проекта, расположенного в данном каталоге, недоступны.</b></p> @@ -16530,27 +16535,37 @@ Preselects a desktop Qt for building the application if available. Cmd Shortcut key - Cmd + Alt Shortcut key - Alt + Ctrl Shortcut key - Ctrl + - - You can switch between Qt Creator's modes using <tt>Ctrl+number</tt>:<ul><li>1 - Welcome</li><li>2 - Edit</li><li>3 - Debug</li><li>4 - Projects</li><li>5 - Help</li></ul> - Можно переключать режим Qt Creator, используя <tt>Ctrl+число</tt>:<ul><li>1 - Приветствие</li><li>2 - Правка</li><li>3 - Отладка</li><li>4 - Проекты</li><li>5 - Справка</li></ul> + + If you add external libraries to your project, Qt Creator will automatically offer syntax highlighting and code completion. + Если добавить внешние библиотеки в проект, то Qt Creator автоматически включит их в подсветку синтаксиса и дополнение кода. - + + You can add custom build steps in the <a href="qthelp://com.nokia.qtcreator/doc/creator-build-settings.html">build settings</a>. + Можно добавить свои этапы сборки в <a href="qthelp://com.nokia.qtcreator/doc/creator-build-settings.html">настройках сборки</a>. + + + + Within a session, you can add <a href="qthelp://com.nokia.qtcreator/doc/creator-build-dependencies.html">dependencies</a> between projects. + В пределах одной сессии можно добавлять <a href="qthelp://com.nokia.qtcreator/doc/creator-build-dependencies.html">зависимости</a> проектов друг от друга. + + + You can show and hide the side bar using <tt>%1+0<tt>. Можно отображать и скрывать боковую панель, используя <tt>%1+0<tt>. @@ -16560,12 +16575,7 @@ Preselects a desktop Qt for building the application if available. Можно тонко настроить функцию <tt>Поиск</tt>, выбрав &quot;Слово целиком&quot; и/или &quot;Учитывать регистр&quot;. Просто кликните на иконку справа от редактируемой строки. - - If you add <a href="qthelp://com.nokia.qtcreator/doc/creator-external-library-handling.html">external libraries</a>, Qt Creator will automatically offer syntax highlighting and code completion. - Если добавить <a href="qthelp://com.nokia.qtcreator/doc/creator-external-library-handling.html">внешние библиотеки</a>, то Qt Creator автоматически предложит подсветку синтаксиса и дополнение кода. - - - + The code completion is CamelCase-aware. For example, to complete <tt>namespaceUri</tt> you can just type <tt>nU</tt> and hit <tt>Ctrl+Space</tt>. Автодополнение кода ориентировано на ВерблюжийРегистр. Например, чтобы получить <tt>namespaceUri</tt> можно просто ввести <tt>nU</tt> и нажать <tt>Ctrl+Space</tt>. @@ -16595,17 +16605,7 @@ Preselects a desktop Qt for building the application if available. Можно осуществлять быстрый поиск методов, классов, справки и прочего, используя <a href="qthelp://com.nokia.qtcreator/doc/creator-navigation.html">Панель поиска</a> (<tt>%1+K</tt>). - - You can add custom build steps in the <a href="qthelp://com.nokia.qtcreator/doc/creator-project-pane.html#build-settings">build settings</a>. - Можно добавить собственные этапы сборки в <a href="qthelp://com.nokia.qtcreator/doc/creator-project-pane.html#build-settings">настройках сборки</a>. - - - - Within a session, you can add <a href="qthelp://com.nokia.qtcreator/doc/creator-project-pane.html#dependencies">dependencies</a> between projects. - В пределах одной сессии можно добавлять <a href="qthelp://com.nokia.qtcreator/doc/creator-project-pane.html#dependencies">зависимости</a> проектов друг от друга. - - - + You can set the preferred editor encoding for every project in <tt>Projects -> Editor Settings -> Default Encoding</tt>. Можно установить предпочитаемую кодировку редактора для каждого проекта в <tt>Проекты -> Настройки редактора -> Кодировка по умолчанию</tt>. @@ -16632,12 +16632,12 @@ Preselects a desktop Qt for building the application if available. Explore Qt C++ Examples - Примеры на Qt C++ + Примеры Qt C++ Explore Qt Quick Examples - Примеры на Qt Quick + Примеры Qt Quick @@ -16713,7 +16713,7 @@ Preselects a desktop Qt for building the application if available. Creates a C++ library based on qmake. This can be used to create:<ul><li>a shared C++ library for use with <tt>QPluginLoader</tt> and runtime (Plugins)</li><li>a shared or static C++ library for use with another project at linktime</li></ul>. - Создание проекта C++ библиотеки под управлением qmake. Может использоваться для разработки:<ul><li>разделяемая C++ библиотека для загрузки через <tt>QPluginLoader</tt> (модуль)</li><li>разделяемая или статическая C++ библиотека для подключения к другому проекту на этапе компоновки</li></ul>. + Создание проекта C++ библиотеки под управлением qmake. Может использоваться для разработки:<ul><li>разделяемая C++ библиотека для загрузки через <tt>QPluginLoader</tt> (надстройка)</li><li>разделяемая или статическая C++ библиотека для подключения к другому проекту на этапе компоновки</li></ul>. @@ -16731,7 +16731,7 @@ Preselects a desktop Qt for building the application if available. Qt 4 plugin - Модуль Qt 4 + Надстройка Qt 4 @@ -16840,7 +16840,7 @@ Qemu уже запущен? Qt4ProjectManager::Internal::MaemoPackageCreationStep - + Creating package file ... Создание файла пакета... @@ -16880,7 +16880,7 @@ Qemu уже запущен? Пакет создан. - + Package Creation: Running command '%1'. Создание пакета: Выполнение команды "%1". @@ -17087,7 +17087,7 @@ Qemu уже запущен? Qt4ProjectManager::Internal::MakeStepFactory - + Make Сборка @@ -17151,7 +17151,7 @@ Preselects Qt for Simulator and mobile targets if available Qt4ProjectManager::Internal::QMakeStepFactory - + qmake qmake @@ -17160,17 +17160,17 @@ Preselects Qt for Simulator and mobile targets if available Qt4ProjectManager::Internal::QemuRuntimeManager - + Start Maemo Emulator Запустить эмулятор Maemo - + Qemu has been shut down, because you removed the corresponding Qt version. Qemu был завершён, так как был удалён соответствующий ему профиль Qt. - + Qemu failed to start: %1 Qemu не удалось запуститься: %1 @@ -17287,7 +17287,7 @@ Preselects Qt for Simulator and mobile targets if available Ошибка разбора файла %1. Отмена. - + Could not find .pro file for sub dir '%1' in '%2' Не удалось найти .pro файл для подкаталога '%1' в '%2' @@ -17540,7 +17540,7 @@ Preselects Qt for Simulator and mobile targets if available Эмулятор Qt - + <b>Device:</b> %1 <b>Устройство:</b> %1 @@ -17558,7 +17558,7 @@ Preselects Qt for Simulator and mobile targets if available Qt4ProjectManager::Internal::Qt4TargetFactory - + Debug Отладка @@ -17879,7 +17879,7 @@ p, li { white-space: pre-wrap; } Установочный файл: - + Device on serial port: Последовательный порт устройства: @@ -17894,7 +17894,7 @@ p, li { white-space: pre-wrap; } Подключение... - + Device: Устройство: @@ -18229,7 +18229,7 @@ Deploying application to '%2'... Состояние - + No builds found Сборки не найдены @@ -18252,18 +18252,18 @@ Deploying application to '%2'... <b>Предупреждение:</b> - + Qt Creator can set up the following targets for project <b>%1</b>: %1: Project name Qt Creator позволяет настроить следующие цели для проекта <b>%1</b>: - + Choose a directory to scan for additional shadow builds Выбор директории для поиска дополнительных теневых сборок - + Import Is this an import of an existing build or a new one? Импортируемая @@ -18382,21 +18382,21 @@ Deploying application to '%2'... Qt4ProjectManager::MakeStep - + Make Qt4 MakeStep display name. Сборка - - <font color="#ff0000">Could not find make command: %1 in the build environment</font> - <font color="#ff0000">Не удалось найти в среде сборки команду: %1</font> + + Could not find make command: %1 in the build environment + Не удалось найти в среде окружения сборки команду: %1 Qt4ProjectManager::MakeStepConfigWidget - + <b>Make:</b> %1 not found in the environment. <b>Сборка:</b>программа %1 не найдена. @@ -18414,20 +18414,20 @@ Deploying application to '%2'... Qt4ProjectManager::QMakeStep - + qmake QMakeStep display name. qmake - - <font color="#0000ff">Configuration is faulty, please check the Build Issues view for details.</font> - <font color="#0000ff">Конфигурация неисправна. Окно "Сообщения сборки" содержит подробную информацию.</font> + + Configuration is faulty, please check the Build Issues view for details. + Конфигурация неисправна. Окно "Сообщения сборки" содержит подробную информацию. - - <font color="#0000ff">Configuration unchanged, skipping qmake step.</font> - <font color="#0000ff">Настройки не изменились, этап qmake пропускается.</font> + + Configuration unchanged, skipping qmake step. + Настройки не изменились, этап qmake пропускается. @@ -18459,7 +18459,7 @@ Deploying application to '%2'... Qt4ProjectManager::Qt4Project - + Evaluating Вычисление @@ -19730,7 +19730,7 @@ Deploying application to '%2'... Username: - Имя пользователя: + Имя пользователя: @@ -20141,7 +20141,7 @@ Deploying application to '%2'... TextEditor::BaseTextDocument - + untitled безымянный @@ -20172,7 +20172,7 @@ Deploying application to '%2'... TextEditor::BaseTextEditorEditable - + Line: %1, Col: %2 Строка: %1, Столбец: %2 @@ -20395,7 +20395,7 @@ Deploying application to '%2'... Center &cursor on scroll - &Центрировать курсор при прокрутке + Прокрутка ни&же конца файла @@ -22264,7 +22264,7 @@ The following encodings are likely to fit: VCSBase::VCSBaseEditor - + Annotate "%1" Аннотация '%1' @@ -22274,7 +22274,7 @@ The following encodings are likely to fit: Копировать "%1" - + Describe change %1 Описать изменение %1 @@ -22628,7 +22628,7 @@ p, li { white-space: pre-wrap; } Not a QmlDesigner plugin. - Не модуль QmlDesigner. + Не надстройка QmlDesigner. @@ -22643,7 +22643,7 @@ p, li { white-space: pre-wrap; } File '%1' is not a QmlDesigner plugin. - Файл "%1" не является модулем QmlDesigner. + Файл "%1" не является надстройкой QmlDesigner. @@ -22819,7 +22819,7 @@ p, li { white-space: pre-wrap; } trk::Launcher - + Cannot open remote file '%1': %2 Невозможно открыть внешний файл "%1": %2 From 7d4bbf49340425aea51acf74554fb70ac4411ff8 Mon Sep 17 00:00:00 2001 From: kh1 Date: Mon, 14 Jun 2010 14:31:34 +0200 Subject: [PATCH 2/7] Allow http request to be opened in the help plugin. Reviewed-by: ck --- src/plugins/help/helpplugin.cpp | 22 +++++++++++----------- src/plugins/help/helpviewer.cpp | 2 -- src/plugins/help/helpviewer_qtb.cpp | 7 +++++++ src/plugins/help/helpviewer_qwv.cpp | 8 ++++++-- 4 files changed, 24 insertions(+), 15 deletions(-) diff --git a/src/plugins/help/helpplugin.cpp b/src/plugins/help/helpplugin.cpp index ec515753e89..a6746dbbd02 100644 --- a/src/plugins/help/helpplugin.cpp +++ b/src/plugins/help/helpplugin.cpp @@ -818,16 +818,8 @@ void HelpPlugin::handleHelpRequest(const QUrl &url) if (HelpViewer::launchWithExternalApp(url)) return; - if (Core::HelpManager::instance()->findFile(url).isValid()) { - if (url.queryItemValue(QLatin1String("view")) == QLatin1String("split")) { - if (HelpViewer* viewer = viewerForContextMode()) - viewer->setSource(url); - } else { - activateHelpMode(); - m_centralWidget->setSource(url); - } - } else { - QString address = url.toString(); + QString address = url.toString(); + if (!Core::HelpManager::instance()->findFile(url).isValid()) { if (address.startsWith(HelpViewer::NsNokia) || address.startsWith(HelpViewer::NsTrolltech)) { // local help not installed, resort to external web help @@ -839,7 +831,15 @@ void HelpPlugin::handleHelpRequest(const QUrl &url) } address = urlPrefix + address.mid(address.lastIndexOf(QLatin1Char('/'))); } - QDesktopServices::openUrl(address); + } + + const QUrl newUrl(address); + if (newUrl.queryItemValue(QLatin1String("view")) == QLatin1String("split")) { + if (HelpViewer* viewer = viewerForContextMode()) + viewer->setSource(newUrl); + } else { + activateHelpMode(); + m_centralWidget->setSource(newUrl); } } diff --git a/src/plugins/help/helpviewer.cpp b/src/plugins/help/helpviewer.cpp index d351a982265..aadeda402d2 100644 --- a/src/plugins/help/helpviewer.cpp +++ b/src/plugins/help/helpviewer.cpp @@ -147,8 +147,6 @@ bool HelpViewer::launchWithExternalApp(const QUrl &url) actualTmpFile.close(); return QDesktopServices::openUrl(QUrl(actualTmpFile.fileName())); } - } else if (url.scheme() == QLatin1String("http")) { - return QDesktopServices::openUrl(url); } return false; } diff --git a/src/plugins/help/helpviewer_qtb.cpp b/src/plugins/help/helpviewer_qtb.cpp index b2e607104c2..de9974fbd2e 100644 --- a/src/plugins/help/helpviewer_qtb.cpp +++ b/src/plugins/help/helpviewer_qtb.cpp @@ -144,6 +144,13 @@ QUrl HelpViewer::source() const void HelpViewer::setSource(const QUrl &url) { + const QString &scheme = url.scheme(); + if (scheme != QLatin1String("qthelp") && scheme != QLatin1String("about")) { + QTextBrowser::setSource(resolvedUrl); + emit loadFinished(true); + return; + } + const QString &string = url.toString(); if (url.isValid() && string != QLatin1String("help")) { if (launchWithExternalApp(url)) diff --git a/src/plugins/help/helpviewer_qwv.cpp b/src/plugins/help/helpviewer_qwv.cpp index 461eefafd91..8c8872edd5f 100644 --- a/src/plugins/help/helpviewer_qwv.cpp +++ b/src/plugins/help/helpviewer_qwv.cpp @@ -121,9 +121,13 @@ HelpNetworkAccessManager::HelpNetworkAccessManager(QObject *parent) { } -QNetworkReply *HelpNetworkAccessManager::createRequest(Operation /*op*/, - const QNetworkRequest &request, QIODevice* /*outgoingData*/) +QNetworkReply *HelpNetworkAccessManager::createRequest(Operation op, + const QNetworkRequest &request, QIODevice* outgoingData) { + const QString &scheme = request.url().scheme(); + if (scheme != QLatin1String("qthelp") && scheme != QLatin1String("about")) + return QNetworkAccessManager::createRequest(op, request, outgoingData); + QString url = request.url().toString(); const QHelpEngineCore &engine = LocalHelpManager::helpEngine(); // TODO: For some reason the url to load is already wrong (passed from webkit) From 6875a50d27443d5f1c9acb11ef1135a99911ca9e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thorbj=C3=B8rn=20Lindeijer?= Date: Mon, 14 Jun 2010 16:06:42 +0200 Subject: [PATCH 3/7] Don't pass QChar as const & since it's just a unsigned short Reviewed-by: ogoffart --- src/libs/cplusplus/MatchingText.cpp | 6 +++--- src/libs/cplusplus/MatchingText.h | 4 ++-- src/plugins/cppeditor/cppeditor.cpp | 4 ++-- src/plugins/cppeditor/cppeditor.h | 4 ++-- src/plugins/qmljseditor/qmljscodecompletion.cpp | 2 +- src/plugins/qmljseditor/qmljscodecompletion.h | 2 +- src/plugins/qmljseditor/qmljseditor.cpp | 16 ++++++++-------- src/plugins/qmljseditor/qmljseditor.h | 4 ++-- src/plugins/texteditor/basetexteditor.cpp | 4 ++-- src/plugins/texteditor/basetexteditor.h | 4 ++-- src/shared/proparser/ioutils.cpp | 2 +- 11 files changed, 26 insertions(+), 26 deletions(-) diff --git a/src/libs/cplusplus/MatchingText.cpp b/src/libs/cplusplus/MatchingText.cpp index b0c5461f24b..a20d2371ac5 100644 --- a/src/libs/cplusplus/MatchingText.cpp +++ b/src/libs/cplusplus/MatchingText.cpp @@ -38,7 +38,7 @@ using namespace CPlusPlus; enum { MAX_NUM_LINES = 20 }; -static bool shouldOverrideChar(const QChar &ch) +static bool shouldOverrideChar(QChar ch) { switch (ch.unicode()) { case ')': case ']': case ';': case '"': case '\'': @@ -84,7 +84,7 @@ bool MatchingText::shouldInsertMatchingText(const QTextCursor &tc) return shouldInsertMatchingText(doc->characterAt(tc.selectionEnd())); } -bool MatchingText::shouldInsertMatchingText(const QChar &lookAhead) +bool MatchingText::shouldInsertMatchingText(QChar lookAhead) { switch (lookAhead.unicode()) { case '{': case '}': @@ -101,7 +101,7 @@ bool MatchingText::shouldInsertMatchingText(const QChar &lookAhead) } QString MatchingText::insertMatchingBrace(const QTextCursor &cursor, const QString &textToProcess, - const QChar &la, int *skippedChars) const + QChar la, int *skippedChars) const { QTextCursor tc = cursor; QTextDocument *doc = tc.document(); diff --git a/src/libs/cplusplus/MatchingText.h b/src/libs/cplusplus/MatchingText.h index 6c83970e92d..56d1db33714 100644 --- a/src/libs/cplusplus/MatchingText.h +++ b/src/libs/cplusplus/MatchingText.h @@ -42,10 +42,10 @@ public: MatchingText(); static bool shouldInsertMatchingText(const QTextCursor &tc); - static bool shouldInsertMatchingText(const QChar &lookAhead); + static bool shouldInsertMatchingText(QChar lookAhead); QString insertMatchingBrace(const QTextCursor &tc, const QString &text, - const QChar &la, int *skippedChars) const; + QChar la, int *skippedChars) const; QString insertParagraphSeparator(const QTextCursor &tc) const; private: diff --git a/src/plugins/cppeditor/cppeditor.cpp b/src/plugins/cppeditor/cppeditor.cpp index d7f0aaa77b8..1b4e59c82c0 100644 --- a/src/plugins/cppeditor/cppeditor.cpp +++ b/src/plugins/cppeditor/cppeditor.cpp @@ -1547,7 +1547,7 @@ SemanticInfo CPPEditor::semanticInfo() const return m_lastSemanticInfo; } -bool CPPEditor::isElectricCharacter(const QChar &ch) const +bool CPPEditor::isElectricCharacter(QChar ch) const { if (ch == QLatin1Char('{') || ch == QLatin1Char('}') || @@ -1559,7 +1559,7 @@ bool CPPEditor::isElectricCharacter(const QChar &ch) const } QString CPPEditor::insertMatchingBrace(const QTextCursor &tc, const QString &text, - const QChar &la, int *skippedChars) const + QChar la, int *skippedChars) const { MatchingText m; return m.insertMatchingBrace(tc, text, la, skippedChars); diff --git a/src/plugins/cppeditor/cppeditor.h b/src/plugins/cppeditor/cppeditor.h index b922434117a..35ba10f759d 100644 --- a/src/plugins/cppeditor/cppeditor.h +++ b/src/plugins/cppeditor/cppeditor.h @@ -212,10 +212,10 @@ protected: TextEditor::BaseTextEditorEditable *createEditableInterface(); // These override BaseTextEditor - virtual bool isElectricCharacter(const QChar &ch) const; + virtual bool isElectricCharacter(QChar ch) const; virtual QString insertMatchingBrace(const QTextCursor &tc, const QString &text, - const QChar &la, int *skippedChars) const; + QChar la, int *skippedChars) const; virtual QString insertParagraphSeparator(const QTextCursor &tc) const; diff --git a/src/plugins/qmljseditor/qmljscodecompletion.cpp b/src/plugins/qmljseditor/qmljscodecompletion.cpp index 556d0a903c6..2c67687259a 100644 --- a/src/plugins/qmljseditor/qmljscodecompletion.cpp +++ b/src/plugins/qmljseditor/qmljscodecompletion.cpp @@ -567,7 +567,7 @@ bool CodeCompletion::maybeTriggersCompletion(TextEditor::ITextEditable *editor) return false; } -bool CodeCompletion::isDelimiter(const QChar &ch) const +bool CodeCompletion::isDelimiter(QChar ch) const { switch (ch.unicode()) { case '{': diff --git a/src/plugins/qmljseditor/qmljscodecompletion.h b/src/plugins/qmljseditor/qmljscodecompletion.h index 6046f6f7d98..283b3768fa7 100644 --- a/src/plugins/qmljseditor/qmljscodecompletion.h +++ b/src/plugins/qmljseditor/qmljscodecompletion.h @@ -78,7 +78,7 @@ private: void updateSnippets(); bool maybeTriggersCompletion(TextEditor::ITextEditable *editor); - bool isDelimiter(const QChar &ch) const; + bool isDelimiter(QChar ch) const; void addCompletions(const QHash &newCompletions, const QIcon &icon); diff --git a/src/plugins/qmljseditor/qmljseditor.cpp b/src/plugins/qmljseditor/qmljseditor.cpp index 0348812557f..f8e92136d12 100644 --- a/src/plugins/qmljseditor/qmljseditor.cpp +++ b/src/plugins/qmljseditor/qmljseditor.cpp @@ -82,9 +82,7 @@ using namespace QmlJS; using namespace QmlJS::AST; using namespace QmlJSEditor::Internal; -namespace { - -int blockBraceDepth(const QTextBlock &block) +static int blockBraceDepth(const QTextBlock &block) { int state = block.userState(); if (state == -1) @@ -93,7 +91,7 @@ int blockBraceDepth(const QTextBlock &block) return (state >> 8) & 0xFF; } -int blockStartState(const QTextBlock &block) +static int blockStartState(const QTextBlock &block) { int state = block.userState(); @@ -103,7 +101,7 @@ int blockStartState(const QTextBlock &block) return state & 0xff; } -bool shouldInsertMatchingText(const QChar &lookAhead) +static bool shouldInsertMatchingText(QChar lookAhead) { switch (lookAhead.unicode()) { case '{': case '}': @@ -120,12 +118,14 @@ bool shouldInsertMatchingText(const QChar &lookAhead) } // switch } -bool shouldInsertMatchingText(const QTextCursor &tc) +static bool shouldInsertMatchingText(const QTextCursor &tc) { QTextDocument *doc = tc.document(); return shouldInsertMatchingText(doc->characterAt(tc.selectionEnd())); } +namespace { + class FindIdDeclarations: protected Visitor { public: @@ -938,7 +938,7 @@ QString QmlJSTextEditor::wordUnderCursor() const return word; } -bool QmlJSTextEditor::isElectricCharacter(const QChar &ch) const +bool QmlJSTextEditor::isElectricCharacter(QChar ch) const { if (ch == QLatin1Char('}') || ch == QLatin1Char(']') @@ -1177,7 +1177,7 @@ bool QmlJSTextEditor::isInComment(const QTextCursor &) const return false; } -QString QmlJSTextEditor::insertMatchingBrace(const QTextCursor &tc, const QString &text, const QChar &, int *skippedChars) const +QString QmlJSTextEditor::insertMatchingBrace(const QTextCursor &tc, const QString &text, QChar, int *skippedChars) const { if (text.length() != 1) return QString(); diff --git a/src/plugins/qmljseditor/qmljseditor.h b/src/plugins/qmljseditor/qmljseditor.h index 1fb222e51b5..cb1edfcf28d 100644 --- a/src/plugins/qmljseditor/qmljseditor.h +++ b/src/plugins/qmljseditor/qmljseditor.h @@ -246,11 +246,11 @@ protected: //// brace matching virtual bool contextAllowsAutoParentheses(const QTextCursor &cursor, const QString &textToInsert = QString()) const; virtual bool isInComment(const QTextCursor &cursor) const; - virtual QString insertMatchingBrace(const QTextCursor &tc, const QString &text, const QChar &la, int *skippedChars) const; + virtual QString insertMatchingBrace(const QTextCursor &tc, const QString &text, QChar la, int *skippedChars) const; virtual QString insertParagraphSeparator(const QTextCursor &tc) const; private: - virtual bool isElectricCharacter(const QChar &ch) const; + virtual bool isElectricCharacter(QChar ch) const; virtual void indentBlock(QTextDocument *doc, QTextBlock block, QChar typedChar); bool isClosingBrace(const QList &tokens) const; diff --git a/src/plugins/texteditor/basetexteditor.cpp b/src/plugins/texteditor/basetexteditor.cpp index 62eb14e2153..90858bb4d59 100644 --- a/src/plugins/texteditor/basetexteditor.cpp +++ b/src/plugins/texteditor/basetexteditor.cpp @@ -3806,7 +3806,7 @@ void BaseTextEditor::zoomReset() emit requestZoomReset(); } -bool BaseTextEditor::isElectricCharacter(const QChar &) const +bool BaseTextEditor::isElectricCharacter(QChar) const { return false; } @@ -3863,7 +3863,7 @@ bool BaseTextEditor::isInComment(const QTextCursor &cursor) const } QString BaseTextEditor::insertMatchingBrace(const QTextCursor &tc, const QString &text, - const QChar &la, int *skippedChars) const + QChar la, int *skippedChars) const { Q_UNUSED(tc); Q_UNUSED(text); diff --git a/src/plugins/texteditor/basetexteditor.h b/src/plugins/texteditor/basetexteditor.h index 294cd3033fa..066ec0d8a08 100644 --- a/src/plugins/texteditor/basetexteditor.h +++ b/src/plugins/texteditor/basetexteditor.h @@ -384,7 +384,7 @@ protected: public: // Returns true if key triggers an indent. - virtual bool isElectricCharacter(const QChar &ch) const; + virtual bool isElectricCharacter(QChar ch) const; void indentInsertedText(const QTextCursor &tc); @@ -407,7 +407,7 @@ protected: // Returns true if the cursor is inside a comment. virtual bool isInComment(const QTextCursor &cursor) const; - virtual QString insertMatchingBrace(const QTextCursor &tc, const QString &text, const QChar &la, int *skippedChars) const; + virtual QString insertMatchingBrace(const QTextCursor &tc, const QString &text, QChar la, int *skippedChars) const; // Returns the text that needs to be inserted virtual QString insertParagraphSeparator(const QTextCursor &tc) const; diff --git a/src/shared/proparser/ioutils.cpp b/src/shared/proparser/ioutils.cpp index 5ed9ea50220..028d4cb6dda 100644 --- a/src/shared/proparser/ioutils.cpp +++ b/src/shared/proparser/ioutils.cpp @@ -176,7 +176,7 @@ QString IoUtils::shellQuote(const QString &arg) #else // Q_OS_WIN -inline static bool isSpecial(const QChar &cUnicode) +inline static bool isSpecial(QChar cUnicode) { static const uchar iqm[] = { 0xff, 0xff, 0xff, 0xff, 0xdf, 0x07, 0x00, 0xd8, From 27daa542d3e99080b59b277b8f177f2f46914c03 Mon Sep 17 00:00:00 2001 From: kh1 Date: Mon, 14 Jun 2010 16:55:58 +0200 Subject: [PATCH 4/7] We need to check for http only. --- src/plugins/help/helpviewer_qtb.cpp | 18 +++++++++--------- src/plugins/help/helpviewer_qwv.cpp | 5 +++-- 2 files changed, 12 insertions(+), 11 deletions(-) diff --git a/src/plugins/help/helpviewer_qtb.cpp b/src/plugins/help/helpviewer_qtb.cpp index de9974fbd2e..5e1982a8cbe 100644 --- a/src/plugins/help/helpviewer_qtb.cpp +++ b/src/plugins/help/helpviewer_qtb.cpp @@ -144,20 +144,20 @@ QUrl HelpViewer::source() const void HelpViewer::setSource(const QUrl &url) { - const QString &scheme = url.scheme(); - if (scheme != QLatin1String("qthelp") && scheme != QLatin1String("about")) { - QTextBrowser::setSource(resolvedUrl); - emit loadFinished(true); - return; - } - const QString &string = url.toString(); if (url.isValid() && string != QLatin1String("help")) { if (launchWithExternalApp(url)) return; - const QHelpEngineCore &engine = HelpManager::instance().helpEngineCore(); - const QUrl &resolvedUrl = engine.findFile(url); + QUrl resolvedUrl; + if (url.scheme() == QLatin1String("http")) + resolvedUrl = url; + + if (!resolvedUrl.isValid()) { + const QHelpEngineCore &engine = LocalHelpManager::helpEngine(); + resolvedUrl = engine.findFile(url); + } + if (resolvedUrl.isValid()) { QTextBrowser::setSource(resolvedUrl); emit loadFinished(true); diff --git a/src/plugins/help/helpviewer_qwv.cpp b/src/plugins/help/helpviewer_qwv.cpp index 8c8872edd5f..c25666f9db8 100644 --- a/src/plugins/help/helpviewer_qwv.cpp +++ b/src/plugins/help/helpviewer_qwv.cpp @@ -124,9 +124,10 @@ HelpNetworkAccessManager::HelpNetworkAccessManager(QObject *parent) QNetworkReply *HelpNetworkAccessManager::createRequest(Operation op, const QNetworkRequest &request, QIODevice* outgoingData) { - const QString &scheme = request.url().scheme(); - if (scheme != QLatin1String("qthelp") && scheme != QLatin1String("about")) + if (!HelpViewer::isLocalUrl(request.url()) + && request.url().scheme() == QLatin1String("http")) { return QNetworkAccessManager::createRequest(op, request, outgoingData); + } QString url = request.url().toString(); const QHelpEngineCore &engine = LocalHelpManager::helpEngine(); From 3cf8d2111521303ccc37a07dc7a63daa38d4e500 Mon Sep 17 00:00:00 2001 From: kh1 Date: Mon, 14 Jun 2010 16:57:26 +0200 Subject: [PATCH 5/7] Fix build without webkit. --- src/plugins/help/helpviewer_qtb.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/plugins/help/helpviewer_qtb.cpp b/src/plugins/help/helpviewer_qtb.cpp index 5e1982a8cbe..94a8f16b0d5 100644 --- a/src/plugins/help/helpviewer_qtb.cpp +++ b/src/plugins/help/helpviewer_qtb.cpp @@ -41,7 +41,7 @@ #include #include -#include +#include using namespace Find; using namespace Help; @@ -78,7 +78,7 @@ HelpViewer::~HelpViewer() QFont HelpViewer::viewerFont() const { - const QHelpEngineCore &engine = HelpManager::helpEngineCore(); + const QHelpEngineCore &engine = LocalHelpManager::helpEngine(); return qVariantValue(engine.customValue(QLatin1String("font"), qApp->font())); } @@ -352,7 +352,7 @@ QVariant HelpViewer::loadResource(int type, const QUrl &name) { QByteArray ba; if (type < 4) { - const QHelpEngineCore &engine = HelpManager::instance().helpEngineCore(); + const QHelpEngineCore &engine = LocalHelpManager::helpEngine(); ba = engine.fileData(name); if (name.toString().endsWith(QLatin1String(".svg"), Qt::CaseInsensitive)) { QImage image; From 106d111f9b75736ef72f72d88a1868822f3edfed Mon Sep 17 00:00:00 2001 From: kh1 Date: Mon, 14 Jun 2010 18:07:20 +0200 Subject: [PATCH 6/7] Fixes broken attribute list for real. Task-number: QTCREATORBUG-1621 --- src/plugins/help/filtersettingspage.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/help/filtersettingspage.cpp b/src/plugins/help/filtersettingspage.cpp index ccdde31a262..799fabe0784 100644 --- a/src/plugins/help/filtersettingspage.cpp +++ b/src/plugins/help/filtersettingspage.cpp @@ -120,7 +120,7 @@ void FilterSettingsPage::updateFilterPage() foreach (const QString &attribute, attributes) new QTreeWidgetItem(m_ui.attributeWidget, QStringList(attribute)); - if (m_filterMap.keys().isEmpty()) { + if (!m_filterMap.keys().isEmpty()) { m_ui.filterWidget->setCurrentRow(0); updateAttributes(m_ui.filterWidget->currentItem()); } From 512e75a56195adf65577a024e363b36761cfc897 Mon Sep 17 00:00:00 2001 From: Kai Koehne Date: Fri, 11 Jun 2010 08:46:32 +0200 Subject: [PATCH 7/7] QmlDesigner: Fix crash when typing keywords as Ids We don't check that an ID entered in the Navigator or Property Editor is not a JavaScript keyword. This patch revamps the RewritingException that happens in this case in a InvalidIdException. Task-number: QTCREATORBUG-1540 --- .../exceptions/invalididexception.cpp | 38 ++++++++++--------- .../designercore/include/invalididexception.h | 16 +++++--- .../qmldesigner/designercore/model/model.cpp | 8 +++- .../designercore/model/modelnode.cpp | 4 +- 4 files changed, 39 insertions(+), 27 deletions(-) diff --git a/src/plugins/qmldesigner/designercore/exceptions/invalididexception.cpp b/src/plugins/qmldesigner/designercore/exceptions/invalididexception.cpp index b56c2f0dc39..39b7c983520 100644 --- a/src/plugins/qmldesigner/designercore/exceptions/invalididexception.cpp +++ b/src/plugins/qmldesigner/designercore/exceptions/invalididexception.cpp @@ -36,8 +36,25 @@ InvalidIdException::InvalidIdException(int line, const QString &function, const QString &file, const QString &id, - bool duplicate) : - InvalidArgumentException(line, function, file, "id"), m_id(id), m_duplicate(duplicate) + Reason reason) : + InvalidArgumentException(line, function, file, "id"), + m_id(id) +{ + if (reason == InvalidCharacters) { + m_description = QCoreApplication::translate("InvalidIdException", "Only alphanumeric characters and underscore allowed.\nIds must begin with a lowercase letter."); + } else { + m_description = QCoreApplication::translate("InvalidIdException", "Ids have to be unique."); + } +} + +InvalidIdException::InvalidIdException(int line, + const QString &function, + const QString &file, + const QString &id, + const QString &description) : + InvalidArgumentException(line, function, file, "id"), + m_id(id), + m_description(description) { } @@ -48,22 +65,7 @@ QString InvalidIdException::type() const QString InvalidIdException::description() const { - if (m_duplicate) - return duplicateErrorMessage(m_id); - - return invalidErrorMessage(m_id); -} - -QString InvalidIdException::duplicateErrorMessage(const QString &id) -{ - return QCoreApplication::translate("InvalidIdException", "Ids have to be unique: ") + id; -} - -QString InvalidIdException::invalidErrorMessage(const QString &id) -{ - return QCoreApplication::translate("InvalidIdException", "Invalid Id: ") + - id + QCoreApplication::translate("InvalidIdException", - "\nOnly alphanumeric characters and underscore allowed.\nIds must begin with a lowercase letter."); + return QCoreApplication::translate("InvalidIdException", "Invalid Id: %1\n%2").arg(m_id, m_description); } } diff --git a/src/plugins/qmldesigner/designercore/include/invalididexception.h b/src/plugins/qmldesigner/designercore/include/invalididexception.h index f9e367692ff..2431710e07c 100644 --- a/src/plugins/qmldesigner/designercore/include/invalididexception.h +++ b/src/plugins/qmldesigner/designercore/include/invalididexception.h @@ -37,22 +37,26 @@ namespace QmlDesigner { class CORESHARED_EXPORT InvalidIdException : public InvalidArgumentException { public: + enum Reason { InvalidCharacters, DuplicateId }; + InvalidIdException(int line, const QString &function, const QString &file, const QString &id, - bool duplicate = false); + Reason reason); + + InvalidIdException(int line, + const QString &function, + const QString &file, + const QString &id, + const QString &description); QString type() const; QString description() const; - static QString duplicateErrorMessage(const QString &id); - static QString invalidErrorMessage(const QString &id); - private: QString m_id; - bool m_duplicate; - + QString m_description; }; } diff --git a/src/plugins/qmldesigner/designercore/model/model.cpp b/src/plugins/qmldesigner/designercore/model/model.cpp index 7c0bc1d90f2..dc66a9c9705 100644 --- a/src/plugins/qmldesigner/designercore/model/model.cpp +++ b/src/plugins/qmldesigner/designercore/model/model.cpp @@ -65,6 +65,7 @@ #include "rewritertransaction.h" #include "rewriterview.h" #include "rewritingexception.h" +#include "invalididexception.h" /*! \defgroup CoreModel @@ -259,7 +260,12 @@ void ModelPrivate::changeNodeId(const InternalNode::Pointer& internalNodePointer m_idNodeHash.remove(oldId); if (!id.isEmpty()) m_idNodeHash.insert(id, internalNodePointer); - notifyNodeIdChanged(internalNodePointer, id, oldId); + + try { + notifyNodeIdChanged(internalNodePointer, id, oldId); + } catch (RewritingException &e) { + throw InvalidIdException(__LINE__, __FUNCTION__, __FILE__, id, e.description()); + } } void ModelPrivate::checkPropertyName(const QString &propertyName) diff --git a/src/plugins/qmldesigner/designercore/model/modelnode.cpp b/src/plugins/qmldesigner/designercore/model/modelnode.cpp index 722f93777f3..042049b4f9e 100644 --- a/src/plugins/qmldesigner/designercore/model/modelnode.cpp +++ b/src/plugins/qmldesigner/designercore/model/modelnode.cpp @@ -180,13 +180,13 @@ void ModelNode::setId(const QString& id) } if (!isValidId(id)) - throw InvalidIdException(__LINE__, __FUNCTION__, __FILE__, id); + throw InvalidIdException(__LINE__, __FUNCTION__, __FILE__, id, InvalidIdException::InvalidCharacters); if (id == ModelNode::id()) return; if (view()->hasId(id)) - throw InvalidIdException(__LINE__, __FUNCTION__, __FILE__, id, true); + throw InvalidIdException(__LINE__, __FUNCTION__, __FILE__, id, InvalidIdException::DuplicateId); m_model.data()->m_d->changeNodeId(internalNode(), id); }