diff --git a/src/Gui/CommandDoc.cpp b/src/Gui/CommandDoc.cpp index 155865b179..61977bc9b5 100644 --- a/src/Gui/CommandDoc.cpp +++ b/src/Gui/CommandDoc.cpp @@ -1017,10 +1017,10 @@ Action * StdCmdUndo::createAction(void) Action *pcAction; pcAction = new UndoAction(this,getMainWindow()); - pcAction->setShortcut(QString::fromLatin1(sAccel)); + pcAction->setShortcut(QString::fromLatin1(getAccel())); applyCommandData(this->className(), pcAction); - if (sPixmap) - pcAction->setIcon(Gui::BitmapFactory().iconFromTheme(sPixmap)); + if (getPixmap()) + pcAction->setIcon(Gui::BitmapFactory().iconFromTheme(getPixmap())); return pcAction; } @@ -1061,10 +1061,10 @@ Action * StdCmdRedo::createAction(void) Action *pcAction; pcAction = new RedoAction(this,getMainWindow()); - pcAction->setShortcut(QString::fromLatin1(sAccel)); + pcAction->setShortcut(QString::fromLatin1(getAccel())); applyCommandData(this->className(), pcAction); - if (sPixmap) - pcAction->setIcon(Gui::BitmapFactory().iconFromTheme(sPixmap)); + if (getPixmap()) + pcAction->setIcon(Gui::BitmapFactory().iconFromTheme(getPixmap())); return pcAction; } diff --git a/src/Gui/CommandLink.cpp b/src/Gui/CommandLink.cpp index 5063588389..cbbbd6f1fb 100644 --- a/src/Gui/CommandLink.cpp +++ b/src/Gui/CommandLink.cpp @@ -98,11 +98,11 @@ Action * StdCmdLinkMakeGroup::createAction(void) // add the action items QAction* action = nullptr; action = pcAction->addAction(QObject::tr("Simple group")); - action->setWhatsThis(QString::fromLatin1(sWhatsThis)); + action->setWhatsThis(QString::fromLatin1(getWhatsThis())); action = pcAction->addAction(QObject::tr("Group with links")); - action->setWhatsThis(QString::fromLatin1(sWhatsThis)); + action->setWhatsThis(QString::fromLatin1(getWhatsThis())); action = pcAction->addAction(QObject::tr("Group with transform links")); - action->setWhatsThis(QString::fromLatin1(sWhatsThis)); + action->setWhatsThis(QString::fromLatin1(getWhatsThis())); return pcAction; } diff --git a/src/Gui/CommandStd.cpp b/src/Gui/CommandStd.cpp index 1259b5a3b3..e62df2d7e8 100644 --- a/src/Gui/CommandStd.cpp +++ b/src/Gui/CommandStd.cpp @@ -122,10 +122,10 @@ Action * StdCmdWorkbench::createAction(void) Action *pcAction; pcAction = new WorkbenchGroup(this,getMainWindow()); - pcAction->setShortcut(QString::fromLatin1(sAccel)); + pcAction->setShortcut(QString::fromLatin1(getAccel())); applyCommandData(this->className(), pcAction); - if (sPixmap) - pcAction->setIcon(Gui::BitmapFactory().iconFromTheme(sPixmap)); + if (getPixmap()) + pcAction->setIcon(Gui::BitmapFactory().iconFromTheme(getPixmap())); return pcAction; } @@ -235,14 +235,14 @@ Action * StdCmdAbout::createAction(void) QString exe = qApp->applicationName(); pcAction = new Action(this,getMainWindow()); pcAction->setText(QCoreApplication::translate( - this->className(), sMenuText).arg(exe)); + this->className(), getMenuText()).arg(exe)); pcAction->setToolTip(QCoreApplication::translate( - this->className(), sToolTipText).arg(exe)); + this->className(), getToolTipText()).arg(exe)); pcAction->setStatusTip(QCoreApplication::translate( - this->className(), sStatusTip).arg(exe)); - pcAction->setWhatsThis(QLatin1String(sWhatsThis)); + this->className(), getStatusTip()).arg(exe)); + pcAction->setWhatsThis(QLatin1String(getWhatsThis())); pcAction->setIcon(QApplication::windowIcon()); - pcAction->setShortcut(QString::fromLatin1(sAccel)); + pcAction->setShortcut(QString::fromLatin1(getAccel())); // Needs to have AboutRole set to avoid duplicates if adding the about action more than once on macOS pcAction->setMenuRole(QAction::AboutRole); return pcAction; @@ -269,12 +269,12 @@ void StdCmdAbout::languageChange() if (_pcAction) { QString exe = qApp->applicationName(); _pcAction->setText(QCoreApplication::translate( - this->className(), sMenuText).arg(exe)); + this->className(), getMenuText()).arg(exe)); _pcAction->setToolTip(QCoreApplication::translate( - this->className(), sToolTipText).arg(exe)); + this->className(), getToolTipText()).arg(exe)); _pcAction->setStatusTip(QCoreApplication::translate( - this->className(), sStatusTip).arg(exe)); - _pcAction->setWhatsThis(QLatin1String(sWhatsThis)); + this->className(), getStatusTip()).arg(exe)); + _pcAction->setWhatsThis(QLatin1String(getWhatsThis())); } } diff --git a/src/Gui/CommandView.cpp b/src/Gui/CommandView.cpp index 2300c1e7b6..63c68f9ffe 100644 --- a/src/Gui/CommandView.cpp +++ b/src/Gui/CommandView.cpp @@ -315,15 +315,15 @@ Action * StdCmdFreezeViews::createAction(void) // add the action items saveView = pcAction->addAction(QObject::tr("Save views...")); - saveView->setWhatsThis(QString::fromLatin1(sWhatsThis)); + saveView->setWhatsThis(QString::fromLatin1(getWhatsThis())); QAction* loadView = pcAction->addAction(QObject::tr("Load views...")); - loadView->setWhatsThis(QString::fromLatin1(sWhatsThis)); + loadView->setWhatsThis(QString::fromLatin1(getWhatsThis())); pcAction->addAction(QString::fromLatin1(""))->setSeparator(true); freezeView = pcAction->addAction(QObject::tr("Freeze view")); - freezeView->setShortcut(QString::fromLatin1(sAccel)); - freezeView->setWhatsThis(QString::fromLatin1(sWhatsThis)); + freezeView->setShortcut(QString::fromLatin1(getAccel())); + freezeView->setWhatsThis(QString::fromLatin1(getWhatsThis())); clearView = pcAction->addAction(QObject::tr("Clear views")); - clearView->setWhatsThis(QString::fromLatin1(sWhatsThis)); + clearView->setWhatsThis(QString::fromLatin1(getWhatsThis())); separator = pcAction->addAction(QString::fromLatin1("")); separator->setSeparator(true); offset = pcAction->actions().count(); @@ -663,43 +663,43 @@ Gui::Action * StdCmdDrawStyle::createAction(void) a0->setChecked(true); a0->setObjectName(QString::fromLatin1("Std_DrawStyleAsIs")); a0->setShortcut(QKeySequence(QString::fromUtf8("V,1"))); - a0->setWhatsThis(QString::fromLatin1(sWhatsThis)); + a0->setWhatsThis(QString::fromLatin1(getWhatsThis())); QAction* a1 = pcAction->addAction(QString()); a1->setCheckable(true); a1->setIcon(BitmapFactory().iconFromTheme("DrawStylePoints")); a1->setObjectName(QString::fromLatin1("Std_DrawStylePoints")); a1->setShortcut(QKeySequence(QString::fromUtf8("V,2"))); - a1->setWhatsThis(QString::fromLatin1(sWhatsThis)); + a1->setWhatsThis(QString::fromLatin1(getWhatsThis())); QAction* a2 = pcAction->addAction(QString()); a2->setCheckable(true); a2->setIcon(BitmapFactory().iconFromTheme("DrawStyleWireFrame")); a2->setObjectName(QString::fromLatin1("Std_DrawStyleWireframe")); a2->setShortcut(QKeySequence(QString::fromUtf8("V,3"))); - a2->setWhatsThis(QString::fromLatin1(sWhatsThis)); + a2->setWhatsThis(QString::fromLatin1(getWhatsThis())); QAction* a3 = pcAction->addAction(QString()); a3->setCheckable(true); a3->setIcon(BitmapFactory().iconFromTheme("DrawStyleHiddenLine")); a3->setObjectName(QString::fromLatin1("Std_DrawStyleHiddenLine")); a3->setShortcut(QKeySequence(QString::fromUtf8("V,4"))); - a3->setWhatsThis(QString::fromLatin1(sWhatsThis)); + a3->setWhatsThis(QString::fromLatin1(getWhatsThis())); QAction* a4 = pcAction->addAction(QString()); a4->setCheckable(true); a4->setIcon(BitmapFactory().iconFromTheme("DrawStyleNoShading")); a4->setObjectName(QString::fromLatin1("Std_DrawStyleNoShading")); a4->setShortcut(QKeySequence(QString::fromUtf8("V,5"))); - a4->setWhatsThis(QString::fromLatin1(sWhatsThis)); + a4->setWhatsThis(QString::fromLatin1(getWhatsThis())); QAction* a5 = pcAction->addAction(QString()); a5->setCheckable(true); a5->setIcon(BitmapFactory().iconFromTheme("DrawStyleShaded")); a5->setObjectName(QString::fromLatin1("Std_DrawStyleShaded")); a5->setShortcut(QKeySequence(QString::fromUtf8("V,6"))); - a5->setWhatsThis(QString::fromLatin1(sWhatsThis)); + a5->setWhatsThis(QString::fromLatin1(getWhatsThis())); QAction* a6 = pcAction->addAction(QString()); a6->setCheckable(true); a6->setIcon(BitmapFactory().iconFromTheme("DrawStyleFlatLines")); a6->setObjectName(QString::fromLatin1("Std_DrawStyleFlatLines")); a6->setShortcut(QKeySequence(QString::fromUtf8("V,7"))); - a6->setWhatsThis(QString::fromLatin1(sWhatsThis)); + a6->setWhatsThis(QString::fromLatin1(getWhatsThis())); pcAction->setIcon(a0->icon()); @@ -1683,7 +1683,7 @@ Action * StdViewDockUndockFullscreen::createAction(void) ActionGroup* pcAction = new ActionGroup(this, getMainWindow()); pcAction->setDropDownMenu(true); pcAction->setText(QCoreApplication::translate( - this->className(), sMenuText)); + this->className(), getMenuText())); CommandManager &rcCmdMgr = Application::Instance->commandManager(); Command* cmdD = rcCmdMgr.getCommandByName("Std_ViewDock"); diff --git a/src/Gui/CommandWindow.cpp b/src/Gui/CommandWindow.cpp index b87997ec93..6527d95a4f 100644 --- a/src/Gui/CommandWindow.cpp +++ b/src/Gui/CommandWindow.cpp @@ -460,14 +460,14 @@ Action * StdCmdWindowsMenu::createAction(void) WindowAction *pcAction; pcAction = new WindowAction(this, getMainWindow()); for ( int i=0; i<10; i++ ) { - QAction* window = pcAction->addAction(QObject::tr(sToolTipText)); + QAction* window = pcAction->addAction(QObject::tr(getToolTipText())); window->setCheckable(true); window->setToolTip(QCoreApplication::translate( - this->className(), sToolTipText)); + this->className(), getToolTipText())); window->setStatusTip(QCoreApplication::translate( - this->className(), sStatusTip)); + this->className(), getStatusTip())); window->setWhatsThis(QCoreApplication::translate( - this->className(), sWhatsThis)); + this->className(), getWhatsThis())); } QAction* sep = pcAction->addAction(QLatin1String("")); diff --git a/src/Gui/NetworkRetriever.cpp b/src/Gui/NetworkRetriever.cpp index b64327bd2f..85a16f8d9b 100644 --- a/src/Gui/NetworkRetriever.cpp +++ b/src/Gui/NetworkRetriever.cpp @@ -421,15 +421,15 @@ Action * StdCmdDownloadOnlineHelp::createAction(void) QString exe = QString::fromLatin1(App::GetApplication().getExecutableName()); pcAction = new Action(this,getMainWindow()); pcAction->setText(QCoreApplication::translate( - this->className(), sMenuText)); + this->className(), getMenuText())); pcAction->setToolTip(QCoreApplication::translate( - this->className(), sToolTipText).arg(exe)); + this->className(), getToolTipText()).arg(exe)); pcAction->setStatusTip(QCoreApplication::translate( - this->className(), sStatusTip).arg(exe)); + this->className(), getStatusTip()).arg(exe)); pcAction->setWhatsThis(QCoreApplication::translate( - this->className(), sWhatsThis).arg(exe)); - pcAction->setIcon(Gui::BitmapFactory().pixmap(sPixmap)); - pcAction->setShortcut(QString::fromLatin1(sAccel)); + this->className(), getWhatsThis()).arg(exe)); + pcAction->setIcon(Gui::BitmapFactory().pixmap(getPixmap())); + pcAction->setShortcut(QString::fromLatin1(getAccel())); return pcAction; } @@ -439,13 +439,13 @@ void StdCmdDownloadOnlineHelp::languageChange() if (_pcAction) { QString exe = QString::fromLatin1(App::GetApplication().getExecutableName()); _pcAction->setText(QCoreApplication::translate( - this->className(), sMenuText)); + this->className(), getMenuText())); _pcAction->setToolTip(QCoreApplication::translate( - this->className(), sToolTipText).arg(exe)); + this->className(), getToolTipText()).arg(exe)); _pcAction->setStatusTip(QCoreApplication::translate( - this->className(), sStatusTip).arg(exe)); + this->className(), getStatusTip()).arg(exe)); _pcAction->setWhatsThis(QCoreApplication::translate( - this->className(), sWhatsThis).arg(exe)); + this->className(), getWhatsThis()).arg(exe)); } } @@ -550,7 +550,7 @@ void StdCmdDownloadOnlineHelp::wgetFinished() { if (_pcAction) _pcAction->setText(QCoreApplication::translate( - this->className(), sMenuText)); + this->className(), getMenuText())); } #include "moc_NetworkRetriever.cpp" diff --git a/src/Mod/Sketcher/Gui/CommandConstraints.cpp b/src/Mod/Sketcher/Gui/CommandConstraints.cpp index e6aeb20df8..99d9938c27 100644 --- a/src/Mod/Sketcher/Gui/CommandConstraints.cpp +++ b/src/Mod/Sketcher/Gui/CommandConstraints.cpp @@ -898,7 +898,7 @@ public: qreal fullIconWidth = 32 * pixelRatio; qreal iconWidth = 16 * pixelRatio; QPixmap cursorPixmap = Gui::BitmapFactory().pixmapFromSvg("Sketcher_Crosshair", QSizeF(fullIconWidth, fullIconWidth), colorMapping), - icon = Gui::BitmapFactory().pixmapFromSvg(cmd->sPixmap, QSizeF(iconWidth, iconWidth)); + icon = Gui::BitmapFactory().pixmapFromSvg(cmd->getPixmap(), QSizeF(iconWidth, iconWidth)); QPainter cursorPainter; cursorPainter.begin(&cursorPixmap); cursorPainter.drawPixmap(16 * pixelRatio, 16 * pixelRatio, icon); @@ -5902,7 +5902,7 @@ Gui::Action * CmdSketcherCompConstrainRadDia::createAction(void) pcAction->setProperty("defaultAction", QVariant(defaultId)); } - pcAction->setShortcut(QString::fromLatin1(sAccel)); + pcAction->setShortcut(QString::fromLatin1(getAccel())); return pcAction; } diff --git a/src/Mod/Sketcher/Gui/CommandSketcherTools.cpp b/src/Mod/Sketcher/Gui/CommandSketcherTools.cpp index 32444ce8f8..26a9d47b80 100644 --- a/src/Mod/Sketcher/Gui/CommandSketcherTools.cpp +++ b/src/Mod/Sketcher/Gui/CommandSketcherTools.cpp @@ -1653,12 +1653,12 @@ void CmdSketcherCompCopy::activated(int iMsg) if (iMsg == 0){ CmdSketcherClone sc; sc.activate(); - pcAction->setShortcut(QString::fromLatin1(this->sAccel)); + pcAction->setShortcut(QString::fromLatin1(this->getAccel())); } else if (iMsg == 1) { CmdSketcherCopy sc; sc.activate(); - pcAction->setShortcut(QString::fromLatin1(this->sAccel)); + pcAction->setShortcut(QString::fromLatin1(this->getAccel())); } else if (iMsg == 2) { CmdSketcherMove sc; @@ -1687,7 +1687,7 @@ Gui::Action * CmdSketcherCompCopy::createAction(void) int defaultId = 0; pcAction->setProperty("defaultAction", QVariant(defaultId)); - pcAction->setShortcut(QString::fromLatin1(sAccel)); + pcAction->setShortcut(QString::fromLatin1(getAccel())); return pcAction; }