summaryrefslogtreecommitdiff
path: root/src/plugins/help
diff options
context:
space:
mode:
authorOrgad Shaneh <orgad.shaneh@audiocodes.com>2012-11-26 20:56:29 +0200
committerKarsten Heimrich <karsten.heimrich@digia.com>2012-11-27 13:18:22 +0100
commitc37420eeb3b8b49bd31a435f248840931fd08843 (patch)
tree7c7948aca6f9a32f363932c929c09a4396a22af7 /src/plugins/help
parentade966222da29e2c165675e5609f36664685e663 (diff)
downloadqt-creator-c37420eeb3b8b49bd31a435f248840931fd08843.tar.gz
Help: Compile with QT_NO_CAST_FROM_ASCII
Change-Id: Iba24d4f2d02de790f31d9606c7f9b85faf4670ce Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Karsten Heimrich <karsten.heimrich@digia.com>
Diffstat (limited to 'src/plugins/help')
-rw-r--r--src/plugins/help/externalhelpwindow.cpp6
-rw-r--r--src/plugins/help/generalsettingspage.cpp4
-rw-r--r--src/plugins/help/help.pro7
-rw-r--r--src/plugins/help/help.qbs2
-rw-r--r--src/plugins/help/helpplugin.cpp12
-rw-r--r--src/plugins/help/localhelpmanager.cpp2
6 files changed, 18 insertions, 15 deletions
diff --git a/src/plugins/help/externalhelpwindow.cpp b/src/plugins/help/externalhelpwindow.cpp
index ca24542b2e..81c349f50b 100644
--- a/src/plugins/help/externalhelpwindow.cpp
+++ b/src/plugins/help/externalhelpwindow.cpp
@@ -49,7 +49,7 @@ ExternalHelpWindow::ExternalHelpWindow(QWidget *parent)
: QMainWindow(parent)
{
QSettings *settings = Core::ICore::settings();
- settings->beginGroup(Help::Constants::ID_MODE_HELP);
+ settings->beginGroup(QLatin1String(Help::Constants::ID_MODE_HELP));
const QVariant geometry = settings->value(QLatin1String("geometry"));
if (geometry.isValid())
@@ -139,7 +139,7 @@ ExternalHelpWindow::ExternalHelpWindow(QWidget *parent)
SLOT(gotoNextPage()));
addAction(ctrlShiftTab);
- action = new QAction(QIcon(Core::Constants::ICON_TOGGLE_SIDEBAR),
+ action = new QAction(QIcon(QLatin1String(Core::Constants::ICON_TOGGLE_SIDEBAR)),
tr("Show Sidebar"), this);
connect(action, SIGNAL(triggered()), this, SIGNAL(showHideSidebar()));
@@ -179,7 +179,7 @@ ExternalHelpWindow::~ExternalHelpWindow()
void ExternalHelpWindow::closeEvent(QCloseEvent *event)
{
QSettings *settings = Core::ICore::settings();
- settings->beginGroup(Help::Constants::ID_MODE_HELP);
+ settings->beginGroup(QLatin1String(Help::Constants::ID_MODE_HELP));
settings->setValue(QLatin1String("geometry"), saveGeometry());
settings->endGroup();
diff --git a/src/plugins/help/generalsettingspage.cpp b/src/plugins/help/generalsettingspage.cpp
index fc2399fac8..24f2c052f1 100644
--- a/src/plugins/help/generalsettingspage.cpp
+++ b/src/plugins/help/generalsettingspage.cpp
@@ -186,7 +186,7 @@ void GeneralSettingsPage::apply()
manager->setCustomValue(QLatin1String("ContextHelpOption"), helpOption);
QSettings *settings = Core::ICore::settings();
- settings->beginGroup(Help::Constants::ID_MODE_HELP);
+ settings->beginGroup(QLatin1String(Help::Constants::ID_MODE_HELP));
settings->setValue(QLatin1String("ContextHelpOption"), helpOption);
settings->endGroup();
@@ -247,7 +247,7 @@ void GeneralSettingsPage::exportBookmarks()
m_ui->errorLabel->setVisible(false);
QString fileName = QFileDialog::getSaveFileName(0, tr("Save File"),
- "untitled.xbel", tr("Files (*.xbel)"));
+ QLatin1String("untitled.xbel"), tr("Files (*.xbel)"));
QLatin1String suffix(".xbel");
if (!fileName.endsWith(suffix))
diff --git a/src/plugins/help/help.pro b/src/plugins/help/help.pro
index cafc9a319b..86e26e481e 100644
--- a/src/plugins/help/help.pro
+++ b/src/plugins/help/help.pro
@@ -16,7 +16,10 @@ INCLUDEPATH += $$PWD
include(../../qtcreatorplugin.pri)
include(help_dependencies.pri)
-DEFINES += QT_CLUCENE_SUPPORT HELP_LIBRARY
+DEFINES += \
+ QT_CLUCENE_SUPPORT \
+ HELP_LIBRARY \
+ QT_NO_CAST_FROM_ASCII
HEADERS += \
centralwidget.h \
@@ -62,7 +65,7 @@ SOURCES += \
searchwidget.cpp \
xbelsupport.cpp \
externalhelpwindow.cpp
-
+
FORMS += docsettingspage.ui \
filtersettingspage.ui \
generalsettingspage.ui \
diff --git a/src/plugins/help/help.qbs b/src/plugins/help/help.qbs
index 53dd30c2cd..384a7b764f 100644
--- a/src/plugins/help/help.qbs
+++ b/src/plugins/help/help.qbs
@@ -25,7 +25,7 @@ QtcPlugin {
condition: qtcore.versionMajor >= 5
cpp.defines: base.concat(["QT_NO_WEBKIT"])
}
- cpp.defines: base.concat(["QT_CLUCENE_SUPPORT"])
+ cpp.defines: base.concat(["QT_CLUCENE_SUPPORT", "QT_NO_CAST_FROM_ASCII"])
cpp.includePaths: base.concat("../../shared/help")
files: [
diff --git a/src/plugins/help/helpplugin.cpp b/src/plugins/help/helpplugin.cpp
index 3eeaf50cbc..3575d92492 100644
--- a/src/plugins/help/helpplugin.cpp
+++ b/src/plugins/help/helpplugin.cpp
@@ -364,7 +364,7 @@ bool HelpPlugin::initialize(const QStringList &arguments, QString *error)
connect(remoteHelpFilter, SIGNAL(linkActivated(QUrl)), this,
SLOT(switchToHelpMode(QUrl)));
- QDesktopServices::setUrlHandler("qthelp", this, "handleHelpRequest");
+ QDesktopServices::setUrlHandler(QLatin1String("qthelp"), this, "handleHelpRequest");
connect(Core::ModeManager::instance(), SIGNAL(currentModeChanged(Core::IMode*,
Core::IMode*)), this, SLOT(modeChanged(Core::IMode*,Core::IMode*)));
@@ -462,7 +462,7 @@ void HelpPlugin::setupUi()
ContentWindow *contentWindow = new ContentWindow();
contentWindow->setWindowTitle(tr(SB_CONTENTS));
- m_contentItem = new Core::SideBarItem(contentWindow, SB_CONTENTS);
+ m_contentItem = new Core::SideBarItem(contentWindow, QLatin1String(SB_CONTENTS));
connect(contentWindow, SIGNAL(linkActivated(QUrl)), m_centralWidget,
SLOT(setSource(QUrl)));
@@ -930,7 +930,7 @@ void HelpPlugin::activateContext()
"available.</center></body></html>").arg(m_idFromContext));
} else {
int version = 0;
- QRegExp exp("(\\d+)");
+ QRegExp exp(QLatin1String("(\\d+)"));
QUrl source = *links.begin();
const QLatin1String qtRefDoc = QLatin1String("com.trolltech.qt");
@@ -1244,12 +1244,12 @@ void HelpPlugin::slotOpenActionUrl(QAction *action)
void HelpPlugin::slotOpenSupportPage()
{
- switchToHelpMode(QUrl("qthelp://com.nokia.qtcreator/doc/technical-support.html"));
+ switchToHelpMode(QUrl(QLatin1String("qthelp://com.nokia.qtcreator/doc/technical-support.html")));
}
void HelpPlugin::slotReportBug()
{
- QDesktopServices::openUrl(QUrl("https://bugreports.qt-project.org"));
+ QDesktopServices::openUrl(QUrl(QLatin1String("https://bugreports.qt-project.org")));
}
void HelpPlugin::openFindToolBar()
@@ -1279,7 +1279,7 @@ void HelpPlugin::doSetupIfNeeded()
int HelpPlugin::contextHelpOption() const
{
QSettings *settings = Core::ICore::settings();
- const QString key = Help::Constants::ID_MODE_HELP + QLatin1String("/ContextHelpOption");
+ const QString key = QLatin1String(Help::Constants::ID_MODE_HELP) + QLatin1String("/ContextHelpOption");
if (settings->contains(key))
return settings->value(key, Help::Constants::SideBySideIfPossible).toInt();
diff --git a/src/plugins/help/localhelpmanager.cpp b/src/plugins/help/localhelpmanager.cpp
index 1e8156a340..191018989c 100644
--- a/src/plugins/help/localhelpmanager.cpp
+++ b/src/plugins/help/localhelpmanager.cpp
@@ -87,7 +87,7 @@ QHelpEngine &LocalHelpManager::helpEngine()
if (!m_guiEngine) {
QMutexLocker _(&m_guiMutex);
if (!m_guiEngine) {
- m_guiEngine = new QHelpEngine("");
+ m_guiEngine = new QHelpEngine(QString());
m_guiEngine->setAutoSaveFilter(false);
}
}