summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/arthur/data/qps/aliasing.qps156
-rw-r--r--tests/arthur/data/qps/aliasing_qps.pngbin0 -> 30531 bytes
-rw-r--r--tests/auto/qaudiodeviceinfo/tst_qaudiodeviceinfo.cpp16
-rw-r--r--tests/auto/qaudioformat/tst_qaudioformat.cpp26
-rw-r--r--tests/auto/qaudioinput/tst_qaudioinput.cpp8
-rw-r--r--tests/auto/qaudiooutput/tst_qaudiooutput.cpp8
-rw-r--r--tests/auto/qboxlayout/tst_qboxlayout.cpp27
-rw-r--r--tests/auto/qfile/tst_qfile.cpp41
-rw-r--r--tests/auto/qfiledialog/tst_qfiledialog.cpp1
-rw-r--r--tests/auto/qfiledialog2/tst_qfiledialog2.cpp108
-rw-r--r--tests/auto/qfontcombobox/tst_qfontcombobox.cpp4
-rw-r--r--tests/auto/qftp/tst_qftp.cpp5
-rw-r--r--tests/auto/qgl/tst_qgl.cpp33
-rw-r--r--tests/auto/qgraphicsgridlayout/tst_qgraphicsgridlayout.cpp382
-rw-r--r--tests/auto/qhttp/tst_qhttp.cpp5
-rw-r--r--tests/auto/qpauseanimation/tst_qpauseanimation.cpp4
-rw-r--r--tests/auto/qscriptable/tst_qscriptable.cpp1
-rw-r--r--tests/auto/qsqlquery/tst_qsqlquery.cpp38
-rw-r--r--tests/auto/qsslsocket/tst_qsslsocket.cpp11
-rw-r--r--tests/auto/qtcpserver/test/test.pro2
-rw-r--r--tests/auto/qtcpserver/tst_qtcpserver.cpp180
-rw-r--r--tests/auto/qtcpsocket/test/test.pro2
-rw-r--r--tests/auto/qtcpsocket/tst_qtcpsocket.cpp24
-rw-r--r--tests/auto/qtextodfwriter/tst_qtextodfwriter.cpp4
-rw-r--r--tests/auto/qudpsocket/test/test.pro1
-rw-r--r--tests/auto/qudpsocket/tst_qudpsocket.cpp18
-rw-r--r--tests/auto/uic/baseline/config_fromuic3.ui1647
-rw-r--r--tests/auto/uic/baseline/config_fromuic3.ui.h715
-rw-r--r--tests/auto/uic3/baseline/config.ui11
-rw-r--r--tests/auto/uic3/baseline/config.ui.410
-rw-r--r--tests/auto/uiloader/baseline/css_qtbug6855.ui57
-rw-r--r--tests/benchmarks/benchmarks.pro1
-rw-r--r--tests/benchmarks/qgraphicsscene/tst_qgraphicsscene.cpp17
-rw-r--r--tests/benchmarks/qhostinfo/main.cpp28
-rw-r--r--tests/benchmarks/qtcpserver/qtcpserver.pro13
-rw-r--r--tests/benchmarks/qtcpserver/tst_qtcpserver.cpp277
36 files changed, 3342 insertions, 539 deletions
diff --git a/tests/arthur/data/qps/aliasing.qps b/tests/arthur/data/qps/aliasing.qps
new file mode 100644
index 0000000..59878f9
--- /dev/null
+++ b/tests/arthur/data/qps/aliasing.qps
@@ -0,0 +1,156 @@
+
+path_moveTo convexPath 25 0
+path_lineTo convexPath 50 50
+path_lineTo convexPath 25 25
+path_lineTo convexPath 0 50
+path_closeSubpath convexPath
+
+pixmap_load border.png pixmap
+
+setRenderHint LineAntialiasing false
+translate 10 10
+
+begin_block drawing
+ setPen black 1
+ setBrush 7f7fff
+ drawPath convexPath
+
+ setFont "monospace" 8
+ setPen black
+ drawText 0 68 "QwErTy@"
+
+
+ setPen black 1
+ setBrush 7f7fff
+ drawRect 0 80 10 5
+
+ setPen black 1
+ setBrush noBrush
+ drawRect 20 80 10 5
+
+ setPen noPen
+ setBrush 7f7fff
+ drawRect 40 80 10 5
+
+
+ setPen black 2
+ setBrush 7f7fff
+ drawRect 0 90 10 5
+
+ setPen black 2
+ setBrush noBrush
+ drawRect 20 90 10 5
+
+ setPen noPen
+ setBrush 7f7fff
+ drawRect 40 90 10 5
+
+
+ setPen black 3
+ setBrush 7f7fff
+ drawRect 0 100 10 5
+
+ setPen black 3
+ setBrush noBrush
+ drawRect 20 100 10 5
+
+ setPen noPen
+ setBrush 7f7fff
+ drawRect 40 100 10 5
+
+
+ setPen black 1
+ setBrush noBrush
+ drawLine 10 110 20 120
+ drawLine 30 120 40 110
+
+ setPen black 2
+ setBrush noBrush
+ drawLine 10 120 20 130
+ drawLine 30 130 40 120
+
+ setPen black 3
+ setBrush noBrush
+ drawLine 10 130 20 140
+ drawLine 30 140 40 130
+
+ drawPixmap pixmap 0 150
+
+ setRenderHint SmoothPixmapTransform false
+ drawPixmap pixmap 20 150 15 15 0 0 10 10
+
+end_block
+
+translate 0 180
+setRenderHint LineAntialiasing true
+repeat_block drawing
+drawText 15 185 "0.0"
+
+resetMatrix
+translate 70.2 10.2
+setRenderHint LineAntialiasing false
+repeat_block drawing
+translate 0 180
+setRenderHint LineAntialiasing true
+repeat_block drawing
+translate -0.2 -0.2
+drawText 15 185 "0.2"
+
+
+resetMatrix
+translate 130.4 10.4
+setRenderHint LineAntialiasing false
+repeat_block drawing
+translate 0 180
+setRenderHint LineAntialiasing true
+repeat_block drawing
+translate -0.4 -0.4
+drawText 15 185 "0.4"
+
+
+resetMatrix
+translate 190.5 10.5
+setRenderHint LineAntialiasing false
+repeat_block drawing
+translate 0 180
+setRenderHint LineAntialiasing true
+repeat_block drawing
+translate -0.5 -0.5
+drawText 15 185 "0.5"
+
+
+resetMatrix
+translate 250.6 10.6
+setRenderHint LineAntialiasing false
+repeat_block drawing
+translate 0 180
+setRenderHint LineAntialiasing true
+repeat_block drawing
+translate -0.6 -0.6
+drawText 15 185 "0.6"
+
+
+resetMatrix
+translate 310.8 10.8
+setRenderHint LineAntialiasing false
+repeat_block drawing
+translate 0 180
+setRenderHint LineAntialiasing true
+repeat_block drawing
+translate -0.8 -0.8
+drawText 15 185 "0.8"
+
+
+resetMatrix
+translate 371 11
+setRenderHint LineAntialiasing false
+repeat_block drawing
+translate 0 180
+setRenderHint LineAntialiasing true
+repeat_block drawing
+drawText 15 185 "1.0"
+
+
+resetMatrix
+drawText 430 95 "Aliased"
+drawText 430 275 "Anti-Aliased" \ No newline at end of file
diff --git a/tests/arthur/data/qps/aliasing_qps.png b/tests/arthur/data/qps/aliasing_qps.png
new file mode 100644
index 0000000..183129b
--- /dev/null
+++ b/tests/arthur/data/qps/aliasing_qps.png
Binary files differ
diff --git a/tests/auto/qaudiodeviceinfo/tst_qaudiodeviceinfo.cpp b/tests/auto/qaudiodeviceinfo/tst_qaudiodeviceinfo.cpp
index 715f219..2270eb2 100644
--- a/tests/auto/qaudiodeviceinfo/tst_qaudiodeviceinfo.cpp
+++ b/tests/auto/qaudiodeviceinfo/tst_qaudiodeviceinfo.cpp
@@ -128,7 +128,7 @@ void tst_QAudioDeviceInfo::codecs()
void tst_QAudioDeviceInfo::channels()
{
if(available) {
- QList<int> avail = device->supportedChannels();
+ QList<int> avail = device->supportedChannelCounts();
QVERIFY(avail.size() > 0);
}
}
@@ -160,7 +160,7 @@ void tst_QAudioDeviceInfo::sampleTypes()
void tst_QAudioDeviceInfo::frequencies()
{
if(available) {
- QList<int> avail = device->supportedFrequencies();
+ QList<int> avail = device->supportedSampleRates();
QVERIFY(avail.size() > 0);
}
}
@@ -169,8 +169,8 @@ void tst_QAudioDeviceInfo::isformat()
{
if(available) {
QAudioFormat format;
- format.setFrequency(44100);
- format.setChannels(2);
+ format.setSampleRate(44100);
+ format.setChannelCount(2);
format.setSampleType(QAudioFormat::SignedInt);
format.setByteOrder(QAudioFormat::LittleEndian);
format.setSampleSize(16);
@@ -185,8 +185,8 @@ void tst_QAudioDeviceInfo::preferred()
{
if(available) {
QAudioFormat format = device->preferredFormat();
- QVERIFY(format.frequency() == 44100);
- QVERIFY(format.channels() == 2);
+ QVERIFY(format.sampleRate() == 44100);
+ QVERIFY(format.channelCount() == 2);
}
}
@@ -194,9 +194,9 @@ void tst_QAudioDeviceInfo::nearest()
{
if(available) {
QAudioFormat format1, format2;
- format1.setFrequency(8000);
+ format1.setSampleRate(8000);
format2 = device->nearestFormat(format1);
- QVERIFY(format2.frequency() == 44100);
+ QVERIFY(format2.sampleRate() == 44100);
}
}
diff --git a/tests/auto/qaudioformat/tst_qaudioformat.cpp b/tests/auto/qaudioformat/tst_qaudioformat.cpp
index 0778a8e..5237dca 100644
--- a/tests/auto/qaudioformat/tst_qaudioformat.cpp
+++ b/tests/auto/qaudioformat/tst_qaudioformat.cpp
@@ -77,8 +77,8 @@ void tst_QAudioFormat::checkNull()
QAudioFormat audioFormat1(audioFormat0);
QVERIFY(!audioFormat1.isValid());
- audioFormat0.setFrequency(44100);
- audioFormat0.setChannels(2);
+ audioFormat0.setSampleRate(44100);
+ audioFormat0.setChannelCount(2);
audioFormat0.setSampleSize(16);
audioFormat0.setCodec("audio/pcm");
audioFormat0.setSampleType(QAudioFormat::SignedInt);
@@ -88,15 +88,15 @@ void tst_QAudioFormat::checkNull()
void tst_QAudioFormat::checkFrequency()
{
QAudioFormat audioFormat;
- audioFormat.setFrequency(44100);
- QVERIFY(audioFormat.frequency() == 44100);
+ audioFormat.setSampleRate(44100);
+ QVERIFY(audioFormat.sampleRate() == 44100);
}
void tst_QAudioFormat::checkChannels()
{
QAudioFormat audioFormat;
- audioFormat.setChannels(2);
- QVERIFY(audioFormat.channels() == 2);
+ audioFormat.setChannelCount(2);
+ QVERIFY(audioFormat.channelCount() == 2);
}
void tst_QAudioFormat::checkSampleSize()
@@ -137,15 +137,15 @@ void tst_QAudioFormat::checkEquality()
QVERIFY(!(audioFormat0 != audioFormat1));
// on filled formats
- audioFormat0.setFrequency(8000);
- audioFormat0.setChannels(1);
+ audioFormat0.setSampleRate(8000);
+ audioFormat0.setChannelCount(1);
audioFormat0.setSampleSize(8);
audioFormat0.setCodec("audio/pcm");
audioFormat0.setByteOrder(QAudioFormat::LittleEndian);
audioFormat0.setSampleType(QAudioFormat::UnSignedInt);
- audioFormat1.setFrequency(8000);
- audioFormat1.setChannels(1);
+ audioFormat1.setSampleRate(8000);
+ audioFormat1.setChannelCount(1);
audioFormat1.setSampleSize(8);
audioFormat1.setCodec("audio/pcm");
audioFormat1.setByteOrder(QAudioFormat::LittleEndian);
@@ -154,7 +154,7 @@ void tst_QAudioFormat::checkEquality()
QVERIFY(audioFormat0 == audioFormat1);
QVERIFY(!(audioFormat0 != audioFormat1));
- audioFormat0.setFrequency(44100);
+ audioFormat0.setSampleRate(44100);
QVERIFY(audioFormat0 != audioFormat1);
QVERIFY(!(audioFormat0 == audioFormat1));
}
@@ -164,8 +164,8 @@ void tst_QAudioFormat::checkAssignment()
QAudioFormat audioFormat0;
QAudioFormat audioFormat1;
- audioFormat0.setFrequency(8000);
- audioFormat0.setChannels(1);
+ audioFormat0.setSampleRate(8000);
+ audioFormat0.setChannelCount(1);
audioFormat0.setSampleSize(8);
audioFormat0.setCodec("audio/pcm");
audioFormat0.setByteOrder(QAudioFormat::LittleEndian);
diff --git a/tests/auto/qaudioinput/tst_qaudioinput.cpp b/tests/auto/qaudioinput/tst_qaudioinput.cpp
index 744ce38..994e9ef 100644
--- a/tests/auto/qaudioinput/tst_qaudioinput.cpp
+++ b/tests/auto/qaudioinput/tst_qaudioinput.cpp
@@ -68,8 +68,8 @@ private:
void tst_QAudioInput::initTestCase()
{
- format.setFrequency(8000);
- format.setChannels(1);
+ format.setSampleRate(8000);
+ format.setChannelCount(1);
format.setSampleSize(8);
format.setCodec("audio/pcm");
format.setByteOrder(QAudioFormat::LittleEndian);
@@ -94,8 +94,8 @@ void tst_QAudioInput::settings()
// Confirm the setting we added in the init function.
QAudioFormat f = audio->format();
- QVERIFY(format.channels() == f.channels());
- QVERIFY(format.frequency() == f.frequency());
+ QVERIFY(format.channelCount() == f.channelCount());
+ QVERIFY(format.sampleRate() == f.sampleRate());
QVERIFY(format.sampleSize() == f.sampleSize());
QVERIFY(format.codec() == f.codec());
QVERIFY(format.byteOrder() == f.byteOrder());
diff --git a/tests/auto/qaudiooutput/tst_qaudiooutput.cpp b/tests/auto/qaudiooutput/tst_qaudiooutput.cpp
index 26694cc..60d0124 100644
--- a/tests/auto/qaudiooutput/tst_qaudiooutput.cpp
+++ b/tests/auto/qaudiooutput/tst_qaudiooutput.cpp
@@ -71,8 +71,8 @@ private:
void tst_QAudioOutput::initTestCase()
{
- format.setFrequency(8000);
- format.setChannels(1);
+ format.setSampleRate(8000);
+ format.setChannelCount(1);
format.setSampleSize(8);
format.setCodec("audio/pcm");
format.setByteOrder(QAudioFormat::LittleEndian);
@@ -95,8 +95,8 @@ void tst_QAudioOutput::settings()
// Confirm the setting we added in the init function.
QAudioFormat f = audio->format();
- QVERIFY(format.channels() == f.channels());
- QVERIFY(format.frequency() == f.frequency());
+ QVERIFY(format.channelCount() == f.channelCount());
+ QVERIFY(format.sampleRate() == f.sampleRate());
QVERIFY(format.sampleSize() == f.sampleSize());
QVERIFY(format.codec() == f.codec());
QVERIFY(format.byteOrder() == f.byteOrder());
diff --git a/tests/auto/qboxlayout/tst_qboxlayout.cpp b/tests/auto/qboxlayout/tst_qboxlayout.cpp
index 8887288..48235e8 100644
--- a/tests/auto/qboxlayout/tst_qboxlayout.cpp
+++ b/tests/auto/qboxlayout/tst_qboxlayout.cpp
@@ -66,6 +66,8 @@ private slots:
void sizeConstraints();
void setGeometry();
void setStyleShouldChangeSpacing();
+
+ void taskQTBUG_7103_minMaxWidthNotRespected();
};
class CustomLayoutStyle : public QWindowsStyle
@@ -246,6 +248,31 @@ void tst_QBoxLayout::setStyleShouldChangeSpacing()
delete style2;
}
+void tst_QBoxLayout::taskQTBUG_7103_minMaxWidthNotRespected()
+{
+ QLabel *label = new QLabel("Qt uses standard C++, but makes extensive use of the C pre-processor to enrich the language. Qt can also be used in several other programming languages via language bindings. It runs on all major platforms, and has extensive internationalization support. Non-GUI features include SQL database access, XML parsing, thread management, network support and a unified cross-platform API for file handling.");
+ label->setWordWrap(true);
+ label->setFixedWidth(200);
+
+ QVBoxLayout *layout = new QVBoxLayout;
+ layout->addWidget(label);
+ layout->addSpacerItem(new QSpacerItem(1, 1, QSizePolicy::Fixed, QSizePolicy::Expanding));
+
+ QWidget widget;
+ widget.setLayout(layout);
+ widget.show();
+ QTest::qWaitForWindowShown(&widget);
+
+ int height = label->height();
+
+ QRect g = widget.geometry();
+ g.setWidth(600);
+ widget.setGeometry(g);
+
+ QTest::qWait(50);
+
+ QCOMPARE(label->height(), height);
+}
QTEST_MAIN(tst_QBoxLayout)
#include "tst_qboxlayout.moc"
diff --git a/tests/auto/qfile/tst_qfile.cpp b/tests/auto/qfile/tst_qfile.cpp
index 2b2f431..e88c222 100644
--- a/tests/auto/qfile/tst_qfile.cpp
+++ b/tests/auto/qfile/tst_qfile.cpp
@@ -129,6 +129,8 @@ private slots:
void readLine();
void readLine2();
void readLineNullInLine();
+ void readAll_data();
+ void readAll();
void readAllStdin();
void readLineStdin();
void readLineStdin_lineByLine();
@@ -752,6 +754,45 @@ void tst_QFile::readLineNullInLine()
QCOMPARE(file.readLine(), QByteArray());
}
+void tst_QFile::readAll_data()
+{
+ QTest::addColumn<bool>("textMode");
+ QTest::addColumn<QString>("fileName");
+ QTest::newRow( "TextMode unixfile" ) << true << SRCDIR "testfile.txt";
+ QTest::newRow( "BinaryMode unixfile" ) << false << SRCDIR "testfile.txt";
+ QTest::newRow( "TextMode dosfile" ) << true << SRCDIR "dosfile.txt";
+ QTest::newRow( "BinaryMode dosfile" ) << false << SRCDIR "dosfile.txt";
+ QTest::newRow( "TextMode bigfile" ) << true << SRCDIR "tst_qfile.cpp";
+ QTest::newRow( "BinaryMode bigfile" ) << false << SRCDIR "tst_qfile.cpp";
+ QVERIFY(QFile(SRCDIR "tst_qfile.cpp").size() > 64*1024);
+}
+
+void tst_QFile::readAll()
+{
+ QFETCH( bool, textMode );
+ QFETCH( QString, fileName );
+
+ QFile file(fileName);
+ if (textMode)
+ QVERIFY(file.open(QFile::Text | QFile::ReadOnly));
+ else
+ QVERIFY(file.open(QFile::ReadOnly));
+
+ QByteArray a = file.readAll();
+ file.reset();
+ QVERIFY(file.pos() == 0);
+
+ QVERIFY(file.bytesAvailable() > 7);
+ QByteArray b = file.read(1);
+ char x;
+ file.getChar(&x);
+ b.append(x);
+ b.append(file.read(5));
+ b.append(file.readAll());
+
+ QCOMPARE(a, b);
+}
+
void tst_QFile::readAllStdin()
{
#if defined(Q_OS_WINCE) || defined(Q_OS_SYMBIAN)
diff --git a/tests/auto/qfiledialog/tst_qfiledialog.cpp b/tests/auto/qfiledialog/tst_qfiledialog.cpp
index 2f9410b..220e1d1 100644
--- a/tests/auto/qfiledialog/tst_qfiledialog.cpp
+++ b/tests/auto/qfiledialog/tst_qfiledialog.cpp
@@ -949,6 +949,7 @@ void tst_QFiledialog::selectFiles()
QLineEdit *lineEdit = qFindChild<QLineEdit*>(dialog, "fileNameEdit");
QVERIFY(lineEdit);
QCOMPARE(lineEdit->text(),QLatin1String("blah"));
+ delete dialog;
}
void tst_QFiledialog::viewMode()
diff --git a/tests/auto/qfiledialog2/tst_qfiledialog2.cpp b/tests/auto/qfiledialog2/tst_qfiledialog2.cpp
index 83ddd39..c3f88c4 100644
--- a/tests/auto/qfiledialog2/tst_qfiledialog2.cpp
+++ b/tests/auto/qfiledialog2/tst_qfiledialog2.cpp
@@ -130,6 +130,8 @@ private slots:
void task259105_filtersCornerCases();
void QTBUG4419_lineEditSelectAll();
+ void QTBUG6558_showDirsOnly();
+ void QTBUG4842_selectFilterWithHideNameFilterDetails();
private:
QByteArray userSettings;
@@ -1040,5 +1042,111 @@ void tst_QFiledialog::QTBUG4419_lineEditSelectAll()
QCOMPARE(tempPath + QChar('/') + lineEdit->selectedText(), t->fileName());
}
+void tst_QFiledialog::QTBUG6558_showDirsOnly()
+{
+ const QString tempPath = QDir::tempPath();
+ QDir dirTemp(tempPath);
+ const QString tempName = QLatin1String("showDirsOnly.") + QString::number(qrand());
+ dirTemp.mkdir(tempName);
+ dirTemp.cd(tempName);
+ QTRY_VERIFY(dirTemp.exists());
+
+ const QString dirPath = dirTemp.absolutePath();
+ QDir dir(dirPath);
+
+ //We create two dirs
+ dir.mkdir("a");
+ dir.mkdir("b");
+
+ //Create a file
+ QFile tempFile(dirPath + "/plop.txt");
+ tempFile.open(QIODevice::WriteOnly | QIODevice::Text);
+ QTextStream out(&tempFile);
+ out << "The magic number is: " << 49 << "\n";
+ tempFile.close();
+
+ QNonNativeFileDialog fd(0, "TestFileDialog");
+
+ fd.setDirectory(dir.absolutePath());
+ fd.setViewMode(QFileDialog::List);
+ fd.setAcceptMode(QFileDialog::AcceptSave);
+ fd.setOption(QFileDialog::ShowDirsOnly, true);
+ fd.show();
+
+ QApplication::setActiveWindow(&fd);
+ QTest::qWaitForWindowShown(&fd);
+ QTRY_COMPARE(fd.isVisible(), true);
+ QTRY_COMPARE(QApplication::activeWindow(), static_cast<QWidget*>(&fd));
+
+ QFileSystemModel *model = qFindChild<QFileSystemModel*>(&fd, "qt_filesystem_model");
+ QTRY_COMPARE(model->rowCount(model->index(dir.absolutePath())), 2);
+
+ fd.setOption(QFileDialog::ShowDirsOnly, false);
+ QTRY_COMPARE(model->rowCount(model->index(dir.absolutePath())), 3);
+
+ fd.setOption(QFileDialog::ShowDirsOnly, true);
+ QTRY_COMPARE(model->rowCount(model->index(dir.absolutePath())), 2);
+
+ fd.setFileMode(QFileDialog::DirectoryOnly);
+ QTRY_COMPARE(model->rowCount(model->index(dir.absolutePath())), 2);
+ QTRY_COMPARE(bool(fd.options() & QFileDialog::ShowDirsOnly), true);
+
+ fd.setFileMode(QFileDialog::AnyFile);
+ QTRY_COMPARE(model->rowCount(model->index(dir.absolutePath())), 3);
+ QTRY_COMPARE(bool(fd.options() & QFileDialog::ShowDirsOnly), false);
+
+ fd.setDirectory(QDir::homePath());
+
+ //We remove the dirs
+ dir.rmdir("a");
+ dir.rmdir("b");
+
+ //we delete the file
+ tempFile.remove();
+
+ dirTemp.cdUp();
+ dirTemp.rmdir(tempName);
+}
+
+void tst_QFiledialog::QTBUG4842_selectFilterWithHideNameFilterDetails()
+{
+ QStringList filtersStr;
+ filtersStr << "Images (*.png *.xpm *.jpg)" << "Text files (*.txt)" << "XML files (*.xml)";
+ QString chosenFilterString("Text files (*.txt)");
+
+ QNonNativeFileDialog fd(0, "TestFileDialog");
+ fd.setAcceptMode(QFileDialog::AcceptSave);
+ fd.setOption(QFileDialog::HideNameFilterDetails, true);
+ fd.setNameFilters(filtersStr);
+ fd.selectNameFilter(chosenFilterString);
+ fd.show();
+
+ QApplication::setActiveWindow(&fd);
+ QTest::qWaitForWindowShown(&fd);
+ QTRY_COMPARE(fd.isVisible(), true);
+ QTRY_COMPARE(QApplication::activeWindow(), static_cast<QWidget*>(&fd));
+
+ QComboBox *filters = qFindChild<QComboBox*>(&fd, "fileTypeCombo");
+ //We compare the current combobox text with the stripped version
+ QCOMPARE(filters->currentText(), QString("Text files"));
+
+ QNonNativeFileDialog fd2(0, "TestFileDialog");
+ fd2.setAcceptMode(QFileDialog::AcceptSave);
+ fd2.setOption(QFileDialog::HideNameFilterDetails, false);
+ fd2.setNameFilters(filtersStr);
+ fd2.selectNameFilter(chosenFilterString);
+ fd2.show();
+
+ QApplication::setActiveWindow(&fd2);
+ QTest::qWaitForWindowShown(&fd2);
+ QTRY_COMPARE(fd2.isVisible(), true);
+ QTRY_COMPARE(QApplication::activeWindow(), static_cast<QWidget*>(&fd2));
+
+ QComboBox *filters2 = qFindChild<QComboBox*>(&fd2, "fileTypeCombo");
+ //We compare the current combobox text with the non stripped version
+ QCOMPARE(filters2->currentText(), chosenFilterString);
+
+}
+
QTEST_MAIN(tst_QFiledialog)
#include "tst_qfiledialog2.moc"
diff --git a/tests/auto/qfontcombobox/tst_qfontcombobox.cpp b/tests/auto/qfontcombobox/tst_qfontcombobox.cpp
index 657be06..73dfe076 100644
--- a/tests/auto/qfontcombobox/tst_qfontcombobox.cpp
+++ b/tests/auto/qfontcombobox/tst_qfontcombobox.cpp
@@ -123,9 +123,11 @@ void tst_QFontComboBox::currentFont_data()
QTest::addColumn<QFont>("currentFont");
// Normalize the names
QFont defaultFont;
+ QFontInfo fi(defaultFont);
+ defaultFont = QFont(fi.family()); // make sure we have a real font name and not something like 'Sans Serif'.
QTest::newRow("default") << defaultFont;
defaultFont.setPointSize(defaultFont.pointSize() + 10);
- QTest::newRow("default") << defaultFont;
+ QTest::newRow("default2") << defaultFont;
QFontDatabase db;
QStringList list = db.families();
for (int i = 0; i < list.count(); ++i) {
diff --git a/tests/auto/qftp/tst_qftp.cpp b/tests/auto/qftp/tst_qftp.cpp
index 27c2e13..9c1670d 100644
--- a/tests/auto/qftp/tst_qftp.cpp
+++ b/tests/auto/qftp/tst_qftp.cpp
@@ -51,9 +51,6 @@
#include <stdlib.h>
#include <QNetworkProxy>
-#ifndef TEST_QNETWORK_PROXY
-#define TEST_QNETWORK_PROXY
-#endif
#include "../network-settings.h"
//TESTED_CLASS=
@@ -202,11 +199,9 @@ void tst_QFtp::initTestCase_data()
QTest::addColumn<int>("proxyType");
QTest::newRow("WithoutProxy") << false << 0;
-#ifdef TEST_QNETWORK_PROXY
QTest::newRow("WithSocks5Proxy") << true << int(QNetworkProxy::Socks5Proxy);
//### doesn't work well yet.
//QTest::newRow("WithHttpProxy") << true << int(QNetworkProxy::HttpProxy);
-#endif
}
void tst_QFtp::initTestCase()
diff --git a/tests/auto/qgl/tst_qgl.cpp b/tests/auto/qgl/tst_qgl.cpp
index 7cda35d..695f7ee 100644
--- a/tests/auto/qgl/tst_qgl.cpp
+++ b/tests/auto/qgl/tst_qgl.cpp
@@ -1865,17 +1865,12 @@ Q_GLOBAL_STATIC_WITH_ARGS(QGLContextResource, qt_shared_test, (qt_shared_test_fr
void tst_QGL::shareRegister()
{
#ifdef QT_BUILD_INTERNAL
- QGLShareRegister *shareReg = qgl_share_reg();
- QVERIFY(shareReg != 0);
-
// Create a context.
QGLWidget *glw1 = new QGLWidget();
glw1->makeCurrent();
// Nothing should be sharing with glw1's context yet.
- QList<const QGLContext *> list;
- list = shareReg->shares(glw1->context());
- QCOMPARE(list.size(), 0);
+ QVERIFY(!glw1->isSharing());
// Create a guard for the first context.
QGLSharedResourceGuard guard(glw1->context());
@@ -1908,16 +1903,6 @@ void tst_QGL::shareRegister()
QVERIFY(guard.context() == glw1->context());
QVERIFY(guard.id() == 3);
- // Now there are two items in the share lists.
- list = shareReg->shares(glw1->context());
- QCOMPARE(list.size(), 2);
- QVERIFY(list.contains(glw1->context()));
- QVERIFY(list.contains(glw2->context()));
- list = shareReg->shares(glw2->context());
- QCOMPARE(list.size(), 2);
- QVERIFY(list.contains(glw1->context()));
- QVERIFY(list.contains(glw2->context()));
-
// Check the sharing relationships.
QVERIFY(QGLContext::areSharing(glw1->context(), glw1->context()));
QVERIFY(QGLContext::areSharing(glw2->context(), glw2->context()));
@@ -1943,18 +1928,6 @@ void tst_QGL::shareRegister()
QVERIFY(qt_shared_test()->value(glw2->context()) == res1);
QVERIFY(qt_shared_test()->value(glw3->context()) == res3);
- // First two should still be sharing, but third is in its own list.
- list = shareReg->shares(glw1->context());
- QCOMPARE(list.size(), 2);
- QVERIFY(list.contains(glw1->context()));
- QVERIFY(list.contains(glw2->context()));
- list = shareReg->shares(glw2->context());
- QCOMPARE(list.size(), 2);
- QVERIFY(list.contains(glw1->context()));
- QVERIFY(list.contains(glw2->context()));
- list = shareReg->shares(glw3->context());
- QCOMPARE(list.size(), 0);
-
// Check the sharing relationships again.
QVERIFY(QGLContext::areSharing(glw1->context(), glw1->context()));
QVERIFY(QGLContext::areSharing(glw2->context(), glw2->context()));
@@ -1992,10 +1965,6 @@ void tst_QGL::shareRegister()
QVERIFY(guard3.context() == glw3->context());
QVERIFY(guard3.id() == 5);
- // Re-check the share list for the second context (should be empty now).
- list = shareReg->shares(glw2->context());
- QCOMPARE(list.size(), 0);
-
// Clean up and check that the resources are properly deleted.
delete glw2;
QCOMPARE(tst_QGLResource::deletions, 1);
diff --git a/tests/auto/qgraphicsgridlayout/tst_qgraphicsgridlayout.cpp b/tests/auto/qgraphicsgridlayout/tst_qgraphicsgridlayout.cpp
index cd1eedd..3d95f92 100644
--- a/tests/auto/qgraphicsgridlayout/tst_qgraphicsgridlayout.cpp
+++ b/tests/auto/qgraphicsgridlayout/tst_qgraphicsgridlayout.cpp
@@ -108,6 +108,157 @@ private slots:
void task236367_maxSizeHint();
};
+class RectWidget : public QGraphicsWidget
+{
+public:
+ RectWidget(QGraphicsItem *parent = 0) : QGraphicsWidget(parent){}
+
+ void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget)
+ {
+ Q_UNUSED(option);
+ Q_UNUSED(widget);
+ painter->drawRoundRect(rect());
+ painter->drawLine(rect().topLeft(), rect().bottomRight());
+ painter->drawLine(rect().bottomLeft(), rect().topRight());
+ }
+
+ QSizeF sizeHint(Qt::SizeHint which, const QSizeF &constraint = QSizeF()) const
+ {
+ if (m_sizeHints[which].isValid()) {
+ return m_sizeHints[which];
+ }
+ return QGraphicsWidget::sizeHint(which, constraint);
+ }
+
+ void setSizeHint(Qt::SizeHint which, const QSizeF &size) {
+ m_sizeHints[which] = size;
+ updateGeometry();
+ }
+
+ QSizeF m_sizeHints[Qt::NSizeHints];
+};
+
+struct ItemDesc
+{
+ ItemDesc(int row, int col)
+ : m_pos(qMakePair(row, col)),
+ m_rowSpan(1),
+ m_colSpan(1),
+ m_sizePolicy(QSizePolicy(QSizePolicy::Preferred, QSizePolicy::Preferred)),
+ m_align(0)
+ {
+ }
+
+ ItemDesc &rowSpan(int span) {
+ m_rowSpan = span;
+ return (*this);
+ }
+
+ ItemDesc &colSpan(int span) {
+ m_colSpan = span;
+ return (*this);
+ }
+
+ ItemDesc &sizePolicy(const QSizePolicy &sp) {
+ m_sizePolicy = sp;
+ return (*this);
+ }
+
+ ItemDesc &sizePolicy(QSizePolicy::Policy horAndVer) {
+ m_sizePolicy = QSizePolicy(horAndVer, horAndVer);
+ return (*this);
+ }
+
+ ItemDesc &sizePolicyH(QSizePolicy::Policy hor) {
+ m_sizePolicy.setHorizontalPolicy(hor);
+ return (*this);
+ }
+
+ ItemDesc &sizePolicyV(QSizePolicy::Policy ver) {
+ m_sizePolicy.setVerticalPolicy(ver);
+ return (*this);
+ }
+
+ ItemDesc &sizePolicy(QSizePolicy::Policy hor, QSizePolicy::Policy ver) {
+ m_sizePolicy = QSizePolicy(hor, ver);
+ return (*this);
+ }
+
+ ItemDesc &sizeHint(Qt::SizeHint which, const QSizeF &sh) {
+ m_sizeHints[which] = sh;
+ return (*this);
+ }
+
+ ItemDesc &preferredSizeHint(const QSizeF &sh) {
+ m_sizeHints[Qt::PreferredSize] = sh;
+ return (*this);
+ }
+
+ ItemDesc &minSize(const QSizeF &sz) {
+ m_sizes[Qt::MinimumSize] = sz;
+ return (*this);
+ }
+ ItemDesc &preferredSize(const QSizeF &sz) {
+ m_sizes[Qt::PreferredSize] = sz;
+ return (*this);
+ }
+ ItemDesc &maxSize(const QSizeF &sz) {
+ m_sizes[Qt::MaximumSize] = sz;
+ return (*this);
+ }
+
+ ItemDesc &alignment(Qt::Alignment alignment) {
+ m_align = alignment;
+ return (*this);
+ }
+
+ void apply(QGraphicsGridLayout *layout, QGraphicsWidget *item) {
+ item->setSizePolicy(m_sizePolicy);
+ for (int i = 0; i < Qt::NSizeHints; ++i) {
+ if (!m_sizes[i].isValid())
+ continue;
+ switch ((Qt::SizeHint)i) {
+ case Qt::MinimumSize:
+ item->setMinimumSize(m_sizes[i]);
+ break;
+ case Qt::PreferredSize:
+ item->setPreferredSize(m_sizes[i]);
+ break;
+ case Qt::MaximumSize:
+ item->setMaximumSize(m_sizes[i]);
+ break;
+ default:
+ qWarning("not implemented");
+ break;
+ }
+ }
+ layout->addItem(item, m_pos.first, m_pos.second, m_rowSpan, m_colSpan);
+ layout->setAlignment(item, m_align);
+ }
+
+ void apply(QGraphicsGridLayout *layout, RectWidget *item) {
+ for (int i = 0; i < Qt::NSizeHints; ++i)
+ item->setSizeHint((Qt::SizeHint)i, m_sizeHints[i]);
+ apply(layout, static_cast<QGraphicsWidget*>(item));
+ }
+
+//private:
+ QPair<int,int> m_pos; // row,col
+ int m_rowSpan;
+ int m_colSpan;
+ QSizePolicy m_sizePolicy;
+ QSizeF m_sizeHints[Qt::NSizeHints];
+ QSizeF m_sizes[Qt::NSizeHints];
+ Qt::Alignment m_align;
+};
+
+typedef QList<ItemDesc> ItemList;
+Q_DECLARE_METATYPE(ItemList);
+
+typedef QList<QSizeF> SizeList;
+Q_DECLARE_METATYPE(SizeList);
+
+
// This will be called before the first test function is executed.
// It is only called once.
void tst_QGraphicsGridLayout::initTestCase()
@@ -190,36 +341,6 @@ void tst_QGraphicsGridLayout::qgraphicsgridlayout()
layout.verticalSpacing();
}
-class RectWidget : public QGraphicsWidget
-{
-public:
- RectWidget(QGraphicsItem *parent = 0) : QGraphicsWidget(parent){}
-
- void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget)
- {
- Q_UNUSED(option);
- Q_UNUSED(widget);
- painter->drawRoundRect(rect());
- painter->drawLine(rect().topLeft(), rect().bottomRight());
- painter->drawLine(rect().bottomLeft(), rect().topRight());
- }
-
- QSizeF sizeHint(Qt::SizeHint which, const QSizeF &constraint = QSizeF()) const
- {
- if (m_sizeHints[which].isValid()) {
- return m_sizeHints[which];
- }
- return QGraphicsWidget::sizeHint(which, constraint);
- }
-
- void setSizeHint(Qt::SizeHint which, const QSizeF &size) {
- m_sizeHints[which] = size;
- updateGeometry();
- }
-
- QSizeF m_sizeHints[Qt::NSizeHints];
-};
-
static void populateLayout(QGraphicsGridLayout *gridLayout, int width, int height)
{
for (int y = 0; y < height; ++y) {
@@ -1144,7 +1265,7 @@ void tst_QGraphicsGridLayout::setColumnSpacing()
}
void tst_QGraphicsGridLayout::setGeometry_data()
-{
+{
QTest::addColumn<QRectF>("rect");
QTest::newRow("null") << QRectF();
QTest::newRow("normal") << QRectF(0,0, 50, 50);
@@ -1233,28 +1354,84 @@ void tst_QGraphicsGridLayout::setSpacing()
void tst_QGraphicsGridLayout::sizeHint_data()
{
+ QTest::addColumn<ItemList>("itemDescriptions");
+ QTest::addColumn<QSizeF>("expectedMinimumSizeHint");
+ QTest::addColumn<QSizeF>("expectedPreferredSizeHint");
+ QTest::addColumn<QSizeF>("expectedMaximumSizeHint");
+
+ QTest::newRow("rowSpan_larger_than_rows") << (ItemList()
+ << ItemDesc(0,0)
+ .minSize(QSizeF(50,300))
+ .maxSize(QSizeF(50,300))
+ .rowSpan(2)
+ << ItemDesc(0,1)
+ .minSize(QSizeF(50,0))
+ .preferredSize(QSizeF(50,50))
+ .maxSize(QSize(50, 1000))
+ << ItemDesc(1,1)
+ .minSize(QSizeF(50,0))
+ .preferredSize(QSizeF(50,50))
+ .maxSize(QSize(50, 1000))
+ )
+ << QSizeF(100, 300)
+ << QSizeF(100, 300)
+ << QSizeF(100, 2000);
+
+ QTest::newRow("rowSpan_smaller_than_rows") << (ItemList()
+ << ItemDesc(0,0)
+ .minSize(QSizeF(50, 0))
+ .preferredSize(QSizeF(50, 50))
+ .maxSize(QSizeF(50, 300))
+ .rowSpan(2)
+ << ItemDesc(0,1)
+ .minSize(QSizeF(50, 50))
+ .preferredSize(QSizeF(50, 50))
+ .maxSize(QSize(50, 50))
+ << ItemDesc(1,1)
+ .minSize(QSizeF(50, 50))
+ .preferredSize(QSizeF(50, 50))
+ .maxSize(QSize(50, 50))
+ )
+ << QSizeF(100, 100)
+ << QSizeF(100, 100)
+ << QSizeF(100, 100);
- /*
- QTest::addColumn<Qt::SizeHint>("which");
- QTest::addColumn<QSizeF>("constraint");
- QTest::addColumn<QSizeF>("sizeHint");
- QTest::newRow("null") << 0;
- */
}
// public QSizeF sizeHint(Qt::SizeHint which, QSizeF const& constraint = QSizeF()) const
void tst_QGraphicsGridLayout::sizeHint()
{
- /*
- QFETCH(Qt::SizeHint, which);
- QFETCH(QSizeF, constraint);
- QFETCH(QSizeF, sizeHint);
+ QFETCH(ItemList, itemDescriptions);
+ QFETCH(QSizeF, expectedMinimumSizeHint);
+ QFETCH(QSizeF, expectedPreferredSizeHint);
+ QFETCH(QSizeF, expectedMaximumSizeHint);
- QGraphicsGridLayout layout;
+ QGraphicsScene scene;
+ QGraphicsView view(&scene);
+ QGraphicsWidget *widget = new QGraphicsWidget(0, Qt::Window);
+ QGraphicsGridLayout *layout = new QGraphicsGridLayout;
+ scene.addItem(widget);
+ widget->setLayout(layout);
+ layout->setContentsMargins(0, 0, 0, 0);
+ layout->setSpacing(0.0);
+ widget->setContentsMargins(0, 0, 0, 0);
+
+ int i;
+ for (i = 0; i < itemDescriptions.count(); ++i) {
+ ItemDesc desc = itemDescriptions.at(i);
+ RectWidget *item = new RectWidget(widget);
+ desc.apply(layout, item);
+ }
+
+ QApplication::sendPostedEvents(0, 0);
+
+ widget->show();
+ view.show();
+ view.resize(400,300);
+ QCOMPARE(layout->sizeHint(Qt::MinimumSize), expectedMinimumSizeHint);
+ QCOMPARE(layout->sizeHint(Qt::PreferredSize), expectedPreferredSizeHint);
+ QCOMPARE(layout->sizeHint(Qt::MaximumSize), expectedMaximumSizeHint);
- layout.sizeHint();
- */
- QSKIP("Test unimplemented", SkipSingle);
}
void tst_QGraphicsGridLayout::verticalSpacing_data()
@@ -1373,121 +1550,6 @@ void tst_QGraphicsGridLayout::removeLayout()
QCOMPARE(pushButton->geometry(), r2);
}
-struct ItemDesc
-{
- ItemDesc(int row, int col)
- : m_pos(qMakePair(row, col)),
- m_rowSpan(1),
- m_colSpan(1),
- m_sizePolicy(QSizePolicy(QSizePolicy::Preferred, QSizePolicy::Preferred)),
- m_align(0)
- {
- }
-
- ItemDesc &rowSpan(int span) {
- m_rowSpan = span;
- return (*this);
- }
-
- ItemDesc &colSpan(int span) {
- m_colSpan = span;
- return (*this);
- }
-
- ItemDesc &sizePolicy(const QSizePolicy &sp) {
- m_sizePolicy = sp;
- return (*this);
- }
-
- ItemDesc &sizePolicy(QSizePolicy::Policy horAndVer) {
- m_sizePolicy = QSizePolicy(horAndVer, horAndVer);
- return (*this);
- }
-
- ItemDesc &sizePolicyH(QSizePolicy::Policy hor) {
- m_sizePolicy.setHorizontalPolicy(hor);
- return (*this);
- }
-
- ItemDesc &sizePolicyV(QSizePolicy::Policy ver) {
- m_sizePolicy.setVerticalPolicy(ver);
- return (*this);
- }
-
- ItemDesc &sizePolicy(QSizePolicy::Policy hor, QSizePolicy::Policy ver) {
- m_sizePolicy = QSizePolicy(hor, ver);
- return (*this);
- }
-
- ItemDesc &sizeHint(Qt::SizeHint which, const QSizeF &sh) {
- m_sizeHints[which] = sh;
- return (*this);
- }
-
- ItemDesc &preferredSizeHint(const QSizeF &sh) {
- m_sizeHints[Qt::PreferredSize] = sh;
- return (*this);
- }
-
- ItemDesc &minSize(const QSizeF &sz) {
- m_sizes[Qt::MinimumSize] = sz;
- return (*this);
- }
- ItemDesc &preferredSize(const QSizeF &sz) {
- m_sizes[Qt::PreferredSize] = sz;
- return (*this);
- }
- ItemDesc &maxSize(const QSizeF &sz) {
- m_sizes[Qt::MaximumSize] = sz;
- return (*this);
- }
-
- ItemDesc &alignment(Qt::Alignment alignment) {
- m_align = alignment;
- return (*this);
- }
-
- void apply(QGraphicsGridLayout *layout, RectWidget *item) {
- item->setSizePolicy(m_sizePolicy);
- for (int i = 0; i < Qt::NSizeHints; ++i) {
- item->setSizeHint((Qt::SizeHint)i, m_sizeHints[i]);
- if (!m_sizes[i].isValid())
- continue;
- switch ((Qt::SizeHint)i) {
- case Qt::MinimumSize:
- item->setMinimumSize(m_sizes[i]);
- break;
- case Qt::PreferredSize:
- item->setPreferredSize(m_sizes[i]);
- break;
- case Qt::MaximumSize:
- item->setMaximumSize(m_sizes[i]);
- break;
- default:
- qWarning("not implemented");
- break;
- }
- }
- layout->addItem(item, m_pos.first, m_pos.second, m_rowSpan, m_colSpan);
- layout->setAlignment(item, m_align);
- }
-
-//private:
- QPair<int,int> m_pos; // row,col
- int m_rowSpan;
- int m_colSpan;
- QSizePolicy m_sizePolicy;
- QSizeF m_sizeHints[Qt::NSizeHints];
- QSizeF m_sizes[Qt::NSizeHints];
- Qt::Alignment m_align;
-};
-
-typedef QList<ItemDesc> ItemList;
-Q_DECLARE_METATYPE(ItemList);
-
-typedef QList<QSizeF> SizeList;
-Q_DECLARE_METATYPE(SizeList);
-
void tst_QGraphicsGridLayout::defaultStretchFactors_data()
{
QTest::addColumn<ItemList>("itemDescriptions");
diff --git a/tests/auto/qhttp/tst_qhttp.cpp b/tests/auto/qhttp/tst_qhttp.cpp
index b4b6ceb..92ab3d8 100644
--- a/tests/auto/qhttp/tst_qhttp.cpp
+++ b/tests/auto/qhttp/tst_qhttp.cpp
@@ -57,9 +57,6 @@
# include <qsslsocket.h>
#endif
-#ifndef TEST_QNETWORK_PROXY
-#define TEST_QNETWORK_PROXY
-#endif
#include "../network-settings.h"
//TESTED_CLASS=
@@ -198,9 +195,7 @@ void tst_QHttp::initTestCase_data()
QTest::addColumn<int>("proxyType");
QTest::newRow("WithoutProxy") << false << 0;
-#ifdef TEST_QNETWORK_PROXY
QTest::newRow("WithSocks5Proxy") << true << int(QNetworkProxy::Socks5Proxy);
-#endif
}
void tst_QHttp::initTestCase()
diff --git a/tests/auto/qpauseanimation/tst_qpauseanimation.cpp b/tests/auto/qpauseanimation/tst_qpauseanimation.cpp
index 4d0a7a7..a421228 100644
--- a/tests/auto/qpauseanimation/tst_qpauseanimation.cpp
+++ b/tests/auto/qpauseanimation/tst_qpauseanimation.cpp
@@ -99,7 +99,7 @@ private slots:
void changeDirectionWhileRunning();
void noTimerUpdates_data();
void noTimerUpdates();
- void mulitplePauseAnimations();
+ void multiplePauseAnimations();
void pauseAndPropertyAnimations();
void pauseResume();
void sequentialPauseGroup();
@@ -169,7 +169,7 @@ void tst_QPauseAnimation::noTimerUpdates()
QCOMPARE(animation.m_updateCurrentTimeCount, 1 + loopCount);
}
-void tst_QPauseAnimation::mulitplePauseAnimations()
+void tst_QPauseAnimation::multiplePauseAnimations()
{
EnableConsistentTiming enabled;
diff --git a/tests/auto/qscriptable/tst_qscriptable.cpp b/tests/auto/qscriptable/tst_qscriptable.cpp
index c0945d8..7ed0a8a 100644
--- a/tests/auto/qscriptable/tst_qscriptable.cpp
+++ b/tests/auto/qscriptable/tst_qscriptable.cpp
@@ -332,7 +332,6 @@ void tst_QScriptable::thisObject()
{
QVERIFY(!m_scriptable.oofThisObject().isValid());
m_engine.evaluate("o.oof = 123");
- QEXPECT_FAIL("", "QTBUG-5749: Setter doesn't get called when it's in the prototype", Continue);
QVERIFY(m_scriptable.oofThisObject().strictlyEquals(m_engine.evaluate("o")));
}
{
diff --git a/tests/auto/qsqlquery/tst_qsqlquery.cpp b/tests/auto/qsqlquery/tst_qsqlquery.cpp
index 2a55c32..5b6da30 100644
--- a/tests/auto/qsqlquery/tst_qsqlquery.cpp
+++ b/tests/auto/qsqlquery/tst_qsqlquery.cpp
@@ -203,6 +203,8 @@ private slots:
void QTBUG_6421();
void QTBUG_6618_data() { generic_data("QODBC"); }
void QTBUG_6618();
+ void QTBUG_6852_data() { generic_data("QMYSQL"); }
+ void QTBUG_6852();
private:
// returns all database connections
@@ -2985,5 +2987,41 @@ void tst_QSqlQuery::QTBUG_6618()
QVERIFY(q.lastError().text().contains(errorString));
}
+void tst_QSqlQuery::QTBUG_6852()
+{
+ QFETCH( QString, dbName );
+ QSqlDatabase db = QSqlDatabase::database( dbName );
+ CHECK_DATABASE( db );
+ if ( tst_Databases::getMySqlVersion( db ).section( QChar('.'), 0, 0 ).toInt()<5 )
+ QSKIP( "Test requires MySQL >= 5.0", SkipSingle );
+
+ QSqlQuery q(db);
+ QString tableName(qTableName(QLatin1String("bug6421"))), procName(qTableName(QLatin1String("bug6421_proc")));
+
+ QVERIFY_SQL(q, exec("DROP PROCEDURE IF EXISTS "+procName));
+ tst_Databases::safeDropTable(db, tableName);
+ QVERIFY_SQL(q, exec("CREATE TABLE "+tableName+"(\n"
+ "MainKey INT NOT NULL,\n"
+ "OtherTextCol VARCHAR(45) NOT NULL,\n"
+ "PRIMARY KEY(`MainKey`))"));
+ QVERIFY_SQL(q, exec("INSERT INTO "+tableName+" VALUES(0, \"Disabled\")"));
+ QVERIFY_SQL(q, exec("INSERT INTO "+tableName+" VALUES(5, \"Error Only\")"));
+ QVERIFY_SQL(q, exec("INSERT INTO "+tableName+" VALUES(10, \"Enabled\")"));
+ QVERIFY_SQL(q, exec("INSERT INTO "+tableName+" VALUES(15, \"Always\")"));
+ QVERIFY_SQL(q, exec("CREATE PROCEDURE "+procName+"()\n"
+ "READS SQL DATA\n"
+ "BEGIN\n"
+ " SET @st = 'SELECT MainKey, OtherTextCol from "+tableName+"';\n"
+ " PREPARE stmt from @st;\n"
+ " EXECUTE stmt;\n"
+ "END;"));
+
+ QVERIFY_SQL(q, exec("CALL "+procName+"()"));
+ QVERIFY_SQL(q, next());
+ QCOMPARE(q.value(0).toInt(), 0);
+ QCOMPARE(q.value(1).toString(), QLatin1String("Disabled"));
+}
+
+
QTEST_MAIN( tst_QSqlQuery )
#include "tst_qsqlquery.moc"
diff --git a/tests/auto/qsslsocket/tst_qsslsocket.cpp b/tests/auto/qsslsocket/tst_qsslsocket.cpp
index 169a688..09c8c5f 100644
--- a/tests/auto/qsslsocket/tst_qsslsocket.cpp
+++ b/tests/auto/qsslsocket/tst_qsslsocket.cpp
@@ -51,13 +51,8 @@
#include <QtNetwork/qtcpserver.h>
#include <QtTest/QtTest>
-#ifndef TEST_QNETWORK_PROXY
-#define TEST_QNETWORK_PROXY
-#endif
-#ifdef TEST_QNETWORK_PROXY
#include <QNetworkProxy>
#include <QAuthenticator>
-#endif
#include "../network-settings.h"
@@ -253,7 +248,6 @@ void tst_QSslSocket::initTestCase_data()
QTest::addColumn<int>("proxyType");
QTest::newRow("WithoutProxy") << false << 0;
-#ifdef TEST_QNETWORK_PROXY
QTest::newRow("WithSocks5Proxy") << true << int(Socks5Proxy);
QTest::newRow("WithSocks5ProxyAuth") << true << int(Socks5Proxy | AuthBasic);
@@ -261,14 +255,12 @@ void tst_QSslSocket::initTestCase_data()
QTest::newRow("WithHttpProxyBasicAuth") << true << int(HttpProxy | AuthBasic);
// uncomment the line below when NTLM works
// QTest::newRow("WithHttpProxyNtlmAuth") << true << int(HttpProxy | AuthNtlm);
-#endif
}
void tst_QSslSocket::init()
{
QFETCH_GLOBAL(bool, setProxy);
if (setProxy) {
-#ifdef TEST_QNETWORK_PROXY
QFETCH_GLOBAL(int, proxyType);
QString fluke = QHostInfo::fromName(QtNetworkSettings::serverName()).addresses().first().toString();
QNetworkProxy proxy;
@@ -295,15 +287,12 @@ void tst_QSslSocket::init()
break;
}
QNetworkProxy::setApplicationProxy(proxy);
-#endif
}
}
void tst_QSslSocket::cleanup()
{
-#ifdef TEST_QNETWORK_PROXY
QNetworkProxy::setApplicationProxy(QNetworkProxy::DefaultProxy);
-#endif
}
#ifndef QT_NO_OPENSSL
diff --git a/tests/auto/qtcpserver/test/test.pro b/tests/auto/qtcpserver/test/test.pro
index bdeaa92..123c79e 100644
--- a/tests/auto/qtcpserver/test/test.pro
+++ b/tests/auto/qtcpserver/test/test.pro
@@ -32,7 +32,5 @@ QT = core network
MOC_DIR=tmp
-DEFINES += TEST_QNETWORK_PROXY
-
diff --git a/tests/auto/qtcpserver/tst_qtcpserver.cpp b/tests/auto/qtcpserver/tst_qtcpserver.cpp
index 8b86111..4567435 100644
--- a/tests/auto/qtcpserver/tst_qtcpserver.cpp
+++ b/tests/auto/qtcpserver/tst_qtcpserver.cpp
@@ -66,11 +66,9 @@
#include <qplatformdefs.h>
#include <qhostinfo.h>
-#ifdef TEST_QNETWORK_PROXY
-# include <QNetworkProxy>
+#include <QNetworkProxy>
Q_DECLARE_METATYPE(QNetworkProxy)
Q_DECLARE_METATYPE(QList<QNetworkProxy>)
-#endif
#include "../network-settings.h"
@@ -95,9 +93,6 @@ private slots:
void constructing();
void clientServerLoop();
void ipv6Server();
- void ipv4LoopbackPerformanceTest();
- void ipv6LoopbackPerformanceTest();
- void ipv4PerformanceTest();
void crashTests();
void maxPendingConnections();
void listenError();
@@ -106,12 +101,10 @@ private slots:
void listenWhileListening();
void addressReusable();
void setNewSocketDescriptorBlocking();
-#ifdef TEST_QNETWORK_PROXY
void invalidProxy_data();
void invalidProxy();
void proxyFactory_data();
void proxyFactory();
-#endif
};
// Testing get/set functions
@@ -143,29 +136,23 @@ void tst_QTcpServer::initTestCase_data()
QTest::addColumn<int>("proxyType");
QTest::newRow("WithoutProxy") << false << 0;
-#ifdef TEST_QNETWORK_PROXY
QTest::newRow("WithSocks5Proxy") << true << int(QNetworkProxy::Socks5Proxy);
-#endif
}
void tst_QTcpServer::init()
{
QFETCH_GLOBAL(bool, setProxy);
if (setProxy) {
-#ifdef TEST_QNETWORK_PROXY
QFETCH_GLOBAL(int, proxyType);
if (proxyType == QNetworkProxy::Socks5Proxy) {
QNetworkProxy::setApplicationProxy(QNetworkProxy(QNetworkProxy::Socks5Proxy, QtNetworkSettings::serverName(), 1080));
}
-#endif
}
}
void tst_QTcpServer::cleanup()
{
-#ifdef TEST_QNETWORK_PROXY
QNetworkProxy::setApplicationProxy(QNetworkProxy::DefaultProxy);
-#endif
}
//----------------------------------------------------------------------------------
@@ -258,159 +245,6 @@ void tst_QTcpServer::ipv6Server()
}
//----------------------------------------------------------------------------------
-void tst_QTcpServer::ipv4LoopbackPerformanceTest()
-{
- QFETCH_GLOBAL(bool, setProxy);
- if (setProxy)
- return;
-
- QTcpServer server;
- QVERIFY(server.listen(QHostAddress::LocalHost));
-
- QVERIFY(server.isListening());
-
- QTcpSocket clientA;
- clientA.connectToHost(QHostAddress::LocalHost, server.serverPort());
- QVERIFY(clientA.waitForConnected(5000));
- QVERIFY(clientA.state() == QAbstractSocket::ConnectedState);
-
- QVERIFY(server.waitForNewConnection());
- QTcpSocket *clientB = server.nextPendingConnection();
- QVERIFY(clientB);
-
- QByteArray buffer(16384, '@');
- QTime stopWatch;
- stopWatch.start();
- qlonglong totalWritten = 0;
- while (stopWatch.elapsed() < 5000) {
- QVERIFY(clientA.write(buffer.data(), buffer.size()) > 0);
- clientA.flush();
- totalWritten += buffer.size();
- while (clientB->waitForReadyRead(100)) {
- if (clientB->bytesAvailable() == 16384)
- break;
- }
- clientB->read(buffer.data(), buffer.size());
- clientB->write(buffer.data(), buffer.size());
- clientB->flush();
- totalWritten += buffer.size();
- while (clientA.waitForReadyRead(100)) {
- if (clientA.bytesAvailable() == 16384)
- break;
- }
- clientA.read(buffer.data(), buffer.size());
- }
-
- qDebug("\t\t%s: %.1fMB/%.1fs: %.1fMB/s",
- server.serverAddress().toString().toLatin1().constData(),
- totalWritten / (1024.0 * 1024.0),
- stopWatch.elapsed() / 1000.0,
- (totalWritten / (stopWatch.elapsed() / 1000.0)) / (1024 * 1024));
-
- delete clientB;
-}
-
-//----------------------------------------------------------------------------------
-void tst_QTcpServer::ipv6LoopbackPerformanceTest()
-{
-#if defined(Q_OS_SYMBIAN)
- QSKIP("Symbian: IPv6 is not yet supported", SkipAll);
-#endif
- QTcpServer server;
- if (!server.listen(QHostAddress::LocalHostIPv6, 0)) {
- QVERIFY(server.serverError() == QAbstractSocket::UnsupportedSocketOperationError);
- } else {
- QTcpSocket clientA;
- clientA.connectToHost(server.serverAddress(), server.serverPort());
- QVERIFY(clientA.waitForConnected(5000));
-
- QVERIFY(server.waitForNewConnection(5000));
- QTcpSocket *clientB = server.nextPendingConnection();
- QVERIFY(clientB);
-
- QByteArray buffer(16384, '@');
- QTime stopWatch;
- stopWatch.start();
- qlonglong totalWritten = 0;
- while (stopWatch.elapsed() < 5000) {
- clientA.write(buffer.data(), buffer.size());
- clientA.flush();
- totalWritten += buffer.size();
- while (clientB->waitForReadyRead(100)) {
- if (clientB->bytesAvailable() == 16384)
- break;
- }
- clientB->read(buffer.data(), buffer.size());
- clientB->write(buffer.data(), buffer.size());
- clientB->flush();
- totalWritten += buffer.size();
- while (clientA.waitForReadyRead(100)) {
- if (clientA.bytesAvailable() == 16384)
- break;
- }
- clientA.read(buffer.data(), buffer.size());
- }
-
- qDebug("\t\t%s: %.1fMB/%.1fs: %.1fMB/s",
- server.serverAddress().toString().toLatin1().constData(),
- totalWritten / (1024.0 * 1024.0),
- stopWatch.elapsed() / 1000.0,
- (totalWritten / (stopWatch.elapsed() / 1000.0)) / (1024 * 1024));
- delete clientB;
- }
-}
-
-//----------------------------------------------------------------------------------
-void tst_QTcpServer::ipv4PerformanceTest()
-{
- QTcpSocket probeSocket;
- probeSocket.connectToHost(QtNetworkSettings::serverName(), 143);
- QVERIFY(probeSocket.waitForConnected(5000));
-
- QTcpServer server;
- QVERIFY(server.listen(probeSocket.localAddress(), 0));
-
- QTcpSocket clientA;
- clientA.connectToHost(server.serverAddress(), server.serverPort());
- QVERIFY(clientA.waitForConnected(5000));
-
- QVERIFY(server.waitForNewConnection(5000));
- QTcpSocket *clientB = server.nextPendingConnection();
- QVERIFY(clientB);
-
- QByteArray buffer(16384, '@');
- QTime stopWatch;
- stopWatch.start();
- qlonglong totalWritten = 0;
- while (stopWatch.elapsed() < 5000) {
- qlonglong writtenA = clientA.write(buffer.data(), buffer.size());
- clientA.flush();
- totalWritten += buffer.size();
- while (clientB->waitForReadyRead(100)) {
- if (clientB->bytesAvailable() == writtenA)
- break;
- }
- clientB->read(buffer.data(), buffer.size());
- qlonglong writtenB = clientB->write(buffer.data(), buffer.size());
- clientB->flush();
- totalWritten += buffer.size();
- while (clientA.waitForReadyRead(100)) {
- if (clientA.bytesAvailable() == writtenB)
- break;
- }
- clientA.read(buffer.data(), buffer.size());
- }
-
- qDebug("\t\t%s: %.1fMB/%.1fs: %.1fMB/s",
- probeSocket.localAddress().toString().toLatin1().constData(),
- totalWritten / (1024.0 * 1024.0),
- stopWatch.elapsed() / 1000.0,
- (totalWritten / (stopWatch.elapsed() / 1000.0)) / (1024 * 1024));
-
- delete clientB;
-}
-
-//----------------------------------------------------------------------------------
void tst_QTcpServer::crashTests()
{
QTcpServer server;
@@ -423,12 +257,10 @@ void tst_QTcpServer::maxPendingConnections()
{
QFETCH_GLOBAL(bool, setProxy);
if (setProxy) {
-#ifdef TEST_QNETWORK_PROXY
QFETCH_GLOBAL(int, proxyType);
if (proxyType == QNetworkProxy::Socks5Proxy) {
QSKIP("With socks5 only 1 connection is allowed ever", SkipAll);
}
-#endif
}
//### sees to fail sometimes ... a timing issue with the test on windows
QTcpServer server;
@@ -464,12 +296,10 @@ void tst_QTcpServer::listenError()
{
QFETCH_GLOBAL(bool, setProxy);
if (setProxy) {
-#ifdef TEST_QNETWORK_PROXY
QFETCH_GLOBAL(int, proxyType);
if (proxyType == QNetworkProxy::Socks5Proxy) {
QSKIP("With socks5 we can not make hard requirements on the address or port", SkipAll);
}
-#endif
}
QTcpServer server;
QVERIFY(!server.listen(QHostAddress("1.2.3.4"), 0));
@@ -513,12 +343,10 @@ void tst_QTcpServer::waitForConnectionTest()
QFETCH_GLOBAL(bool, setProxy);
if (setProxy) {
-#ifdef TEST_QNETWORK_PROXY
QFETCH_GLOBAL(int, proxyType);
if (proxyType == QNetworkProxy::Socks5Proxy) {
QSKIP("Localhost servers don't work well with SOCKS5", SkipAll);
}
-#endif
}
QTcpSocket findLocalIpSocket;
@@ -624,12 +452,10 @@ void tst_QTcpServer::addressReusable()
QFETCH_GLOBAL(bool, setProxy);
if (setProxy) {
-#ifdef TEST_QNETWORK_PROXY
QFETCH_GLOBAL(int, proxyType);
if (proxyType == QNetworkProxy::Socks5Proxy) {
QSKIP("With socks5 this test does not make senans at the momment", SkipAll);
}
-#endif
}
#if defined(Q_OS_WINCE) || defined(Q_OS_SYMBIAN)
QString signalName = QString::fromLatin1("/test_signal.txt");
@@ -667,12 +493,10 @@ void tst_QTcpServer::setNewSocketDescriptorBlocking()
{
QFETCH_GLOBAL(bool, setProxy);
if (setProxy) {
-#ifdef TEST_QNETWORK_PROXY
QFETCH_GLOBAL(int, proxyType);
if (proxyType == QNetworkProxy::Socks5Proxy) {
QSKIP("With socks5 we can not make the socket descripter blocking", SkipAll);
}
-#endif
}
SeverWithBlockingSockets server;
QVERIFY(server.listen());
@@ -683,7 +507,6 @@ void tst_QTcpServer::setNewSocketDescriptorBlocking()
QVERIFY(server.ok);
}
-#ifdef TEST_QNETWORK_PROXY
void tst_QTcpServer::invalidProxy_data()
{
QTest::addColumn<int>("type");
@@ -838,7 +661,6 @@ void tst_QTcpServer::proxyFactory()
// Sometimes, error codes change for the better
QTEST(int(server.serverError()), "expectedError");
}
-#endif
QTEST_MAIN(tst_QTcpServer)
#include "tst_qtcpserver.moc"
diff --git a/tests/auto/qtcpsocket/test/test.pro b/tests/auto/qtcpsocket/test/test.pro
index 0f93def..c4369df 100644
--- a/tests/auto/qtcpsocket/test/test.pro
+++ b/tests/auto/qtcpsocket/test/test.pro
@@ -13,8 +13,6 @@ vxworks:QT -= gui
symbian: TARGET.EPOCHEAPSIZE="0x100 0x1000000"
-#DEFINES += TEST_QNETWORK_PROXY
-
TARGET = tst_qtcpsocket
win32 {
diff --git a/tests/auto/qtcpsocket/tst_qtcpsocket.cpp b/tests/auto/qtcpsocket/tst_qtcpsocket.cpp
index 863b8f5..c6d39ba 100644
--- a/tests/auto/qtcpsocket/tst_qtcpsocket.cpp
+++ b/tests/auto/qtcpsocket/tst_qtcpsocket.cpp
@@ -82,9 +82,6 @@
#include <QTime>
#include <QTimer>
#include <QDebug>
-#ifndef TEST_QNETWORK_PROXY
-#define TEST_QNETWORK_PROXY
-#endif
// RVCT compiles also unused inline methods
# include <QNetworkProxy>
@@ -194,12 +191,11 @@ private slots:
void increaseReadBufferSize();
void taskQtBug5799ConnectionErrorWaitForConnected();
void taskQtBug5799ConnectionErrorEventLoop();
-#ifdef TEST_QNETWORK_PROXY
+
void invalidProxy_data();
void invalidProxy();
void proxyFactory_data();
void proxyFactory();
-#endif
protected slots:
void nonBlockingIMAP_hostFound();
@@ -270,17 +266,15 @@ void tst_QTcpSocket::initTestCase_data()
qDebug() << QtNetworkSettings::serverName();
QTest::newRow("WithoutProxy") << false << 0 << false;
-#ifdef TEST_QNETWORK_PROXY
QTest::newRow("WithSocks5Proxy") << true << int(Socks5Proxy) << false;
QTest::newRow("WithSocks5ProxyAuth") << true << int(Socks5Proxy | AuthBasic) << false;
QTest::newRow("WithHttpProxy") << true << int(HttpProxy) << false;
QTest::newRow("WithHttpProxyBasicAuth") << true << int(HttpProxy | AuthBasic) << false;
// QTest::newRow("WithHttpProxyNtlmAuth") << true << int(HttpProxy | AuthNtlm) << false;
-#endif
+
#ifndef QT_NO_OPENSSL
QTest::newRow("WithoutProxy SSL") << false << 0 << true;
-#ifdef TEST_QNETWORK_PROXY
QTest::newRow("WithSocks5Proxy SSL") << true << int(Socks5Proxy) << true;
QTest::newRow("WithSocks5AuthProxy SSL") << true << int(Socks5Proxy | AuthBasic) << true;
@@ -288,14 +282,12 @@ void tst_QTcpSocket::initTestCase_data()
QTest::newRow("WithHttpProxyBasicAuth SSL") << true << int(HttpProxy | AuthBasic) << true;
// QTest::newRow("WithHttpProxyNtlmAuth SSL") << true << int(HttpProxy | AuthNtlm) << true;
#endif
-#endif
}
void tst_QTcpSocket::init()
{
QFETCH_GLOBAL(bool, setProxy);
if (setProxy) {
-#ifdef TEST_QNETWORK_PROXY
QFETCH_GLOBAL(int, proxyType);
QString fluke = QHostInfo::fromName(QtNetworkSettings::serverName()).addresses().first().toString();
QNetworkProxy proxy;
@@ -322,7 +314,6 @@ void tst_QTcpSocket::init()
break;
}
QNetworkProxy::setApplicationProxy(proxy);
-#endif
}
}
@@ -345,9 +336,7 @@ QTcpSocket *tst_QTcpSocket::newSocket() const
void tst_QTcpSocket::cleanup()
{
-#ifdef TEST_QNETWORK_PROXY
QNetworkProxy::setApplicationProxy(QNetworkProxy::DefaultProxy);
-#endif
}
void tst_QTcpSocket::proxyAuthenticationRequired(const QNetworkProxy &, QAuthenticator *auth)
@@ -1322,9 +1311,7 @@ void tst_QTcpSocket::synchronousApi()
void tst_QTcpSocket::dontCloseOnTimeout()
{
QTcpServer server;
-#ifdef TEST_QNETWORK_PROXY
server.setProxy(QNetworkProxy(QNetworkProxy::NoProxy));
-#endif
QVERIFY(server.listen());
QHostAddress serverAddress = QHostAddress::LocalHost;
@@ -1793,9 +1780,6 @@ void tst_QTcpSocket::readyReadSignalsAfterWaitForReadyRead()
QCOMPARE(readyReadSpy.count(), 1);
QString s = socket->readLine();
-#ifdef TEST_QNETWORK_PROXY
- QNetworkProxy::ProxyType proxyType = QNetworkProxy::applicationProxy().type();
-#endif
QCOMPARE(s.toLatin1().constData(), QtNetworkSettings::expectedReplyIMAP().constData());
QCOMPARE(socket->bytesAvailable(), qint64(0));
@@ -2252,9 +2236,6 @@ void tst_QTcpSocket::taskQtBug5799ConnectionErrorEventLoop()
QString("Could not reach server: %1").arg(socket.errorString()).toLocal8Bit());
}
-
-
-#ifdef TEST_QNETWORK_PROXY
void tst_QTcpSocket::invalidProxy_data()
{
QTest::addColumn<int>("type");
@@ -2433,7 +2414,6 @@ void tst_QTcpSocket::proxyFactory()
delete socket;
}
-#endif
QTEST_MAIN(tst_QTcpSocket)
diff --git a/tests/auto/qtextodfwriter/tst_qtextodfwriter.cpp b/tests/auto/qtextodfwriter/tst_qtextodfwriter.cpp
index cfcbcfb..a61de99 100644
--- a/tests/auto/qtextodfwriter/tst_qtextodfwriter.cpp
+++ b/tests/auto/qtextodfwriter/tst_qtextodfwriter.cpp
@@ -175,6 +175,10 @@ void tst_QTextOdfWriter::testWriteStyle1_data()
"<style:style style:name=\"c4\" style:family=\"text\"><style:text-properties fo:font-style=\"italic\" fo:font-family=\"Sans\"/></style:style>";
QTest::newRow("bold+italic") << text1 << 25 <<
"<style:style style:name=\"c4\" style:family=\"text\"><style:text-properties fo:font-style=\"italic\" fo:font-weight=\"bold\" fo:font-family=\"Sans\"/></style:style>";
+ QString colorText = "<span style=\"color: #00FF00; background-color: #FF0000;\"> Color Text </span>";
+ QTest::newRow("green/red") << colorText << 3 <<
+ "<style:style style:name=\"c4\" style:family=\"text\"><style:text-properties fo:font-family=\"Sans\" fo:color=\"#00ff00\" fo:background-color=\"#ff0000\"/></style:style>";
+
}
void tst_QTextOdfWriter::testWriteStyle1()
diff --git a/tests/auto/qudpsocket/test/test.pro b/tests/auto/qudpsocket/test/test.pro
index 2e0a020..44d3d30 100644
--- a/tests/auto/qudpsocket/test/test.pro
+++ b/tests/auto/qudpsocket/test/test.pro
@@ -3,7 +3,6 @@ SOURCES += ../tst_qudpsocket.cpp
QT = core network
MOC_DIR=tmp
-DEFINES += TEST_QNETWORK_PROXY
win32 {
CONFIG(debug, debug|release) {
diff --git a/tests/auto/qudpsocket/tst_qudpsocket.cpp b/tests/auto/qudpsocket/tst_qudpsocket.cpp
index 160d74c..e3ab9bc 100644
--- a/tests/auto/qudpsocket/tst_qudpsocket.cpp
+++ b/tests/auto/qudpsocket/tst_qudpsocket.cpp
@@ -49,10 +49,7 @@
#include <qhostaddress.h>
#include <qhostinfo.h>
#include <qmap.h>
-#ifdef TEST_QNETWORK_PROXY
-# include <QNetworkProxy>
-#endif
-
+#include <QNetworkProxy>
#include <qstringlist.h>
#include "../network-settings.h"
@@ -118,32 +115,23 @@ void tst_QUdpSocket::initTestCase_data()
QTest::addColumn<int>("proxyType");
QTest::newRow("WithoutProxy") << false << 0;
-#ifdef TEST_QNETWORK_PROXY
QTest::newRow("WithSocks5Proxy") << true << int(QNetworkProxy::Socks5Proxy);
-#endif
}
void tst_QUdpSocket::init()
{
QFETCH_GLOBAL(bool, setProxy);
if (setProxy) {
-#ifdef TEST_QNETWORK_PROXY
QFETCH_GLOBAL(int, proxyType);
if (proxyType == QNetworkProxy::Socks5Proxy) {
QNetworkProxy::setApplicationProxy(QNetworkProxy(QNetworkProxy::Socks5Proxy, QtNetworkSettings::serverName(), 1080));
}
-#endif
}
}
void tst_QUdpSocket::cleanup()
{
- QFETCH_GLOBAL(bool, setProxy);
- if (setProxy) {
-#ifdef TEST_QNETWORK_PROXY
QNetworkProxy::setApplicationProxy(QNetworkProxy::DefaultProxy);
-#endif
- }
}
@@ -204,12 +192,10 @@ void tst_QUdpSocket::broadcasting()
{
QFETCH_GLOBAL(bool, setProxy);
if (setProxy) {
-#ifdef TEST_QNETWORK_PROXY
QFETCH_GLOBAL(int, proxyType);
if (proxyType == QNetworkProxy::Socks5Proxy) {
QSKIP("With socks5 Broadcast is not supported.", SkipSingle);
}
-#endif
}
#ifdef Q_OS_AIX
QSKIP("Broadcast does not work on darko", SkipAll);
@@ -539,12 +525,10 @@ void tst_QUdpSocket::bindMode()
{
QFETCH_GLOBAL(bool, setProxy);
if (setProxy) {
-#ifdef TEST_QNETWORK_PROXY
QFETCH_GLOBAL(int, proxyType);
if (proxyType == QNetworkProxy::Socks5Proxy) {
QSKIP("With socks5 explicit port binding is not supported.", SkipAll);
}
-#endif
}
QUdpSocket socket;
diff --git a/tests/auto/uic/baseline/config_fromuic3.ui b/tests/auto/uic/baseline/config_fromuic3.ui
new file mode 100644
index 0000000..0bd6256
--- /dev/null
+++ b/tests/auto/uic/baseline/config_fromuic3.ui
@@ -0,0 +1,1647 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0" stdsetdef="1">
+ <author></author>
+ <comment>*********************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the test suite 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$
+**
+*********************************************************************</comment>
+ <exportmacro></exportmacro>
+ <class>Config</class>
+ <widget class="QDialog" name="Config">
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>481</width>
+ <height>645</height>
+ </rect>
+ </property>
+ <property name="windowTitle">
+ <string>Configure</string>
+ </property>
+ <property name="windowIcon">
+ <pixmap>logo.png</pixmap>
+ </property>
+ <property name="sizeGripEnabled">
+ <bool>true</bool>
+ </property>
+ <layout class="QGridLayout">
+ <property name="margin">
+ <number>11</number>
+ </property>
+ <property name="spacing">
+ <number>6</number>
+ </property>
+ <item row="0" column="1">
+ <widget class="Q3ButtonGroup" name="ButtonGroup2">
+ <property name="title">
+ <string>Depth</string>
+ </property>
+ <widget class="QRadioButton" name="depth_1">
+ <property name="geometry">
+ <rect>
+ <x>11</x>
+ <y>19</y>
+ <width>229</width>
+ <height>19</height>
+ </rect>
+ </property>
+ <property name="text">
+ <string>1 bit monochrome</string>
+ </property>
+ </widget>
+ <widget class="QRadioButton" name="depth_4gray">
+ <property name="geometry">
+ <rect>
+ <x>11</x>
+ <y>44</y>
+ <width>229</width>
+ <height>19</height>
+ </rect>
+ </property>
+ <property name="text">
+ <string>4 bit grayscale</string>
+ </property>
+ </widget>
+ <widget class="QRadioButton" name="depth_8">
+ <property name="geometry">
+ <rect>
+ <x>11</x>
+ <y>69</y>
+ <width>229</width>
+ <height>19</height>
+ </rect>
+ </property>
+ <property name="text">
+ <string>8 bit</string>
+ </property>
+ </widget>
+ <widget class="QRadioButton" name="depth_12">
+ <property name="geometry">
+ <rect>
+ <x>11</x>
+ <y>94</y>
+ <width>229</width>
+ <height>19</height>
+ </rect>
+ </property>
+ <property name="text">
+ <string>12 (16) bit</string>
+ </property>
+ </widget>
+ <widget class="QRadioButton" name="depth_16">
+ <property name="geometry">
+ <rect>
+ <x>11</x>
+ <y>119</y>
+ <width>229</width>
+ <height>19</height>
+ </rect>
+ </property>
+ <property name="text">
+ <string>16 bit</string>
+ </property>
+ </widget>
+ <widget class="QRadioButton" name="depth_32">
+ <property name="geometry">
+ <rect>
+ <x>11</x>
+ <y>144</y>
+ <width>229</width>
+ <height>19</height>
+ </rect>
+ </property>
+ <property name="text">
+ <string>32 bit</string>
+ </property>
+ </widget>
+ </widget>
+ </item>
+ <item row="4" column="0" rowspan="1" colspan="2">
+ <layout class="QHBoxLayout">
+ <property name="margin">
+ <number>0</number>
+ </property>
+ <property name="spacing">
+ <number>6</number>
+ </property>
+ <item>
+ <spacer name="Horizontal Spacing2">
+ <property name="sizeHint">
+ <size>
+ <width>20</width>
+ <height>20</height>
+ </size>
+ </property>
+ <property name="sizeType">
+ <enum>QSizePolicy::Expanding</enum>
+ </property>
+ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
+ </property>
+ </spacer>
+ </item>
+ <item>
+ <widget class="QPushButton" name="buttonOk">
+ <property name="text">
+ <string>&amp;OK</string>
+ </property>
+ <property name="autoDefault">
+ <bool>true</bool>
+ </property>
+ <property name="default">
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QPushButton" name="buttonCancel">
+ <property name="text">
+ <string>&amp;Cancel</string>
+ </property>
+ <property name="autoDefault">
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ <item row="2" column="0" rowspan="1" colspan="2">
+ <widget class="QCheckBox" name="touchScreen">
+ <property name="text">
+ <string>Emulate touch screen (no mouse move).</string>
+ </property>
+ </widget>
+ </item>
+ <item row="3" column="0" rowspan="1" colspan="2">
+ <widget class="Q3GroupBox" name="GroupBox1">
+ <property name="title">
+ <string>Gamma</string>
+ </property>
+ <layout class="QGridLayout">
+ <property name="margin">
+ <number>11</number>
+ </property>
+ <property name="spacing">
+ <number>6</number>
+ </property>
+ <item row="6" column="0">
+ <widget class="QLabel" name="TextLabel3">
+ <property name="text">
+ <string>Blue</string>
+ </property>
+ <property name="wordWrap">
+ <bool>false</bool>
+ </property>
+ </widget>
+ </item>
+ <item row="6" column="1">
+ <widget class="QSlider" name="bslider">
+ <property name="palette">
+ <palette>
+ <active>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>0</blue>
+ </color>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>127</red>
+ <green>127</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>63</red>
+ <green>63</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>127</blue>
+ </color>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>170</blue>
+ </color>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>0</blue>
+ </color>
+ <color>
+ <red>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>0</blue>
+ </color>
+ <color>
+ <red>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>220</red>
+ <green>220</green>
+ <blue>220</blue>
+ </color>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>0</blue>
+ </color>
+ <color>
+ <red>10</red>
+ <green>95</green>
+ <blue>137</blue>
+ </color>
+ <color>
+ <red>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>0</blue>
+ </color>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>0</blue>
+ </color>
+ </active>
+ <inactive>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>0</blue>
+ </color>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>127</red>
+ <green>127</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>38</red>
+ <green>38</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>127</blue>
+ </color>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>170</blue>
+ </color>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>0</blue>
+ </color>
+ <color>
+ <red>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>0</blue>
+ </color>
+ <color>
+ <red>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>220</red>
+ <green>220</green>
+ <blue>220</blue>
+ </color>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>0</blue>
+ </color>
+ <color>
+ <red>10</red>
+ <green>95</green>
+ <blue>137</blue>
+ </color>
+ <color>
+ <red>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>0</blue>
+ </color>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>0</blue>
+ </color>
+ </inactive>
+ <disabled>
+ <color>
+ <red>128</red>
+ <green>128</green>
+ <blue>128</blue>
+ </color>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>127</red>
+ <green>127</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>38</red>
+ <green>38</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>127</blue>
+ </color>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>170</blue>
+ </color>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>0</blue>
+ </color>
+ <color>
+ <red>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>128</red>
+ <green>128</green>
+ <blue>128</blue>
+ </color>
+ <color>
+ <red>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>220</red>
+ <green>220</green>
+ <blue>220</blue>
+ </color>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>0</blue>
+ </color>
+ <color>
+ <red>10</red>
+ <green>95</green>
+ <blue>137</blue>
+ </color>
+ <color>
+ <red>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>0</blue>
+ </color>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>0</blue>
+ </color>
+ </disabled>
+ </palette>
+ </property>
+ <property name="maximum">
+ <number>400</number>
+ </property>
+ <property name="value">
+ <number>100</number>
+ </property>
+ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
+ </property>
+ </widget>
+ </item>
+ <item row="6" column="2">
+ <widget class="QLabel" name="blabel">
+ <property name="text">
+ <string>1.0</string>
+ </property>
+ <property name="wordWrap">
+ <bool>false</bool>
+ </property>
+ </widget>
+ </item>
+ <item row="5" column="1">
+ <spacer name="Spacer3">
+ <property name="sizeHint">
+ <size>
+ <width>20</width>
+ <height>20</height>
+ </size>
+ </property>
+ <property name="sizeType">
+ <enum>QSizePolicy::Expanding</enum>
+ </property>
+ <property name="orientation">
+ <enum>Qt::Vertical</enum>
+ </property>
+ </spacer>
+ </item>
+ <item row="4" column="0">
+ <widget class="QLabel" name="TextLabel2">
+ <property name="text">
+ <string>Green</string>
+ </property>
+ <property name="wordWrap">
+ <bool>false</bool>
+ </property>
+ </widget>
+ </item>
+ <item row="4" column="1">
+ <widget class="QSlider" name="gslider">
+ <property name="palette">
+ <palette>
+ <active>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>0</blue>
+ </color>
+ <color>
+ <red>0</red>
+ <green>255</green>
+ <blue>0</blue>
+ </color>
+ <color>
+ <red>127</red>
+ <green>255</green>
+ <blue>127</blue>
+ </color>
+ <color>
+ <red>63</red>
+ <green>255</green>
+ <blue>63</blue>
+ </color>
+ <color>
+ <red>0</red>
+ <green>127</green>
+ <blue>0</blue>
+ </color>
+ <color>
+ <red>0</red>
+ <green>170</green>
+ <blue>0</blue>
+ </color>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>0</blue>
+ </color>
+ <color>
+ <red>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>0</blue>
+ </color>
+ <color>
+ <red>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>220</red>
+ <green>220</green>
+ <blue>220</blue>
+ </color>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>0</blue>
+ </color>
+ <color>
+ <red>10</red>
+ <green>95</green>
+ <blue>137</blue>
+ </color>
+ <color>
+ <red>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>0</blue>
+ </color>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>0</blue>
+ </color>
+ </active>
+ <inactive>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>0</blue>
+ </color>
+ <color>
+ <red>0</red>
+ <green>255</green>
+ <blue>0</blue>
+ </color>
+ <color>
+ <red>127</red>
+ <green>255</green>
+ <blue>127</blue>
+ </color>
+ <color>
+ <red>38</red>
+ <green>255</green>
+ <blue>38</blue>
+ </color>
+ <color>
+ <red>0</red>
+ <green>127</green>
+ <blue>0</blue>
+ </color>
+ <color>
+ <red>0</red>
+ <green>170</green>
+ <blue>0</blue>
+ </color>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>0</blue>
+ </color>
+ <color>
+ <red>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>0</blue>
+ </color>
+ <color>
+ <red>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>220</red>
+ <green>220</green>
+ <blue>220</blue>
+ </color>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>0</blue>
+ </color>
+ <color>
+ <red>10</red>
+ <green>95</green>
+ <blue>137</blue>
+ </color>
+ <color>
+ <red>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>0</blue>
+ </color>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>0</blue>
+ </color>
+ </inactive>
+ <disabled>
+ <color>
+ <red>128</red>
+ <green>128</green>
+ <blue>128</blue>
+ </color>
+ <color>
+ <red>0</red>
+ <green>255</green>
+ <blue>0</blue>
+ </color>
+ <color>
+ <red>127</red>
+ <green>255</green>
+ <blue>127</blue>
+ </color>
+ <color>
+ <red>38</red>
+ <green>255</green>
+ <blue>38</blue>
+ </color>
+ <color>
+ <red>0</red>
+ <green>127</green>
+ <blue>0</blue>
+ </color>
+ <color>
+ <red>0</red>
+ <green>170</green>
+ <blue>0</blue>
+ </color>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>0</blue>
+ </color>
+ <color>
+ <red>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>128</red>
+ <green>128</green>
+ <blue>128</blue>
+ </color>
+ <color>
+ <red>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>220</red>
+ <green>220</green>
+ <blue>220</blue>
+ </color>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>0</blue>
+ </color>
+ <color>
+ <red>10</red>
+ <green>95</green>
+ <blue>137</blue>
+ </color>
+ <color>
+ <red>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>0</blue>
+ </color>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>0</blue>
+ </color>
+ </disabled>
+ </palette>
+ </property>
+ <property name="maximum">
+ <number>400</number>
+ </property>
+ <property name="value">
+ <number>100</number>
+ </property>
+ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
+ </property>
+ </widget>
+ </item>
+ <item row="4" column="2">
+ <widget class="QLabel" name="glabel">
+ <property name="text">
+ <string>1.0</string>
+ </property>
+ <property name="wordWrap">
+ <bool>false</bool>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="0">
+ <widget class="QLabel" name="TextLabel7">
+ <property name="text">
+ <string>All</string>
+ </property>
+ <property name="wordWrap">
+ <bool>false</bool>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="2">
+ <widget class="QLabel" name="TextLabel8">
+ <property name="text">
+ <string>1.0</string>
+ </property>
+ <property name="wordWrap">
+ <bool>false</bool>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="1">
+ <widget class="QSlider" name="gammaslider">
+ <property name="palette">
+ <palette>
+ <active>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>0</blue>
+ </color>
+ <color>
+ <red>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>127</red>
+ <green>127</green>
+ <blue>127</blue>
+ </color>
+ <color>
+ <red>170</red>
+ <green>170</green>
+ <blue>170</blue>
+ </color>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>0</blue>
+ </color>
+ <color>
+ <red>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>0</blue>
+ </color>
+ <color>
+ <red>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>220</red>
+ <green>220</green>
+ <blue>220</blue>
+ </color>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>0</blue>
+ </color>
+ <color>
+ <red>10</red>
+ <green>95</green>
+ <blue>137</blue>
+ </color>
+ <color>
+ <red>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>0</blue>
+ </color>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>0</blue>
+ </color>
+ </active>
+ <inactive>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>0</blue>
+ </color>
+ <color>
+ <red>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>127</red>
+ <green>127</green>
+ <blue>127</blue>
+ </color>
+ <color>
+ <red>170</red>
+ <green>170</green>
+ <blue>170</blue>
+ </color>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>0</blue>
+ </color>
+ <color>
+ <red>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>0</blue>
+ </color>
+ <color>
+ <red>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>220</red>
+ <green>220</green>
+ <blue>220</blue>
+ </color>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>0</blue>
+ </color>
+ <color>
+ <red>10</red>
+ <green>95</green>
+ <blue>137</blue>
+ </color>
+ <color>
+ <red>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>0</blue>
+ </color>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>0</blue>
+ </color>
+ </inactive>
+ <disabled>
+ <color>
+ <red>128</red>
+ <green>128</green>
+ <blue>128</blue>
+ </color>
+ <color>
+ <red>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>127</red>
+ <green>127</green>
+ <blue>127</blue>
+ </color>
+ <color>
+ <red>170</red>
+ <green>170</green>
+ <blue>170</blue>
+ </color>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>0</blue>
+ </color>
+ <color>
+ <red>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>128</red>
+ <green>128</green>
+ <blue>128</blue>
+ </color>
+ <color>
+ <red>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>220</red>
+ <green>220</green>
+ <blue>220</blue>
+ </color>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>0</blue>
+ </color>
+ <color>
+ <red>10</red>
+ <green>95</green>
+ <blue>137</blue>
+ </color>
+ <color>
+ <red>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>0</blue>
+ </color>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>0</blue>
+ </color>
+ </disabled>
+ </palette>
+ </property>
+ <property name="maximum">
+ <number>400</number>
+ </property>
+ <property name="value">
+ <number>100</number>
+ </property>
+ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
+ </property>
+ </widget>
+ </item>
+ <item row="2" column="0">
+ <widget class="QLabel" name="TextLabel1_2">
+ <property name="text">
+ <string>Red</string>
+ </property>
+ <property name="wordWrap">
+ <bool>false</bool>
+ </property>
+ </widget>
+ </item>
+ <item row="2" column="2">
+ <widget class="QLabel" name="rlabel">
+ <property name="text">
+ <string>1.0</string>
+ </property>
+ <property name="wordWrap">
+ <bool>false</bool>
+ </property>
+ </widget>
+ </item>
+ <item row="2" column="1">
+ <widget class="QSlider" name="rslider">
+ <property name="palette">
+ <palette>
+ <active>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>0</blue>
+ </color>
+ <color>
+ <red>255</red>
+ <green>0</green>
+ <blue>0</blue>
+ </color>
+ <color>
+ <red>255</red>
+ <green>127</green>
+ <blue>127</blue>
+ </color>
+ <color>
+ <red>255</red>
+ <green>63</green>
+ <blue>63</blue>
+ </color>
+ <color>
+ <red>127</red>
+ <green>0</green>
+ <blue>0</blue>
+ </color>
+ <color>
+ <red>170</red>
+ <green>0</green>
+ <blue>0</blue>
+ </color>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>0</blue>
+ </color>
+ <color>
+ <red>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>0</blue>
+ </color>
+ <color>
+ <red>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>220</red>
+ <green>220</green>
+ <blue>220</blue>
+ </color>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>0</blue>
+ </color>
+ <color>
+ <red>10</red>
+ <green>95</green>
+ <blue>137</blue>
+ </color>
+ <color>
+ <red>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>0</blue>
+ </color>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>0</blue>
+ </color>
+ </active>
+ <inactive>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>0</blue>
+ </color>
+ <color>
+ <red>255</red>
+ <green>0</green>
+ <blue>0</blue>
+ </color>
+ <color>
+ <red>255</red>
+ <green>127</green>
+ <blue>127</blue>
+ </color>
+ <color>
+ <red>255</red>
+ <green>38</green>
+ <blue>38</blue>
+ </color>
+ <color>
+ <red>127</red>
+ <green>0</green>
+ <blue>0</blue>
+ </color>
+ <color>
+ <red>170</red>
+ <green>0</green>
+ <blue>0</blue>
+ </color>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>0</blue>
+ </color>
+ <color>
+ <red>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>0</blue>
+ </color>
+ <color>
+ <red>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>220</red>
+ <green>220</green>
+ <blue>220</blue>
+ </color>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>0</blue>
+ </color>
+ <color>
+ <red>10</red>
+ <green>95</green>
+ <blue>137</blue>
+ </color>
+ <color>
+ <red>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>0</blue>
+ </color>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>0</blue>
+ </color>
+ </inactive>
+ <disabled>
+ <color>
+ <red>128</red>
+ <green>128</green>
+ <blue>128</blue>
+ </color>
+ <color>
+ <red>255</red>
+ <green>0</green>
+ <blue>0</blue>
+ </color>
+ <color>
+ <red>255</red>
+ <green>127</green>
+ <blue>127</blue>
+ </color>
+ <color>
+ <red>255</red>
+ <green>38</green>
+ <blue>38</blue>
+ </color>
+ <color>
+ <red>127</red>
+ <green>0</green>
+ <blue>0</blue>
+ </color>
+ <color>
+ <red>170</red>
+ <green>0</green>
+ <blue>0</blue>
+ </color>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>0</blue>
+ </color>
+ <color>
+ <red>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>128</red>
+ <green>128</green>
+ <blue>128</blue>
+ </color>
+ <color>
+ <red>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>220</red>
+ <green>220</green>
+ <blue>220</blue>
+ </color>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>0</blue>
+ </color>
+ <color>
+ <red>10</red>
+ <green>95</green>
+ <blue>137</blue>
+ </color>
+ <color>
+ <red>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>0</blue>
+ </color>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>0</blue>
+ </color>
+ </disabled>
+ </palette>
+ </property>
+ <property name="maximum">
+ <number>400</number>
+ </property>
+ <property name="value">
+ <number>100</number>
+ </property>
+ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
+ </property>
+ </widget>
+ </item>
+ <item row="3" column="1">
+ <spacer name="Spacer2">
+ <property name="sizeHint">
+ <size>
+ <width>20</width>
+ <height>20</height>
+ </size>
+ </property>
+ <property name="sizeType">
+ <enum>QSizePolicy::Expanding</enum>
+ </property>
+ <property name="orientation">
+ <enum>Qt::Vertical</enum>
+ </property>
+ </spacer>
+ </item>
+ <item row="1" column="1">
+ <spacer name="Spacer4">
+ <property name="sizeHint">
+ <size>
+ <width>20</width>
+ <height>20</height>
+ </size>
+ </property>
+ <property name="sizeType">
+ <enum>QSizePolicy::Expanding</enum>
+ </property>
+ <property name="orientation">
+ <enum>Qt::Vertical</enum>
+ </property>
+ </spacer>
+ </item>
+ <item row="8" column="0" rowspan="1" colspan="3">
+ <widget class="QPushButton" name="PushButton3">
+ <property name="text">
+ <string>Set all to 1.0</string>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="3" rowspan="9" colspan="1">
+ <widget class="GammaView" name="MyCustomWidget1"/>
+ </item>
+ <item row="7" column="1">
+ <spacer name="Spacer5">
+ <property name="sizeHint">
+ <size>
+ <width>20</width>
+ <height>20</height>
+ </size>
+ </property>
+ <property name="sizeType">
+ <enum>QSizePolicy::Expanding</enum>
+ </property>
+ <property name="orientation">
+ <enum>Qt::Vertical</enum>
+ </property>
+ </spacer>
+ </item>
+ </layout>
+ </widget>
+ </item>
+ <item row="0" column="0">
+ <widget class="Q3ButtonGroup" name="ButtonGroup1">
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>5</hsizetype>
+ <vsizetype>5</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="title">
+ <string>Size</string>
+ </property>
+ <layout class="QVBoxLayout">
+ <property name="margin">
+ <number>11</number>
+ </property>
+ <property name="spacing">
+ <number>6</number>
+ </property>
+ <item>
+ <widget class="QRadioButton" name="size_240_320">
+ <property name="text">
+ <string>240x320 &quot;PDA&quot;</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QRadioButton" name="size_320_240">
+ <property name="text">
+ <string>320x240 &quot;TV&quot;</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QRadioButton" name="size_640_480">
+ <property name="text">
+ <string>640x480 &quot;VGA&quot;</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <layout class="QHBoxLayout">
+ <property name="margin">
+ <number>0</number>
+ </property>
+ <property name="spacing">
+ <number>6</number>
+ </property>
+ <item>
+ <widget class="QRadioButton" name="size_custom">
+ <property name="text">
+ <string>Custom</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QSpinBox" name="size_width">
+ <property name="maximum">
+ <number>1280</number>
+ </property>
+ <property name="minimum">
+ <number>1</number>
+ </property>
+ <property name="singleStep">
+ <number>16</number>
+ </property>
+ <property name="value">
+ <number>400</number>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QSpinBox" name="size_height">
+ <property name="maximum">
+ <number>1024</number>
+ </property>
+ <property name="minimum">
+ <number>1</number>
+ </property>
+ <property name="singleStep">
+ <number>16</number>
+ </property>
+ <property name="value">
+ <number>300</number>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ <item>
+ <layout class="QHBoxLayout">
+ <property name="margin">
+ <number>0</number>
+ </property>
+ <property name="spacing">
+ <number>6</number>
+ </property>
+ <item>
+ <widget class="QRadioButton" name="size_skin">
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>0</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>Skin</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QComboBox" name="skin">
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>5</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <item>
+ <property name="text">
+ <string>pda.skin</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>ipaq.skin</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>qpe.skin</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>cassiopeia.skin</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>other.skin</string>
+ </property>
+ </item>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ </layout>
+ </widget>
+ </item>
+ <item row="1" column="0" rowspan="1" colspan="2">
+ <widget class="QLabel" name="TextLabel1">
+ <property name="text">
+ <string>&lt;p&gt;Note that any applications using the virtual framebuffer will be terminated if you change the Size or Depth &lt;i&gt;above&lt;/i&gt;. You may freely modify the Gamma &lt;i&gt;below&lt;/i&gt;.</string>
+ </property>
+ <property name="wordWrap">
+ <bool>false</bool>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QRadioButton" name="test_for_useless_buttongroupId">
+ <property name="text">
+ <string>Test</string>
+ </property>
+ <property name="buttonGroupId">
+ <string>1</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ <layoutdefault spacing="6" margin="11"/>
+ <customwidgets>
+ <customwidget>
+ <class>GammaView</class>
+ <extends>QWidget</extends>
+ <header location="local">gammaview.h</header>
+ <sizehint>
+ <width>64</width>
+ <height>64</height>
+ </sizehint>
+ <container>0</container>
+ <sizepolicy>
+ <hordata>3</hordata>
+ <verdata>3</verdata>
+ </sizepolicy>
+ <pixmap>image0</pixmap>
+ </customwidget>
+ </customwidgets>
+ <images>
+ <image name="image0">
+ <data format="XPM.GZ" length="646">789c6dd2c10ac2300c00d07bbf2234b7229d1be245fc04c5a3201e4615f430059d0711ff5ddb2e6bb236ec90eed134cb5a19d8ef36602af5ecdbfeeac05dda0798d3abebde87e3faa374d3807fa0d633a52d38d8de6f679fe33fc776e196f53cd010188256a3600a292882096246517815ca99884606e18044a3a40d91824820924265a7923a2e8bcd05f33db1173e002913175f2a6be6d3294871a2d95fa00e8a94ee017b69d339d90df1e77c57ea072ede6758</data>
+ </image>
+ </images>
+ <connections>
+ <connection>
+ <sender>buttonOk</sender>
+ <signal>clicked()</signal>
+ <receiver>Config</receiver>
+ <slot>accept()</slot>
+ </connection>
+ <connection>
+ <sender>buttonCancel</sender>
+ <signal>clicked()</signal>
+ <receiver>Config</receiver>
+ <slot>reject()</slot>
+ </connection>
+ </connections>
+</ui>
diff --git a/tests/auto/uic/baseline/config_fromuic3.ui.h b/tests/auto/uic/baseline/config_fromuic3.ui.h
new file mode 100644
index 0000000..ec20d05
--- /dev/null
+++ b/tests/auto/uic/baseline/config_fromuic3.ui.h
@@ -0,0 +1,715 @@
+/*
+*********************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the test suite 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$
+**
+*********************************************************************
+*/
+
+/********************************************************************************
+** Form generated from reading UI file 'config_fromuic3.ui'
+**
+** Created: Thu Dec 17 12:48:42 2009
+** by: Qt User Interface Compiler version 4.6.1
+**
+** WARNING! All changes made in this file will be lost when recompiling UI file!
+********************************************************************************/
+
+#ifndef CONFIG_FROMUIC3_H
+#define CONFIG_FROMUIC3_H
+
+#include <Qt3Support/Q3ButtonGroup>
+#include <Qt3Support/Q3GroupBox>
+#include <QtCore/QVariant>
+#include <QtGui/QAction>
+#include <QtGui/QApplication>
+#include <QtGui/QButtonGroup>
+#include <QtGui/QCheckBox>
+#include <QtGui/QComboBox>
+#include <QtGui/QDialog>
+#include <QtGui/QGridLayout>
+#include <QtGui/QHBoxLayout>
+#include <QtGui/QHeaderView>
+#include <QtGui/QLabel>
+#include <QtGui/QPushButton>
+#include <QtGui/QRadioButton>
+#include <QtGui/QSlider>
+#include <QtGui/QSpacerItem>
+#include <QtGui/QSpinBox>
+#include <QtGui/QVBoxLayout>
+#include "gammaview.h"
+
+QT_BEGIN_NAMESPACE
+
+class Ui_Config
+{
+public:
+ QGridLayout *gridLayout;
+ Q3ButtonGroup *ButtonGroup2;
+ QRadioButton *depth_1;
+ QRadioButton *depth_4gray;
+ QRadioButton *depth_8;
+ QRadioButton *depth_12;
+ QRadioButton *depth_16;
+ QRadioButton *depth_32;
+ QHBoxLayout *hboxLayout;
+ QSpacerItem *Horizontal_Spacing2;
+ QPushButton *buttonOk;
+ QPushButton *buttonCancel;
+ QCheckBox *touchScreen;
+ Q3GroupBox *GroupBox1;
+ QGridLayout *gridLayout1;
+ QLabel *TextLabel3;
+ QSlider *bslider;
+ QLabel *blabel;
+ QSpacerItem *Spacer3;
+ QLabel *TextLabel2;
+ QSlider *gslider;
+ QLabel *glabel;
+ QLabel *TextLabel7;
+ QLabel *TextLabel8;
+ QSlider *gammaslider;
+ QLabel *TextLabel1_2;
+ QLabel *rlabel;
+ QSlider *rslider;
+ QSpacerItem *Spacer2;
+ QSpacerItem *Spacer4;
+ QPushButton *PushButton3;
+ GammaView *MyCustomWidget1;
+ QSpacerItem *Spacer5;
+ Q3ButtonGroup *ButtonGroup1;
+ QVBoxLayout *vboxLayout;
+ QRadioButton *size_240_320;
+ QRadioButton *size_320_240;
+ QRadioButton *size_640_480;
+ QHBoxLayout *hboxLayout1;
+ QRadioButton *size_custom;
+ QSpinBox *size_width;
+ QSpinBox *size_height;
+ QHBoxLayout *hboxLayout2;
+ QRadioButton *size_skin;
+ QComboBox *skin;
+ QLabel *TextLabel1;
+ QRadioButton *test_for_useless_buttongroupId;
+
+ void setupUi(QDialog *Config)
+ {
+ if (Config->objectName().isEmpty())
+ Config->setObjectName(QString::fromUtf8("Config"));
+ Config->resize(481, 645);
+ Config->setWindowIcon(QPixmap(QString::fromUtf8("logo.png")));
+ Config->setSizeGripEnabled(true);
+ gridLayout = new QGridLayout(Config);
+ gridLayout->setSpacing(6);
+ gridLayout->setContentsMargins(11, 11, 11, 11);
+ gridLayout->setObjectName(QString::fromUtf8("gridLayout"));
+ ButtonGroup2 = new Q3ButtonGroup(Config);
+ ButtonGroup2->setObjectName(QString::fromUtf8("ButtonGroup2"));
+ depth_1 = new QRadioButton(ButtonGroup2);
+ depth_1->setObjectName(QString::fromUtf8("depth_1"));
+ depth_1->setGeometry(QRect(11, 19, 229, 19));
+ depth_4gray = new QRadioButton(ButtonGroup2);
+ depth_4gray->setObjectName(QString::fromUtf8("depth_4gray"));
+ depth_4gray->setGeometry(QRect(11, 44, 229, 19));
+ depth_8 = new QRadioButton(ButtonGroup2);
+ depth_8->setObjectName(QString::fromUtf8("depth_8"));
+ depth_8->setGeometry(QRect(11, 69, 229, 19));
+ depth_12 = new QRadioButton(ButtonGroup2);
+ depth_12->setObjectName(QString::fromUtf8("depth_12"));
+ depth_12->setGeometry(QRect(11, 94, 229, 19));
+ depth_16 = new QRadioButton(ButtonGroup2);
+ depth_16->setObjectName(QString::fromUtf8("depth_16"));
+ depth_16->setGeometry(QRect(11, 119, 229, 19));
+ depth_32 = new QRadioButton(ButtonGroup2);
+ depth_32->setObjectName(QString::fromUtf8("depth_32"));
+ depth_32->setGeometry(QRect(11, 144, 229, 19));
+
+ gridLayout->addWidget(ButtonGroup2, 0, 1, 1, 1);
+
+ hboxLayout = new QHBoxLayout();
+ hboxLayout->setSpacing(6);
+ hboxLayout->setContentsMargins(0, 0, 0, 0);
+ hboxLayout->setObjectName(QString::fromUtf8("hboxLayout"));
+ Horizontal_Spacing2 = new QSpacerItem(20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum);
+
+ hboxLayout->addItem(Horizontal_Spacing2);
+
+ buttonOk = new QPushButton(Config);
+ buttonOk->setObjectName(QString::fromUtf8("buttonOk"));
+ buttonOk->setAutoDefault(true);
+ buttonOk->setDefault(true);
+
+ hboxLayout->addWidget(buttonOk);
+
+ buttonCancel = new QPushButton(Config);
+ buttonCancel->setObjectName(QString::fromUtf8("buttonCancel"));
+ buttonCancel->setAutoDefault(true);
+
+ hboxLayout->addWidget(buttonCancel);
+
+
+ gridLayout->addLayout(hboxLayout, 4, 0, 1, 2);
+
+ touchScreen = new QCheckBox(Config);
+ touchScreen->setObjectName(QString::fromUtf8("touchScreen"));
+
+ gridLayout->addWidget(touchScreen, 2, 0, 1, 2);
+
+ GroupBox1 = new Q3GroupBox(Config);
+ GroupBox1->setObjectName(QString::fromUtf8("GroupBox1"));
+ GroupBox1->setColumnLayout(0, Qt::Vertical);
+ GroupBox1->layout()->setSpacing(6);
+ GroupBox1->layout()->setContentsMargins(11, 11, 11, 11);
+ gridLayout1 = new QGridLayout();
+ QBoxLayout *boxlayout = qobject_cast<QBoxLayout *>(GroupBox1->layout());
+ if (boxlayout)
+ boxlayout->addLayout(gridLayout1);
+ gridLayout1->setAlignment(Qt::AlignTop);
+ gridLayout1->setObjectName(QString::fromUtf8("gridLayout1"));
+ TextLabel3 = new QLabel(GroupBox1);
+ TextLabel3->setObjectName(QString::fromUtf8("TextLabel3"));
+ TextLabel3->setWordWrap(false);
+
+ gridLayout1->addWidget(TextLabel3, 6, 0, 1, 1);
+
+ bslider = new QSlider(GroupBox1);
+ bslider->setObjectName(QString::fromUtf8("bslider"));
+ QPalette palette;
+ palette.setColor(QPalette::Active, static_cast<QPalette::ColorRole>(0), QColor(0, 0, 0));
+ palette.setColor(QPalette::Active, static_cast<QPalette::ColorRole>(1), QColor(0, 0, 255));
+ palette.setColor(QPalette::Active, static_cast<QPalette::ColorRole>(2), QColor(127, 127, 255));
+ palette.setColor(QPalette::Active, static_cast<QPalette::ColorRole>(3), QColor(63, 63, 255));
+ palette.setColor(QPalette::Active, static_cast<QPalette::ColorRole>(4), QColor(0, 0, 127));
+ palette.setColor(QPalette::Active, static_cast<QPalette::ColorRole>(5), QColor(0, 0, 170));
+ palette.setColor(QPalette::Active, static_cast<QPalette::ColorRole>(6), QColor(0, 0, 0));
+ palette.setColor(QPalette::Active, static_cast<QPalette::ColorRole>(7), QColor(255, 255, 255));
+ palette.setColor(QPalette::Active, static_cast<QPalette::ColorRole>(8), QColor(0, 0, 0));
+ palette.setColor(QPalette::Active, static_cast<QPalette::ColorRole>(9), QColor(255, 255, 255));
+ palette.setColor(QPalette::Active, static_cast<QPalette::ColorRole>(10), QColor(220, 220, 220));
+ palette.setColor(QPalette::Active, static_cast<QPalette::ColorRole>(11), QColor(0, 0, 0));
+ palette.setColor(QPalette::Active, static_cast<QPalette::ColorRole>(12), QColor(10, 95, 137));
+ palette.setColor(QPalette::Active, static_cast<QPalette::ColorRole>(13), QColor(255, 255, 255));
+ palette.setColor(QPalette::Active, static_cast<QPalette::ColorRole>(14), QColor(0, 0, 0));
+ palette.setColor(QPalette::Active, static_cast<QPalette::ColorRole>(15), QColor(0, 0, 0));
+ palette.setColor(QPalette::Inactive, static_cast<QPalette::ColorRole>(0), QColor(0, 0, 0));
+ palette.setColor(QPalette::Inactive, static_cast<QPalette::ColorRole>(1), QColor(0, 0, 255));
+ palette.setColor(QPalette::Inactive, static_cast<QPalette::ColorRole>(2), QColor(127, 127, 255));
+ palette.setColor(QPalette::Inactive, static_cast<QPalette::ColorRole>(3), QColor(38, 38, 255));
+ palette.setColor(QPalette::Inactive, static_cast<QPalette::ColorRole>(4), QColor(0, 0, 127));
+ palette.setColor(QPalette::Inactive, static_cast<QPalette::ColorRole>(5), QColor(0, 0, 170));
+ palette.setColor(QPalette::Inactive, static_cast<QPalette::ColorRole>(6), QColor(0, 0, 0));
+ palette.setColor(QPalette::Inactive, static_cast<QPalette::ColorRole>(7), QColor(255, 255, 255));
+ palette.setColor(QPalette::Inactive, static_cast<QPalette::ColorRole>(8), QColor(0, 0, 0));
+ palette.setColor(QPalette::Inactive, static_cast<QPalette::ColorRole>(9), QColor(255, 255, 255));
+ palette.setColor(QPalette::Inactive, static_cast<QPalette::ColorRole>(10), QColor(220, 220, 220));
+ palette.setColor(QPalette::Inactive, static_cast<QPalette::ColorRole>(11), QColor(0, 0, 0));
+ palette.setColor(QPalette::Inactive, static_cast<QPalette::ColorRole>(12), QColor(10, 95, 137));
+ palette.setColor(QPalette::Inactive, static_cast<QPalette::ColorRole>(13), QColor(255, 255, 255));
+ palette.setColor(QPalette::Inactive, static_cast<QPalette::ColorRole>(14), QColor(0, 0, 0));
+ palette.setColor(QPalette::Inactive, static_cast<QPalette::ColorRole>(15), QColor(0, 0, 0));
+ palette.setColor(QPalette::Disabled, static_cast<QPalette::ColorRole>(0), QColor(128, 128, 128));
+ palette.setColor(QPalette::Disabled, static_cast<QPalette::ColorRole>(1), QColor(0, 0, 255));
+ palette.setColor(QPalette::Disabled, static_cast<QPalette::ColorRole>(2), QColor(127, 127, 255));
+ palette.setColor(QPalette::Disabled, static_cast<QPalette::ColorRole>(3), QColor(38, 38, 255));
+ palette.setColor(QPalette::Disabled, static_cast<QPalette::ColorRole>(4), QColor(0, 0, 127));
+ palette.setColor(QPalette::Disabled, static_cast<QPalette::ColorRole>(5), QColor(0, 0, 170));
+ palette.setColor(QPalette::Disabled, static_cast<QPalette::ColorRole>(6), QColor(0, 0, 0));
+ palette.setColor(QPalette::Disabled, static_cast<QPalette::ColorRole>(7), QColor(255, 255, 255));
+ palette.setColor(QPalette::Disabled, static_cast<QPalette::ColorRole>(8), QColor(128, 128, 128));
+ palette.setColor(QPalette::Disabled, static_cast<QPalette::ColorRole>(9), QColor(255, 255, 255));
+ palette.setColor(QPalette::Disabled, static_cast<QPalette::ColorRole>(10), QColor(220, 220, 220));
+ palette.setColor(QPalette::Disabled, static_cast<QPalette::ColorRole>(11), QColor(0, 0, 0));
+ palette.setColor(QPalette::Disabled, static_cast<QPalette::ColorRole>(12), QColor(10, 95, 137));
+ palette.setColor(QPalette::Disabled, static_cast<QPalette::ColorRole>(13), QColor(255, 255, 255));
+ palette.setColor(QPalette::Disabled, static_cast<QPalette::ColorRole>(14), QColor(0, 0, 0));
+ palette.setColor(QPalette::Disabled, static_cast<QPalette::ColorRole>(15), QColor(0, 0, 0));
+ bslider->setPalette(palette);
+ bslider->setMaximum(400);
+ bslider->setValue(100);
+ bslider->setOrientation(Qt::Horizontal);
+
+ gridLayout1->addWidget(bslider, 6, 1, 1, 1);
+
+ blabel = new QLabel(GroupBox1);
+ blabel->setObjectName(QString::fromUtf8("blabel"));
+ blabel->setWordWrap(false);
+
+ gridLayout1->addWidget(blabel, 6, 2, 1, 1);
+
+ Spacer3 = new QSpacerItem(20, 20, QSizePolicy::Minimum, QSizePolicy::Expanding);
+
+ gridLayout1->addItem(Spacer3, 5, 1, 1, 1);
+
+ TextLabel2 = new QLabel(GroupBox1);
+ TextLabel2->setObjectName(QString::fromUtf8("TextLabel2"));
+ TextLabel2->setWordWrap(false);
+
+ gridLayout1->addWidget(TextLabel2, 4, 0, 1, 1);
+
+ gslider = new QSlider(GroupBox1);
+ gslider->setObjectName(QString::fromUtf8("gslider"));
+ QPalette palette1;
+ palette1.setColor(QPalette::Active, static_cast<QPalette::ColorRole>(0), QColor(0, 0, 0));
+ palette1.setColor(QPalette::Active, static_cast<QPalette::ColorRole>(1), QColor(0, 255, 0));
+ palette1.setColor(QPalette::Active, static_cast<QPalette::ColorRole>(2), QColor(127, 255, 127));
+ palette1.setColor(QPalette::Active, static_cast<QPalette::ColorRole>(3), QColor(63, 255, 63));
+ palette1.setColor(QPalette::Active, static_cast<QPalette::ColorRole>(4), QColor(0, 127, 0));
+ palette1.setColor(QPalette::Active, static_cast<QPalette::ColorRole>(5), QColor(0, 170, 0));
+ palette1.setColor(QPalette::Active, static_cast<QPalette::ColorRole>(6), QColor(0, 0, 0));
+ palette1.setColor(QPalette::Active, static_cast<QPalette::ColorRole>(7), QColor(255, 255, 255));
+ palette1.setColor(QPalette::Active, static_cast<QPalette::ColorRole>(8), QColor(0, 0, 0));
+ palette1.setColor(QPalette::Active, static_cast<QPalette::ColorRole>(9), QColor(255, 255, 255));
+ palette1.setColor(QPalette::Active, static_cast<QPalette::ColorRole>(10), QColor(220, 220, 220));
+ palette1.setColor(QPalette::Active, static_cast<QPalette::ColorRole>(11), QColor(0, 0, 0));
+ palette1.setColor(QPalette::Active, static_cast<QPalette::ColorRole>(12), QColor(10, 95, 137));
+ palette1.setColor(QPalette::Active, static_cast<QPalette::ColorRole>(13), QColor(255, 255, 255));
+ palette1.setColor(QPalette::Active, static_cast<QPalette::ColorRole>(14), QColor(0, 0, 0));
+ palette1.setColor(QPalette::Active, static_cast<QPalette::ColorRole>(15), QColor(0, 0, 0));
+ palette1.setColor(QPalette::Inactive, static_cast<QPalette::ColorRole>(0), QColor(0, 0, 0));
+ palette1.setColor(QPalette::Inactive, static_cast<QPalette::ColorRole>(1), QColor(0, 255, 0));
+ palette1.setColor(QPalette::Inactive, static_cast<QPalette::ColorRole>(2), QColor(127, 255, 127));
+ palette1.setColor(QPalette::Inactive, static_cast<QPalette::ColorRole>(3), QColor(38, 255, 38));
+ palette1.setColor(QPalette::Inactive, static_cast<QPalette::ColorRole>(4), QColor(0, 127, 0));
+ palette1.setColor(QPalette::Inactive, static_cast<QPalette::ColorRole>(5), QColor(0, 170, 0));
+ palette1.setColor(QPalette::Inactive, static_cast<QPalette::ColorRole>(6), QColor(0, 0, 0));
+ palette1.setColor(QPalette::Inactive, static_cast<QPalette::ColorRole>(7), QColor(255, 255, 255));
+ palette1.setColor(QPalette::Inactive, static_cast<QPalette::ColorRole>(8), QColor(0, 0, 0));
+ palette1.setColor(QPalette::Inactive, static_cast<QPalette::ColorRole>(9), QColor(255, 255, 255));
+ palette1.setColor(QPalette::Inactive, static_cast<QPalette::ColorRole>(10), QColor(220, 220, 220));
+ palette1.setColor(QPalette::Inactive, static_cast<QPalette::ColorRole>(11), QColor(0, 0, 0));
+ palette1.setColor(QPalette::Inactive, static_cast<QPalette::ColorRole>(12), QColor(10, 95, 137));
+ palette1.setColor(QPalette::Inactive, static_cast<QPalette::ColorRole>(13), QColor(255, 255, 255));
+ palette1.setColor(QPalette::Inactive, static_cast<QPalette::ColorRole>(14), QColor(0, 0, 0));
+ palette1.setColor(QPalette::Inactive, static_cast<QPalette::ColorRole>(15), QColor(0, 0, 0));
+ palette1.setColor(QPalette::Disabled, static_cast<QPalette::ColorRole>(0), QColor(128, 128, 128));
+ palette1.setColor(QPalette::Disabled, static_cast<QPalette::ColorRole>(1), QColor(0, 255, 0));
+ palette1.setColor(QPalette::Disabled, static_cast<QPalette::ColorRole>(2), QColor(127, 255, 127));
+ palette1.setColor(QPalette::Disabled, static_cast<QPalette::ColorRole>(3), QColor(38, 255, 38));
+ palette1.setColor(QPalette::Disabled, static_cast<QPalette::ColorRole>(4), QColor(0, 127, 0));
+ palette1.setColor(QPalette::Disabled, static_cast<QPalette::ColorRole>(5), QColor(0, 170, 0));
+ palette1.setColor(QPalette::Disabled, static_cast<QPalette::ColorRole>(6), QColor(0, 0, 0));
+ palette1.setColor(QPalette::Disabled, static_cast<QPalette::ColorRole>(7), QColor(255, 255, 255));
+ palette1.setColor(QPalette::Disabled, static_cast<QPalette::ColorRole>(8), QColor(128, 128, 128));
+ palette1.setColor(QPalette::Disabled, static_cast<QPalette::ColorRole>(9), QColor(255, 255, 255));
+ palette1.setColor(QPalette::Disabled, static_cast<QPalette::ColorRole>(10), QColor(220, 220, 220));
+ palette1.setColor(QPalette::Disabled, static_cast<QPalette::ColorRole>(11), QColor(0, 0, 0));
+ palette1.setColor(QPalette::Disabled, static_cast<QPalette::ColorRole>(12), QColor(10, 95, 137));
+ palette1.setColor(QPalette::Disabled, static_cast<QPalette::ColorRole>(13), QColor(255, 255, 255));
+ palette1.setColor(QPalette::Disabled, static_cast<QPalette::ColorRole>(14), QColor(0, 0, 0));
+ palette1.setColor(QPalette::Disabled, static_cast<QPalette::ColorRole>(15), QColor(0, 0, 0));
+ gslider->setPalette(palette1);
+ gslider->setMaximum(400);
+ gslider->setValue(100);
+ gslider->setOrientation(Qt::Horizontal);
+
+ gridLayout1->addWidget(gslider, 4, 1, 1, 1);
+
+ glabel = new QLabel(GroupBox1);
+ glabel->setObjectName(QString::fromUtf8("glabel"));
+ glabel->setWordWrap(false);
+
+ gridLayout1->addWidget(glabel, 4, 2, 1, 1);
+
+ TextLabel7 = new QLabel(GroupBox1);
+ TextLabel7->setObjectName(QString::fromUtf8("TextLabel7"));
+ TextLabel7->setWordWrap(false);
+
+ gridLayout1->addWidget(TextLabel7, 0, 0, 1, 1);
+
+ TextLabel8 = new QLabel(GroupBox1);
+ TextLabel8->setObjectName(QString::fromUtf8("TextLabel8"));
+ TextLabel8->setWordWrap(false);
+
+ gridLayout1->addWidget(TextLabel8, 0, 2, 1, 1);
+
+ gammaslider = new QSlider(GroupBox1);
+ gammaslider->setObjectName(QString::fromUtf8("gammaslider"));
+ QPalette palette2;
+ palette2.setColor(QPalette::Active, static_cast<QPalette::ColorRole>(0), QColor(0, 0, 0));
+ palette2.setColor(QPalette::Active, static_cast<QPalette::ColorRole>(1), QColor(255, 255, 255));
+ palette2.setColor(QPalette::Active, static_cast<QPalette::ColorRole>(2), QColor(255, 255, 255));
+ palette2.setColor(QPalette::Active, static_cast<QPalette::ColorRole>(3), QColor(255, 255, 255));
+ palette2.setColor(QPalette::Active, static_cast<QPalette::ColorRole>(4), QColor(127, 127, 127));
+ palette2.setColor(QPalette::Active, static_cast<QPalette::ColorRole>(5), QColor(170, 170, 170));
+ palette2.setColor(QPalette::Active, static_cast<QPalette::ColorRole>(6), QColor(0, 0, 0));
+ palette2.setColor(QPalette::Active, static_cast<QPalette::ColorRole>(7), QColor(255, 255, 255));
+ palette2.setColor(QPalette::Active, static_cast<QPalette::ColorRole>(8), QColor(0, 0, 0));
+ palette2.setColor(QPalette::Active, static_cast<QPalette::ColorRole>(9), QColor(255, 255, 255));
+ palette2.setColor(QPalette::Active, static_cast<QPalette::ColorRole>(10), QColor(220, 220, 220));
+ palette2.setColor(QPalette::Active, static_cast<QPalette::ColorRole>(11), QColor(0, 0, 0));
+ palette2.setColor(QPalette::Active, static_cast<QPalette::ColorRole>(12), QColor(10, 95, 137));
+ palette2.setColor(QPalette::Active, static_cast<QPalette::ColorRole>(13), QColor(255, 255, 255));
+ palette2.setColor(QPalette::Active, static_cast<QPalette::ColorRole>(14), QColor(0, 0, 0));
+ palette2.setColor(QPalette::Active, static_cast<QPalette::ColorRole>(15), QColor(0, 0, 0));
+ palette2.setColor(QPalette::Inactive, static_cast<QPalette::ColorRole>(0), QColor(0, 0, 0));
+ palette2.setColor(QPalette::Inactive, static_cast<QPalette::ColorRole>(1), QColor(255, 255, 255));
+ palette2.setColor(QPalette::Inactive, static_cast<QPalette::ColorRole>(2), QColor(255, 255, 255));
+ palette2.setColor(QPalette::Inactive, static_cast<QPalette::ColorRole>(3), QColor(255, 255, 255));
+ palette2.setColor(QPalette::Inactive, static_cast<QPalette::ColorRole>(4), QColor(127, 127, 127));
+ palette2.setColor(QPalette::Inactive, static_cast<QPalette::ColorRole>(5), QColor(170, 170, 170));
+ palette2.setColor(QPalette::Inactive, static_cast<QPalette::ColorRole>(6), QColor(0, 0, 0));
+ palette2.setColor(QPalette::Inactive, static_cast<QPalette::ColorRole>(7), QColor(255, 255, 255));
+ palette2.setColor(QPalette::Inactive, static_cast<QPalette::ColorRole>(8), QColor(0, 0, 0));
+ palette2.setColor(QPalette::Inactive, static_cast<QPalette::ColorRole>(9), QColor(255, 255, 255));
+ palette2.setColor(QPalette::Inactive, static_cast<QPalette::ColorRole>(10), QColor(220, 220, 220));
+ palette2.setColor(QPalette::Inactive, static_cast<QPalette::ColorRole>(11), QColor(0, 0, 0));
+ palette2.setColor(QPalette::Inactive, static_cast<QPalette::ColorRole>(12), QColor(10, 95, 137));
+ palette2.setColor(QPalette::Inactive, static_cast<QPalette::ColorRole>(13), QColor(255, 255, 255));
+ palette2.setColor(QPalette::Inactive, static_cast<QPalette::ColorRole>(14), QColor(0, 0, 0));
+ palette2.setColor(QPalette::Inactive, static_cast<QPalette::ColorRole>(15), QColor(0, 0, 0));
+ palette2.setColor(QPalette::Disabled, static_cast<QPalette::ColorRole>(0), QColor(128, 128, 128));
+ palette2.setColor(QPalette::Disabled, static_cast<QPalette::ColorRole>(1), QColor(255, 255, 255));
+ palette2.setColor(QPalette::Disabled, static_cast<QPalette::ColorRole>(2), QColor(255, 255, 255));
+ palette2.setColor(QPalette::Disabled, static_cast<QPalette::ColorRole>(3), QColor(255, 255, 255));
+ palette2.setColor(QPalette::Disabled, static_cast<QPalette::ColorRole>(4), QColor(127, 127, 127));
+ palette2.setColor(QPalette::Disabled, static_cast<QPalette::ColorRole>(5), QColor(170, 170, 170));
+ palette2.setColor(QPalette::Disabled, static_cast<QPalette::ColorRole>(6), QColor(0, 0, 0));
+ palette2.setColor(QPalette::Disabled, static_cast<QPalette::ColorRole>(7), QColor(255, 255, 255));
+ palette2.setColor(QPalette::Disabled, static_cast<QPalette::ColorRole>(8), QColor(128, 128, 128));
+ palette2.setColor(QPalette::Disabled, static_cast<QPalette::ColorRole>(9), QColor(255, 255, 255));
+ palette2.setColor(QPalette::Disabled, static_cast<QPalette::ColorRole>(10), QColor(220, 220, 220));
+ palette2.setColor(QPalette::Disabled, static_cast<QPalette::ColorRole>(11), QColor(0, 0, 0));
+ palette2.setColor(QPalette::Disabled, static_cast<QPalette::ColorRole>(12), QColor(10, 95, 137));
+ palette2.setColor(QPalette::Disabled, static_cast<QPalette::ColorRole>(13), QColor(255, 255, 255));
+ palette2.setColor(QPalette::Disabled, static_cast<QPalette::ColorRole>(14), QColor(0, 0, 0));
+ palette2.setColor(QPalette::Disabled, static_cast<QPalette::ColorRole>(15), QColor(0, 0, 0));
+ gammaslider->setPalette(palette2);
+ gammaslider->setMaximum(400);
+ gammaslider->setValue(100);
+ gammaslider->setOrientation(Qt::Horizontal);
+
+ gridLayout1->addWidget(gammaslider, 0, 1, 1, 1);
+
+ TextLabel1_2 = new QLabel(GroupBox1);
+ TextLabel1_2->setObjectName(QString::fromUtf8("TextLabel1_2"));
+ TextLabel1_2->setWordWrap(false);
+
+ gridLayout1->addWidget(TextLabel1_2, 2, 0, 1, 1);
+
+ rlabel = new QLabel(GroupBox1);
+ rlabel->setObjectName(QString::fromUtf8("rlabel"));
+ rlabel->setWordWrap(false);
+
+ gridLayout1->addWidget(rlabel, 2, 2, 1, 1);
+
+ rslider = new QSlider(GroupBox1);
+ rslider->setObjectName(QString::fromUtf8("rslider"));
+ QPalette palette3;
+ palette3.setColor(QPalette::Active, static_cast<QPalette::ColorRole>(0), QColor(0, 0, 0));
+ palette3.setColor(QPalette::Active, static_cast<QPalette::ColorRole>(1), QColor(255, 0, 0));
+ palette3.setColor(QPalette::Active, static_cast<QPalette::ColorRole>(2), QColor(255, 127, 127));
+ palette3.setColor(QPalette::Active, static_cast<QPalette::ColorRole>(3), QColor(255, 63, 63));
+ palette3.setColor(QPalette::Active, static_cast<QPalette::ColorRole>(4), QColor(127, 0, 0));
+ palette3.setColor(QPalette::Active, static_cast<QPalette::ColorRole>(5), QColor(170, 0, 0));
+ palette3.setColor(QPalette::Active, static_cast<QPalette::ColorRole>(6), QColor(0, 0, 0));
+ palette3.setColor(QPalette::Active, static_cast<QPalette::ColorRole>(7), QColor(255, 255, 255));
+ palette3.setColor(QPalette::Active, static_cast<QPalette::ColorRole>(8), QColor(0, 0, 0));
+ palette3.setColor(QPalette::Active, static_cast<QPalette::ColorRole>(9), QColor(255, 255, 255));
+ palette3.setColor(QPalette::Active, static_cast<QPalette::ColorRole>(10), QColor(220, 220, 220));
+ palette3.setColor(QPalette::Active, static_cast<QPalette::ColorRole>(11), QColor(0, 0, 0));
+ palette3.setColor(QPalette::Active, static_cast<QPalette::ColorRole>(12), QColor(10, 95, 137));
+ palette3.setColor(QPalette::Active, static_cast<QPalette::ColorRole>(13), QColor(255, 255, 255));
+ palette3.setColor(QPalette::Active, static_cast<QPalette::ColorRole>(14), QColor(0, 0, 0));
+ palette3.setColor(QPalette::Active, static_cast<QPalette::ColorRole>(15), QColor(0, 0, 0));
+ palette3.setColor(QPalette::Inactive, static_cast<QPalette::ColorRole>(0), QColor(0, 0, 0));
+ palette3.setColor(QPalette::Inactive, static_cast<QPalette::ColorRole>(1), QColor(255, 0, 0));
+ palette3.setColor(QPalette::Inactive, static_cast<QPalette::ColorRole>(2), QColor(255, 127, 127));
+ palette3.setColor(QPalette::Inactive, static_cast<QPalette::ColorRole>(3), QColor(255, 38, 38));
+ palette3.setColor(QPalette::Inactive, static_cast<QPalette::ColorRole>(4), QColor(127, 0, 0));
+ palette3.setColor(QPalette::Inactive, static_cast<QPalette::ColorRole>(5), QColor(170, 0, 0));
+ palette3.setColor(QPalette::Inactive, static_cast<QPalette::ColorRole>(6), QColor(0, 0, 0));
+ palette3.setColor(QPalette::Inactive, static_cast<QPalette::ColorRole>(7), QColor(255, 255, 255));
+ palette3.setColor(QPalette::Inactive, static_cast<QPalette::ColorRole>(8), QColor(0, 0, 0));
+ palette3.setColor(QPalette::Inactive, static_cast<QPalette::ColorRole>(9), QColor(255, 255, 255));
+ palette3.setColor(QPalette::Inactive, static_cast<QPalette::ColorRole>(10), QColor(220, 220, 220));
+ palette3.setColor(QPalette::Inactive, static_cast<QPalette::ColorRole>(11), QColor(0, 0, 0));
+ palette3.setColor(QPalette::Inactive, static_cast<QPalette::ColorRole>(12), QColor(10, 95, 137));
+ palette3.setColor(QPalette::Inactive, static_cast<QPalette::ColorRole>(13), QColor(255, 255, 255));
+ palette3.setColor(QPalette::Inactive, static_cast<QPalette::ColorRole>(14), QColor(0, 0, 0));
+ palette3.setColor(QPalette::Inactive, static_cast<QPalette::ColorRole>(15), QColor(0, 0, 0));
+ palette3.setColor(QPalette::Disabled, static_cast<QPalette::ColorRole>(0), QColor(128, 128, 128));
+ palette3.setColor(QPalette::Disabled, static_cast<QPalette::ColorRole>(1), QColor(255, 0, 0));
+ palette3.setColor(QPalette::Disabled, static_cast<QPalette::ColorRole>(2), QColor(255, 127, 127));
+ palette3.setColor(QPalette::Disabled, static_cast<QPalette::ColorRole>(3), QColor(255, 38, 38));
+ palette3.setColor(QPalette::Disabled, static_cast<QPalette::ColorRole>(4), QColor(127, 0, 0));
+ palette3.setColor(QPalette::Disabled, static_cast<QPalette::ColorRole>(5), QColor(170, 0, 0));
+ palette3.setColor(QPalette::Disabled, static_cast<QPalette::ColorRole>(6), QColor(0, 0, 0));
+ palette3.setColor(QPalette::Disabled, static_cast<QPalette::ColorRole>(7), QColor(255, 255, 255));
+ palette3.setColor(QPalette::Disabled, static_cast<QPalette::ColorRole>(8), QColor(128, 128, 128));
+ palette3.setColor(QPalette::Disabled, static_cast<QPalette::ColorRole>(9), QColor(255, 255, 255));
+ palette3.setColor(QPalette::Disabled, static_cast<QPalette::ColorRole>(10), QColor(220, 220, 220));
+ palette3.setColor(QPalette::Disabled, static_cast<QPalette::ColorRole>(11), QColor(0, 0, 0));
+ palette3.setColor(QPalette::Disabled, static_cast<QPalette::ColorRole>(12), QColor(10, 95, 137));
+ palette3.setColor(QPalette::Disabled, static_cast<QPalette::ColorRole>(13), QColor(255, 255, 255));
+ palette3.setColor(QPalette::Disabled, static_cast<QPalette::ColorRole>(14), QColor(0, 0, 0));
+ palette3.setColor(QPalette::Disabled, static_cast<QPalette::ColorRole>(15), QColor(0, 0, 0));
+ rslider->setPalette(palette3);
+ rslider->setMaximum(400);
+ rslider->setValue(100);
+ rslider->setOrientation(Qt::Horizontal);
+
+ gridLayout1->addWidget(rslider, 2, 1, 1, 1);
+
+ Spacer2 = new QSpacerItem(20, 20, QSizePolicy::Minimum, QSizePolicy::Expanding);
+
+ gridLayout1->addItem(Spacer2, 3, 1, 1, 1);
+
+ Spacer4 = new QSpacerItem(20, 20, QSizePolicy::Minimum, QSizePolicy::Expanding);
+
+ gridLayout1->addItem(Spacer4, 1, 1, 1, 1);
+
+ PushButton3 = new QPushButton(GroupBox1);
+ PushButton3->setObjectName(QString::fromUtf8("PushButton3"));
+
+ gridLayout1->addWidget(PushButton3, 8, 0, 1, 3);
+
+ MyCustomWidget1 = new GammaView(GroupBox1);
+ MyCustomWidget1->setObjectName(QString::fromUtf8("MyCustomWidget1"));
+
+ gridLayout1->addWidget(MyCustomWidget1, 0, 3, 9, 1);
+
+ Spacer5 = new QSpacerItem(20, 20, QSizePolicy::Minimum, QSizePolicy::Expanding);
+
+ gridLayout1->addItem(Spacer5, 7, 1, 1, 1);
+
+
+ gridLayout->addWidget(GroupBox1, 3, 0, 1, 2);
+
+ ButtonGroup1 = new Q3ButtonGroup(Config);
+ ButtonGroup1->setObjectName(QString::fromUtf8("ButtonGroup1"));
+ QSizePolicy sizePolicy(static_cast<QSizePolicy::Policy>(5), static_cast<QSizePolicy::Policy>(5));
+ sizePolicy.setHorizontalStretch(0);
+ sizePolicy.setVerticalStretch(0);
+ sizePolicy.setHeightForWidth(ButtonGroup1->sizePolicy().hasHeightForWidth());
+ ButtonGroup1->setSizePolicy(sizePolicy);
+ ButtonGroup1->setColumnLayout(0, Qt::Vertical);
+ ButtonGroup1->layout()->setSpacing(6);
+ ButtonGroup1->layout()->setContentsMargins(11, 11, 11, 11);
+ vboxLayout = new QVBoxLayout();
+ QBoxLayout *boxlayout1 = qobject_cast<QBoxLayout *>(ButtonGroup1->layout());
+ if (boxlayout1)
+ boxlayout1->addLayout(vboxLayout);
+ vboxLayout->setAlignment(Qt::AlignTop);
+ vboxLayout->setObjectName(QString::fromUtf8("vboxLayout"));
+ size_240_320 = new QRadioButton(ButtonGroup1);
+ size_240_320->setObjectName(QString::fromUtf8("size_240_320"));
+
+ vboxLayout->addWidget(size_240_320);
+
+ size_320_240 = new QRadioButton(ButtonGroup1);
+ size_320_240->setObjectName(QString::fromUtf8("size_320_240"));
+
+ vboxLayout->addWidget(size_320_240);
+
+ size_640_480 = new QRadioButton(ButtonGroup1);
+ size_640_480->setObjectName(QString::fromUtf8("size_640_480"));
+
+ vboxLayout->addWidget(size_640_480);
+
+ hboxLayout1 = new QHBoxLayout();
+ hboxLayout1->setSpacing(6);
+ hboxLayout1->setContentsMargins(0, 0, 0, 0);
+ hboxLayout1->setObjectName(QString::fromUtf8("hboxLayout1"));
+ size_custom = new QRadioButton(ButtonGroup1);
+ size_custom->setObjectName(QString::fromUtf8("size_custom"));
+
+ hboxLayout1->addWidget(size_custom);
+
+ size_width = new QSpinBox(ButtonGroup1);
+ size_width->setObjectName(QString::fromUtf8("size_width"));
+ size_width->setMaximum(1280);
+ size_width->setMinimum(1);
+ size_width->setSingleStep(16);
+ size_width->setValue(400);
+
+ hboxLayout1->addWidget(size_width);
+
+ size_height = new QSpinBox(ButtonGroup1);
+ size_height->setObjectName(QString::fromUtf8("size_height"));
+ size_height->setMaximum(1024);
+ size_height->setMinimum(1);
+ size_height->setSingleStep(16);
+ size_height->setValue(300);
+
+ hboxLayout1->addWidget(size_height);
+
+
+ vboxLayout->addLayout(hboxLayout1);
+
+ hboxLayout2 = new QHBoxLayout();
+ hboxLayout2->setSpacing(6);
+ hboxLayout2->setContentsMargins(0, 0, 0, 0);
+ hboxLayout2->setObjectName(QString::fromUtf8("hboxLayout2"));
+ size_skin = new QRadioButton(ButtonGroup1);
+ size_skin->setObjectName(QString::fromUtf8("size_skin"));
+ QSizePolicy sizePolicy1(static_cast<QSizePolicy::Policy>(0), static_cast<QSizePolicy::Policy>(0));
+ sizePolicy1.setHorizontalStretch(0);
+ sizePolicy1.setVerticalStretch(0);
+ sizePolicy1.setHeightForWidth(size_skin->sizePolicy().hasHeightForWidth());
+ size_skin->setSizePolicy(sizePolicy1);
+
+ hboxLayout2->addWidget(size_skin);
+
+ skin = new QComboBox(ButtonGroup1);
+ skin->setObjectName(QString::fromUtf8("skin"));
+ QSizePolicy sizePolicy2(static_cast<QSizePolicy::Policy>(5), static_cast<QSizePolicy::Policy>(0));
+ sizePolicy2.setHorizontalStretch(0);
+ sizePolicy2.setVerticalStretch(0);
+ sizePolicy2.setHeightForWidth(skin->sizePolicy().hasHeightForWidth());
+ skin->setSizePolicy(sizePolicy2);
+
+ hboxLayout2->addWidget(skin);
+
+
+ vboxLayout->addLayout(hboxLayout2);
+
+
+ gridLayout->addWidget(ButtonGroup1, 0, 0, 1, 1);
+
+ TextLabel1 = new QLabel(Config);
+ TextLabel1->setObjectName(QString::fromUtf8("TextLabel1"));
+ TextLabel1->setWordWrap(false);
+
+ gridLayout->addWidget(TextLabel1, 1, 0, 1, 2);
+
+ test_for_useless_buttongroupId = new QRadioButton(Config);
+ test_for_useless_buttongroupId->setObjectName(QString::fromUtf8("test_for_useless_buttongroupId"));
+
+ gridLayout->addWidget(test_for_useless_buttongroupId, 0, 0, 1, 1);
+
+
+ retranslateUi(Config);
+ QObject::connect(buttonOk, SIGNAL(clicked()), Config, SLOT(accept()));
+ QObject::connect(buttonCancel, SIGNAL(clicked()), Config, SLOT(reject()));
+
+ QMetaObject::connectSlotsByName(Config);
+ } // setupUi
+
+ void retranslateUi(QDialog *Config)
+ {
+ Config->setWindowTitle(QApplication::translate("Config", "Configure", 0, QApplication::UnicodeUTF8));
+ ButtonGroup2->setTitle(QApplication::translate("Config", "Depth", 0, QApplication::UnicodeUTF8));
+ depth_1->setText(QApplication::translate("Config", "1 bit monochrome", 0, QApplication::UnicodeUTF8));
+ depth_4gray->setText(QApplication::translate("Config", "4 bit grayscale", 0, QApplication::UnicodeUTF8));
+ depth_8->setText(QApplication::translate("Config", "8 bit", 0, QApplication::UnicodeUTF8));
+ depth_12->setText(QApplication::translate("Config", "12 (16) bit", 0, QApplication::UnicodeUTF8));
+ depth_16->setText(QApplication::translate("Config", "16 bit", 0, QApplication::UnicodeUTF8));
+ depth_32->setText(QApplication::translate("Config", "32 bit", 0, QApplication::UnicodeUTF8));
+ buttonOk->setText(QApplication::translate("Config", "&OK", 0, QApplication::UnicodeUTF8));
+ buttonCancel->setText(QApplication::translate("Config", "&Cancel", 0, QApplication::UnicodeUTF8));
+ touchScreen->setText(QApplication::translate("Config", "Emulate touch screen (no mouse move).", 0, QApplication::UnicodeUTF8));
+ GroupBox1->setTitle(QApplication::translate("Config", "Gamma", 0, QApplication::UnicodeUTF8));
+ TextLabel3->setText(QApplication::translate("Config", "Blue", 0, QApplication::UnicodeUTF8));
+ blabel->setText(QApplication::translate("Config", "1.0", 0, QApplication::UnicodeUTF8));
+ TextLabel2->setText(QApplication::translate("Config", "Green", 0, QApplication::UnicodeUTF8));
+ glabel->setText(QApplication::translate("Config", "1.0", 0, QApplication::UnicodeUTF8));
+ TextLabel7->setText(QApplication::translate("Config", "All", 0, QApplication::UnicodeUTF8));
+ TextLabel8->setText(QApplication::translate("Config", "1.0", 0, QApplication::UnicodeUTF8));
+ TextLabel1_2->setText(QApplication::translate("Config", "Red", 0, QApplication::UnicodeUTF8));
+ rlabel->setText(QApplication::translate("Config", "1.0", 0, QApplication::UnicodeUTF8));
+ PushButton3->setText(QApplication::translate("Config", "Set all to 1.0", 0, QApplication::UnicodeUTF8));
+ ButtonGroup1->setTitle(QApplication::translate("Config", "Size", 0, QApplication::UnicodeUTF8));
+ size_240_320->setText(QApplication::translate("Config", "240x320 \"PDA\"", 0, QApplication::UnicodeUTF8));
+ size_320_240->setText(QApplication::translate("Config", "320x240 \"TV\"", 0, QApplication::UnicodeUTF8));
+ size_640_480->setText(QApplication::translate("Config", "640x480 \"VGA\"", 0, QApplication::UnicodeUTF8));
+ size_custom->setText(QApplication::translate("Config", "Custom", 0, QApplication::UnicodeUTF8));
+ size_skin->setText(QApplication::translate("Config", "Skin", 0, QApplication::UnicodeUTF8));
+ skin->clear();
+ skin->insertItems(0, QStringList()
+ << QApplication::translate("Config", "pda.skin", 0, QApplication::UnicodeUTF8)
+ << QApplication::translate("Config", "ipaq.skin", 0, QApplication::UnicodeUTF8)
+ << QApplication::translate("Config", "qpe.skin", 0, QApplication::UnicodeUTF8)
+ << QApplication::translate("Config", "cassiopeia.skin", 0, QApplication::UnicodeUTF8)
+ << QApplication::translate("Config", "other.skin", 0, QApplication::UnicodeUTF8)
+ );
+ TextLabel1->setText(QApplication::translate("Config", "<p>Note that any applications using the virtual framebuffer will be terminated if you change the Size or Depth <i>above</i>. You may freely modify the Gamma <i>below</i>.", 0, QApplication::UnicodeUTF8));
+ test_for_useless_buttongroupId->setText(QApplication::translate("Config", "Test", 0, QApplication::UnicodeUTF8));
+ } // retranslateUi
+
+
+protected:
+ enum IconID
+ {
+ image0_ID,
+ unknown_ID
+ };
+ static QPixmap qt_get_icon(IconID id)
+ {
+ static const char* const image0_data[] = {
+"22 22 2 1",
+". c None",
+"# c #a4c610",
+"........######........",
+".....###########......",
+"....##############....",
+"...################...",
+"..######......######..",
+"..#####........#####..",
+".#####.......#..#####.",
+".####.......###..####.",
+"####.......#####..####",
+"####......#####...####",
+"####....#######...####",
+"####....######....####",
+"####...########...####",
+".####.##########..####",
+".####..####.#########.",
+".#####..##...########.",
+"..#####.......#######.",
+"..######......######..",
+"...###################",
+"....##################",
+"......###########.###.",
+"........######.....#.."};
+
+
+ switch (id) {
+ case image0_ID: return QPixmap((const char**)image0_data);
+ default: return QPixmap();
+ } // switch
+ } // icon
+
+};
+
+namespace Ui {
+ class Config: public Ui_Config {};
+} // namespace Ui
+
+QT_END_NAMESPACE
+
+#endif // CONFIG_FROMUIC3_H
diff --git a/tests/auto/uic3/baseline/config.ui b/tests/auto/uic3/baseline/config.ui
index 1ffeab3..dc02682 100644
--- a/tests/auto/uic3/baseline/config.ui
+++ b/tests/auto/uic3/baseline/config.ui
@@ -1648,6 +1648,17 @@
<string>&lt;p&gt;Note that any applications using the virtual framebuffer will be terminated if you change the Size or Depth &lt;i&gt;above&lt;/i&gt;. You may freely modify the Gamma &lt;i&gt;below&lt;/i&gt;.</string>
</property>
</widget>
+ <widget class="QRadioButton">
+ <property name="name">
+ <cstring>test_for_useless_buttongroupId</cstring>
+ </property>
+ <property name="text">
+ <string>Test</string>
+ </property>
+ <property name="buttonGroupId">
+ <string>1</string>
+ </property>
+ </widget>
</grid>
</widget>
<customwidgets>
diff --git a/tests/auto/uic3/baseline/config.ui.4 b/tests/auto/uic3/baseline/config.ui.4
index 17e6a7c..0bd6256 100644
--- a/tests/auto/uic3/baseline/config.ui.4
+++ b/tests/auto/uic3/baseline/config.ui.4
@@ -1595,6 +1595,16 @@
</property>
</widget>
</item>
+ <item>
+ <widget class="QRadioButton" name="test_for_useless_buttongroupId">
+ <property name="text">
+ <string>Test</string>
+ </property>
+ <property name="buttonGroupId">
+ <string>1</string>
+ </property>
+ </widget>
+ </item>
</layout>
</widget>
<layoutdefault spacing="6" margin="11"/>
diff --git a/tests/auto/uiloader/baseline/css_qtbug6855.ui b/tests/auto/uiloader/baseline/css_qtbug6855.ui
deleted file mode 100644
index 0727f6b..0000000
--- a/tests/auto/uiloader/baseline/css_qtbug6855.ui
+++ /dev/null
@@ -1,57 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<ui version="4.0">
- <class>Form</class>
- <widget class="QWidget" name="Form">
- <property name="geometry">
- <rect>
- <x>0</x>
- <y>0</y>
- <width>212</width>
- <height>108</height>
- </rect>
- </property>
- <property name="windowTitle">
- <string>Form</string>
- </property>
- <property name="styleSheet">
- <string notr="true">QPushButton { padding: 20px; }</string>
- </property>
- <layout class="QGridLayout" name="gridLayout">
- <item row="0" column="0">
- <widget class="QPushButton" name="pushButton">
- <property name="text">
- <string>Text not cropped</string>
- </property>
- </widget>
- </item>
- <item row="0" column="1">
- <spacer name="horizontalSpacer">
- <property name="orientation">
- <enum>Qt::Horizontal</enum>
- </property>
- <property name="sizeHint" stdset="0">
- <size>
- <width>258</width>
- <height>20</height>
- </size>
- </property>
- </spacer>
- </item>
- <item row="1" column="0">
- <spacer name="verticalSpacer">
- <property name="orientation">
- <enum>Qt::Vertical</enum>
- </property>
- <property name="sizeHint" stdset="0">
- <size>
- <width>20</width>
- <height>218</height>
- </size>
- </property>
- </spacer>
- </item>
- </layout>
- </widget>
- <resources/>
- <connections/>
-</ui>
diff --git a/tests/benchmarks/benchmarks.pro b/tests/benchmarks/benchmarks.pro
index 0f760a1..7bb4bb1 100644
--- a/tests/benchmarks/benchmarks.pro
+++ b/tests/benchmarks/benchmarks.pro
@@ -37,6 +37,7 @@ SUBDIRS = containers-associative \
qstringbuilder \
qstylesheetstyle \
qsvgrenderer \
+ qtcpserver \
qtableview \
qthreadstorage
diff --git a/tests/benchmarks/qgraphicsscene/tst_qgraphicsscene.cpp b/tests/benchmarks/qgraphicsscene/tst_qgraphicsscene.cpp
index 1944219..53fd9b6 100644
--- a/tests/benchmarks/qgraphicsscene/tst_qgraphicsscene.cpp
+++ b/tests/benchmarks/qgraphicsscene/tst_qgraphicsscene.cpp
@@ -64,6 +64,7 @@ private slots:
void addItem();
void itemAt_data();
void itemAt();
+ void initialShow();
};
tst_QGraphicsScene::tst_QGraphicsScene()
@@ -227,5 +228,21 @@ void tst_QGraphicsScene::itemAt()
qApp->processEvents();
}
+void tst_QGraphicsScene::initialShow()
+{
+ QGraphicsScene scene;
+
+ QBENCHMARK {
+ for (int y = 0; y < 30000; ++y) {
+ QGraphicsRectItem *item = new QGraphicsRectItem(0, 0, 50, 50);
+ item->setPos((y/2) * item->rect().width(), (y/2) * item->rect().height());
+ scene.addItem(item);
+ }
+ scene.itemAt(0, 0); // triggers indexing
+ //This call polish the items so we bench their processing too.
+ qApp->processEvents();
+ }
+}
+
QTEST_MAIN(tst_QGraphicsScene)
#include "tst_qgraphicsscene.moc"
diff --git a/tests/benchmarks/qhostinfo/main.cpp b/tests/benchmarks/qhostinfo/main.cpp
index 389443b..80d0fd8 100644
--- a/tests/benchmarks/qhostinfo/main.cpp
+++ b/tests/benchmarks/qhostinfo/main.cpp
@@ -7,11 +7,11 @@
** This file is part of the test suite of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
-** Commercial Usage
-** Licensees holding valid Qt Commercial licenses may use this file in
-** accordance with the Qt Commercial License Agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Nokia.
+** 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
@@ -25,19 +25,21 @@
** rights. These rights are described in the Nokia Qt LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
** If you have questions regarding the use of this file, please contact
** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
+
+
#include <QDebug>
#include <QHostInfo>
#include <QStringList>
diff --git a/tests/benchmarks/qtcpserver/qtcpserver.pro b/tests/benchmarks/qtcpserver/qtcpserver.pro
new file mode 100644
index 0000000..e7bf13a
--- /dev/null
+++ b/tests/benchmarks/qtcpserver/qtcpserver.pro
@@ -0,0 +1,13 @@
+load(qttest_p4)
+TEMPLATE = app
+TARGET = tst_qtcpserver
+DEPENDPATH += .
+INCLUDEPATH += .
+
+QT -= gui
+QT += network
+
+CONFIG += release
+
+# Input
+SOURCES += tst_qtcpserver.cpp
diff --git a/tests/benchmarks/qtcpserver/tst_qtcpserver.cpp b/tests/benchmarks/qtcpserver/tst_qtcpserver.cpp
new file mode 100644
index 0000000..07640b8
--- /dev/null
+++ b/tests/benchmarks/qtcpserver/tst_qtcpserver.cpp
@@ -0,0 +1,277 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the test suite 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$
+**
+****************************************************************************/
+
+// Just to get Q_OS_SYMBIAN
+#include <qglobal.h>
+
+#include <QtTest/QtTest>
+
+
+#include <qcoreapplication.h>
+#include <qtcpsocket.h>
+#include <qtcpserver.h>
+#include <qhostaddress.h>
+#include <qprocess.h>
+#include <qstringlist.h>
+#include <qplatformdefs.h>
+#include <qhostinfo.h>
+
+#include <QNetworkProxy>
+Q_DECLARE_METATYPE(QNetworkProxy)
+Q_DECLARE_METATYPE(QList<QNetworkProxy>)
+
+#include "../../auto/network-settings.h"
+
+//TESTED_CLASS=
+//TESTED_FILES=
+
+class tst_QTcpServer : public QObject
+{
+ Q_OBJECT
+
+public:
+ tst_QTcpServer();
+ virtual ~tst_QTcpServer();
+
+
+public slots:
+ void initTestCase_data();
+ void init();
+ void cleanup();
+private slots:
+ void ipv4LoopbackPerformanceTest();
+ void ipv6LoopbackPerformanceTest();
+ void ipv4PerformanceTest();
+};
+
+tst_QTcpServer::tst_QTcpServer()
+{
+ Q_SET_DEFAULT_IAP
+}
+
+tst_QTcpServer::~tst_QTcpServer()
+{
+}
+
+void tst_QTcpServer::initTestCase_data()
+{
+ QTest::addColumn<bool>("setProxy");
+ QTest::addColumn<int>("proxyType");
+
+ QTest::newRow("WithoutProxy") << false << 0;
+ QTest::newRow("WithSocks5Proxy") << true << int(QNetworkProxy::Socks5Proxy);
+}
+
+void tst_QTcpServer::init()
+{
+ QFETCH_GLOBAL(bool, setProxy);
+ if (setProxy) {
+ QFETCH_GLOBAL(int, proxyType);
+ if (proxyType == QNetworkProxy::Socks5Proxy) {
+ QNetworkProxy::setApplicationProxy(QNetworkProxy(QNetworkProxy::Socks5Proxy, QtNetworkSettings::serverName(), 1080));
+ }
+ }
+}
+
+void tst_QTcpServer::cleanup()
+{
+ QNetworkProxy::setApplicationProxy(QNetworkProxy::DefaultProxy);
+}
+
+//----------------------------------------------------------------------------------
+void tst_QTcpServer::ipv4LoopbackPerformanceTest()
+{
+ QFETCH_GLOBAL(bool, setProxy);
+ if (setProxy)
+ return;
+
+ QTcpServer server;
+ QVERIFY(server.listen(QHostAddress::LocalHost));
+
+ QVERIFY(server.isListening());
+
+ QTcpSocket clientA;
+ clientA.connectToHost(QHostAddress::LocalHost, server.serverPort());
+ QVERIFY(clientA.waitForConnected(5000));
+ QVERIFY(clientA.state() == QAbstractSocket::ConnectedState);
+
+ QVERIFY(server.waitForNewConnection());
+ QTcpSocket *clientB = server.nextPendingConnection();
+ QVERIFY(clientB);
+
+ QByteArray buffer(16384, '@');
+ QTime stopWatch;
+ stopWatch.start();
+ qlonglong totalWritten = 0;
+ while (stopWatch.elapsed() < 5000) {
+ QVERIFY(clientA.write(buffer.data(), buffer.size()) > 0);
+ clientA.flush();
+ totalWritten += buffer.size();
+ while (clientB->waitForReadyRead(100)) {
+ if (clientB->bytesAvailable() == 16384)
+ break;
+ }
+ clientB->read(buffer.data(), buffer.size());
+ clientB->write(buffer.data(), buffer.size());
+ clientB->flush();
+ totalWritten += buffer.size();
+ while (clientA.waitForReadyRead(100)) {
+ if (clientA.bytesAvailable() == 16384)
+ break;
+ }
+ clientA.read(buffer.data(), buffer.size());
+ }
+
+ qDebug("\t\t%s: %.1fMB/%.1fs: %.1fMB/s",
+ server.serverAddress().toString().toLatin1().constData(),
+ totalWritten / (1024.0 * 1024.0),
+ stopWatch.elapsed() / 1000.0,
+ (totalWritten / (stopWatch.elapsed() / 1000.0)) / (1024 * 1024));
+
+ delete clientB;
+}
+
+//----------------------------------------------------------------------------------
+void tst_QTcpServer::ipv6LoopbackPerformanceTest()
+{
+ QFETCH_GLOBAL(bool, setProxy);
+ if (setProxy)
+ return;
+
+#if defined(Q_OS_SYMBIAN)
+ QSKIP("Symbian: IPv6 is not yet supported", SkipAll);
+#endif
+ QTcpServer server;
+ if (!server.listen(QHostAddress::LocalHostIPv6, 0)) {
+ QVERIFY(server.serverError() == QAbstractSocket::UnsupportedSocketOperationError);
+ } else {
+ QTcpSocket clientA;
+ clientA.connectToHost(server.serverAddress(), server.serverPort());
+ QVERIFY(clientA.waitForConnected(5000));
+
+ QVERIFY(server.waitForNewConnection(5000));
+ QTcpSocket *clientB = server.nextPendingConnection();
+ QVERIFY(clientB);
+
+ QByteArray buffer(16384, '@');
+ QTime stopWatch;
+ stopWatch.start();
+ qlonglong totalWritten = 0;
+ while (stopWatch.elapsed() < 5000) {
+ clientA.write(buffer.data(), buffer.size());
+ clientA.flush();
+ totalWritten += buffer.size();
+ while (clientB->waitForReadyRead(100)) {
+ if (clientB->bytesAvailable() == 16384)
+ break;
+ }
+ clientB->read(buffer.data(), buffer.size());
+ clientB->write(buffer.data(), buffer.size());
+ clientB->flush();
+ totalWritten += buffer.size();
+ while (clientA.waitForReadyRead(100)) {
+ if (clientA.bytesAvailable() == 16384)
+ break;
+ }
+ clientA.read(buffer.data(), buffer.size());
+ }
+
+ qDebug("\t\t%s: %.1fMB/%.1fs: %.1fMB/s",
+ server.serverAddress().toString().toLatin1().constData(),
+ totalWritten / (1024.0 * 1024.0),
+ stopWatch.elapsed() / 1000.0,
+ (totalWritten / (stopWatch.elapsed() / 1000.0)) / (1024 * 1024));
+ delete clientB;
+ }
+}
+
+//----------------------------------------------------------------------------------
+void tst_QTcpServer::ipv4PerformanceTest()
+{
+ QTcpSocket probeSocket;
+ probeSocket.connectToHost(QtNetworkSettings::serverName(), 143);
+ QVERIFY(probeSocket.waitForConnected(5000));
+
+ QTcpServer server;
+ QVERIFY(server.listen(probeSocket.localAddress(), 0));
+
+ QTcpSocket clientA;
+ clientA.connectToHost(server.serverAddress(), server.serverPort());
+ QVERIFY(clientA.waitForConnected(5000));
+
+ QVERIFY(server.waitForNewConnection(5000));
+ QTcpSocket *clientB = server.nextPendingConnection();
+ QVERIFY(clientB);
+
+ QByteArray buffer(16384, '@');
+ QTime stopWatch;
+ stopWatch.start();
+ qlonglong totalWritten = 0;
+ while (stopWatch.elapsed() < 5000) {
+ qlonglong writtenA = clientA.write(buffer.data(), buffer.size());
+ clientA.flush();
+ totalWritten += buffer.size();
+ while (clientB->waitForReadyRead(100)) {
+ if (clientB->bytesAvailable() == writtenA)
+ break;
+ }
+ clientB->read(buffer.data(), buffer.size());
+ qlonglong writtenB = clientB->write(buffer.data(), buffer.size());
+ clientB->flush();
+ totalWritten += buffer.size();
+ while (clientA.waitForReadyRead(100)) {
+ if (clientA.bytesAvailable() == writtenB)
+ break;
+ }
+ clientA.read(buffer.data(), buffer.size());
+ }
+
+ qDebug("\t\t%s: %.1fMB/%.1fs: %.1fMB/s",
+ probeSocket.localAddress().toString().toLatin1().constData(),
+ totalWritten / (1024.0 * 1024.0),
+ stopWatch.elapsed() / 1000.0,
+ (totalWritten / (stopWatch.elapsed() / 1000.0)) / (1024 * 1024));
+
+ delete clientB;
+}
+
+QTEST_MAIN(tst_QTcpServer)
+#include "tst_qtcpserver.moc"