// #cmakedefine QT_NO_TABWIDGET
// #cmakedefine QT_NO_TABLEVIEW
// #cmakedefine QT_NO_TABLEWIDGET
-// #cmakedefine QT_NO_TEMPORARYFILE
// #cmakedefine QT_NO_TEXTCONTROL
// #cmakedefine QT_NO_TEXTEDIT
// #cmakedefine QT_NO_TEXTHTMLPARSER
#cmakedefine QT_NO_STYLE_WINDOWS
#cmakedefine QT_NO_SYNTAXHIGHLIGHTER
#cmakedefine QT_NO_SYSTEMTRAYICON
+#cmakedefine QT_NO_TEMPORARYFILE
#cmakedefine QT_NO_TEXTBROWSER
#cmakedefine QT_NO_UDPSOCKET
#cmakedefine QT_NO_UNDOGROUP
int fileDescriptorForTest();
QProcess proc;
+#ifndef QT_NO_TEMPORARYFILE
QTemporaryFile tempFile;
+#else
+ QFile file;
+#endif
bool fileDescriptorPassing;
};
int tst_QDBusMarshall::fileDescriptorForTest()
{
+#ifndef QT_NO_TEMPORARYFILE
if (!tempFile.isOpen()) {
tempFile.setFileTemplate(QDir::tempPath() + "/qdbusmarshalltestXXXXXX.tmp");
tempFile.open();
}
return tempFile.handle();
+#else
+ if (!file.isOpen()) {
+ file.open(STDERR_FILENO, QFile::ReadOnly);
+ }
+ return file.handle();
+#endif
}
void addBasicTypesColumns()
void tst_QFileInfo::copy()
{
+#ifndef QT_NO_TEMPORARYFILE
QTemporaryFile t;
t.open();
QFileInfo info(t.fileName());
QVERIFY(privateInfo != privateInfo3);
QVERIFY(privateInfo2 != privateInfo3);
QCOMPARE(privateInfo, privateInfo2);
+#else // QT_NO_TEMPORARYFILE
+ QSKIP("Katie compiled without temporary file support (QT_NO_TEMPORARYFILE)", SkipAll);
+#endif // QT_NO_TEMPORARYFILE
}
void tst_QFileInfo::isFile_data()
void tst_QFileInfo::canonicalPath()
{
+#ifndef QT_NO_TEMPORARYFILE
QTemporaryFile tempFile;
tempFile.setAutoRemove(true);
tempFile.open();
QFileInfo fi(tempFile.fileName());
QCOMPARE(fi.canonicalPath(), QFileInfo(QDir::tempPath()).canonicalFilePath());
+#else // QT_NO_TEMPORARYFILE
+ QSKIP("Katie compiled without temporary file support (QT_NO_TEMPORARYFILE)", SkipAll);
+#endif // QT_NO_TEMPORARYFILE
}
void tst_QFileInfo::canonicalFilePath()
**
****************************************************************************/
-
#include <QtTest/QtTest>
#include <qcoreapplication.h>
#include <qstring.h>
//TESTED_CLASS=
//TESTED_FILES=
+#ifndef QT_NO_TEMPORARYFILE
+
class tst_QTemporaryFile : public QObject
{
Q_OBJECT
QTEST_MAIN(tst_QTemporaryFile)
#include "moc_tst_qtemporaryfile.cpp"
+
+#else // QT_NO_TEMPORARYFILE
+
+QTEST_NOOP_MAIN
+
+#endif // QT_NO_TEMPORARYFILE
#define QFILE_BENCH_FACTOR 1024*512
#define QFILE_BENCH_TF_SIZE QFILE_BENCH_FACTOR*81
+#ifndef QT_NO_TEMPORARYFILE
+
// 10 predefined (but random() seek positions
// hardcoded to be comparable over several runs
const int seekpos[] = {int(QFILE_BENCH_TF_SIZE*0.52),
class tst_qfile: public QObject
{
-Q_ENUMS(BenchmarkType)
-Q_OBJECT
+ Q_ENUMS(BenchmarkType)
+ Q_OBJECT
public:
enum BenchmarkType {
QFileBenchmark = 1,
QTEST_MAIN(tst_qfile)
#include "moc_main.cpp"
+
+#else // QT_NO_TEMPORARYFILE
+
+QTEST_NOOP_MAIN
+
+#endif // QT_NO_TEMPORARYFILE
QT_USE_NAMESPACE
+#ifndef QT_NO_TEMPORARYFILE
+
class tst_qtemporaryfile : public QObject
{
Q_OBJECT
QTEST_MAIN(tst_qtemporaryfile)
#include "moc_main.cpp"
+
+#else // QT_NO_TEMPORARYFILE
+
+QTEST_NOOP_MAIN
+
+#endif // QT_NO_TEMPORARYFILE