diff --git a/src/plugins/coreplugin/welcomemode.cpp b/src/plugins/coreplugin/welcomemode.cpp
index 21a25471101..8510f289343 100644
--- a/src/plugins/coreplugin/welcomemode.cpp
+++ b/src/plugins/coreplugin/welcomemode.cpp
@@ -151,6 +151,8 @@ WelcomeMode::WelcomeMode() :
l->addWidget(m_d->m_webview);
m_d->m_webview->setAcceptDrops(false);
+ m_d->m_webview->settings()->setAttribute(QWebSettings::PluginsEnabled, false);
+ m_d->m_webview->settings()->setAttribute(QWebSettings::JavaEnabled, false);
#else
m_d->m_label->setWordWrap(true);
diff --git a/src/plugins/help/helpplugin.cpp b/src/plugins/help/helpplugin.cpp
index 4d48afd0b20..8dfb429c4d2 100644
--- a/src/plugins/help/helpplugin.cpp
+++ b/src/plugins/help/helpplugin.cpp
@@ -570,8 +570,8 @@ void HelpPlugin::activateContext()
}
if (viewer) {
- viewer->setHtml(tr("
No Documentation
"
- "%1
No documentation available.").
+ viewer->setHtml(tr("No Documentation
"
+ "%1
No documentation available.").
arg(id));
viewer->setSource(QUrl());
//activateIndex();
@@ -589,8 +589,8 @@ void HelpPlugin::activateContext()
if (viewer) {
viewer->setSource(QUrl());
- viewer->setHtml("No Documentation
No"
- " documentation available.");
+ viewer->setHtml("No Documentation
No"
+ " documentation available.");
//activateIndex();
}
}
diff --git a/src/shared/help/helpviewer.cpp b/src/shared/help/helpviewer.cpp
index b22726da610..b4319e13cb4 100644
--- a/src/shared/help/helpviewer.cpp
+++ b/src/shared/help/helpviewer.cpp
@@ -216,6 +216,8 @@ bool HelpPage::acceptNavigationRequest(QWebFrame *,
HelpViewer::HelpViewer(QHelpEngine *engine, CentralWidget *parent)
: QWebView(parent), helpEngine(engine), parentWidget(parent)
{
+ settings()->setAttribute(QWebSettings::PluginsEnabled, false);
+ settings()->setAttribute(QWebSettings::JavaEnabled, false);
setPage(new HelpPage(parent, helpEngine, this));
page()->setNetworkAccessManager(new HelpNetworkAccessManager(engine, this));
diff --git a/tests/auto/cplusplus/semantic/tst_semantic.cpp b/tests/auto/cplusplus/semantic/tst_semantic.cpp
index 84d6ba27c4f..d2af748cddf 100644
--- a/tests/auto/cplusplus/semantic/tst_semantic.cpp
+++ b/tests/auto/cplusplus/semantic/tst_semantic.cpp
@@ -98,6 +98,7 @@ private slots:
void typedef_1();
void typedef_2();
void typedef_3();
+ void const_1();
};
void tst_Semantic::function_declaration_1()
@@ -319,5 +320,28 @@ void tst_Semantic::typedef_3()
_pointStruct);
}
+void tst_Semantic::const_1()
+{
+ QSharedPointer doc = document("\n"
+"int foo(const void *s);\n"
+ );
+
+ QCOMPARE(doc->errorCount, 0U);
+ QCOMPARE(doc->globals->symbolCount(), 1U);
+
+ Declaration *decl = doc->globals->symbolAt(0)->asDeclaration();
+ QVERIFY(decl);
+ QVERIFY(decl->type()->isFunctionType());
+ Function *funTy = decl->type()->asFunctionType();
+ QVERIFY(funTy->returnType()->isIntegerType());
+ QCOMPARE(funTy->argumentCount(), 1U);
+ Argument *arg = funTy->argumentAt(0)->asArgument();
+ QVERIFY(arg);
+ QVERIFY(! arg->type().isConst());
+ QVERIFY(arg->type()->isPointerType());
+ QVERIFY(arg->type()->asPointerType()->elementType().isConst());
+ QVERIFY(arg->type()->asPointerType()->elementType()->isVoidType());
+}
+
QTEST_APPLESS_MAIN(tst_Semantic)
#include "tst_semantic.moc"