summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2010-08-11 18:35:41 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2010-08-11 18:35:41 (GMT)
commit263bdc38f494e5d0be69b61c92ca6456fc4db330 (patch)
treec18351b345ff69c3d412ebd9d5802e00e91fb8c2 /tests
parent0bbc19d5721c8c00f2b3c6cb28cca2d0adfda315 (diff)
parent319f4f07c80664d6e244daf22d9b4c13e5d4e69a (diff)
downloadQt-263bdc38f494e5d0be69b61c92ca6456fc4db330.zip
Qt-263bdc38f494e5d0be69b61c92ca6456fc4db330.tar.gz
Qt-263bdc38f494e5d0be69b61c92ca6456fc4db330.tar.bz2
Merge branch 'qt-4.7-from-4.6' of scm.dev.nokia.troll.no:qt/qt-integration into 4.7-integration
* 'qt-4.7-from-4.6' of scm.dev.nokia.troll.no:qt/qt-integration: (22 commits) QSslSocket: fix security vulnerability with wildcard IP addresses fix build for -no-qt3support Fix handling of SSL certificates with wildcard domain names Doc: typo fixed in qlibraryinfo.cpp Fixes for combining multiple Qt::ImhXXXOnly with S60 FEP fix compile error Test code for input method hints Make input methods work correctly with Symbian^3 FEP in numeric mode Updated WebKit from /home/shausman/src/webkit/trunk to qtwebkit/qtwebkit-4.6 ( bbff6182e525fcf58dbc7426a1fbbf8f31588214 ) Improving text coordinate rounding in the OpenVG paint engine Add QDir::homePath() for the log file in QTestFileLogger in testlib on Symbian, both hardware and emulator. Fixed test regression on Mac Don't resolve GLSL extensions if no shaders setUniformValue(QSize) was setting (w,w) not (w,h) Fixed build break on Symbian versions earlier than S^3 Enabled tst_mediaobject::testPlayFromResource on Symbian Added support to Phonon MMF backend for playback of Qt resource files Updated tst_mediaobject resource playback test cases Added support to Phonon MMF backend for playback of Qt resource files Fix proxy widgets with the OpenVG paint engine. ...
Diffstat (limited to 'tests')
-rw-r--r--tests/manual/inputmethodhints/inputmethodhints.cpp99
-rw-r--r--tests/manual/inputmethodhints/inputmethodhints.h63
-rw-r--r--tests/manual/inputmethodhints/inputmethodhints.pro13
-rw-r--r--tests/manual/inputmethodhints/inputmethodhints.ui138
-rw-r--r--tests/manual/inputmethodhints/main.cpp53
5 files changed, 366 insertions, 0 deletions
diff --git a/tests/manual/inputmethodhints/inputmethodhints.cpp b/tests/manual/inputmethodhints/inputmethodhints.cpp
new file mode 100644
index 0000000..0c00b8d
--- /dev/null
+++ b/tests/manual/inputmethodhints/inputmethodhints.cpp
@@ -0,0 +1,99 @@
+/****************************************************************************
+**
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "inputmethodhints.h"
+
+inputmethodhints::inputmethodhints(QWidget *parent)
+ : QMainWindow(parent)
+{
+ ui.setupUi(this);
+ connect(ui.cbDialableOnly, SIGNAL(stateChanged(int)), this, SLOT(checkboxChanged(int)));
+ connect(ui.cbDigitsOnly, SIGNAL(stateChanged(int)), this, SLOT(checkboxChanged(int)));
+ connect(ui.cbEmailOnly, SIGNAL(stateChanged(int)), this, SLOT(checkboxChanged(int)));
+ connect(ui.cbFormattedNumbersOnly, SIGNAL(stateChanged(int)), this, SLOT(checkboxChanged(int)));
+ connect(ui.cbHiddenText, SIGNAL(stateChanged(int)), this, SLOT(checkboxChanged(int)));
+ connect(ui.cbLowercaseOnly, SIGNAL(stateChanged(int)), this, SLOT(checkboxChanged(int)));
+ connect(ui.cbNoAutoUppercase, SIGNAL(stateChanged(int)), this, SLOT(checkboxChanged(int)));
+ connect(ui.cbNoPredictiveText, SIGNAL(stateChanged(int)), this, SLOT(checkboxChanged(int)));
+ connect(ui.cbPreferLowercase, SIGNAL(stateChanged(int)), this, SLOT(checkboxChanged(int)));
+ connect(ui.cbPreferNumbers, SIGNAL(stateChanged(int)), this, SLOT(checkboxChanged(int)));
+ connect(ui.cbPreferUpperCase, SIGNAL(stateChanged(int)), this, SLOT(checkboxChanged(int)));
+ connect(ui.cbUppercaseOnly, SIGNAL(stateChanged(int)), this, SLOT(checkboxChanged(int)));
+ connect(ui.cbUrlOnly, SIGNAL(stateChanged(int)), this, SLOT(checkboxChanged(int)));
+}
+
+inputmethodhints::~inputmethodhints()
+{
+
+}
+
+void inputmethodhints::checkboxChanged(int)
+{
+ int flags = 0;
+ if (ui.cbDialableOnly->isChecked())
+ flags |= Qt::ImhDialableCharactersOnly;
+ if (ui.cbDigitsOnly->isChecked())
+ flags |= Qt::ImhDigitsOnly;
+ if (ui.cbEmailOnly->isChecked())
+ flags |= Qt::ImhEmailCharactersOnly;
+ if (ui.cbFormattedNumbersOnly->isChecked())
+ flags |= Qt::ImhFormattedNumbersOnly;
+ if (ui.cbHiddenText->isChecked())
+ flags |= Qt::ImhHiddenText;
+ if (ui.cbLowercaseOnly->isChecked())
+ flags |= Qt::ImhLowercaseOnly;
+ if (ui.cbNoAutoUppercase->isChecked())
+ flags |= Qt::ImhNoAutoUppercase;
+ if (ui.cbNoPredictiveText->isChecked())
+ flags |= Qt::ImhNoPredictiveText;
+ if (ui.cbPreferLowercase->isChecked())
+ flags |= Qt::ImhPreferLowercase;
+ if (ui.cbPreferNumbers->isChecked())
+ flags |= Qt::ImhPreferNumbers;
+ if (ui.cbPreferUpperCase->isChecked())
+ flags |= Qt::ImhPreferUppercase;
+ if (ui.cbUppercaseOnly->isChecked())
+ flags |= Qt::ImhUppercaseOnly;
+ if (ui.cbUrlOnly->isChecked())
+ flags |= Qt::ImhUrlCharactersOnly;
+ ui.lineEdit->clear();
+ ui.lineEdit->setInputMethodHints(Qt::InputMethodHints(flags));
+}
diff --git a/tests/manual/inputmethodhints/inputmethodhints.h b/tests/manual/inputmethodhints/inputmethodhints.h
new file mode 100644
index 0000000..988a4be
--- /dev/null
+++ b/tests/manual/inputmethodhints/inputmethodhints.h
@@ -0,0 +1,63 @@
+/****************************************************************************
+**
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef INPUTMETHODHINTS_H
+#define INPUTMETHODHINTS_H
+
+#include <QtGui/QMainWindow>
+#include "ui_tst_inputmethodhints.h"
+
+class inputmethodhints : public QMainWindow
+{
+ Q_OBJECT
+
+public:
+ inputmethodhints(QWidget *parent = 0);
+ ~inputmethodhints();
+
+public slots:
+ void checkboxChanged(int);
+
+private:
+ Ui::MainWindow ui;
+};
+
+#endif // INPUTMETHODHINTS_H
diff --git a/tests/manual/inputmethodhints/inputmethodhints.pro b/tests/manual/inputmethodhints/inputmethodhints.pro
new file mode 100644
index 0000000..7298ec6
--- /dev/null
+++ b/tests/manual/inputmethodhints/inputmethodhints.pro
@@ -0,0 +1,13 @@
+TEMPLATE = app
+TARGET = tst_inputmethodhints
+
+QT += core \
+ gui
+
+HEADERS += inputmethodhints.h
+SOURCES += main.cpp \
+ inputmethodhints.cpp
+FORMS += inputmethodhints.ui
+RESOURCES +=
+
+symbian:TARGET.UID3 = 0xE4938ABC
diff --git a/tests/manual/inputmethodhints/inputmethodhints.ui b/tests/manual/inputmethodhints/inputmethodhints.ui
new file mode 100644
index 0000000..d0dc01d
--- /dev/null
+++ b/tests/manual/inputmethodhints/inputmethodhints.ui
@@ -0,0 +1,138 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>MainWindow</class>
+ <widget class="QMainWindow" name="MainWindow">
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>360</width>
+ <height>640</height>
+ </rect>
+ </property>
+ <property name="windowTitle">
+ <string>MainWindow</string>
+ </property>
+ <widget class="QWidget" name="centralwidget">
+ <layout class="QVBoxLayout" name="verticalLayout_3">
+ <item>
+ <widget class="QTabWidget" name="tabWidget">
+ <property name="currentIndex">
+ <number>1</number>
+ </property>
+ <widget class="QWidget" name="tab">
+ <attribute name="title">
+ <string>behaviour</string>
+ </attribute>
+ <layout class="QVBoxLayout" name="verticalLayout">
+ <item>
+ <widget class="QCheckBox" name="cbHiddenText">
+ <property name="text">
+ <string>ImhHiddenText</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QCheckBox" name="cbNoAutoUppercase">
+ <property name="text">
+ <string>ImhNoAutoUppercase</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QCheckBox" name="cbPreferNumbers">
+ <property name="text">
+ <string>ImhPreferNumbers</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QCheckBox" name="cbPreferUpperCase">
+ <property name="text">
+ <string>ImhPreferUppercase</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QCheckBox" name="cbPreferLowercase">
+ <property name="text">
+ <string>ImhPreferLowercase</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QCheckBox" name="cbNoPredictiveText">
+ <property name="text">
+ <string>ImhNoPredictiveText</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ <widget class="QWidget" name="tab_2">
+ <attribute name="title">
+ <string>restrictions</string>
+ </attribute>
+ <layout class="QVBoxLayout" name="verticalLayout_2">
+ <item>
+ <widget class="QCheckBox" name="cbDigitsOnly">
+ <property name="text">
+ <string>ImhDigitsOnly</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QCheckBox" name="cbFormattedNumbersOnly">
+ <property name="text">
+ <string>ImhFormattedNumbersOnly</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QCheckBox" name="cbUppercaseOnly">
+ <property name="text">
+ <string>ImhUppercaseOnly</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QCheckBox" name="cbLowercaseOnly">
+ <property name="text">
+ <string>ImhLowercaseOnly</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QCheckBox" name="cbDialableOnly">
+ <property name="text">
+ <string>ImhDialableCharactersOnly</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QCheckBox" name="cbEmailOnly">
+ <property name="text">
+ <string>ImhEmailCharactersOnly</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QCheckBox" name="cbUrlOnly">
+ <property name="text">
+ <string>ImhUrlCharactersOnly</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ </widget>
+ </item>
+ <item>
+ <widget class="QLineEdit" name="lineEdit"/>
+ </item>
+ </layout>
+ </widget>
+ </widget>
+ <resources/>
+ <connections/>
+</ui>
diff --git a/tests/manual/inputmethodhints/main.cpp b/tests/manual/inputmethodhints/main.cpp
new file mode 100644
index 0000000..022bf3f
--- /dev/null
+++ b/tests/manual/inputmethodhints/main.cpp
@@ -0,0 +1,53 @@
+/****************************************************************************
+**
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "inputmethodhints.h"
+
+#include <QtGui>
+#include <QApplication>
+
+int main(int argc, char *argv[])
+{
+ QApplication a(argc, argv);
+ inputmethodhints w;
+ w.showMaximized();
+ return a.exec();
+}