summaryrefslogtreecommitdiff
path: root/library
Side-by-side diff
Diffstat (limited to 'library') (more/less context) (ignore whitespace changes)
-rw-r--r--library/fontdatabase.cpp17
1 files changed, 16 insertions, 1 deletions
diff --git a/library/fontdatabase.cpp b/library/fontdatabase.cpp
index 899d5cf..c7a5211 100644
--- a/library/fontdatabase.cpp
+++ b/library/fontdatabase.cpp
@@ -49,14 +49,14 @@ static QString fontFamily( const QString& key )
//bool italic = key.mid(u2-1,1) == "i";
// #### ignores _t and _I fields
return family;
}
#endif
-QValueList<FontFactory> *FontDatabase::factoryList = 0;
+QValueList<FontFactory> *FontDatabase::factoryList = 0;
/*!
\class FontDatabase fontdatabase.h
\brief The FontDatabase class provides information about available fonts.
Most often you will simply want to query the database for the
available font families().
@@ -89,12 +89,17 @@ FontDatabase::FontDatabase()
*/
QStringList FontDatabase::families() const
{
#ifndef QT_NO_FONTDATABASE
return QFontDatabase::families();
#else
+
+#ifndef QWS
+ QStringList list;
+ return list;
+#else
QStringList list;
QDict<void> familyDict;
QDiskFont *qdf;
for ( qdf=qt_fontmanager->diskfonts.first(); qdf!=0;
qdf=qt_fontmanager->diskfonts.next()) {
QString familyname = qdf->name;
@@ -112,12 +117,13 @@ QStringList FontDatabase::families() const
list.append( familyname );
}
}
return list;
#endif
+#endif
}
#ifdef QT_NO_FONTDATABASE
/*!
Returns a list of standard fontsizes.
*/
@@ -141,12 +147,16 @@ QValueList<int> FontDatabase::standardSizes()
/*!
Load any font renderer plugins that are available and make the fonts
that the plugins can read available.
*/
void FontDatabase::loadRenderers()
{
+#ifndef QWS
+ return;
+#else
+
#ifndef QT_NO_COMPONENT
if ( !factoryList )
factoryList = new QValueList<FontFactory>;
QValueList<FontFactory>::Iterator mit;
for ( mit = factoryList->begin(); mit != factoryList->end(); ++mit ) {
@@ -180,19 +190,23 @@ void FontDatabase::loadRenderers()
readFonts( factory.factory );
} else {
delete lib;
}
}
#endif
+#endif
}
/*!
\internal
*/
void FontDatabase::readFonts( QFontFactory *factory )
{
+#ifndef QWS
+return;
+#else
// Load in font definition file
QString fn = fontDir() + "fontdir";
FILE* fontdef=fopen(fn.local8Bit(),"r");
if(!fontdef) {
QCString temp=fn.local8Bit();
qWarning("Cannot find font definition file %s - is $QTDIR set correctly?",
@@ -227,8 +241,9 @@ void FontDatabase::readFonts( QFontFactory *factory )
}
}
}
fgets(buf,200,fontdef);
}
fclose(fontdef);
+#endif
}