QApplication::setOverrideCursor/restoreOverrideCursor are static methods

parent a3b47880
......@@ -175,13 +175,13 @@ void KisGmicPlugin::slotApplyGmicCommand(KisGmicFilterSetting* setting)
QTime myTimer;
myTimer.start();
qApp->setOverrideCursor(Qt::WaitCursor);
QApplication::setOverrideCursor(Qt::WaitCursor);
m_gmicApplicator->setProperties(m_view->image(), node, actionName, kritaNodes, setting->gmicCommand(), m_gmicCustomCommands);
m_gmicApplicator->start();
m_gmicApplicator->wait();
m_view->image()->waitForDone();
qApp->restoreOverrideCursor();
QApplication::restoreOverrideCursor();
double seconds = myTimer.elapsed() * 0.001;
// temporary feedback
......
......@@ -271,12 +271,12 @@ void KisGmicWidget::startUpdate()
m_updater = new KisGmicUpdater(m_updateUrl);
connect(m_updater, SIGNAL(updated()), this, SLOT(finishUpdate()));
m_updater->start();
qApp->setOverrideCursor(Qt::WaitCursor);
QApplication::setOverrideCursor(Qt::WaitCursor);
}
void KisGmicWidget::finishUpdate()
{
qApp->restoreOverrideCursor();
QApplication::restoreOverrideCursor();
m_updater->deleteLater();
QString msg = i18nc("@info",
"Update filters done. "
......
......@@ -82,7 +82,7 @@ void KisSeparateChannelsPlugin::slotSeparate()
if (dlgSeparate->exec() == QDialog::Accepted) {
qApp->setOverrideCursor(Qt::BusyCursor);
QApplication::setOverrideCursor(Qt::BusyCursor);
KoProgressUpdater* pu = m_view->createProgressUpdater(KoProgressUpdater::Unthreaded);
pu->start(100, i18n("Separate Image"));
QPointer<KoUpdater> u = pu->startSubtask();
......@@ -95,7 +95,7 @@ void KisSeparateChannelsPlugin::slotSeparate()
dlgSeparate->getDownscale(),
dlgSeparate->getToColor());
pu->deleteLater();
qApp->restoreOverrideCursor();
QApplication::restoreOverrideCursor();
}
delete dlgSeparate;
......
......@@ -84,7 +84,7 @@ KoFilter::ConversionStatus exrExport::convert(const QByteArray& from, const QByt
widget.flatten->setChecked(cfg.getBool("flatten", false));
if (!m_chain->manager()->getBatchMode() ) {
qApp->restoreOverrideCursor();
QApplication::restoreOverrideCursor();
if (dialog.exec() == QDialog::Rejected) {
return KoFilter::UserCancelled;
}
......
......@@ -94,7 +94,7 @@ KoFilter::ConversionStatus KisHeightMapExport::convert(const QByteArray& from, c
optionsHeightMap.setupUi(wdg);
kdb->setMainWidget(wdg);
qApp->restoreOverrideCursor();
QApplication::restoreOverrideCursor();
QString filterConfig = KisConfig().exportConfiguration("HeightMap");
KisPropertiesConfiguration cfg;
......
......@@ -102,7 +102,7 @@ KoFilter::ConversionStatus KisHeightMapImport::convert(const QByteArray& from, c
return KoFilter::FileNotFound;
}
qApp->restoreOverrideCursor();
QApplication::restoreOverrideCursor();
KDialog* kdb = new KDialog(0);
kdb->setWindowTitle(i18n("R16 HeightMap Import Options"));
......
......@@ -88,7 +88,7 @@ KoFilter::ConversionStatus jp2Export::convert(const QByteArray& from, const QByt
optionsJP2.qualityLevel->setValue(cfg.getInt("quality", 100));
kdb->setMainWidget(wdg);
qApp->restoreOverrideCursor();
QApplication::restoreOverrideCursor();
if (!m_chain->manager()->getBatchMode()) {
if (kdb->exec() == QDialog::Rejected) {
......
......@@ -114,7 +114,7 @@ KoFilter::ConversionStatus KisJPEGExport::convert(const QByteArray& from, const
frm.setEnabledFilters(cfg.getString("filters").split(','));
kdb->setMainWidget(wdg);
qApp->restoreOverrideCursor();
QApplication::restoreOverrideCursor();
if (!m_chain->manager()->getBatchMode()) {
if (kdb->exec() == QDialog::Rejected) {
......
......@@ -119,7 +119,7 @@ KisPDFImport::ConversionStatus KisPDFImport::convert(const QByteArray& , const Q
KisPDFImportWidget* wdg = new KisPDFImportWidget(pdoc, kdb);
kdb->setMainWidget(wdg);
qApp->restoreOverrideCursor();
QApplication::restoreOverrideCursor();
if (kdb->exec() == QDialog::Rejected) {
delete pdoc;
delete kdb;
......
......@@ -170,7 +170,7 @@ KoFilter::ConversionStatus KisPNGExport::convert(const QByteArray& from, const Q
wdg->bnTransparencyFillColor->setColor(QColor(rgb[0].toInt(), rgb[1].toInt(), rgb[2].toInt()));
kdb->setMainWidget(wdg);
qApp->restoreOverrideCursor();
QApplication::restoreOverrideCursor();
if (hasVisibleWidgets()) {
if (!m_chain->manager()->getBatchMode()) {
if (kdb->exec() == QDialog::Rejected) {
......
......@@ -162,7 +162,7 @@ KoFilter::ConversionStatus KisPPMExport::convert(const QByteArray& from, const Q
optionsPPM.setupUi(wdg);
kdb->setMainWidget(wdg);
qApp->restoreOverrideCursor();
QApplication::restoreOverrideCursor();
QString filterConfig = KisConfig().exportConfiguration("PPM");
KisPropertiesConfiguration cfg;
......
......@@ -45,7 +45,7 @@ KisDlgOptionsTIFF::KisDlgOptionsTIFF(QWidget *parent)
connect(optionswdg->kComboBoxCompressionType, SIGNAL(activated(int)), this, SLOT(activated(int)));
connect(optionswdg->flatten, SIGNAL(toggled(bool)), this, SLOT(flattenToggled(bool)));
setMainWidget(wdg);
qApp->restoreOverrideCursor();
QApplication::restoreOverrideCursor();
setSizePolicy(QSizePolicy(QSizePolicy::Minimum, QSizePolicy::Minimum));
QString filterConfig = KisConfig().exportConfiguration("TIFF");
......
......@@ -148,7 +148,7 @@ void KisToolGradient::endPrimaryAction(KoPointerEvent *event)
new KisResourcesSnapshot(image, 0, this->canvas()->resourceManager());
if (image && (device = resources->currentNode()->paintDevice())) {
qApp->setOverrideCursor(Qt::BusyCursor);
QApplication::setOverrideCursor(Qt::BusyCursor);
KUndo2MagicString actionName = kundo2_i18n("Gradient");
KisUndoAdapter *undoAdapter = image->undoAdapter();
......@@ -169,7 +169,7 @@ void KisToolGradient::endPrimaryAction(KoPointerEvent *event)
painter.endTransaction(undoAdapter);
undoAdapter->endMacro();
qApp->restoreOverrideCursor();
QApplication::restoreOverrideCursor();
currentNode()->setDirty();
notifyModified();
delete updater;
......
......@@ -421,7 +421,7 @@ bool KisDoc2::newImage(const QString& name,
if (!cs) return false;
qApp->setOverrideCursor(Qt::BusyCursor);
QApplication::setOverrideCursor(Qt::BusyCursor);
image = new KisImage(createUndoStore(), width, height, cs, name);
Q_CHECK_PTR(image);
......@@ -450,7 +450,7 @@ bool KisDoc2::newImage(const QString& name,
cfg.setDefaultColorDepth(image->colorSpace()->colorDepthId().id());
cfg.defColorProfile(image->colorSpace()->profile()->name());
qApp->restoreOverrideCursor();
QApplication::restoreOverrideCursor();
return true;
}
......
......@@ -72,7 +72,7 @@ void KisPart2::setDocument(KisDoc2 *document)
KoView *KisPart2::createViewInstance(KoDocument *document, QWidget *parent)
{
qApp->setOverrideCursor(Qt::WaitCursor);
QApplication::setOverrideCursor(Qt::WaitCursor);
KisView2 *v = new KisView2(this, qobject_cast<KisDoc2*>(document), parent);
//XXX : fix this ugliness
......@@ -84,7 +84,7 @@ KoView *KisPart2::createViewInstance(KoDocument *document, QWidget *parent)
// see: https://bugs.kde.org/show_bug.cgi?id=208239.
document->setModified(true);
document->setModified(false);
qApp->restoreOverrideCursor();
QApplication::restoreOverrideCursor();
return v;
}
......
......@@ -241,15 +241,15 @@ KoMainWindow *KoPart::currentMainwindow() const
void KoPart::openExistingFile(const KUrl& url)
{
qApp->setOverrideCursor(Qt::BusyCursor);
QApplication::setOverrideCursor(Qt::BusyCursor);
d->document->openUrl(url);
d->document->setModified(false);
qApp->restoreOverrideCursor();
QApplication::restoreOverrideCursor();
}
void KoPart::openTemplate(const KUrl& url)
{
qApp->setOverrideCursor(Qt::BusyCursor);
QApplication::setOverrideCursor(Qt::BusyCursor);
bool ok = d->document->loadNativeFormat(url.toLocalFile());
d->document->setModified(false);
d->document->undoStack()->clear();
......@@ -266,7 +266,7 @@ void KoPart::openTemplate(const KUrl& url)
d->document->showLoadingErrorDialog();
d->document->initEmpty();
}
qApp->restoreOverrideCursor();
QApplication::restoreOverrideCursor();
}
void KoPart::addRecentURLToAllMainWindows(KUrl url)
......
......@@ -313,7 +313,7 @@ void KoCsvImportDialog::Private::fillTable()
QChar x;
QString field;
qApp->setOverrideCursor(Qt::WaitCursor);
QApplication::setOverrideCursor(Qt::WaitCursor);
for (row = 0; row < dialog->m_sheet->rowCount(); ++row) {
for (column = 0; column < dialog->m_sheet->columnCount(); ++column) {
......@@ -569,7 +569,7 @@ void KoCsvImportDialog::Private::fillTable()
dialog->m_rowEnd->setValue(endRow == -1 ? row : endRow);
dialog->m_colEnd->setValue(endCol == -1 ? maxColumn : endCol);
qApp->restoreOverrideCursor();
QApplication::restoreOverrideCursor();
}
KoCsvImportDialog::DataType KoCsvImportDialog::dataType(int col) const
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment