Created
May 31, 2011 13:21
-
-
Save kkristof/1000486 to your computer and use it in GitHub Desktop.
buildfix
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/Tools/ChangeLog b/Tools/ChangeLog | |
index a774049..93ec66d 100644 | |
--- a/Tools/ChangeLog | |
+++ b/Tools/ChangeLog | |
@@ -1,5 +1,16 @@ | |
2011-05-31 Kristóf Kosztyó <Kosztyo.Kristof@stud.u-szeged.hu> | |
+ Reviewed by NOBODY (OOPS!). | |
+ | |
+ [Qt] Fix for find feature in QtTestBrowser to minimal build | |
+ | |
+ * QtTestBrowser/launcherwindow.cpp: | |
+ (LauncherWindow::LauncherWindow): | |
+ (LauncherWindow::createChrome): | |
+ * QtTestBrowser/launcherwindow.h: | |
+ | |
+2011-05-31 Kristóf Kosztyó <Kosztyo.Kristof@stud.u-szeged.hu> | |
+ | |
Reviewed by Csaba Osztrogonác. | |
[Qt] Implement find feature for QtTestBrowser | |
diff --git a/Tools/QtTestBrowser/launcherwindow.cpp b/Tools/QtTestBrowser/launcherwindow.cpp | |
index f93702b..980fc58 100644 | |
--- a/Tools/QtTestBrowser/launcherwindow.cpp | |
+++ b/Tools/QtTestBrowser/launcherwindow.cpp | |
@@ -46,7 +46,9 @@ LauncherWindow::LauncherWindow(WindowOptions* data, QGraphicsScene* sharedScene) | |
, m_inspector(0) | |
, m_formatMenuAction(0) | |
, m_zoomAnimation(0) | |
+#ifndef QT_NO_LINEEDIT | |
, m_findFlag(0) | |
+#endif | |
{ | |
if (data) | |
m_windowOptions = *data; | |
@@ -198,8 +200,10 @@ void LauncherWindow::createChrome() | |
editMenu->addAction(page()->action(QWebPage::Copy)); | |
editMenu->addAction(page()->action(QWebPage::Paste)); | |
editMenu->addSeparator(); | |
+#ifndef QT_NO_LINEEDIT | |
editMenu->addAction("&Find", this, SLOT(showFindBar()), QKeySequence(Qt::CTRL | Qt::Key_F)); | |
editMenu->addSeparator(); | |
+#endif | |
QAction* setEditable = editMenu->addAction("Set Editable", this, SLOT(setEditable(bool))); | |
setEditable->setCheckable(true); | |
@@ -410,7 +414,7 @@ void LauncherWindow::createChrome() | |
QAction* toggleJavascriptCanOpenWindows = settingsMenu->addAction("Enable js popup windows", this, SLOT(toggleJavascriptCanOpenWindows(bool))); | |
toggleJavascriptCanOpenWindows->setCheckable(true); | |
toggleJavascriptCanOpenWindows->setChecked(false); | |
- | |
+#ifndef QT_NO_LINEEDIT | |
m_findBar = new QToolBar("Find", this); | |
addToolBar(Qt::BottomToolBarArea, m_findBar); | |
@@ -454,6 +458,7 @@ void LauncherWindow::createChrome() | |
m_findBar->setMovable(false); | |
m_findBar->setVisible(false); | |
#endif | |
+#endif | |
} | |
bool LauncherWindow::isGraphicsBased() const | |
@@ -1022,6 +1027,7 @@ LauncherWindow* LauncherWindow::cloneWindow() | |
return mw; | |
} | |
+#ifndef QT_NO_LINEEDIT | |
void LauncherWindow::showFindBar() | |
{ | |
if (!m_findBar->isVisible()) { | |
@@ -1057,3 +1063,4 @@ void LauncherWindow::find(int mode = s_findNormalFlag) | |
if (m_findFlag & QWebPage::HighlightAllOccurrences) | |
page()->findText(m_lineEdit->text(), QFlag(m_findFlag)); | |
} | |
+#endif | |
diff --git a/Tools/QtTestBrowser/launcherwindow.h b/Tools/QtTestBrowser/launcherwindow.h | |
index f9cf00a..d689958 100644 | |
--- a/Tools/QtTestBrowser/launcherwindow.h | |
+++ b/Tools/QtTestBrowser/launcherwindow.h | |
@@ -190,9 +190,10 @@ protected slots: | |
void toggleOfflineStorageDatabase(bool toggle); | |
void toggleOfflineWebApplicationCache(bool toggle); | |
void setOfflineStorageDefaultQuota(); | |
- | |
+#ifndef QT_NO_LINEEDIT | |
void showFindBar(); | |
void find(int mode); | |
+#endif | |
#if defined(QT_CONFIGURED_WITH_OPENGL) | |
void toggleQGLWidgetViewport(bool enable); | |
#endif | |
@@ -241,11 +242,12 @@ private: | |
bool m_touchMocking; | |
QString m_inputUrl; | |
- | |
+#ifndef QT_NO_LINEEDIT | |
QToolBar* m_findBar; | |
QLineEdit* m_lineEdit; | |
int m_findFlag; | |
static const int s_findNormalFlag = 0; | |
+#endif | |
}; | |
#endif |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment