summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/gui/text/qfontdatabase.cpp9
-rw-r--r--tests/auto/qtextedit/tst_qtextedit.cpp6
-rw-r--r--tests/auto/qtextlayout/tst_qtextlayout.cpp6
3 files changed, 12 insertions, 9 deletions
diff --git a/src/gui/text/qfontdatabase.cpp b/src/gui/text/qfontdatabase.cpp
index d33cdf0..cba41da 100644
--- a/src/gui/text/qfontdatabase.cpp
+++ b/src/gui/text/qfontdatabase.cpp
@@ -85,7 +85,12 @@ QT_BEGIN_NAMESPACE
extern int qt_defaultDpiY(); // in qfont.cpp
-Q_GUI_EXPORT bool qt_enable_test_font = false;
+bool qt_enable_test_font = false;
+
+Q_AUTOTEST_EXPORT void qt_setQtEnableTestFont(bool value)
+{
+ qt_enable_test_font = value;
+}
static int getFontWeight(const QString &weightString)
{
@@ -2588,7 +2593,7 @@ QStringList QFontDatabase::applicationFontFamilies(int id)
\sa removeApplicationFont(), addApplicationFont(), addApplicationFontFromData()
*/
-/*!
+/*!
\fn bool QFontDatabase::supportsThreadedFontRendering()
\since 4.4
diff --git a/tests/auto/qtextedit/tst_qtextedit.cpp b/tests/auto/qtextedit/tst_qtextedit.cpp
index 392af5e..100eecd 100644
--- a/tests/auto/qtextedit/tst_qtextedit.cpp
+++ b/tests/auto/qtextedit/tst_qtextedit.cpp
@@ -1917,7 +1917,7 @@ void tst_QTextEdit::setText()
}
QT_BEGIN_NAMESPACE
-extern Q_GUI_EXPORT bool qt_enable_test_font;
+extern void qt_setQtEnableTestFont(bool value);
QT_END_NAMESPACE
void tst_QTextEdit::fullWidthSelection_data()
@@ -1964,7 +1964,7 @@ void tst_QTextEdit::fullWidthSelection()
cursor.setBlockFormat(bf1);
// use the test font so we always know where stuff will end up.
- qt_enable_test_font = true;
+ qt_setQtEnableTestFont(true);
QFont testFont;
testFont.setFamily("__Qt__Box__Engine__");
testFont.setPixelSize(12);
@@ -2012,7 +2012,7 @@ void tst_QTextEdit::fullWidthSelection2()
QTextCursor cursor = widget.textCursor();
// use the test font so we always know where stuff will end up.
- qt_enable_test_font = true;
+ qt_setQtEnableTestFont(true);
QFont testFont;
testFont.setFamily("__Qt__Box__Engine__");
testFont.setPixelSize(12);
diff --git a/tests/auto/qtextlayout/tst_qtextlayout.cpp b/tests/auto/qtextlayout/tst_qtextlayout.cpp
index e948cf2..d76f387 100644
--- a/tests/auto/qtextlayout/tst_qtextlayout.cpp
+++ b/tests/auto/qtextlayout/tst_qtextlayout.cpp
@@ -57,8 +57,6 @@
#define TESTFONT_SIZE 12
-
-
//TESTED_CLASS=
//TESTED_FILES=
@@ -164,12 +162,12 @@ void tst_QTextLayout::getSetCheck()
}
QT_BEGIN_NAMESPACE
-extern Q_GUI_EXPORT bool qt_enable_test_font;
+extern void qt_setQtEnableTestFont(bool value);
QT_END_NAMESPACE
tst_QTextLayout::tst_QTextLayout()
{
- qt_enable_test_font = true;
+ qt_setQtEnableTestFont(true);
}
tst_QTextLayout::~tst_QTextLayout()