Commit c37420ee authored by Orgad Shaneh's avatar Orgad Shaneh Committed by Karsten Heimrich
Browse files

Help: Compile with QT_NO_CAST_FROM_ASCII



Change-Id: Iba24d4f2d02de790f31d9606c7f9b85faf4670ce
Reviewed-by: default avatarFriedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: default avatarKarsten Heimrich <karsten.heimrich@digia.com>
parent ade96622
......@@ -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();
......
......@@ -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))
......
......@@ -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 \
......
......@@ -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: [
......
......@@ -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();
......
......@@ -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);
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment