From 9acfff1792cf9aa13d6dc213369ac620a203c22a Mon Sep 17 00:00:00 2001 From: Bea Lam Date: Wed, 28 Oct 2009 16:45:26 +1000 Subject: Use ShellMode for creator plugin expression widget. --- tools/qmldebugger/creatorplugin/qmlinspectormode.cpp | 2 +- tools/qmldebugger/standalone/expressionquerywidget.cpp | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) 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() -- cgit v0.12 From 1f68fba91cf60103dd118dbd0d78342526bac593 Mon Sep 17 00:00:00 2001 From: Warwick Allison Date: Wed, 28 Oct 2009 17:07:18 +1000 Subject: Mac-safe sanity check. QT-2398 fix --- tests/auto/declarative/sql/tst_sql.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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")); } -- cgit v0.12 From 5746e2ec47f1186e928830b58833756ac25156f4 Mon Sep 17 00:00:00 2001 From: Warwick Allison Date: Wed, 28 Oct 2009 17:45:31 +1000 Subject: missing commit --- .../auto/declarative/sql/data/4-iteration-index.js | 27 ++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 tests/auto/declarative/sql/data/4-iteration-index.js 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; +} -- cgit v0.12 From c25bface8e20b472d1e50a82fdd85f7cda001f7e Mon Sep 17 00:00:00 2001 From: Alan Alpert Date: Wed, 28 Oct 2009 18:03:16 +1000 Subject: Add missing file Task-number: QT-2401 --- tests/auto/declarative/qfxtextinput/data/cursorTest.qml | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 tests/auto/declarative/qfxtextinput/data/cursorTest.qml 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 + } +} -- cgit v0.12