Changeset View
Changeset View
Standalone View
Standalone View
core/document.cpp
Show First 20 Lines • Show All 5106 Lines • ▼ Show 20 Line(s) | 5097 | { | |||
---|---|---|---|---|---|
5107 | QByteArray data; | 5107 | QByteArray data; | ||
5108 | QDataStream stream( &data, QIODevice::WriteOnly ); | 5108 | QDataStream stream( &data, QIODevice::WriteOnly ); | ||
5109 | stream << f.read( byteRange.last() - byteRange.first() ); | 5109 | stream << f.read( byteRange.last() - byteRange.first() ); | ||
5110 | f.close(); | 5110 | f.close(); | ||
5111 | 5111 | | |||
5112 | return data; | 5112 | return data; | ||
5113 | } | 5113 | } | ||
5114 | 5114 | | |||
5115 | QString Document::executeScript( QString function ) | ||||
5116 | { | ||||
5117 | if( !d->m_scripter ) | ||||
5118 | d->m_scripter = new Scripter( d ); | ||||
5119 | return d->m_scripter->execute( JavaScript, function ); | ||||
5120 | } | ||||
5121 | | ||||
5115 | void DocumentPrivate::requestDone( PixmapRequest * req ) | 5122 | void DocumentPrivate::requestDone( PixmapRequest * req ) | ||
5116 | { | 5123 | { | ||
5117 | if ( !req ) | 5124 | if ( !req ) | ||
5118 | return; | 5125 | return; | ||
5119 | 5126 | | |||
5120 | if ( !m_generator || m_closingLoop ) | 5127 | if ( !m_generator || m_closingLoop ) | ||
5121 | { | 5128 | { | ||
5122 | m_pixmapRequestsMutex.lock(); | 5129 | m_pixmapRequestsMutex.lock(); | ||
▲ Show 20 Lines • Show All 549 Lines • Show Last 20 Lines |