diff --git a/src/plugins/coreplugin/editormanager/editormanager.cpp b/src/plugins/coreplugin/editormanager/editormanager.cpp index 064cc10a597626efc57d6a2b3290289a915f65d8..68709bfbfbe379ce1bb1aa38656ff53385a363b9 100644 --- a/src/plugins/coreplugin/editormanager/editormanager.cpp +++ b/src/plugins/coreplugin/editormanager/editormanager.cpp @@ -278,7 +278,7 @@ EditorManager::EditorManager(ICore *core, QWidget *parent) : ActionManager *am = m_d->m_core->actionManager(); ActionContainer *mfile = am->actionContainer(Constants::M_FILE); - //Revert to saved + // Revert to saved Command *cmd = am->registerAction(m_d->m_revertToSavedAction, Constants::REVERTTOSAVED, editManagerContext); cmd->setAttribute(Command::CA_UpdateText); @@ -286,18 +286,18 @@ EditorManager::EditorManager(ICore *core, QWidget *parent) : mfile->addAction(cmd, Constants::G_FILE_SAVE); connect(m_d->m_revertToSavedAction, SIGNAL(triggered()), this, SLOT(revertToSaved())); - //Save Action + // Save Action am->registerAction(m_d->m_saveAction, Constants::SAVE, editManagerContext); connect(m_d->m_saveAction, SIGNAL(triggered()), this, SLOT(saveFile())); - //Save As Action + // Save As Action am->registerAction(m_d->m_saveAsAction, Constants::SAVEAS, editManagerContext); connect(m_d->m_saveAsAction, SIGNAL(triggered()), this, SLOT(saveFileAs())); - //Window Menu + // Window Menu ActionContainer *mwindow = am->actionContainer(Constants::M_WINDOW); - //Window menu separators + // Window menu separators QAction *tmpaction = new QAction(this); tmpaction->setSeparator(true); cmd = am->registerAction(tmpaction, QLatin1String("QtCreator.Window.Sep.Split"), editManagerContext); @@ -308,7 +308,7 @@ EditorManager::EditorManager(ICore *core, QWidget *parent) : cmd = am->registerAction(tmpaction, QLatin1String("QtCreator.Window.Sep.Navigate"), editManagerContext); mwindow->addAction(cmd, Constants::G_WINDOW_NAVIGATE); - //Close Action + // Close Action cmd = am->registerAction(m_d->m_closeCurrentEditorAction, Constants::CLOSE, editManagerContext); #ifdef Q_WS_WIN cmd->setDefaultKeySequence(QKeySequence(tr("Ctrl+F4"))); @@ -320,13 +320,13 @@ EditorManager::EditorManager(ICore *core, QWidget *parent) : mfile->addAction(cmd, Constants::G_FILE_CLOSE); connect(m_d->m_closeCurrentEditorAction, SIGNAL(triggered()), this, SLOT(closeEditor())); - //Close All Action + // Close All Action cmd = am->registerAction(m_d->m_closeAllEditorsAction, Constants::CLOSEALL, editManagerContext); cmd->setDefaultKeySequence(QKeySequence(tr("Ctrl+Shift+W"))); mfile->addAction(cmd, Constants::G_FILE_CLOSE); connect(m_d->m_closeAllEditorsAction, SIGNAL(triggered()), this, SLOT(closeAllEditors())); - //Close All Others Action + // Close All Others Action cmd = am->registerAction(m_d->m_closeOtherEditorsAction, Constants::CLOSEOTHERS, editManagerContext); mfile->addAction(cmd, Constants::G_FILE_CLOSE); cmd->setAttribute(Core::Command::CA_UpdateText); diff --git a/src/plugins/coreplugin/mainwindow.cpp b/src/plugins/coreplugin/mainwindow.cpp index b446a935c53b0305532b73701ce22018416c0f25..9acd4adcbc550f789a9de4e6800648503602b8a4 100644 --- a/src/plugins/coreplugin/mainwindow.cpp +++ b/src/plugins/coreplugin/mainwindow.cpp @@ -579,7 +579,8 @@ void MainWindow::registerDefaultActions() mfile->addAction(cmd, Constants::G_FILE_SAVE); // Save As Action - tmpaction = new QAction(tr("Save &As..."), this); + icon = QIcon::fromTheme(QLatin1String("document-save-as")); + tmpaction = new QAction(icon, tr("Save &As..."), this); cmd = am->registerAction(tmpaction, Constants::SAVEAS, m_globalContext); #ifdef Q_WS_MAC cmd->setDefaultKeySequence(QKeySequence(tr("Ctrl+Shift+S"))); @@ -604,7 +605,8 @@ void MainWindow::registerDefaultActions() mfile->addAction(cmd, Constants::G_FILE_PRINT); // Exit Action - m_exitAction = new QAction(tr("E&xit"), this); + icon = QIcon::fromTheme(QLatin1String("application-exit")); + m_exitAction = new QAction(icon, tr("E&xit"), this); cmd = am->registerAction(m_exitAction, Constants::EXIT, m_globalContext); cmd->setDefaultKeySequence(QKeySequence(tr("Ctrl+Q"))); mfile->addAction(cmd, Constants::G_FILE_OTHER); @@ -655,14 +657,16 @@ void MainWindow::registerDefaultActions() tmpaction->setEnabled(false); // Select All - tmpaction = new QAction(tr("&Select All"), this); + icon = QIcon::fromTheme(QLatin1String("edit-select-all")); + tmpaction = new QAction(icon, tr("&Select All"), this); cmd = am->registerAction(tmpaction, Constants::SELECTALL, m_globalContext); cmd->setDefaultKeySequence(QKeySequence::SelectAll); medit->addAction(cmd, Constants::G_EDIT_SELECTALL); tmpaction->setEnabled(false); // Goto Action - tmpaction = new QAction(tr("&Go To Line..."), this); + icon = QIcon::fromTheme(QLatin1String("go-jump")); + tmpaction = new QAction(icon, tr("&Go To Line..."), this); cmd = am->registerAction(tmpaction, Constants::GOTO, m_globalContext); cmd->setDefaultKeySequence(QKeySequence(tr("Ctrl+L"))); medit->addAction(cmd, Constants::G_EDIT_OTHER); @@ -724,10 +728,11 @@ void MainWindow::registerDefaultActions() #endif // About IDE Action + icon = QIcon::fromTheme(QLatin1String("help-about")); #ifdef Q_WS_MAC - tmpaction = new QAction(tr("About &Qt Creator"), this); // it's convention not to add dots to the about menu + tmpaction = new QAction(icon, tr("About &Qt Creator"), this); // it's convention not to add dots to the about menu #else - tmpaction = new QAction(tr("About &Qt Creator..."), this); + tmpaction = new QAction(icon, tr("About &Qt Creator..."), this); #endif cmd = am->registerAction(tmpaction, Constants::ABOUT_QTCREATOR, m_globalContext); mhelp->addAction(cmd, Constants::G_HELP_ABOUT); diff --git a/src/plugins/find/findtoolbar.cpp b/src/plugins/find/findtoolbar.cpp index ed359fdc5cd78e7ab6b12b4d1816f18e1cdefbec..3f3449a5c2423624cea69d007ae9fc386117e5cb 100644 --- a/src/plugins/find/findtoolbar.cpp +++ b/src/plugins/find/findtoolbar.cpp @@ -133,7 +133,8 @@ FindToolBar::FindToolBar(FindPlugin *plugin, CurrentDocumentFind *currentDocumen Core::ActionContainer *mfind = am->actionContainer(Constants::M_FIND); Core::Command *cmd; - m_findInDocumentAction = new QAction(tr("Find/Replace"), this); + QIcon icon = QIcon::fromTheme(QLatin1String("edit-find-replace")); + m_findInDocumentAction = new QAction(icon, tr("Find/Replace"), this); cmd = am->registerAction(m_findInDocumentAction, Constants::FIND_IN_DOCUMENT, globalcontext); cmd->setDefaultKeySequence(QKeySequence::Find); mfind->addAction(cmd, Constants::G_FIND_CURRENTDOCUMENT);