diff options
Diffstat (limited to 'src')
18 files changed, 242 insertions, 106 deletions
diff --git a/src/plugins/coreplugin/editormanager/editormanager.cpp b/src/plugins/coreplugin/editormanager/editormanager.cpp index fe675b910b..7f4db0b13a 100644 --- a/src/plugins/coreplugin/editormanager/editormanager.cpp +++ b/src/plugins/coreplugin/editormanager/editormanager.cpp @@ -1201,10 +1201,12 @@ IEditor *EditorManager::openEditorWithContents(const QString &editorKind, QApplication::setOverrideCursor(QCursor(Qt::WaitCursor)); IEditor *edt = createEditor(editorKind); - if (!edt) + if (!edt) { + QApplication::restoreOverrideCursor(); return 0; + } - if (!edt || !edt->createNew(contents)) { + if (!edt->createNew(contents)) { QApplication::restoreOverrideCursor(); delete edt; edt = 0; diff --git a/src/plugins/cpptools/cppcodecompletion.cpp b/src/plugins/cpptools/cppcodecompletion.cpp index 0fb216a475..37ea378d2e 100644 --- a/src/plugins/cpptools/cppcodecompletion.cpp +++ b/src/plugins/cpptools/cppcodecompletion.cpp @@ -89,6 +89,14 @@ public: { setFocusPolicy(Qt::NoFocus); setAttribute(Qt::WA_DeleteOnClose); + + // Set the window and button text to the tooltip text color, since this + // widget draws the background as a tooltip. + QPalette p = palette(); + const QColor toolTipTextColor = p.color(QPalette::Inactive, QPalette::ToolTipText); + p.setColor(QPalette::Inactive, QPalette::WindowText, toolTipTextColor); + p.setColor(QPalette::Inactive, QPalette::ButtonText, toolTipTextColor); + setPalette(p); } protected: @@ -1019,7 +1027,8 @@ bool CppCodeCompletion::completeConstructorOrFunction(const QList<LookupItem> &r if (doc->parse(Document::ParseDeclaration)) { doc->check(); if (SimpleDeclarationAST *sd = doc->translationUnit()->ast()->asSimpleDeclaration()) { - if (sd->declarator_list && sd->declarator_list->value->postfix_declarator_list + if (sd->declarator_list && + sd->declarator_list && sd->declarator_list->value->postfix_declarator_list && sd->declarator_list->value->postfix_declarator_list->value->asFunctionDeclarator()) { autocompleteSignature = true; } diff --git a/src/plugins/debugger/debuggeragents.cpp b/src/plugins/debugger/debuggeragents.cpp index d29b5e506f..102be15cb7 100644 --- a/src/plugins/debugger/debuggeragents.cpp +++ b/src/plugins/debugger/debuggeragents.cpp @@ -44,6 +44,8 @@ #include <utils/qtcassert.h> #include <QtCore/QDebug> + +#include <QtGui/QMessageBox> #include <QtGui/QPlainTextEdit> #include <QtGui/QTextCursor> #include <QtGui/QSyntaxHighlighter> @@ -68,13 +70,13 @@ namespace Internal { */ MemoryViewAgent::MemoryViewAgent(DebuggerManager *manager, quint64 addr) - : QObject(manager), m_engine(manager->currentEngine()) + : QObject(manager), m_engine(manager->currentEngine()), m_manager(manager) { init(addr); } MemoryViewAgent::MemoryViewAgent(DebuggerManager *manager, const QString &addr) - : QObject(manager), m_engine(manager->currentEngine()) + : QObject(manager), m_engine(manager->currentEngine()), m_manager(manager) { bool ok = true; init(addr.toULongLong(&ok, 0)); @@ -94,11 +96,19 @@ void MemoryViewAgent::init(quint64 addr) m_editor = editorManager->openEditorWithContents( Core::Constants::K_DEFAULT_BINARY_EDITOR, &titlePattern); - connect(m_editor->widget(), SIGNAL(lazyDataRequested(quint64,bool)), - this, SLOT(fetchLazyData(quint64,bool))); - editorManager->activateEditor(m_editor); - QMetaObject::invokeMethod(m_editor->widget(), "setLazyData", - Q_ARG(quint64, addr), Q_ARG(int, 1024 * 1024), Q_ARG(int, BinBlockSize)); + if (m_editor) { + connect(m_editor->widget(), SIGNAL(lazyDataRequested(quint64,bool)), + this, SLOT(fetchLazyData(quint64,bool))); + editorManager->activateEditor(m_editor); + QMetaObject::invokeMethod(m_editor->widget(), "setLazyData", + Q_ARG(quint64, addr), Q_ARG(int, 1024 * 1024), Q_ARG(int, BinBlockSize)); + } else { + m_manager->showMessageBox(QMessageBox::Warning, + tr("No memory viewer available"), + tr("The memory contents cannot be shown as no viewer plugin not " + "the BinEditor plugin could be loaded.")); + deleteLater(); + } } void MemoryViewAgent::fetchLazyData(quint64 block, bool sync) diff --git a/src/plugins/debugger/debuggeragents.h b/src/plugins/debugger/debuggeragents.h index ff7e4879aa..f0888c6b92 100644 --- a/src/plugins/debugger/debuggeragents.h +++ b/src/plugins/debugger/debuggeragents.h @@ -70,6 +70,7 @@ private: QPointer<IDebuggerEngine> m_engine; QPointer<Core::IEditor> m_editor; + QPointer<DebuggerManager> m_manager; }; diff --git a/src/plugins/debugger/gdb/gdbengine.cpp b/src/plugins/debugger/gdb/gdbengine.cpp index 9365e54ee4..fe167734eb 100644 --- a/src/plugins/debugger/gdb/gdbengine.cpp +++ b/src/plugins/debugger/gdb/gdbengine.cpp @@ -4497,17 +4497,19 @@ void GdbEngine::handleInferiorPrepared() { const QString qtInstallPath = m_startParameters->qtInstallPath; if (!qtInstallPath.isEmpty()) { - QString qtBuildPath = - #if defined(Q_OS_WIN) - _("C:/qt-greenhouse/Trolltech/Code_less_create_more/Trolltech/Code_less_create_more/Troll/4.6/qt"); - #elif defined(Q_OS_MAC) - QString(); - #else - _("/var/tmp/qt-x11-src-4.6.0"); - #endif - if (!qtBuildPath.isEmpty()) + QString qtBuildPath; +#if defined(Q_OS_WIN) + qtBuildPath = _("C:/qt-greenhouse/Trolltech/Code_less_create_more/Trolltech/Code_less_create_more/Troll/4.6/qt"); postCommand(_("set substitute-path %1 %2") - .arg(qtBuildPath).arg(qtInstallPath)); + .arg(qtBuildPath).arg(qtInstallPath)); + qtBuildPath = _("C:/iwmake/build_mingw_opensource"); + postCommand(_("set substitute-path %1 %2") + .arg(qtBuildPath).arg(qtInstallPath)); +#elif defined(Q_OS_UNIX) && !defined (Q_OS_MAC) + qtBuildPath = _("/var/tmp/qt-x11-src-4.6.0"); + postCommand(_("set substitute-path %1 %2") + .arg(qtBuildPath).arg(qtInstallPath)); +#endif } // Initial attempt to set breakpoints diff --git a/src/plugins/designer/qtcreatorintegration.cpp b/src/plugins/designer/qtcreatorintegration.cpp index 31ecc39d2b..636627c40f 100644 --- a/src/plugins/designer/qtcreatorintegration.cpp +++ b/src/plugins/designer/qtcreatorintegration.cpp @@ -47,6 +47,8 @@ #include <extensionsystem/pluginmanager.h> #include <texteditor/basetexteditor.h> #include <texteditor/itexteditable.h> +#include <projectexplorer/projectexplorer.h> +#include <projectexplorer/session.h> #include <QtDesigner/QDesignerFormWindowInterface> @@ -577,9 +579,22 @@ bool QtCreatorIntegration::navigateToSlot(const QString &objectName, const QFileInfo fi(currentUiFile); const QString uicedName = QLatin1String("ui_") + fi.completeBaseName() + QLatin1String(".h"); + // Retrieve code model snapshot restricted to project of ui file. + const ProjectExplorer::Project *uiProject = ProjectExplorer::ProjectExplorerPlugin::instance()->session()->projectForFile(currentUiFile); + if (!uiProject) { + *errorMessage = tr("Internal error: No project could be found for %1.").arg(currentUiFile); + return false; + } + CPlusPlus::Snapshot docTable = cppModelManagerInstance()->snapshot(); + for (CPlusPlus::Snapshot::iterator it = docTable.begin(); it != docTable.end(); ) { + const ProjectExplorer::Project *project = ProjectExplorer::ProjectExplorerPlugin::instance()->session()->projectForFile(it.key()); + if (project == uiProject) { + ++it; + } else { + it = docTable.erase(it); + } + } // take all docs, find the ones that include the ui_xx.h. - - const CPlusPlus::Snapshot docTable = cppModelManagerInstance()->snapshot(); QList<Document::Ptr> docList = findDocumentsIncluding(docTable, uicedName, true); // change to false when we know the absolute path to generated ui_<>.h file if (Designer::Constants::Internal::debug) diff --git a/src/plugins/fakevim/fakevimhandler.cpp b/src/plugins/fakevim/fakevimhandler.cpp index c8cf6b9082..d690a3452c 100644 --- a/src/plugins/fakevim/fakevimhandler.cpp +++ b/src/plugins/fakevim/fakevimhandler.cpp @@ -1178,7 +1178,7 @@ EventResult FakeVimHandler::Private::handleCommandMode(int key, int unmodified, m_passing = !m_passing; updateMiniBuffer(); } else if (key == '.') { - //qDebug() << "REPEATING" << quoteUnprintable(m_dotCommand); + //qDebug() << "REPEATING" << quoteUnprintable(m_dotCommand) << count(); QString savedCommand = m_dotCommand; m_dotCommand.clear(); replay(savedCommand, count()); @@ -1366,6 +1366,8 @@ EventResult FakeVimHandler::Private::handleCommandMode(int key, int unmodified, } finishMovement("j"); } else if (key == 'J') { + setDotCommand("%1J", count()); + beginEditBlock(); if (m_submode == NoSubMode) { for (int i = qMax(count(), 2) - 1; --i >= 0; ) { moveToEndOfLine(); @@ -1380,6 +1382,8 @@ EventResult FakeVimHandler::Private::handleCommandMode(int key, int unmodified, if (!m_gflag) moveLeft(); } + endEditBlock(); + finishMovement(); } else if (key == 'k' || key == Key_Up) { if (m_submode == NoSubMode || m_submode == ZSubMode || m_submode == CapitalZSubMode || m_submode == RegisterSubMode) { diff --git a/src/plugins/help/helpplugin.cpp b/src/plugins/help/helpplugin.cpp index da93cd6795..9e5fd1a805 100644 --- a/src/plugins/help/helpplugin.cpp +++ b/src/plugins/help/helpplugin.cpp @@ -418,7 +418,7 @@ bool HelpPlugin::initialize(const QStringList &arguments, QString *error) cmd->setDefaultKeySequence(QKeySequence(tr("Ctrl++"))); connect(a, SIGNAL(triggered()), m_centralWidget, SLOT(zoomIn())); advancedMenu->addAction(cmd, Core::Constants::G_EDIT_FONT); - + a = new QAction(tr("Decrease Font Size"), this); cmd = am->registerAction(a, TextEditor::Constants::DECREASE_FONT_SIZE, modecontext); @@ -572,7 +572,6 @@ void HelpPlugin::extensionsInitialized() return; } - bool needsSetup = false; bool assistantInternalDocRegistered = false; QStringList documentationToRemove; QStringList filtersToRemove; @@ -601,12 +600,10 @@ void HelpPlugin::extensionsInitialized() QHelpEngineCore hc(m_helpEngine->collectionFile()); hc.setupData(); foreach (const QString &ns, documentationToRemove) { - if (hc.unregisterDocumentation(ns)) - needsSetup = true; + hc.unregisterDocumentation(ns); } foreach (const QString &filter, filtersToRemove) { - if (hc.removeCustomFilter(filter)) - needsSetup = true; + hc.removeCustomFilter(filter); } if (!assistantInternalDocRegistered) { @@ -619,38 +616,46 @@ void HelpPlugin::extensionsInitialized() #endif if (!hc.registerDocumentation(qchFileName)) qDebug() << qPrintable(hc.error()); - needsSetup = true; } } - QLatin1String key("UnfilteredFilterInserted"); - int i = m_helpEngine->customValue(key).toInt(); - if (i != 1) { - { - QHelpEngineCore hc(m_helpEngine->collectionFile()); - hc.setupData(); - hc.addCustomFilter(tr("Unfiltered"), QStringList()); - hc.setCustomValue(key, 1); + const QLatin1String weAddedFilterKey("UnfilteredFilterInserted"); + const QLatin1String previousFilterNameKey("UnfilteredFilterName"); + int i = m_helpEngine->customValue(weAddedFilterKey).toInt(); + const QString filterName = tr("Unfiltered"); + if (i == 1) { // we added a filter at some point + // remove previously added filter + QHelpEngineCore hc(m_helpEngine->collectionFile()); + hc.setupData(); + QString previousFilterName = hc.customValue(previousFilterNameKey).toString(); + if (!previousFilterName.isEmpty()) { // we noted down the name of the previously added filter + hc.removeCustomFilter(previousFilterName); + } + if (previousFilterName != filterName) { // potentially remove a filter with new name + hc.removeCustomFilter(filterName); } - bool blocked = m_helpEngine->blockSignals(true); - m_helpEngine->setCurrentFilter(tr("Unfiltered")); - m_helpEngine->blockSignals(blocked); - needsSetup = true; } + { + QHelpEngineCore hc(m_helpEngine->collectionFile()); + hc.setupData(); + hc.addCustomFilter(filterName, QStringList()); + hc.setCustomValue(weAddedFilterKey, 1); + hc.setCustomValue(previousFilterNameKey, filterName); + } + bool blocked = m_helpEngine->blockSignals(true); + m_helpEngine->setCurrentFilter(filterName); + m_helpEngine->blockSignals(blocked); QString addedDocs = m_helpEngine->customValue(QLatin1String("AddedDocs")).toString(); if (!addedDocs.isEmpty()) { QStringList documentationToAdd = addedDocs.split(";"); - foreach(QString item, documentationToAdd) { - needsSetup = true; + foreach (QString item, documentationToAdd) m_helpEngine->registerDocumentation(item); - } m_helpEngine->removeCustomValue(QLatin1String("AddedDocs")); } - if (needsSetup) - m_helpEngine->setupData(); + m_helpEngine->setupData(); updateFilterComboBox(); m_bookmarkManager->setupBookmarkModels(); @@ -662,7 +667,7 @@ void HelpPlugin::extensionsInitialized() font = qVariantValue<QFont>(m_helpEngine->customValue(QLatin1String("font"), font)); - + webSettings->setFontFamily(QWebSettings::StandardFont, font.family()); webSettings->setFontSize(QWebSettings::DefaultFontSize, font.pointSize()); #endif diff --git a/src/plugins/projectexplorer/environmenteditmodel.cpp b/src/plugins/projectexplorer/environmenteditmodel.cpp index 422c8328c2..b34a7d64b2 100644 --- a/src/plugins/projectexplorer/environmenteditmodel.cpp +++ b/src/plugins/projectexplorer/environmenteditmodel.cpp @@ -234,15 +234,21 @@ int EnvironmentModel::findInResultInsertPosition(const QString &name) const bool EnvironmentModel::setData(const QModelIndex &index, const QVariant &value, int role) { if (role == Qt::EditRole && index.isValid()) { + // ignore changes to already set values: + if (data(index, role) == value) + return true; + if (index.column() == 0) { //fail if a variable with the same name already exists #ifdef Q_OS_WIN - if (findInChanges(value.toString().toUpper()) != -1) - return false; + const QString &newName = value.toString().toUpper(); #else - if (findInChanges(value.toString()) != -1) - return false; + const QString &newName = value.toString(); #endif + + if (findInChanges(newName) != -1) + return false; + EnvironmentItem old("", ""); if (m_mergedEnvironments) { int pos = findInChanges(indexToVariable(index)); @@ -256,11 +262,7 @@ bool EnvironmentModel::setData(const QModelIndex &index, const QVariant &value, } else { old = m_items.at(index.row()); } -#ifdef Q_OS_WIN - const QString &newName = value.toString().toUpper(); -#else - const QString &newName = value.toString(); -#endif + if (changes(old.name)) removeVariable(old.name); old.name = newName; diff --git a/src/plugins/projectexplorer/projectexplorer.cpp b/src/plugins/projectexplorer/projectexplorer.cpp index 549d0ce350..1693c398df 100644 --- a/src/plugins/projectexplorer/projectexplorer.cpp +++ b/src/plugins/projectexplorer/projectexplorer.cpp @@ -2006,17 +2006,15 @@ void ProjectExplorerPlugin::populateRunConfigurationMenu() foreach (const Project *pro, d->m_session->projects()) { foreach (RunConfiguration *runConfiguration, pro->runConfigurations()) { - if (runConfiguration->isEnabled()) { - const QString title = QString("%1 (%2)").arg(pro->name(), runConfiguration->name()); - QAction *act = new QAction(title, d->m_runConfigurationActionGroup); - act->setCheckable(true); - act->setData(qVariantFromValue(runConfiguration)); - act->setChecked(runConfiguration == activeRunConfiguration); - d->m_runConfigurationMenu->addAction(act); - if (debug) - qDebug() << "RunConfiguration" << runConfiguration << "project:" << pro->name() - << "active:" << (runConfiguration == activeRunConfiguration); - } + const QString title = QString("%1 (%2)").arg(pro->name(), runConfiguration->name()); + QAction *act = new QAction(title, d->m_runConfigurationActionGroup); + act->setCheckable(true); + act->setData(qVariantFromValue(runConfiguration)); + act->setChecked(runConfiguration == activeRunConfiguration); + d->m_runConfigurationMenu->addAction(act); + if (debug) + qDebug() << "RunConfiguration" << runConfiguration << "project:" << pro->name() + << "active:" << (runConfiguration == activeRunConfiguration); } } diff --git a/src/plugins/projectexplorer/projectwizardpage.ui b/src/plugins/projectexplorer/projectwizardpage.ui index 6773a3da3a..89d15be868 100644 --- a/src/plugins/projectexplorer/projectwizardpage.ui +++ b/src/plugins/projectexplorer/projectwizardpage.ui @@ -65,10 +65,13 @@ <property name="orientation"> <enum>Qt::Vertical</enum> </property> + <property name="sizeType"> + <enum>QSizePolicy::Fixed</enum> + </property> <property name="sizeHint" stdset="0"> <size> - <width>20</width> - <height>40</height> + <width>0</width> + <height>10</height> </size> </property> </spacer> @@ -92,8 +95,8 @@ <rect> <x>0</x> <y>0</y> - <width>601</width> - <height>154</height> + <width>611</width> + <height>305</height> </rect> </property> <layout class="QVBoxLayout" name="verticalLayout_2"> diff --git a/src/plugins/qt4projectmanager/qt-s60/s60devices.cpp b/src/plugins/qt4projectmanager/qt-s60/s60devices.cpp index 9207460cb0..d77db8e074 100644 --- a/src/plugins/qt4projectmanager/qt-s60/s60devices.cpp +++ b/src/plugins/qt4projectmanager/qt-s60/s60devices.cpp @@ -138,22 +138,56 @@ bool S60Devices::read() #endif } +// Windows: Get list of paths containing common program data +// as pointed to by environment. +static QStringList commonProgramFilesPaths() +{ + const QChar pathSep = QLatin1Char(';'); + QStringList rc; + const QByteArray commonX86 = qgetenv("CommonProgramFiles(x86)"); + if (!commonX86.isEmpty()) + rc += QString::fromLocal8Bit(commonX86).split(pathSep); + const QByteArray common = qgetenv("CommonProgramFiles"); + if (!common.isEmpty()) + rc += QString::fromLocal8Bit(common).split(pathSep); + return rc; +} + // Windows EPOC -bool S60Devices::readWin() +// Find the "devices.xml" file containing the SDKs +static QString devicesXmlFile(QString *errorMessage) { - // Check the windows registry via QSettings for devices.xml path - QSettings settings(SYMBIAN_SDKS_KEY, QSettings::NativeFormat); - QString devicesXmlPath = settings.value(SYMBIAN_PATH_KEY).toString(); - if (devicesXmlPath.isEmpty()) { - m_errorString = "Could not find installed SDKs in registry."; - return false; + const QString devicesFile = QLatin1String(SYMBIAN_DEVICES_FILE); + // Try registry + const QSettings settings(QLatin1String(SYMBIAN_SDKS_KEY), QSettings::NativeFormat); + const QString devicesRegistryXmlPath = settings.value(QLatin1String(SYMBIAN_PATH_KEY)).toString(); + if (!devicesRegistryXmlPath.isEmpty()) + return QDir::cleanPath(devicesRegistryXmlPath + QLatin1Char('/') + devicesFile); + // Look up common program data files + const QString symbianDir = QLatin1String("/symbian/"); + foreach(const QString &commonDataDir, commonProgramFilesPaths()) { + const QFileInfo fi(commonDataDir + symbianDir + devicesFile); + if (fi.isFile()) + return fi.absoluteFilePath(); } + // None found... + *errorMessage = QString::fromLatin1("The file '%1' containing the device SDK configuration " + "could not be found looking at the registry key " + "%2\\%3 or the common program data directories."). + arg(devicesFile, QLatin1String(SYMBIAN_SDKS_KEY), + QLatin1String(SYMBIAN_PATH_KEY)); + return QString(); +} - devicesXmlPath += QLatin1String("/") + QLatin1String(SYMBIAN_DEVICES_FILE); +bool S60Devices::readWin() +{ + const QString devicesXmlPath = devicesXmlFile(&m_errorString); + if (devicesXmlPath.isEmpty()) + return false; QFile devicesFile(devicesXmlPath); - if (!devicesFile.open(QIODevice::ReadOnly)) { - m_errorString = QString("Could not read devices file at %1.").arg(devicesXmlPath); + if (!devicesFile.open(QIODevice::ReadOnly|QIODevice::Text)) { + m_errorString = QString::fromLatin1("Could not open the devices file %1: %2").arg(devicesXmlPath, devicesFile.errorString()); return false; } QXmlStreamReader xml(&devicesFile); @@ -192,10 +226,10 @@ bool S60Devices::readWin() } devicesFile.close(); if (xml.hasError()) { - m_errorString = xml.errorString(); + m_errorString = QString::fromLatin1("Syntax error in devices file %1: %2"). + arg(devicesXmlPath, xml.errorString()); return false; } - return true; } diff --git a/src/plugins/qt4projectmanager/qt-s60/s60devicespreferencepane.cpp b/src/plugins/qt4projectmanager/qt-s60/s60devicespreferencepane.cpp index 81023915f0..c1b616eb77 100644 --- a/src/plugins/qt4projectmanager/qt-s60/s60devicespreferencepane.cpp +++ b/src/plugins/qt4projectmanager/qt-s60/s60devicespreferencepane.cpp @@ -72,8 +72,26 @@ void S60DevicesWidget::updateDevicesList() item->setToolTip(1, tooltip); m_ui->list->addTopLevelItem(item); } + const QString errorString = m_devices->errorString(); + if (errorString.isEmpty()) { + clearErrorLabel(); + } else { + setErrorLabel(errorString); + } +} + +void S60DevicesWidget::setErrorLabel(const QString& t) +{ + m_ui->errorLabel->setText(t); + m_ui->errorLabel->setVisible(true); +} + +void S60DevicesWidget::clearErrorLabel() +{ + m_ui->errorLabel->setVisible(false); } + S60DevicesPreferencePane::S60DevicesPreferencePane(S60Devices *devices, QObject *parent) : Core::IOptionsPage(parent), m_widget(0), @@ -121,3 +139,5 @@ void S60DevicesPreferencePane::apply() void S60DevicesPreferencePane::finish() { } + + diff --git a/src/plugins/qt4projectmanager/qt-s60/s60devicespreferencepane.h b/src/plugins/qt4projectmanager/qt-s60/s60devicespreferencepane.h index 3378dcd316..92efc14e49 100644 --- a/src/plugins/qt4projectmanager/qt-s60/s60devicespreferencepane.h +++ b/src/plugins/qt4projectmanager/qt-s60/s60devicespreferencepane.h @@ -56,6 +56,9 @@ private slots: private: void updateDevicesList(); + void setErrorLabel(const QString&); + void clearErrorLabel(); + Ui::S60DevicesPreferencePane *m_ui; S60Devices *m_devices; }; diff --git a/src/plugins/qt4projectmanager/qt-s60/s60devicespreferencepane.ui b/src/plugins/qt4projectmanager/qt-s60/s60devicespreferencepane.ui index f739161007..1693e3e8a5 100644 --- a/src/plugins/qt4projectmanager/qt-s60/s60devicespreferencepane.ui +++ b/src/plugins/qt4projectmanager/qt-s60/s60devicespreferencepane.ui @@ -15,7 +15,7 @@ </property> <layout class="QVBoxLayout" name="verticalLayout"> <item> - <widget class="QLabel" name="label"> + <widget class="QLabel" name="titleLabel"> <property name="text"> <string>Installed S60 SDKs:</string> </property> @@ -51,6 +51,22 @@ </widget> </item> <item> + <widget class="QLabel" name="errorLabel"> + <property name="styleSheet"> + <string notr="true">background-color: red;</string> + </property> + <property name="text"> + <string>Error</string> + </property> + <property name="wordWrap"> + <bool>true</bool> + </property> + <property name="textInteractionFlags"> + <set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByMouse</set> + </property> + </widget> + </item> + <item> <layout class="QHBoxLayout" name="horizontalLayout"> <item> <spacer name="horizontalSpacer"> diff --git a/src/plugins/qt4projectmanager/qtmodulesinfo.cpp b/src/plugins/qt4projectmanager/qtmodulesinfo.cpp index 90a3f28f4d..92f8e565c4 100644 --- a/src/plugins/qt4projectmanager/qtmodulesinfo.cpp +++ b/src/plugins/qt4projectmanager/qtmodulesinfo.cpp @@ -51,67 +51,67 @@ const itemVectorType itemVector() { static const struct item items[] = { {"core", - QCoreApplication::translate("QtModulesInfo", "QtCore Module"), + QLatin1String("QtCore"), QCoreApplication::translate("QtModulesInfo", "Core non-GUI classes used by other modules"), true}, {"gui", - QCoreApplication::translate("QtModulesInfo", "QtGui Module"), + QLatin1String("QtGui"), QCoreApplication::translate("QtModulesInfo", "Graphical user interface components"), true}, {"network", - QCoreApplication::translate("QtModulesInfo", "QtNetwork Module"), + QLatin1String("QtNetwork"), QCoreApplication::translate("QtModulesInfo", "Classes for network programming"), false}, {"opengl", - QCoreApplication::translate("QtModulesInfo", "QtOpenGL Module"), + QLatin1String("QtOpenGL"), QCoreApplication::translate("QtModulesInfo", "OpenGL support classes"), false}, {"sql", - QCoreApplication::translate("QtModulesInfo", "QtSql Module"), + QLatin1String("QtSql"), QCoreApplication::translate("QtModulesInfo", "Classes for database integration using SQL"), false}, {"script", - QCoreApplication::translate("QtModulesInfo", "QtScript Module"), + QLatin1String("QtScript"), QCoreApplication::translate("QtModulesInfo", "Classes for evaluating Qt Scripts"), false}, {"scripttools", - QCoreApplication::translate("QtModulesInfo", "QtScriptTools Module"), + QLatin1String("QtScriptTools"), QCoreApplication::translate("QtModulesInfo", "Additional Qt Script components"), false}, {"svg", - QCoreApplication::translate("QtModulesInfo", "QtSvg Module"), + QLatin1String("QtSvg"), QCoreApplication::translate("QtModulesInfo", "Classes for displaying the contents of SVG files"), false}, {"webkit", - QCoreApplication::translate("QtModulesInfo", "QtWebKit Module"), + QLatin1String("QtWebKit"), QCoreApplication::translate("QtModulesInfo", "Classes for displaying and editing Web content"), false}, {"xml", - QCoreApplication::translate("QtModulesInfo", "QtXml Module"), + QLatin1String("QtXml"), QCoreApplication::translate("QtModulesInfo", "Classes for handling XML"), false}, {"xmlpatterns", - QCoreApplication::translate("QtModulesInfo", "QtXmlPatterns Module"), + QLatin1String("QtXmlPatterns"), QCoreApplication::translate("QtModulesInfo", "An XQuery/XPath engine for XML and custom data models"), false}, {"phonon", - QCoreApplication::translate("QtModulesInfo", "Phonon Module"), + QLatin1String("Phonon"), QCoreApplication::translate("QtModulesInfo", "Multimedia framework classes"), false}, {"multimedia", - QCoreApplication::translate("QtModulesInfo", "QtMultimedia Module"), + QLatin1String("QtMultimedia"), QCoreApplication::translate("QtModulesInfo", "Classes for low-level multimedia functionality"), false}, {"qt3support", - QCoreApplication::translate("QtModulesInfo", "Qt3Support Module"), + QLatin1String("Qt3Support"), QCoreApplication::translate("QtModulesInfo", "Classes that ease porting from Qt 3 to Qt 4"), false}, {"testlib", - QCoreApplication::translate("QtModulesInfo", "QtTest Module"), + QLatin1String("QtTest"), QCoreApplication::translate("QtModulesInfo", "Tool classes for unit testing"), false}, {"dbus", - QCoreApplication::translate("QtModulesInfo", "QtDBus Module"), + QLatin1String("QtDBus"), QCoreApplication::translate("QtModulesInfo", "Classes for Inter-Process Communication using the D-Bus"), false} }; diff --git a/src/plugins/texteditor/completionwidget.cpp b/src/plugins/texteditor/completionwidget.cpp index e4f7c97b80..7cdbac8577 100644 --- a/src/plugins/texteditor/completionwidget.cpp +++ b/src/plugins/texteditor/completionwidget.cpp @@ -139,7 +139,16 @@ bool CompletionWidget::event(QEvent *e) bool forwardKeys = true; if (e->type() == QEvent::FocusOut) { - closeList(); + QModelIndex index; +#if defined(Q_OS_DARWIN) && ! defined(QT_MAC_USE_COCOA) + QFocusEvent *fe = static_cast<QFocusEvent *>(e); + if (fe->reason() == Qt::OtherFocusReason) { + // Qt/carbon workaround + // focus out is received before the key press event. + index = currentIndex(); + } +#endif + closeList(index); return true; } else if (e->type() == QEvent::KeyPress) { QKeyEvent *ke = static_cast<QKeyEvent *>(e); @@ -153,7 +162,8 @@ bool CompletionWidget::event(QEvent *e) case Qt::Key_Tab: case Qt::Key_Return: //independently from style, accept current entry if return is pressed - closeList(currentIndex()); + if (qApp->focusWidget() == this) + closeList(currentIndex()); return true; case Qt::Key_Up: if (currentIndex().row() == 0) { diff --git a/src/plugins/texteditor/texteditoractionhandler.cpp b/src/plugins/texteditor/texteditoractionhandler.cpp index 5043583a46..9da54ddc10 100644 --- a/src/plugins/texteditor/texteditoractionhandler.cpp +++ b/src/plugins/texteditor/texteditoractionhandler.cpp @@ -362,9 +362,11 @@ void TextEditorActionHandler::gotoAction() { Locator::LocatorManager *locatorManager = Locator::LocatorManager::instance(); QTC_ASSERT(locatorManager, return); - const QString shortcut = TextEditorPlugin::instance()->lineNumberFilter()->shortcutString(); - const QString text = tr(" <line number>"); - locatorManager->show(shortcut + text, 2, text.length()-1); + QString locatorString = TextEditorPlugin::instance()->lineNumberFilter()->shortcutString(); + locatorString += QLatin1Char(' '); + const int selectionStart = locatorString.size(); + locatorString += tr("<line number>"); + locatorManager->show(locatorString, selectionStart, locatorString.size() - selectionStart); } void TextEditorActionHandler::printAction() |
