From 14e39ba5afb77499f18b1fe4e9faf1d0bebd1981 Mon Sep 17 00:00:00 2001 From: Friedemann Kleint <Friedemann.Kleint@nokia.com> Date: Thu, 7 May 2009 15:34:52 +0200 Subject: [PATCH] Fixed translation issues. --- .../cmakeopenprojectwizard.cpp | 18 +++++++-------- src/plugins/debugger/cdb/cdbdebugengine.cpp | 8 +++---- src/plugins/debugger/cdb/cdbdumperhelper.cpp | 22 +++++++++---------- src/plugins/debugger/commonoptionspage.ui | 2 +- src/plugins/debugger/debuggeractions.cpp | 2 +- src/plugins/debugger/debuggermanager.cpp | 4 ++-- src/plugins/debugger/moduleshandler.cpp | 2 +- src/plugins/help/centralwidget.cpp | 2 +- src/plugins/help/centralwidget.h | 10 ++------- src/plugins/help/helpplugin.cpp | 2 +- src/plugins/help/helpplugin.h | 6 +++-- src/plugins/projectexplorer/buildmanager.cpp | 11 ++++++---- src/plugins/projectexplorer/outputwindow.cpp | 2 +- .../projectexplorersettingspage.h | 1 + src/shared/help/bookmarkmanager.cpp | 4 ++-- src/shared/help/contentwindow.cpp | 4 ++-- src/shared/help/helpviewer.cpp | 8 +++---- src/shared/help/helpviewer.h | 15 ++++++++----- src/shared/help/indexwindow.cpp | 8 +++---- 19 files changed, 68 insertions(+), 63 deletions(-) diff --git a/src/plugins/cmakeprojectmanager/cmakeopenprojectwizard.cpp b/src/plugins/cmakeprojectmanager/cmakeopenprojectwizard.cpp index eae41bbef08..85952928356 100644 --- a/src/plugins/cmakeprojectmanager/cmakeopenprojectwizard.cpp +++ b/src/plugins/cmakeprojectmanager/cmakeopenprojectwizard.cpp @@ -184,9 +184,9 @@ InSourceBuildPage::InSourceBuildPage(CMakeOpenProjectWizard *cmakeWizard) setLayout(new QVBoxLayout); QLabel *label = new QLabel(this); label->setWordWrap(true); - label->setText(tr("Qt Creator has detected an in source build. " - "This prevents shadow builds, Qt Creator won't allow you to change the build directory. " - "If you want a shadow build, clean your source directory and open the project again.")); + label->setText(tr("Qt Creator has detected an in-source-build " + "which prevents shadow builds. Qt Creator will not allow you to change the build directory. " + "If you want a shadow build, clean your source directory and re-open the project.")); layout()->addWidget(label); } @@ -199,7 +199,7 @@ XmlFileUpToDatePage::XmlFileUpToDatePage(CMakeOpenProjectWizard *cmakeWizard) label->setWordWrap(true); label->setText(tr("Qt Creator has found a recent cbp file, which Qt Creator will parse to gather information about the project. " "You can change the command line arguments used to create this file in the project mode. " - "Click finish to load the project")); + "Click finish to load the project.")); layout()->addWidget(label); } @@ -281,15 +281,15 @@ void CMakeRunPage::initializePage() m_descriptionLabel->setText(tr("The directory %1 contains an outdated .cbp file. Qt " "Creator needs to update this file by running cmake. " "If you want to add additional command line arguments, " - "add them in the below. Note, that cmake remembers command " - "line arguments from the former runs.").arg(m_buildDirectory)); + "add them below. Note that cmake remembers command " + "line arguments from the previous runs.").arg(m_buildDirectory)); } else if(m_mode == CMakeRunPage::Recreate) { - m_descriptionLabel->setText(tr("The directory %1 specified in a buildconfiguration, " + m_descriptionLabel->setText(tr("The directory %1 specified in a build-configuration, " "does not contain a cbp file. Qt Creator needs to " "recreate this file, by running cmake. " "Some projects require command line arguments to " - "the initial cmake call. Note, that cmake remembers command " - "line arguments from the former runs.").arg(m_buildDirectory)); + "the initial cmake call. Note that cmake remembers command " + "line arguments from the previous runs.").arg(m_buildDirectory)); } else if(m_mode == CMakeRunPage::Change) { m_buildDirectory = m_cmakeWizard->buildDirectory(); m_descriptionLabel->setText(tr("Qt Creator needs to run cmake in the new build directory. " diff --git a/src/plugins/debugger/cdb/cdbdebugengine.cpp b/src/plugins/debugger/cdb/cdbdebugengine.cpp index 39c52525b64..55b8091aa2b 100644 --- a/src/plugins/debugger/cdb/cdbdebugengine.cpp +++ b/src/plugins/debugger/cdb/cdbdebugengine.cpp @@ -493,11 +493,11 @@ bool CdbDebugEngine::startDebugger() } break; case AttachCore: - errorMessage = tr("CdbDebugEngine: Attach to core not supported!"); + errorMessage = tr("Attaching to core files is not supported!"); break; } if (rc) { - m_d->m_debuggerManager->showStatusMessage(tr("Debugger Running"), -1); + m_d->m_debuggerManager->showStatusMessage(tr("Debugger running"), -1); if (needWatchTimer) startWatchTimer(); } else { @@ -515,7 +515,7 @@ bool CdbDebugEngine::startAttachDebugger(qint64 pid, QString *errorMessage) if (debugCDB) qDebug() << "Attaching to " << pid << " returns " << hr << executionStatusString(m_d->m_cif.debugControl); if (FAILED(hr)) { - *errorMessage = tr("AttachProcess failed for pid %1: %2").arg(pid).arg(msgDebugEngineComResult(hr)); + *errorMessage = tr("Attaching to a process failed for process id %1: %2").arg(pid).arg(msgDebugEngineComResult(hr)); return false; } else { m_d->m_mode = AttachExternal; @@ -558,7 +558,7 @@ bool CdbDebugEngine::startDebuggerWithExecutable(DebuggerStartMode sm, QString * m_d->m_debuggerManager->m_workingDir.utf16(), env); if (FAILED(hr)) { - *errorMessage = tr("CreateProcess2Wide failed for '%1': %2").arg(cmd, msgDebugEngineComResult(hr)); + *errorMessage = tr("Unable to create a process '%1': %2").arg(cmd, msgDebugEngineComResult(hr)); m_d->m_debuggerManagerAccess->notifyInferiorExited(); return false; } else { diff --git a/src/plugins/debugger/cdb/cdbdumperhelper.cpp b/src/plugins/debugger/cdb/cdbdumperhelper.cpp index c6d2337d0de..7a9c2efd7b5 100644 --- a/src/plugins/debugger/cdb/cdbdumperhelper.cpp +++ b/src/plugins/debugger/cdb/cdbdumperhelper.cpp @@ -188,27 +188,27 @@ static bool debuggeeLoadLibrary(IDebuggerManagerAccessForEngines *access, static inline QString msgMethod(bool injectOrCall) { return injectOrCall ? - QCoreApplication::translate("CdbDumperHelper", "injection") : - QCoreApplication::translate("CdbDumperHelper", "debugger call"); + QCoreApplication::translate("Debugger::Internal::CdbDumperHelper", "injection") : + QCoreApplication::translate("Debugger::Internal::CdbDumperHelper", "debugger call"); } static QString msgLoading(const QString &library, bool injectOrCall) { - return QCoreApplication::translate("CdbDumperHelper", + return QCoreApplication::translate("Debugger::Internal::CdbDumperHelper", "Loading the custom dumper library '%1' (%2) ..."). arg(library, msgMethod(injectOrCall)); } static QString msgLoadFailed(const QString &library, bool injectOrCall, const QString &why) { - return QCoreApplication::translate("CdbDumperHelper", + return QCoreApplication::translate("Debugger::Internal::CdbDumperHelper", "Loading of the custom dumper library '%1' (%2) failed: %3"). arg(library, msgMethod(injectOrCall), why); } static QString msgLoadSucceeded(const QString &library, bool injectOrCall) { - return QCoreApplication::translate("CdbDumperHelper", + return QCoreApplication::translate("Debugger::Internal::CdbDumperHelper", "Loaded the custom dumper library '%1' (%2)."). arg(library, msgMethod(injectOrCall)); } @@ -240,7 +240,7 @@ void CdbDumperHelper::disable() { if (loadDebug) qDebug() << Q_FUNC_INFO; - m_access->showDebuggerOutput(m_messagePrefix, QCoreApplication::translate("CdbDumperHelper", "Disabling dumpers due to debuggee crash...")); + m_access->showDebuggerOutput(m_messagePrefix, QCoreApplication::translate("Debugger::Internal::CdbDumperHelper", "Disabling dumpers due to debuggee crash...")); m_state = Disabled; } @@ -351,7 +351,7 @@ bool CdbDumperHelper::ensureInitialized(QString *errorMessage) m_access->showQtDumperLibraryWarning(*errorMessage); return false; case CallLoadNoQtApp: - m_access->showDebuggerOutput(m_messagePrefix, QCoreApplication::translate("CdbDumperHelper", "The debuggee does not appear to be Qt application.")); + m_access->showDebuggerOutput(m_messagePrefix, QCoreApplication::translate("Debugger::Internal::CdbDumperHelper", "The debuggee does not appear to be Qt application.")); m_state = Disabled; // No message here return true; } @@ -360,15 +360,15 @@ bool CdbDumperHelper::ensureInitialized(QString *errorMessage) break; } // Perform remaining initialization - m_manager->showStatusMessage(QCoreApplication::translate("CdbDumperHelper", "Initializing dumpers..."), 10000); + m_manager->showStatusMessage(QCoreApplication::translate("Debugger::Internal::CdbDumperHelper", "Initializing dumpers..."), 10000); const bool ok = initResolveSymbols(errorMessage) && initKnownTypes(errorMessage); if (ok) { - m_access->showDebuggerOutput(m_messagePrefix, QCoreApplication::translate("CdbDumperHelper", "Custom dumper library initialized.")); + m_access->showDebuggerOutput(m_messagePrefix, QCoreApplication::translate("Debugger::Internal::CdbDumperHelper", "Custom dumper library initialized.")); m_access->showDebuggerOutput(m_messagePrefix, m_helper.toString()); m_state = Initialized; } else { m_state = Disabled; // No message here - *errorMessage = QCoreApplication::translate("CdbDumperHelper", "The custom dumper library could not be initialized: %1").arg(*errorMessage); + *errorMessage = QCoreApplication::translate("Debugger::Internal::CdbDumperHelper", "The custom dumper library could not be initialized: %1").arg(*errorMessage); m_access->showDebuggerOutput(m_messagePrefix, *errorMessage); m_access->showQtDumperLibraryWarning(*errorMessage); } @@ -557,7 +557,7 @@ CdbDumperHelper::DumpResult CdbDumperHelper::dumpType(const WatchData &wd, bool return DumpNotHandled; // Now evaluate - const QString message = QCoreApplication::translate("CdbDumperHelper", + const QString message = QCoreApplication::translate("Debugger::Internal::CdbDumperHelper", "Querying dumpers for '%1'/'%2' (%3)"). arg(wd.name, wd.exp, wd.type); m_access->showDebuggerOutput(m_messagePrefix, message); diff --git a/src/plugins/debugger/commonoptionspage.ui b/src/plugins/debugger/commonoptionspage.ui index 8804fa8dbd3..f7f733b25c8 100644 --- a/src/plugins/debugger/commonoptionspage.ui +++ b/src/plugins/debugger/commonoptionspage.ui @@ -51,7 +51,7 @@ <item> <widget class="QCheckBox" name="checkBoxUseToolTips"> <property name="toolTip"> - <string>Checking this will make enable tooltips for variable values during debugging. Since this can slow down debugging and does not provide reliable information as it does not use scope information, it is switched off by default.</string> + <string>Checking this will enable tooltips for variable values during debugging. Since this can slow down debugging and does not provide reliable information as it does not use scope information, it is switched off by default.</string> </property> <property name="text"> <string>Use tooltips while debugging</string> diff --git a/src/plugins/debugger/debuggeractions.cpp b/src/plugins/debugger/debuggeractions.cpp index b96e059a666..e6358718bde 100644 --- a/src/plugins/debugger/debuggeractions.cpp +++ b/src/plugins/debugger/debuggeractions.cpp @@ -194,7 +194,7 @@ DebuggerSettings *DebuggerSettings::instance() // Breakpoints // item = new SavedAction(instance); - item->setText(tr("Syncronize breakpoints")); + item->setText(tr("Synchronize breakpoints")); instance->insertItem(SynchronizeBreakpoints, item); diff --git a/src/plugins/debugger/debuggermanager.cpp b/src/plugins/debugger/debuggermanager.cpp index e7780922f9c..85e52ff03b6 100644 --- a/src/plugins/debugger/debuggermanager.cpp +++ b/src/plugins/debugger/debuggermanager.cpp @@ -1532,8 +1532,8 @@ void DebuggerManager::showQtDumperLibraryWarning(const QString &details) dialog.setText(tr("The debugger did not find the debugging helper library.")); dialog.setInformativeText(tr("The debugging helper is used to nicely format the values of Qt " "data types and some STL data types. " - "It must be compiled for each Qt version, " - "you can do this in the Qt preferences page by selecting " + "It must be compiled for each Qt version which " + "you can do in the Qt preferences page by selecting " "a Qt installation and clicking on 'Rebuild' for the debugging " "helper.")); if (!details.isEmpty()) diff --git a/src/plugins/debugger/moduleshandler.cpp b/src/plugins/debugger/moduleshandler.cpp index 19e7058c1e3..ee1dc1f94e2 100644 --- a/src/plugins/debugger/moduleshandler.cpp +++ b/src/plugins/debugger/moduleshandler.cpp @@ -87,7 +87,7 @@ QVariant ModulesModel::headerData(int section, tr("Module name") + " ", tr("Symbols read") + " ", tr("Start address") + " ", - tr("End addAress") + " " + tr("End address") + " " }; return headers[section]; } diff --git a/src/plugins/help/centralwidget.cpp b/src/plugins/help/centralwidget.cpp index c1ad95d4832..7904da10079 100644 --- a/src/plugins/help/centralwidget.cpp +++ b/src/plugins/help/centralwidget.cpp @@ -71,7 +71,7 @@ namespace { } return 0; } - CentralWidget *staticCentralWidget = 0; + Help::Internal::CentralWidget *staticCentralWidget = 0; } CentralWidget::CentralWidget(QHelpEngine *engine, QWidget *parent) diff --git a/src/plugins/help/centralwidget.h b/src/plugins/help/centralwidget.h index c12272da13a..3be4fb7099f 100644 --- a/src/plugins/help/centralwidget.h +++ b/src/plugins/help/centralwidget.h @@ -48,7 +48,6 @@ class QToolButton; class QTabWidget; class QHelpEngine; class QFocusEvent; -class CentralWidget; class HelpViewer; QT_END_NAMESPACE @@ -56,10 +55,6 @@ QT_END_NAMESPACE namespace Help { namespace Internal { class PrintHelper; -} // namespace Internal -} // namespace Help - -QT_BEGIN_NAMESPACE class CentralWidget : public QWidget { @@ -143,8 +138,7 @@ private: QPrinter *printer; }; -QT_END_NAMESPACE -//} // namespace Internal -//} // namespace Help +} // namespace Internal +} // namespace Help #endif // CENTRALWIDGET_H diff --git a/src/plugins/help/helpplugin.cpp b/src/plugins/help/helpplugin.cpp index 9250e2ebd0a..ceaad2b5535 100644 --- a/src/plugins/help/helpplugin.cpp +++ b/src/plugins/help/helpplugin.cpp @@ -230,7 +230,7 @@ bool HelpPlugin::initialize(const QStringList &arguments, QString *error) am->actionContainer(Core::Constants::M_HELP)->addAction(cmd, Core::Constants::G_HELP_HELP); #endif - m_centralWidget = new CentralWidget(m_helpEngine); + m_centralWidget = new Help::Internal::CentralWidget(m_helpEngine); Aggregation::Aggregate *agg = new Aggregation::Aggregate; agg->add(m_centralWidget); agg->add(new HelpFindSupport(m_centralWidget)); diff --git a/src/plugins/help/helpplugin.h b/src/plugins/help/helpplugin.h index d5a5dd9821b..590421a46a1 100644 --- a/src/plugins/help/helpplugin.h +++ b/src/plugins/help/helpplugin.h @@ -49,7 +49,6 @@ class IndexWindow; class ContentWindow; class BookmarkManager; class BookmarkWidget; -class CentralWidget; class HelpViewer; QT_END_NAMESPACE @@ -62,6 +61,9 @@ class SideBarItem; } namespace Help { +namespace Internal { + class CentralWidget; +} namespace Constants { const char * const C_MODE_HELP = "Help Mode"; @@ -141,7 +143,7 @@ private: BookmarkWidget *m_bookmarkWidget; BookmarkManager *m_bookmarkManager; SearchWidget *m_searchWidget; - CentralWidget *m_centralWidget; + Help::Internal::CentralWidget *m_centralWidget; HelpViewer *m_helpViewerForSideBar; HelpMode *m_mode; bool m_shownLastPages; diff --git a/src/plugins/projectexplorer/buildmanager.cpp b/src/plugins/projectexplorer/buildmanager.cpp index 285214728c0..44282595812 100644 --- a/src/plugins/projectexplorer/buildmanager.cpp +++ b/src/plugins/projectexplorer/buildmanager.cpp @@ -51,6 +51,11 @@ using namespace ProjectExplorer; using namespace ProjectExplorer::Internal; +static inline QString msgProgress(int n, int total) +{ + return BuildManager::tr("Finished %n of %1 build steps", 0, n).arg(total); +} + BuildManager::BuildManager(ProjectExplorerPlugin *parent) : QObject(parent) , m_running(false) @@ -200,8 +205,7 @@ void BuildManager::startBuildQueue() } else { // Already running m_progressFutureInterface->setProgressRange(0, m_maxProgress * 100); - const QString &progressText = tr("Finished %1 of %2 build steps").arg(m_progress).arg(m_maxProgress); - m_progressFutureInterface->setProgressValueAndText(m_progress*100, progressText); + m_progressFutureInterface->setProgressValueAndText(m_progress*100, msgProgress(m_progress, m_maxProgress)); } } @@ -235,8 +239,7 @@ void BuildManager::nextBuildQueue() this, SLOT(addToOutputWindow(QString))); ++m_progress; - const QString &progressText = tr("Finished %1 of %2 build steps").arg(m_progress).arg(m_maxProgress); - m_progressFutureInterface->setProgressValueAndText(m_progress*100, progressText); + m_progressFutureInterface->setProgressValueAndText(m_progress*100, msgProgress(m_progress, m_maxProgress)); bool result = m_watcher.result(); if (!result) { diff --git a/src/plugins/projectexplorer/outputwindow.cpp b/src/plugins/projectexplorer/outputwindow.cpp index 74adafc2fee..2df5b00e294 100644 --- a/src/plugins/projectexplorer/outputwindow.cpp +++ b/src/plugins/projectexplorer/outputwindow.cpp @@ -67,7 +67,7 @@ OutputPane::OutputPane() // Rerun m_reRunButton = new QToolButton; m_reRunButton->setIcon(runIcon); - m_reRunButton->setToolTip(tr("Rerun this runconfiguration")); + m_reRunButton->setToolTip(tr("Re-run this run-configuration")); m_reRunButton->setAutoRaise(true); m_reRunButton->setEnabled(false); connect(m_reRunButton, SIGNAL(clicked()), diff --git a/src/plugins/projectexplorer/projectexplorersettingspage.h b/src/plugins/projectexplorer/projectexplorersettingspage.h index 378bfc54c7d..a10048f07c9 100644 --- a/src/plugins/projectexplorer/projectexplorersettingspage.h +++ b/src/plugins/projectexplorer/projectexplorersettingspage.h @@ -38,6 +38,7 @@ namespace Internal { class ProjectExplorerSettingsPage : public Core::IOptionsPage { + Q_OBJECT public: ProjectExplorerSettingsPage(); ~ProjectExplorerSettingsPage(); diff --git a/src/shared/help/bookmarkmanager.cpp b/src/shared/help/bookmarkmanager.cpp index 4531cb5bb83..22f6a6a2215 100644 --- a/src/shared/help/bookmarkmanager.cpp +++ b/src/shared/help/bookmarkmanager.cpp @@ -400,7 +400,7 @@ void BookmarkWidget::customContextMenuRequested(const QPoint &point) emit requestShowLink(data); } else if (picked_action == showItemNewTab) { - CentralWidget::instance()->setSourceInNewTab(data); + Help::Internal::CentralWidget::instance()->setSourceInNewTab(data); } else if (picked_action == removeItem) { bookmarkManager->removeBookmarkItem(treeView, @@ -575,7 +575,7 @@ bool BookmarkWidget::eventFilter(QObject *object, QEvent *e) if (index.isValid() && (me->button() == Qt::MidButton)) { QString data = index.data(Qt::UserRole + 10).toString(); if (!data.isEmpty() && data != QLatin1String("Folder")) - CentralWidget::instance()->setSourceInNewTab(data); + Help::Internal::CentralWidget::instance()->setSourceInNewTab(data); } } return QWidget::eventFilter(object, e); diff --git a/src/shared/help/contentwindow.cpp b/src/shared/help/contentwindow.cpp index 2a9d860c6a5..21b13e3ad7e 100644 --- a/src/shared/help/contentwindow.cpp +++ b/src/shared/help/contentwindow.cpp @@ -118,7 +118,7 @@ bool ContentWindow::eventFilter(QObject *o, QEvent *e) qobject_cast<QHelpContentModel*>(m_contentWidget->model()); QHelpContentItem *itm = contentModel->contentItemAt(m_contentWidget->currentIndex()); - CentralWidget::instance()->setSourceInNewTab(itm->url()); + Help::Internal::CentralWidget::instance()->setSourceInNewTab(itm->url()); } } return QWidget::eventFilter(o, e); @@ -143,7 +143,7 @@ void ContentWindow::showContextMenu(const QPoint &pos) if (curTab == action) emit linkActivated(itm->url()); else if (newTab == action) - CentralWidget::instance()->setSourceInNewTab(itm->url()); + Help::Internal::CentralWidget::instance()->setSourceInNewTab(itm->url()); } void ContentWindow::itemClicked(const QModelIndex &index) diff --git a/src/shared/help/helpviewer.cpp b/src/shared/help/helpviewer.cpp index 89a13358352..83efcb56cfc 100644 --- a/src/shared/help/helpviewer.cpp +++ b/src/shared/help/helpviewer.cpp @@ -148,7 +148,7 @@ QNetworkReply *HelpNetworkAccessManager::createRequest(Operation op, class HelpPage : public QWebPage { public: - HelpPage(CentralWidget *central, QHelpEngine *engine, QObject *parent); + HelpPage(Help::Internal::CentralWidget *central, QHelpEngine *engine, QObject *parent); protected: virtual QWebPage *createWindow(QWebPage::WebWindowType); @@ -157,11 +157,11 @@ protected: const QNetworkRequest &request, NavigationType type); private: - CentralWidget *centralWidget; + Help::Internal::CentralWidget *centralWidget; QHelpEngine *helpEngine; }; -HelpPage::HelpPage(CentralWidget *central, QHelpEngine *engine, QObject *parent) +HelpPage::HelpPage(Help::Internal::CentralWidget *central, QHelpEngine *engine, QObject *parent) : QWebPage(parent), centralWidget(central), helpEngine(engine) { } @@ -209,7 +209,7 @@ bool HelpPage::acceptNavigationRequest(QWebFrame *, return false; } -HelpViewer::HelpViewer(QHelpEngine *engine, CentralWidget *parent) +HelpViewer::HelpViewer(QHelpEngine *engine, Help::Internal::CentralWidget *parent) : QWebView(parent), helpEngine(engine), parentWidget(parent) { setPage(new HelpPage(parent, helpEngine, this)); diff --git a/src/shared/help/helpviewer.h b/src/shared/help/helpviewer.h index 7f85cf9d2ca..74e100dbd5e 100644 --- a/src/shared/help/helpviewer.h +++ b/src/shared/help/helpviewer.h @@ -42,7 +42,6 @@ QT_BEGIN_NAMESPACE class QHelpEngine; -class CentralWidget; class QPoint; class QString; @@ -50,6 +49,12 @@ class QKeyEvent; class QMouseEvent; class QContextMenuEvent; +namespace Help { + namespace Internal { + class CentralWidget; +} +} + #if !defined(QT_NO_WEBKIT) class HelpViewer : public QWebView @@ -57,7 +62,7 @@ class HelpViewer : public QWebView Q_OBJECT public: - HelpViewer(QHelpEngine *helpEngine, CentralWidget *parent); + HelpViewer(QHelpEngine *helpEngine, Help::Internal::CentralWidget *parent); void setSource(const QUrl &url); inline QUrl source() const @@ -101,7 +106,7 @@ private Q_SLOTS: private: QHelpEngine *helpEngine; - CentralWidget* parentWidget; + Help::Internal::CentralWidget* parentWidget; QUrl homeUrl; }; @@ -112,7 +117,7 @@ class HelpViewer : public QTextBrowser Q_OBJECT public: - HelpViewer(QHelpEngine *helpEngine, CentralWidget *parent); + HelpViewer(QHelpEngine *helpEngine, Help::Internal::CentralWidget *parent); void setSource(const QUrl &url); void resetZoom(); @@ -148,7 +153,7 @@ private: bool controlPressed; QString lastAnchor; QHelpEngine *helpEngine; - CentralWidget* parentWidget; + Help::Internal::CentralWidget* parentWidget; QUrl homeUrl; }; diff --git a/src/shared/help/indexwindow.cpp b/src/shared/help/indexwindow.cpp index 3ce9dd1620b..d96d463c45f 100644 --- a/src/shared/help/indexwindow.cpp +++ b/src/shared/help/indexwindow.cpp @@ -134,12 +134,12 @@ bool IndexWindow::eventFilter(QObject *obj, QEvent *e) if (model) { QMap<QString, QUrl> links = model->linksForKeyword(keyword); if (links.count() == 1) { - CentralWidget::instance()-> + Help::Internal::CentralWidget::instance()-> setSourceInNewTab(links.constBegin().value()); } else { TopicChooser tc(this, keyword, links); if (tc.exec() == QDialog::Accepted) { - CentralWidget::instance()->setSourceInNewTab(tc.link()); + Help::Internal::CentralWidget::instance()->setSourceInNewTab(tc.link()); } } } @@ -158,10 +158,10 @@ bool IndexWindow::eventFilter(QObject *obj, QEvent *e) if (links.count() > 1) { TopicChooser tc(this, keyword, links); if (tc.exec() == QDialog::Accepted) { - CentralWidget::instance()->setSourceInNewTab(tc.link()); + Help::Internal::CentralWidget::instance()->setSourceInNewTab(tc.link()); } } else if (links.count() == 1) { - CentralWidget::instance()-> + Help::Internal::CentralWidget::instance()-> setSourceInNewTab(links.constBegin().value()); } } -- GitLab