summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYoann Lopes <yoann.lopes@nokia.com>2010-09-24 11:43:56 (GMT)
committerYoann Lopes <yoann.lopes@nokia.com>2010-09-24 11:43:56 (GMT)
commitf9d1028cc7569c1eea48c50fbf88911063551764 (patch)
treedcf22d5c52daec3ba7aca2ae9191c10ad4596541
parent55f13f31321063b1fd2f377d33a42218b080b222 (diff)
parentfa54bcad158716fd507bcc0f8464879656bc6f93 (diff)
downloadQt-f9d1028cc7569c1eea48c50fbf88911063551764.zip
Qt-f9d1028cc7569c1eea48c50fbf88911063551764.tar.gz
Qt-f9d1028cc7569c1eea48c50fbf88911063551764.tar.bz2
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-2 into 4.7
-rw-r--r--src/opengl/qgl.cpp3
-rw-r--r--src/opengl/qgl_egl.cpp1
-rw-r--r--src/opengl/qpaintengine_opengl.cpp4
-rw-r--r--tools/assistant/tools/assistant/cmdlineparser.cpp7
-rw-r--r--tools/assistant/tools/assistant/cmdlineparser.h1
-rw-r--r--tools/assistant/tools/assistant/main.cpp12
-rw-r--r--tools/assistant/tools/assistant/mainwindow.cpp9
-rw-r--r--tools/assistant/tools/assistant/mainwindow.h2
8 files changed, 29 insertions, 10 deletions
diff --git a/src/opengl/qgl.cpp b/src/opengl/qgl.cpp
index 0d1a66e..b678790 100644
--- a/src/opengl/qgl.cpp
+++ b/src/opengl/qgl.cpp
@@ -509,6 +509,9 @@ QGLFormat::~QGLFormat()
exchange the screen contents with the buffer. The result is
flicker-free drawing and often better performance.
+ Note that single buffered contexts are currently not supported
+ with EGL.
+
\sa doubleBuffer(), QGLContext::swapBuffers(),
QGLWidget::swapBuffers()
*/
diff --git a/src/opengl/qgl_egl.cpp b/src/opengl/qgl_egl.cpp
index ebd1169..c79c4cd 100644
--- a/src/opengl/qgl_egl.cpp
+++ b/src/opengl/qgl_egl.cpp
@@ -143,6 +143,7 @@ void qt_glformat_from_eglconfig(QGLFormat& format, const EGLConfig config)
format.setRgba(true); // EGL doesn't support colour index rendering
format.setStereo(false); // EGL doesn't support stereo buffers
format.setAccumBufferSize(0); // EGL doesn't support accululation buffers
+ format.setDoubleBuffer(true); // We don't support single buffered EGL contexts
// Clear the EGL error state because some of the above may
// have errored out because the attribute is not applicable
diff --git a/src/opengl/qpaintengine_opengl.cpp b/src/opengl/qpaintengine_opengl.cpp
index 58778ea..2f17aa6 100644
--- a/src/opengl/qpaintengine_opengl.cpp
+++ b/src/opengl/qpaintengine_opengl.cpp
@@ -506,12 +506,12 @@ struct QDrawQueueItem
////////// GL program cache: start
-typedef struct {
+struct GLProgram {
int brush; // brush index or mask index
int mode; // composition mode index
bool mask;
GLuint program;
-} GLProgram;
+};
typedef QMultiHash<const QGLContext *, GLProgram> QGLProgramHash;
diff --git a/tools/assistant/tools/assistant/cmdlineparser.cpp b/tools/assistant/tools/assistant/cmdlineparser.cpp
index 1cf2915..181abe2 100644
--- a/tools/assistant/tools/assistant/cmdlineparser.cpp
+++ b/tools/assistant/tools/assistant/cmdlineparser.cpp
@@ -300,6 +300,13 @@ QString CmdLineParser::collectionFile() const
return m_collectionFile;
}
+bool CmdLineParser::collectionFileGiven() const
+{
+ TRACE_OBJ
+ return m_arguments.contains(QLatin1String("-collectionfile"),
+ Qt::CaseInsensitive);
+}
+
QUrl CmdLineParser::url() const
{
TRACE_OBJ
diff --git a/tools/assistant/tools/assistant/cmdlineparser.h b/tools/assistant/tools/assistant/cmdlineparser.h
index db66494..9fc36b3 100644
--- a/tools/assistant/tools/assistant/cmdlineparser.h
+++ b/tools/assistant/tools/assistant/cmdlineparser.h
@@ -61,6 +61,7 @@ public:
void setCollectionFile(const QString &file);
QString collectionFile() const;
+ bool collectionFileGiven() const;
QString cloneFile() const;
QUrl url() const;
bool enableRemoteControl() const;
diff --git a/tools/assistant/tools/assistant/main.cpp b/tools/assistant/tools/assistant/main.cpp
index bb86bfe..e3eef34 100644
--- a/tools/assistant/tools/assistant/main.cpp
+++ b/tools/assistant/tools/assistant/main.cpp
@@ -420,16 +420,18 @@ int main(int argc, char *argv[])
cachedCollection.setCurrentFilter(cmd.currentFilter());
}
- /*
- * We need to be careful here: The main window has to be deleted before
- * the help engine wrapper, which has to be deleted before the
- * QApplication.
- */
if (collectionFileGiven)
cmd.setCollectionFile(cachedCollectionFile);
+
MainWindow *w = new MainWindow(&cmd);
w->show();
a.connect(&a, SIGNAL(lastWindowClosed()), &a, SLOT(quit()));
+
+ /*
+ * We need to be careful here: The main window has to be deleted before
+ * the help engine wrapper, which has to be deleted before the
+ * QApplication.
+ */
const int retval = a.exec();
delete w;
HelpEngineWrapper::removeInstance();
diff --git a/tools/assistant/tools/assistant/mainwindow.cpp b/tools/assistant/tools/assistant/mainwindow.cpp
index 65a58c0..68343a4 100644
--- a/tools/assistant/tools/assistant/mainwindow.cpp
+++ b/tools/assistant/tools/assistant/mainwindow.cpp
@@ -161,7 +161,7 @@ MainWindow::MainWindow(CmdLineParser *cmdLine, QWidget *parent)
setupActions();
statusBar()->show();
- if (initHelpDB()) {
+ if (initHelpDB(!cmdLine->collectionFileGiven())) {
setupFilterToolbar();
setupAddressToolbar();
@@ -281,13 +281,18 @@ void MainWindow::closeEvent(QCloseEvent *e)
QMainWindow::closeEvent(e);
}
-bool MainWindow::initHelpDB()
+bool MainWindow::initHelpDB(bool registerInternalDoc)
{
TRACE_OBJ
HelpEngineWrapper &helpEngineWrapper = HelpEngineWrapper::instance();
if (!helpEngineWrapper.setupData())
return false;
+ if (!registerInternalDoc) {
+ if (helpEngineWrapper.defaultHomePage() == QLatin1String("help"))
+ helpEngineWrapper.setDefaultHomePage(QLatin1String("about:blank"));
+ return true;
+ }
bool assistantInternalDocRegistered = false;
QString intern(QLatin1String("com.trolltech.com.assistantinternal-"));
foreach (const QString &ns, helpEngineWrapper.registeredDocumentations()) {
diff --git a/tools/assistant/tools/assistant/mainwindow.h b/tools/assistant/tools/assistant/mainwindow.h
index 8219140..26726ee 100644
--- a/tools/assistant/tools/assistant/mainwindow.h
+++ b/tools/assistant/tools/assistant/mainwindow.h
@@ -121,7 +121,7 @@ private slots:
void documentationUpdated(const QString &namespaceName);
private:
- bool initHelpDB();
+ bool initHelpDB(bool registerInternalDoc);
void setupActions();
void closeEvent(QCloseEvent *e);
void activateDockWidget(QWidget *w);