summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAaron Kennedy <aaron.kennedy@nokia.com>2009-10-28 08:38:14 (GMT)
committerAaron Kennedy <aaron.kennedy@nokia.com>2009-10-28 08:38:14 (GMT)
commit13751c0fd2eacea6447766033c22dbe3dd0369d7 (patch)
tree899a2fb2794b6275af813168b0b159d64bcc21d7
parentc6afc5d26fbf2022435ff55a4bbc99b2d71f1e7c (diff)
parent30d8810bfab9c8157f80e5e38beda1ad8c0acfb0 (diff)
downloadQt-13751c0fd2eacea6447766033c22dbe3dd0369d7.zip
Qt-13751c0fd2eacea6447766033c22dbe3dd0369d7.tar.gz
Qt-13751c0fd2eacea6447766033c22dbe3dd0369d7.tar.bz2
Merge branch 'kinetic-declarativeui' of git@scm.dev.nokia.troll.no:qt/kinetic into kinetic-declarativeui
-rw-r--r--tests/auto/declarative/qfxtextinput/data/cursorTest.qml8
-rw-r--r--tests/auto/declarative/sql/data/4-iteration-index.js27
-rw-r--r--tests/auto/declarative/sql/tst_sql.cpp2
-rw-r--r--tools/qmldebugger/creatorplugin/qmlinspectormode.cpp2
-rw-r--r--tools/qmldebugger/standalone/expressionquerywidget.cpp9
5 files changed, 46 insertions, 2 deletions
diff --git a/tests/auto/declarative/qfxtextinput/data/cursorTest.qml b/tests/auto/declarative/qfxtextinput/data/cursorTest.qml
new file mode 100644
index 0000000..ddc98cc
--- /dev/null
+++ b/tests/auto/declarative/qfxtextinput/data/cursorTest.qml
@@ -0,0 +1,8 @@
+import Qt 4.6
+
+Rectangle { width: 300; height: 300; color: "white"
+ TextInput { text: "Hello world!"; id: textInputObject; objectName: "textInputObject"
+ resources: [ Component { id:cursor; Item { id:cursorInstance; objectName: "cursorInstance";} } ]
+ cursorDelegate: cursor
+ }
+}
diff --git a/tests/auto/declarative/sql/data/4-iteration-index.js b/tests/auto/declarative/sql/data/4-iteration-index.js
new file mode 100644
index 0000000..298737d
--- /dev/null
+++ b/tests/auto/declarative/sql/data/4-iteration-index.js
@@ -0,0 +1,27 @@
+var db = openDatabase("QmlTestDB", "", "Test database from Qt autotests", 1000000);
+var r=0;
+
+db.transaction(
+ function(tx) {
+ tx.executeSql('SELECT * FROM Greeting', [],
+ function(tx, rs) {
+ var r1=""
+ for(var i = 0; i < rs.rows.length; i++) {
+ r1 += rs.rows[i].salutation + ", " + rs.rows[i].salutee + ";"
+ }
+ if (r1 != "hello, world;hello, world;hello, world;hello, world;")
+ r = "SELECTED DATA WRONG: "+r1;
+ },
+ function(tx, error) { if (r==0) r="SELECT FAILED: "+error.message }
+ );
+ },
+ function(tx, error) { if (r==0) r="TRANSACTION FAILED: "+error.message },
+ function(tx, result) { if (r==0) r="passed" }
+);
+
+
+function test()
+{
+ if (r == 0) r = "transaction_not_finished";
+ return r;
+}
diff --git a/tests/auto/declarative/sql/tst_sql.cpp b/tests/auto/declarative/sql/tst_sql.cpp
index 22e9ba4..0ebdccd 100644
--- a/tests/auto/declarative/sql/tst_sql.cpp
+++ b/tests/auto/declarative/sql/tst_sql.cpp
@@ -86,7 +86,7 @@ QString tst_sql::dbDir() const
void tst_sql::checkDatabasePath()
{
// Check default storage path (we can't use it since we don't want to mess with user's data)
- QVERIFY(engine->offlineStoragePath().contains("Nokia"));
+ QVERIFY(engine->offlineStoragePath().contains("tst_sql"));
QVERIFY(engine->offlineStoragePath().contains("OfflineStorage"));
}
diff --git a/tools/qmldebugger/creatorplugin/qmlinspectormode.cpp b/tools/qmldebugger/creatorplugin/qmlinspectormode.cpp
index a90ca2c..5881cd1 100644
--- a/tools/qmldebugger/creatorplugin/qmlinspectormode.cpp
+++ b/tools/qmldebugger/creatorplugin/qmlinspectormode.cpp
@@ -385,7 +385,7 @@ void QmlInspectorMode::initWidgets()
m_propertiesWidget = new ObjectPropertiesView;
m_watchTableView = new WatchTableView(m_watchTableModel);
m_frameRateWidget = new CanvasFrameRate;
- m_expressionWidget = new ExpressionQueryWidget(ExpressionQueryWidget::SeparateEntryMode);
+ m_expressionWidget = new ExpressionQueryWidget(ExpressionQueryWidget::ShellMode);
// FancyMainWindow uses widgets' window titles for tab labels
m_objectTreeWidget->setWindowTitle(tr("Object Tree"));
diff --git a/tools/qmldebugger/standalone/expressionquerywidget.cpp b/tools/qmldebugger/standalone/expressionquerywidget.cpp
index 3c4296d..e064189 100644
--- a/tools/qmldebugger/standalone/expressionquerywidget.cpp
+++ b/tools/qmldebugger/standalone/expressionquerywidget.cpp
@@ -42,6 +42,7 @@ ExpressionQueryWidget::ExpressionQueryWidget(Mode mode, QmlEngineDebug *client,
m_lineEdit->installEventFilter(this);
} else {
m_textEdit->installEventFilter(this);
+ appendPrompt();
}
}
@@ -55,6 +56,8 @@ void ExpressionQueryWidget::clear()
m_textEdit->clear();
if (m_lineEdit)
m_lineEdit->clear();
+ if (m_mode == ShellMode)
+ appendPrompt();
}
void ExpressionQueryWidget::updateTitle()
@@ -99,6 +102,12 @@ void ExpressionQueryWidget::checkCurrentContext()
void ExpressionQueryWidget::showCurrentContext()
{
+ if (m_mode == ShellMode) {
+ // clear the initial prompt
+ if (m_textEdit->document()->lineCount() == 1)
+ m_textEdit->clear();
+ }
+
m_textEdit->moveCursor(QTextCursor::End);
m_textEdit->setTextColor(Qt::darkGreen);
m_textEdit->append(m_currObject.className()