remove Applet::showMessage
This commit is contained in:
parent
23d7d4f842
commit
ae7856e836
@ -484,11 +484,6 @@ void Applet::setConfigurationRequired(bool needsConfig, const QString &reason)
|
||||
d->showConfigurationRequiredMessage(needsConfig, reason);
|
||||
}
|
||||
|
||||
void Applet::showMessage(const QIcon &icon, const QString &message, const MessageButtons buttons)
|
||||
{
|
||||
d->showMessage(icon, message, buttons);
|
||||
}
|
||||
|
||||
QVariantList Applet::startupArguments() const
|
||||
{
|
||||
return d->args;
|
||||
|
@ -721,23 +721,6 @@ class PLASMA_EXPORT Applet : public QObject
|
||||
*/
|
||||
virtual void constraintsEvent(Plasma::Constraints constraints);
|
||||
|
||||
//Completely UI-specific, remove or move to scriptengine
|
||||
/**
|
||||
* Shows a message as an overlay of the applet: the message has an
|
||||
* icon, text and (optional) buttons
|
||||
*
|
||||
* @param icon the icon that will be shown
|
||||
* @param message the message string that will be shown.
|
||||
* If the message is empty nothng will be shown
|
||||
* and if there was a message already it will be hidden
|
||||
* @param buttons an OR combination of all the buttons needed
|
||||
*
|
||||
* @see Plasma::MessageButtons
|
||||
* @see messageButtonPressed
|
||||
* @since 4.3
|
||||
*/
|
||||
void showMessage(const QIcon &icon, const QString &message, const Plasma::MessageButtons buttons);
|
||||
|
||||
//TODO: timerEvent should go into AppletPrivate
|
||||
/**
|
||||
* Reimplemented from QObject
|
||||
|
@ -175,14 +175,6 @@ void AppletPrivate::showConfigurationRequiredMessage(bool show, const QString &r
|
||||
Q_UNUSED(reason)
|
||||
}
|
||||
|
||||
void AppletPrivate::showMessage(const QIcon &icon, const QString &message, const MessageButtons buttons)
|
||||
{
|
||||
// reimplemented in the UI specific library
|
||||
Q_UNUSED(icon)
|
||||
Q_UNUSED(message)
|
||||
Q_UNUSED(buttons)
|
||||
}
|
||||
|
||||
void AppletPrivate::positionMessageOverlay()
|
||||
{
|
||||
// reimplemented in the UI specific library
|
||||
|
@ -79,7 +79,6 @@ public:
|
||||
// the interface
|
||||
virtual void showConfigurationRequiredMessage(bool show, const QString &reason);
|
||||
virtual void cleanUpAndDelete();
|
||||
virtual void showMessage(const QIcon &icon, const QString &message, const MessageButtons buttons);
|
||||
virtual void positionMessageOverlay();
|
||||
virtual void updateFailedToLaunch(const QString &reason);
|
||||
|
||||
|
@ -126,13 +126,9 @@ void AssociatedApplicationManager::run(Plasma::Applet *applet)
|
||||
execCommand = execCommand.trimmed();
|
||||
|
||||
QStringList parameters = d->urlLists.value(applet).toStringList();
|
||||
bool success = QProcess::startDetached(execCommand, parameters);
|
||||
QProcess::startDetached(execCommand, parameters);
|
||||
#endif
|
||||
|
||||
if (!success) {
|
||||
applet->showMessage(KDE::icon("application-exit"), i18n("There was an error attempting to exec the associated application with this widget."), ButtonOk);
|
||||
}
|
||||
|
||||
} else if (d->urlLists.contains(applet) && !d->urlLists.value(applet).isEmpty()) {
|
||||
#if !PLASMA_NO_KIO
|
||||
KRun *krun = new KRun(d->urlLists.value(applet).first(), 0);
|
||||
|
@ -130,13 +130,6 @@ void AppletScript::addStandardConfigurationPages(KConfigDialog *dialog)
|
||||
}
|
||||
}
|
||||
|
||||
void AppletScript::showMessage(const QIcon &icon, const QString &message, const MessageButtons buttons)
|
||||
{
|
||||
if (applet()) {
|
||||
applet()->showMessage(icon, message, buttons);
|
||||
}
|
||||
}
|
||||
|
||||
void AppletScript::configChanged()
|
||||
{
|
||||
}
|
||||
|
@ -209,11 +209,6 @@ protected:
|
||||
*/
|
||||
void addStandardConfigurationPages(KConfigDialog *dialog);
|
||||
|
||||
/**
|
||||
* @see Applet
|
||||
*/
|
||||
void showMessage(const QIcon &icon, const QString &message, const MessageButtons buttons);
|
||||
|
||||
private:
|
||||
friend class Applet;
|
||||
friend class PopupApplet;
|
||||
|
Loading…
Reference in New Issue
Block a user