forked from qt-creator/qt-creator
Merge branch 'master' of git@scm.dev.nokia.troll.no:creator/mainline
This commit is contained in:
@@ -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);
|
||||
|
@@ -570,8 +570,8 @@ void HelpPlugin::activateContext()
|
||||
}
|
||||
|
||||
if (viewer) {
|
||||
viewer->setHtml(tr("<title>No Documentation</title><br><br>"
|
||||
"<center><b>%1</b><br><br>No documentation available.").
|
||||
viewer->setHtml(tr("<html><head><title>No Documentation</title></head><body><br/>"
|
||||
"<center><b>%1</b><br/>No documentation available.</center></body></html>").
|
||||
arg(id));
|
||||
viewer->setSource(QUrl());
|
||||
//activateIndex();
|
||||
@@ -589,8 +589,8 @@ void HelpPlugin::activateContext()
|
||||
|
||||
if (viewer) {
|
||||
viewer->setSource(QUrl());
|
||||
viewer->setHtml("<title>No Documentation</title><br><br><center>No"
|
||||
" documentation available.");
|
||||
viewer->setHtml("<html><head><title>No Documentation</title></head><body><br/><br/><center>No"
|
||||
" documentation available.</center></body></html>");
|
||||
//activateIndex();
|
||||
}
|
||||
}
|
||||
|
@@ -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));
|
||||
|
@@ -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<Document> 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"
|
||||
|
Reference in New Issue
Block a user