fix logic
[personal-kdelibs.git] / khtml / test_regression_fontoverload.cpp
blob01b253cd3699d7ec3bbea6f6719febe5250fd5e2
1 /**
2 * This file is part of the KDE project
4 * Copyright (C) 2003 Stephan Kulow (coolo@kde.org)
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Library General Public
8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version.
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Library General Public License for more details.
16 * You should have received a copy of the GNU Library General Public License
17 * along with this library; see the file COPYING.LIB. If not, write to
18 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
19 * Boston, MA 02110-1301, USA.
23 #include "ecma/kjs_proxy.h"
25 #define QT_NO_FONTCONFIG 1
26 #define QT_NO_FREETYPE 1
27 #include <private/qfontengine_p.h>
28 #ifdef Q_WS_X11
29 # include <private/qfontengine_x11_p.h>
30 #endif
31 #include <QtGui/QFontDatabase>
32 #include <QtGui/QFont>
33 #include "khtml_settings.h"
34 #include <QtGui/QImage>
35 #include <assert.h>
36 #include <QtGui/QX11Info>
37 #include <QtGui/QPainter>
38 #include <fixx11h.h>
40 struct MetricsInfo {
41 const char* name;
42 int ascent;
43 int descent;
44 int leading;
48 typedef QFixed QtFontDim;
50 static int dimToInt(QtFontDim dim) {
51 return dim.toInt();
55 static MetricsInfo compatMetrics[] = {
56 {"-Adobe-Courier-Medium-R-Normal--10-100-75-75-M-60-ISO10646-1", 8, 1, 2},
57 {"-Adobe-Courier-Medium-O-Normal--10-100-75-75-M-60-ISO10646-1", 8, 1, 2},
58 {"-Adobe-Courier-Bold-R-Normal--10-100-75-75-M-60-ISO10646-1", 8, 1, 2},
59 {"-Adobe-Courier-Bold-O-Normal--10-100-75-75-M-60-ISO10646-1", 8, 1, 2},
60 {"-Adobe-Courier-Medium-R-Normal--12-120-75-75-M-70-ISO10646-1", 10, 2, 2},
61 {"-Adobe-Courier-Medium-O-Normal--12-120-75-75-M-70-ISO10646-1", 10, 2, 2},
62 {"-Adobe-Courier-Bold-R-Normal--12-120-75-75-M-70-ISO10646-1", 10, 2, 2},
63 {"-Adobe-Courier-Bold-O-Normal--12-120-75-75-M-70-ISO10646-1", 10, 2, 2},
64 {"-Adobe-Courier-Medium-R-Normal--18-180-75-75-M-110-ISO10646-1", 14, 3, 3},
65 {"-Adobe-Courier-Medium-O-Normal--18-180-75-75-M-110-ISO10646-1", 14, 3, 3},
66 {"-Adobe-Courier-Bold-R-Normal--18-180-75-75-M-110-ISO10646-1", 14, 3, 3},
67 {"-Adobe-Courier-Bold-O-Normal--18-180-75-75-M-110-ISO10646-1", 14, 3, 3},
68 {"-Adobe-Courier-Medium-R-Normal--24-240-75-75-M-150-ISO10646-1", 19, 4, 4},
69 {"-Adobe-Courier-Medium-O-Normal--24-240-75-75-M-150-ISO10646-1", 19, 4, 4},
70 {"-Adobe-Courier-Bold-R-Normal--24-240-75-75-M-150-ISO10646-1", 19, 4, 4},
71 {"-Adobe-Courier-Bold-O-Normal--24-240-75-75-M-150-ISO10646-1", 19, 4, 4},
72 {"-Adobe-Times-Medium-R-Normal--8-80-75-75-P-44-ISO10646-1", 7, 1, 1},
73 {"-Adobe-Times-Medium-R-Normal--8-80-75-75-P-44-ISO10646-1", 7, 1, 1},
74 {"-Adobe-Times-Medium-R-Normal--8-80-75-75-P-44-ISO10646-1", 7, 1, 1},
75 {"-Adobe-Times-Medium-R-Normal--8-80-75-75-P-44-ISO10646-1", 7, 1, 1},
76 {"-Adobe-Times-Medium-R-Normal--8-80-75-75-P-44-ISO10646-1", 7, 1, 1},
77 {"-Adobe-Times-Medium-R-Normal--8-80-75-75-P-44-ISO10646-1", 7, 1, 1},
78 {"-Adobe-Times-Medium-R-Normal--8-80-75-75-P-44-ISO10646-1", 7, 1, 1},
79 {"-Adobe-Times-Medium-R-Normal--8-80-75-75-P-44-ISO10646-1", 7, 1, 1},
80 {"-Adobe-Times-Medium-R-Normal--8-80-75-75-P-44-ISO10646-1", 7, 1, 1},
81 {"-Adobe-Times-Medium-R-Normal--8-80-75-75-P-44-ISO10646-1", 7, 1, 1},
82 {"-Adobe-Times-Medium-R-Normal--8-80-75-75-P-44-ISO10646-1", 7, 1, 1},
83 {"-Adobe-Times-Medium-R-Normal--8-80-75-75-P-44-ISO10646-1", 7, 1, 1},
84 {"-Adobe-Times-Medium-R-Normal--8-80-75-75-P-44-ISO10646-1", 7, 1, 1},
85 {"-Adobe-Times-Medium-R-Normal--8-80-75-75-P-44-ISO10646-1", 7, 1, 1},
86 {"-Adobe-Times-Medium-R-Normal--8-80-75-75-P-44-ISO10646-1", 7, 1, 1},
87 {"-Adobe-Times-Medium-R-Normal--8-80-75-75-P-44-ISO10646-1", 7, 1, 1},
88 {"-Adobe-Helvetica-Medium-R-Normal--10-100-75-75-P-56-ISO10646-1", 10, 1, 2},
89 {"-Adobe-Helvetica-Medium-O-Normal--10-100-75-75-P-57-ISO10646-1", 10, 1, 2},
90 {"-Adobe-Helvetica-Bold-R-Normal--10-100-75-75-P-60-ISO10646-1", 10, 1, 2},
91 {"-Adobe-Helvetica-Bold-O-Normal--10-100-75-75-P-60-ISO10646-1", 10, 1, 2},
92 {"-Adobe-Helvetica-Medium-R-Normal--12-120-75-75-P-67-ISO10646-1", 11, 2, 2},
93 {"-Adobe-Helvetica-Medium-O-Normal--12-120-75-75-P-67-ISO10646-1", 11, 2, 2},
94 {"-Adobe-Helvetica-Bold-R-Normal--12-120-75-75-P-70-ISO10646-1", 11, 2, 2},
95 {"-Adobe-Helvetica-Bold-O-Normal--12-120-75-75-P-69-ISO10646-1", 11, 2, 2},
96 {"-Adobe-Helvetica-Medium-R-Normal--18-180-75-75-P-98-ISO10646-1", 16, 4, 3},
97 {"-Adobe-Helvetica-Medium-O-Normal--18-180-75-75-P-98-ISO10646-1", 16, 4, 3},
98 {"-Adobe-Helvetica-Bold-R-Normal--18-180-75-75-P-103-ISO10646-1", 16, 4, 3},
99 {"-Adobe-Helvetica-Bold-O-Normal--18-180-75-75-P-104-ISO10646-1", 16, 4, 3},
100 {"-Adobe-Helvetica-Medium-R-Normal--24-240-75-75-P-130-ISO10646-1", 22, 4, 4},
101 {"-Adobe-Helvetica-Medium-O-Normal--24-240-75-75-P-130-ISO10646-1", 22, 4, 4},
102 {"-Adobe-Helvetica-Bold-R-Normal--24-240-75-75-P-138-ISO10646-1", 22, 4, 4},
103 {"-Adobe-Helvetica-Bold-O-Normal--24-240-75-75-P-138-ISO10646-1", 22, 4, 4},
104 {"-Adobe-Courier-Medium-R-Normal--10-100-75-75-M-60-ISO10646-1", 8, 1, 2},
105 {"-Adobe-Courier-Medium-O-Normal--10-100-75-75-M-60-ISO10646-1", 8, 1, 2},
106 {"-Adobe-Courier-Bold-R-Normal--10-100-75-75-M-60-ISO10646-1", 8, 1, 2},
107 {"-Adobe-Courier-Bold-O-Normal--10-100-75-75-M-60-ISO10646-1", 8, 1, 2},
108 {"-Adobe-Courier-Medium-R-Normal--12-120-75-75-M-70-ISO10646-1", 10, 2, 2},
109 {"-Adobe-Courier-Medium-O-Normal--12-120-75-75-M-70-ISO10646-1", 10, 2, 2},
110 {"-Adobe-Courier-Bold-R-Normal--12-120-75-75-M-70-ISO10646-1", 10, 2, 2},
111 {"-Adobe-Courier-Bold-O-Normal--12-120-75-75-M-70-ISO10646-1", 10, 2, 2},
112 {"-Adobe-Courier-Medium-R-Normal--18-180-75-75-M-110-ISO10646-1", 14, 3, 3},
113 {"-Adobe-Courier-Medium-O-Normal--18-180-75-75-M-110-ISO10646-1", 14, 3, 3},
114 {"-Adobe-Courier-Bold-R-Normal--18-180-75-75-M-110-ISO10646-1", 14, 3, 3},
115 {"-Adobe-Courier-Bold-O-Normal--18-180-75-75-M-110-ISO10646-1", 14, 3, 3},
116 {"-Adobe-Courier-Medium-R-Normal--24-240-75-75-M-150-ISO10646-1", 19, 4, 4},
117 {"-Adobe-Courier-Medium-O-Normal--24-240-75-75-M-150-ISO10646-1", 19, 4, 4},
118 {"-Adobe-Courier-Bold-R-Normal--24-240-75-75-M-150-ISO10646-1", 19, 4, 4},
119 {"-Adobe-Courier-Bold-O-Normal--24-240-75-75-M-150-ISO10646-1", 19, 4, 4},
120 {"-Adobe-Times-Medium-R-Normal--8-80-75-75-P-44-ISO10646-1", 7, 1, 1},
121 {"-Adobe-Times-Medium-R-Normal--8-80-75-75-P-44-ISO10646-1", 7, 1, 1},
122 {"-Adobe-Times-Medium-R-Normal--8-80-75-75-P-44-ISO10646-1", 7, 1, 1},
123 {"-Adobe-Times-Medium-R-Normal--8-80-75-75-P-44-ISO10646-1", 7, 1, 1},
124 {"-Adobe-Times-Medium-R-Normal--8-80-75-75-P-44-ISO10646-1", 7, 1, 1},
125 {"-Adobe-Times-Medium-R-Normal--8-80-75-75-P-44-ISO10646-1", 7, 1, 1},
126 {"-Adobe-Times-Medium-R-Normal--8-80-75-75-P-44-ISO10646-1", 7, 1, 1},
127 {"-Adobe-Times-Medium-R-Normal--8-80-75-75-P-44-ISO10646-1", 7, 1, 1},
128 {"-Adobe-Times-Medium-R-Normal--8-80-75-75-P-44-ISO10646-1", 7, 1, 1},
129 {"-Adobe-Times-Medium-R-Normal--8-80-75-75-P-44-ISO10646-1", 7, 1, 1},
130 {"-Adobe-Times-Medium-R-Normal--8-80-75-75-P-44-ISO10646-1", 7, 1, 1},
131 {"-Adobe-Times-Medium-R-Normal--8-80-75-75-P-44-ISO10646-1", 7, 1, 1},
132 {"-Adobe-Times-Medium-R-Normal--8-80-75-75-P-44-ISO10646-1", 7, 1, 1},
133 {"-Adobe-Times-Medium-R-Normal--8-80-75-75-P-44-ISO10646-1", 7, 1, 1},
134 {"-Adobe-Times-Medium-R-Normal--8-80-75-75-P-44-ISO10646-1", 7, 1, 1},
135 {"-Adobe-Times-Medium-R-Normal--8-80-75-75-P-44-ISO10646-1", 7, 1, 1},
136 {"-Adobe-Helvetica-Medium-R-Normal--10-100-75-75-P-56-ISO10646-1", 10, 1, 2},
137 {"-Adobe-Helvetica-Medium-O-Normal--10-100-75-75-P-57-ISO10646-1", 10, 1, 2},
138 {"-Adobe-Helvetica-Bold-R-Normal--10-100-75-75-P-60-ISO10646-1", 10, 1, 2},
139 {"-Adobe-Helvetica-Bold-O-Normal--10-100-75-75-P-60-ISO10646-1", 10, 1, 2},
140 {"-Adobe-Helvetica-Medium-R-Normal--12-120-75-75-P-67-ISO10646-1", 11, 2, 2},
141 {"-Adobe-Helvetica-Medium-O-Normal--12-120-75-75-P-67-ISO10646-1", 11, 2, 2},
142 {"-Adobe-Helvetica-Bold-R-Normal--12-120-75-75-P-70-ISO10646-1", 11, 2, 2},
143 {"-Adobe-Helvetica-Bold-O-Normal--12-120-75-75-P-69-ISO10646-1", 11, 2, 2},
144 {"-Adobe-Helvetica-Medium-R-Normal--18-180-75-75-P-98-ISO10646-1", 16, 4, 3},
145 {"-Adobe-Helvetica-Medium-O-Normal--18-180-75-75-P-98-ISO10646-1", 16, 4, 3},
146 {"-Adobe-Helvetica-Bold-R-Normal--18-180-75-75-P-103-ISO10646-1", 16, 4, 3},
147 {"-Adobe-Helvetica-Bold-O-Normal--18-180-75-75-P-104-ISO10646-1", 16, 4, 3},
148 {"-Adobe-Helvetica-Medium-R-Normal--24-240-75-75-P-130-ISO10646-1", 22, 4, 4},
149 {"-Adobe-Helvetica-Medium-O-Normal--24-240-75-75-P-130-ISO10646-1", 22, 4, 4},
150 {"-Adobe-Helvetica-Bold-R-Normal--24-240-75-75-P-138-ISO10646-1", 22, 4, 4},
151 {"-Adobe-Helvetica-Bold-O-Normal--24-240-75-75-P-138-ISO10646-1", 22, 4, 4},
152 {0, 0, 0, 0}
155 static MetricsInfo* grabMetrics(QString name)
157 for (int pos = 0; compatMetrics[pos].name; ++pos)
158 if (name == QLatin1String(compatMetrics[pos].name))
159 return &compatMetrics[pos];
160 return 0;
163 class QFakeFontEngine : public QFontEngineXLFD
165 public:
166 QString name;
168 QFakeFontEngine( XFontStruct *fs, const char *name, int size );
169 ~QFakeFontEngine();
171 bool haveMetrics;
172 QtFontDim m_ascent, m_descent, m_leading;
173 bool ahem;
174 int pixS;
175 XFontStruct* xfs;
177 void recalcAdvances(int len, QGlyphLayout *glyphs, QTextEngine::ShaperFlags flags) const
179 QFontEngineXLFD::recalcAdvances(len, glyphs, flags);
181 // Go through the glyhs with glyph 0 and fix up their x advance
182 // to make sense (or at least match Qt3)
183 // ### set proper GPLv2 and Qt (c) when committed
184 QtFontDim fallBackWidth = xfs->min_bounds.width;
185 if (xfs->per_char) {
186 if (haveMetrics)
187 fallBackWidth = m_ascent; //### we really should get rid of these and regen..
188 else
189 fallBackWidth = xfs->ascent;
192 QGlyphLayout* g = glyphs + len;
193 while (g != glyphs) {
194 --g;
195 if (!g->glyph) {
196 g->advance.x = fallBackWidth;
201 Type type() const
203 if (ahem) {
204 return QFontEngine::Freetype;
205 } else
206 return QFontEngine::XLFD;
210 QtFontDim ascent() const
212 if (haveMetrics)
213 return m_ascent;
214 else
215 return QFontEngineXLFD::ascent();
218 QtFontDim descent() const
220 if (haveMetrics)
221 return m_descent;
222 else
223 return QFontEngineXLFD::descent();
226 QtFontDim leading() const
228 if (ahem)
229 return 0;
230 else if (haveMetrics)
231 return m_leading;
232 else
233 return QFontEngineXLFD::leading();
236 bool canRender( const QChar *string, int len );
239 //OK. This is evil. Since we don't use Xft, we hijack the FreeType painting hook in the X11 engine
240 //for ahem, as unfortunately the drawing is in the paint engine, and not the font engine in Qt4
241 class QPaintEngine;
242 class KDE_EXPORT QX11PaintEngine: public QPaintEngine
244 void drawFreetype(const QPointF &p, const QTextItemInt &si);
247 void QX11PaintEngine::drawFreetype(const QPointF &p, const QTextItemInt &si)
249 if (!si.num_glyphs) return;
251 QFakeFontEngine *eng = static_cast<QFakeFontEngine*>(si.fontEngine);
253 int x = int(p.x());
254 int y = int(p.y());
255 int pixS = int(eng->pixS);
256 int advance = pixS;
257 int ascent = dimToInt(eng->ascent());
258 int descent = dimToInt(eng->descent());
260 if (si.flags & QTextItem::RightToLeft)
262 x = x + advance * (si.num_glyphs - 1);
263 advance = -advance;
266 for (int pos = 0; pos < si.num_glyphs; ++pos)
268 QRect rect;
269 switch (si.glyphs[pos].glyph)
271 case ' ':
272 rect = QRect();
273 break;
274 case 'p':
275 //Below the baseline, including it
276 rect = QRect(x, y, pixS, descent + 1);
277 break;
278 case 0xC9:
279 //Above the baseline
280 rect = QRect(x, y - ascent, pixS, ascent);
281 break;
282 default:
283 //Whole block
284 rect = QRect(x, y - ascent, pixS, pixS);
287 QPainter* p = painter();
288 p->fillRect(rect, p->pen().color());
290 x += advance;
295 QFakeFontEngine::QFakeFontEngine( XFontStruct *fs, const char *name, int size )
296 : QFontEngineXLFD( fs, name, 0)
298 xfs = fs;
299 pixS = size;
300 this->name = QLatin1String(name);
301 ahem = this->name.contains("ahem");
303 MetricsInfo* metrics = grabMetrics(name);
304 if (metrics)
306 haveMetrics = true;
307 m_ascent = metrics->ascent;
308 m_descent = metrics->descent;
309 m_leading = metrics->leading;
311 else
312 haveMetrics = false;
315 QFakeFontEngine::~QFakeFontEngine()
320 bool QFakeFontEngine::canRender( const QChar *, int )
322 return true;
325 static QString courier_pickxlfd( int pixelsize, bool italic, bool bold )
327 if ( pixelsize >= 24 )
328 pixelsize = 24;
329 else if ( pixelsize >= 18 )
330 pixelsize = 18;
331 else if ( pixelsize >= 12 )
332 pixelsize = 12;
333 else
334 pixelsize = 10;
336 return QString( "-adobe-courier-%1-%2-normal--%3-*-75-75-m-*-iso10646-1" ).arg( bold ? "bold" : "medium" ).arg( italic ? "o" : "r" ).arg( pixelsize );
339 static QString ahem_pickxlfd( int pixelsize )
341 return QString( "-misc-ahem-medium-r-normal--%1-*-100-100-c-*-iso10646-1" ).arg( pixelsize );
344 static QString helv_pickxlfd( int pixelsize, bool italic, bool bold )
346 if ( pixelsize >= 24 )
347 pixelsize = 24;
348 else if ( pixelsize >= 18 )
349 pixelsize = 18;
350 else if ( pixelsize >= 12 )
351 pixelsize = 12;
352 else
353 pixelsize = 10;
355 return QString( "-adobe-helvetica-%1-%2-normal--%3-*-75-75-p-*-iso10646-1" ).arg( bold ? "bold" : "medium" ).arg( italic ? "o" : "r" ).arg( pixelsize );
359 static QFontEngine* loadFont(const QFontDef& request)
361 QString xlfd;
362 QString family = request.family.toLower();
363 if ( family == "adobe courier" || family == "courier" || family == "fixed" ) {
364 xlfd = courier_pickxlfd( request.pixelSize, request.style == QFont::StyleItalic, request.weight > 50 );
366 else if ( family == "times new roman" || family == "times" )
367 xlfd = "-adobe-times-medium-r-normal--8-80-75-75-p-44-iso10646-1";
368 else if ( family == "ahem" )
369 xlfd = ahem_pickxlfd( request.pixelSize );
370 else
371 xlfd = helv_pickxlfd( request.pixelSize, request.style == QFont::StyleItalic, request.weight > 50 );
373 QFontEngine *fe = 0;
375 XFontStruct *xfs;
376 xfs = XLoadQueryFont( QX11Info::display(), xlfd.toLatin1() );
377 if (!xfs) // as long as you don't do screenshots, it's maybe fine
378 qFatal("we need some fonts. So make sure you have %s installed.", qPrintable(xlfd));
380 unsigned long value;
381 if ( !XGetFontProperty( xfs, XA_FONT, &value ) )
382 return 0;
384 char *n = XGetAtomName( QX11Info::display(), value );
385 xlfd = n;
386 if ( n )
387 XFree( n );
389 fe = new QFakeFontEngine( xfs, xlfd.toLatin1(),request.pixelSize );
390 return fe;
393 KDE_EXPORT
394 QFontEngine *QFontDatabase::loadXlfd(int /* screen */, int /* script */,
395 const QFontDef &request, int /* force_encoding_id */)
397 return loadFont(request);
400 extern "C" KDE_EXPORT int FcInit() {
401 /* Make sure Qt uses the Xlfd path, which we intercept */
402 return 0;
405 KDE_EXPORT bool QFontDatabase::isBitmapScalable( const QString &,
406 const QString &) const
408 return true;
411 KDE_EXPORT bool QFontDatabase::isSmoothlyScalable( const QString &,
412 const QString &) const
414 return true;
417 const QString &KHTMLSettings::availableFamilies()
419 if ( !avFamilies ) {
420 avFamilies = new QString;
421 *avFamilies = ",Adobe Courier,Arial,Comic Sans MS,Courier,Helvetica,Times,Times New Roman,Utopia,Fixed,Ahem,";
424 return *avFamilies;
428 bool KHTMLSettings::unfinishedImageFrame() const
430 return false;
433 KDE_EXPORT int QX11Info::appDpiY( int )
435 return 100;
438 KDE_EXPORT int QX11Info::appDpiX( int )
440 return 100;
443 KDE_EXPORT void QFont::insertSubstitution(const QString &,
444 const QString &)
448 KDE_EXPORT void QFont::insertSubstitutions(const QString &,
449 const QStringList &)
453 #include <kprotocolinfo.h>
454 bool KProtocolInfo::isKnownProtocol( const QString& _protocol )
456 return ( _protocol == "file" );
459 #include <kprotocolinfofactory.h>
461 QString KProtocolInfo::exec( const QString& _protocol )
463 if ( _protocol != "file" )
464 return QString();
466 KProtocolInfo::Ptr prot = KProtocolInfoFactory::self()->findProtocol(_protocol);
467 if ( !prot )
468 return QString();
470 return prot->m_exec;
473 #include <dcopclient.h>
475 bool DCOPClient::attach()
477 return false;
480 bool DCOPClient::isAttached() const
482 return false;
485 void DCOPClient::processSocketData( int )
489 #include <QtGui/QApplication>
490 #include <QtGui/QPalette>
492 #if 0
493 KDE_EXPORT void QApplication::setPalette( const QPalette &, bool ,
494 const char* )
496 static bool done = false;
497 if (done) return;
498 QString xlfd = AHEM;
499 XFontStruct *xfs;
500 xfs = XLoadQueryFont(QPaintDevice::x11AppDisplay(), xlfd.toLatin1().constData() );
501 if (!xfs) // as long as you don't do screenshots, it's maybe fine
502 qFatal("We will need some fonts. So make sure you have %s installed.", xlfd.toLatin1().constData());
503 XFreeFont(QPaintDevice::x11AppDisplay(), xfs);
504 done = true;
506 #endif
508 #include <kapplication.h>
509 // void KApplication::dcopFailure( const QString & )
510 // {
511 // qDebug( "KApplication::dcopFailure" );
512 // }
514 #include <kparts/historyprovider.h>
516 bool KParts::HistoryProvider::contains( const QString& t ) const
518 return ( t == "http://www.kde.org/" || t == "http://www.google.com/");
522 #include <ksslsettings.h>
524 bool KSSLSettings::warnOnEnter() const { return false; }
525 bool KSSLSettings::warnOnUnencrypted() const { return false; }
526 bool KSSLSettings::warnOnLeave() const { return false; }
528 #include <kparts/plugin.h>
530 KParts::Plugin* KParts::Plugin::loadPlugin( QObject * /* parent */, const char* /* libname */) { return 0; }