mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-23 10:18:50 +00:00
Don't use a hourglass cursor while diplaying alerts.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@32960 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
598daa7c71
commit
8c11a45b99
@ -144,10 +144,9 @@ int prompt(docstring const & title0, docstring const & question,
|
||||
|
||||
docstring const title = bformat(_("LyX: %1$s"), title0);
|
||||
|
||||
// For some reason, sometimes Qt uses an hourglass or watch cursor when
|
||||
// For some reason, sometimes Qt uses a hourglass or watch cursor when
|
||||
// displaying the alert. Hence, we ask for the standard cursor shape.
|
||||
// This call has no effect if the cursor has not been overridden.
|
||||
qApp->changeOverrideCursor(Qt::ArrowCursor);
|
||||
qApp->setOverrideCursor(Qt::ArrowCursor);
|
||||
|
||||
// FIXME replace that with guiApp->currentView()
|
||||
//LYXERR0("FOCUS: " << qApp->focusWidget());
|
||||
@ -159,6 +158,8 @@ int prompt(docstring const & title0, docstring const & question,
|
||||
b3.empty() ? QString::null : toqstr(b3),
|
||||
default_button, cancel_button);
|
||||
|
||||
qApp->restoreOverrideCursor();
|
||||
|
||||
// Qt bug: can return -1 on cancel or WM close, despite the docs.
|
||||
if (res == -1)
|
||||
res = cancel_button;
|
||||
@ -183,6 +184,9 @@ void warning(docstring const & title0, docstring const & message,
|
||||
return;
|
||||
}
|
||||
|
||||
// Don't use a hourglass cursor while displaying the alert
|
||||
qApp->setOverrideCursor(Qt::ArrowCursor);
|
||||
|
||||
if (!askshowagain) {
|
||||
ProgressInterface::instance()->warning(
|
||||
toqstr(title),
|
||||
@ -193,6 +197,8 @@ void warning(docstring const & title0, docstring const & message,
|
||||
toqstr(message),
|
||||
toqstr(formatted(message)));
|
||||
}
|
||||
|
||||
qApp->restoreOverrideCursor();
|
||||
}
|
||||
|
||||
|
||||
@ -212,9 +218,14 @@ void error(docstring const & title0, docstring const & message)
|
||||
return;
|
||||
}
|
||||
|
||||
// Don't use a hourglass cursor while displaying the alert
|
||||
qApp->setOverrideCursor(Qt::ArrowCursor);
|
||||
|
||||
ProgressInterface::instance()->error(
|
||||
toqstr(title),
|
||||
toqstr(formatted(message)));
|
||||
|
||||
qApp->restoreOverrideCursor();
|
||||
}
|
||||
|
||||
|
||||
@ -235,9 +246,14 @@ void information(docstring const & title0, docstring const & message)
|
||||
return;
|
||||
}
|
||||
|
||||
// Don't use a hourglass cursor while displaying the alert
|
||||
qApp->setOverrideCursor(Qt::ArrowCursor);
|
||||
|
||||
ProgressInterface::instance()->information(
|
||||
toqstr(title),
|
||||
toqstr(formatted(message)));
|
||||
|
||||
qApp->restoreOverrideCursor();
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user