Example #1
0
/*!
    Sets the application-wide default style sheet to \a sheet,
    deleting any style sheet previously set. The ownership is
    transferred to QStyleSheet.

    \sa defaultSheet()
*/
void QStyleSheet::setDefaultSheet( QStyleSheet* sheet)
{
    if ( defaultsheet != sheet ) {
	if ( defaultsheet )
	    qt_cleanup_stylesheet.reset();
	delete defaultsheet;
    }
    defaultsheet = sheet;
    if ( defaultsheet )
	qt_cleanup_stylesheet.set( &defaultsheet );
}
Example #2
0
/*!
    Returns the application-wide default style sheet. This style sheet
    is used by rich text rendering classes such as QSimpleRichText,
    QWhatsThis and QMessageBox to define the rendering style and
    available tags within rich text documents. It also serves as the
    initial style sheet for the more complex render widgets, QTextEdit
    and QTextBrowser.

    \sa setDefaultSheet()
*/
QStyleSheet* QStyleSheet::defaultSheet()
{
    if (!defaultsheet) {
	defaultsheet = new QStyleSheet();
	qt_cleanup_stylesheet.set( &defaultsheet );
    }
    return defaultsheet;
}
Example #3
0
inline static QSharedDoubleBufferCleaner *staticCleaner()
{
    if ( ! static_cleaner ) {
	static_cleaner = new QSharedDoubleBufferCleaner();
	cleanup_static_cleaner.set( &static_cleaner );
    }
    return static_cleaner;
}
Example #4
0
QSInterpreter *QSInterpreter::defaultInterpreter()
{
  if (!def_inter) {
    def_inter = new QSInterpreter();
    def_cleanup.set(&def_inter);
  }
  return def_inter;
}
Example #5
0
Q_EXPORT QPtrDict<QSqlDriverExtension> *qSqlDriverExtDict()
{
    if ( !qt_driver_extension_dict ) {
	qt_driver_extension_dict = new QPtrDict<QSqlDriverExtension>;
	qt_driver_ext_cleanup.set( &qt_driver_extension_dict );
    }
    return qt_driver_extension_dict;
}
Example #6
0
Q_EXPORT QPtrDict<QSqlOpenExtension> *qSqlOpenExtDict()
{
    if ( !qt_open_extension_dict ) {
	qt_open_extension_dict = new QPtrDict<QSqlOpenExtension>;
	qt_open_ext_cleanup.set( &qt_open_extension_dict );
    }
    return qt_open_extension_dict;
}
Example #7
0
static void ensure_fallback_map()
{
    if ( fallbackMap ) return;
    fallbackMap = new FallbackMap;
    qt_fallback_font_family_cleanup.set( &fallbackMap );
}