MCPcopy Create free account
hub / github.com/ckaiser/Lightscreen / unloadPixmap

Method unloadPixmap

tools/screenshot.cpp:505–520  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

503}
504
505bool Screenshot::unloadPixmap()
506{
507 if (mUnloaded) {
508 return true;
509 }
510
511 // Unloading the pixmap to reduce memory usage during previews
512 mUnloadFilename = QString("%1/.screenshot.%2%3").arg(mOptions.directory.path()).arg(qrand() * qrand() + QDateTime::currentDateTime().toTime_t()).arg(extension());
513 mUnloaded = mPixmap.save(mUnloadFilename, 0, mOptions.quality);
514
515 if (mUnloaded) {
516 mPixmap = QPixmap();
517 }
518
519 return mUnloaded;
520}
521
522void Screenshot::wholeScreen()
523{

Callers

nothing calls this directly

Calls 3

QStringClass · 0.85
QPixmapClass · 0.85
saveMethod · 0.80

Tested by

no test coverage detected