forked from qt-creator/qt-creator
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>
This commit is contained in:
committed by
Karsten Heimrich
parent
ade966222d
commit
c37420eeb3
@@ -49,7 +49,7 @@ ExternalHelpWindow::ExternalHelpWindow(QWidget *parent)
|
|||||||
: QMainWindow(parent)
|
: QMainWindow(parent)
|
||||||
{
|
{
|
||||||
QSettings *settings = Core::ICore::settings();
|
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"));
|
const QVariant geometry = settings->value(QLatin1String("geometry"));
|
||||||
if (geometry.isValid())
|
if (geometry.isValid())
|
||||||
@@ -139,7 +139,7 @@ ExternalHelpWindow::ExternalHelpWindow(QWidget *parent)
|
|||||||
SLOT(gotoNextPage()));
|
SLOT(gotoNextPage()));
|
||||||
addAction(ctrlShiftTab);
|
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);
|
tr("Show Sidebar"), this);
|
||||||
connect(action, SIGNAL(triggered()), this, SIGNAL(showHideSidebar()));
|
connect(action, SIGNAL(triggered()), this, SIGNAL(showHideSidebar()));
|
||||||
|
|
||||||
@@ -179,7 +179,7 @@ ExternalHelpWindow::~ExternalHelpWindow()
|
|||||||
void ExternalHelpWindow::closeEvent(QCloseEvent *event)
|
void ExternalHelpWindow::closeEvent(QCloseEvent *event)
|
||||||
{
|
{
|
||||||
QSettings *settings = Core::ICore::settings();
|
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->setValue(QLatin1String("geometry"), saveGeometry());
|
||||||
settings->endGroup();
|
settings->endGroup();
|
||||||
|
|
||||||
|
|||||||
@@ -186,7 +186,7 @@ void GeneralSettingsPage::apply()
|
|||||||
manager->setCustomValue(QLatin1String("ContextHelpOption"), helpOption);
|
manager->setCustomValue(QLatin1String("ContextHelpOption"), helpOption);
|
||||||
|
|
||||||
QSettings *settings = Core::ICore::settings();
|
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->setValue(QLatin1String("ContextHelpOption"), helpOption);
|
||||||
settings->endGroup();
|
settings->endGroup();
|
||||||
|
|
||||||
@@ -247,7 +247,7 @@ void GeneralSettingsPage::exportBookmarks()
|
|||||||
m_ui->errorLabel->setVisible(false);
|
m_ui->errorLabel->setVisible(false);
|
||||||
|
|
||||||
QString fileName = QFileDialog::getSaveFileName(0, tr("Save File"),
|
QString fileName = QFileDialog::getSaveFileName(0, tr("Save File"),
|
||||||
"untitled.xbel", tr("Files (*.xbel)"));
|
QLatin1String("untitled.xbel"), tr("Files (*.xbel)"));
|
||||||
|
|
||||||
QLatin1String suffix(".xbel");
|
QLatin1String suffix(".xbel");
|
||||||
if (!fileName.endsWith(suffix))
|
if (!fileName.endsWith(suffix))
|
||||||
|
|||||||
@@ -16,7 +16,10 @@ INCLUDEPATH += $$PWD
|
|||||||
include(../../qtcreatorplugin.pri)
|
include(../../qtcreatorplugin.pri)
|
||||||
include(help_dependencies.pri)
|
include(help_dependencies.pri)
|
||||||
|
|
||||||
DEFINES += QT_CLUCENE_SUPPORT HELP_LIBRARY
|
DEFINES += \
|
||||||
|
QT_CLUCENE_SUPPORT \
|
||||||
|
HELP_LIBRARY \
|
||||||
|
QT_NO_CAST_FROM_ASCII
|
||||||
|
|
||||||
HEADERS += \
|
HEADERS += \
|
||||||
centralwidget.h \
|
centralwidget.h \
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ QtcPlugin {
|
|||||||
condition: qtcore.versionMajor >= 5
|
condition: qtcore.versionMajor >= 5
|
||||||
cpp.defines: base.concat(["QT_NO_WEBKIT"])
|
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")
|
cpp.includePaths: base.concat("../../shared/help")
|
||||||
|
|
||||||
files: [
|
files: [
|
||||||
|
|||||||
@@ -364,7 +364,7 @@ bool HelpPlugin::initialize(const QStringList &arguments, QString *error)
|
|||||||
connect(remoteHelpFilter, SIGNAL(linkActivated(QUrl)), this,
|
connect(remoteHelpFilter, SIGNAL(linkActivated(QUrl)), this,
|
||||||
SLOT(switchToHelpMode(QUrl)));
|
SLOT(switchToHelpMode(QUrl)));
|
||||||
|
|
||||||
QDesktopServices::setUrlHandler("qthelp", this, "handleHelpRequest");
|
QDesktopServices::setUrlHandler(QLatin1String("qthelp"), this, "handleHelpRequest");
|
||||||
connect(Core::ModeManager::instance(), SIGNAL(currentModeChanged(Core::IMode*,
|
connect(Core::ModeManager::instance(), SIGNAL(currentModeChanged(Core::IMode*,
|
||||||
Core::IMode*)), this, SLOT(modeChanged(Core::IMode*,Core::IMode*)));
|
Core::IMode*)), this, SLOT(modeChanged(Core::IMode*,Core::IMode*)));
|
||||||
|
|
||||||
@@ -462,7 +462,7 @@ void HelpPlugin::setupUi()
|
|||||||
|
|
||||||
ContentWindow *contentWindow = new ContentWindow();
|
ContentWindow *contentWindow = new ContentWindow();
|
||||||
contentWindow->setWindowTitle(tr(SB_CONTENTS));
|
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,
|
connect(contentWindow, SIGNAL(linkActivated(QUrl)), m_centralWidget,
|
||||||
SLOT(setSource(QUrl)));
|
SLOT(setSource(QUrl)));
|
||||||
|
|
||||||
@@ -930,7 +930,7 @@ void HelpPlugin::activateContext()
|
|||||||
"available.</center></body></html>").arg(m_idFromContext));
|
"available.</center></body></html>").arg(m_idFromContext));
|
||||||
} else {
|
} else {
|
||||||
int version = 0;
|
int version = 0;
|
||||||
QRegExp exp("(\\d+)");
|
QRegExp exp(QLatin1String("(\\d+)"));
|
||||||
QUrl source = *links.begin();
|
QUrl source = *links.begin();
|
||||||
const QLatin1String qtRefDoc = QLatin1String("com.trolltech.qt");
|
const QLatin1String qtRefDoc = QLatin1String("com.trolltech.qt");
|
||||||
|
|
||||||
@@ -1244,12 +1244,12 @@ void HelpPlugin::slotOpenActionUrl(QAction *action)
|
|||||||
|
|
||||||
void HelpPlugin::slotOpenSupportPage()
|
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()
|
void HelpPlugin::slotReportBug()
|
||||||
{
|
{
|
||||||
QDesktopServices::openUrl(QUrl("https://bugreports.qt-project.org"));
|
QDesktopServices::openUrl(QUrl(QLatin1String("https://bugreports.qt-project.org")));
|
||||||
}
|
}
|
||||||
|
|
||||||
void HelpPlugin::openFindToolBar()
|
void HelpPlugin::openFindToolBar()
|
||||||
@@ -1279,7 +1279,7 @@ void HelpPlugin::doSetupIfNeeded()
|
|||||||
int HelpPlugin::contextHelpOption() const
|
int HelpPlugin::contextHelpOption() const
|
||||||
{
|
{
|
||||||
QSettings *settings = Core::ICore::settings();
|
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))
|
if (settings->contains(key))
|
||||||
return settings->value(key, Help::Constants::SideBySideIfPossible).toInt();
|
return settings->value(key, Help::Constants::SideBySideIfPossible).toInt();
|
||||||
|
|
||||||
|
|||||||
@@ -87,7 +87,7 @@ QHelpEngine &LocalHelpManager::helpEngine()
|
|||||||
if (!m_guiEngine) {
|
if (!m_guiEngine) {
|
||||||
QMutexLocker _(&m_guiMutex);
|
QMutexLocker _(&m_guiMutex);
|
||||||
if (!m_guiEngine) {
|
if (!m_guiEngine) {
|
||||||
m_guiEngine = new QHelpEngine("");
|
m_guiEngine = new QHelpEngine(QString());
|
||||||
m_guiEngine->setAutoSaveFilter(false);
|
m_guiEngine->setAutoSaveFilter(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user