Harmonize QPA TrayIcon showMessage parameter order

Parameters were misnamed in some places but still managed to pass them
through in the right order.  Rename to avoid confusion, and keep the
parameter order the same as in QSystemTrayIcon::showMessage.

Change-Id: Ib4c8fff15eff15034c4ea64757803b118e487144
Reviewed-by: Marco Martin <mart@kde.org>
Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
This commit is contained in:
Shawn Rutledge 2014-11-26 19:49:57 +01:00
parent c5a43acf18
commit f277c07467
7 changed files with 13 additions and 15 deletions

View File

@ -118,7 +118,7 @@ QPlatformSystemTrayIcon::~QPlatformSystemTrayIcon()
*/
/*!
\fn void QPlatformSystemTrayIcon::showMessage(const QString &msg, const QString &title,
\fn void QPlatformSystemTrayIcon::showMessage(const QString &title, const QString &msg,
const QIcon &icon, MessageIcon iconType, int secs)
Shows a balloon message for the entry with the given \a title, message \a msg and \a icon for
the time specified in \a secs. \a iconType is used as a hint for the implementing platform.

View File

@ -69,7 +69,7 @@ public:
virtual void updateToolTip(const QString &tooltip) = 0;
virtual void updateMenu(QPlatformMenu *menu) = 0;
virtual QRect geometry() const = 0;
virtual void showMessage(const QString &msg, const QString &title,
virtual void showMessage(const QString &title, const QString &msg,
const QIcon &icon, MessageIcon iconType, int secs) = 0;
virtual bool isSystemTrayAvailable() const = 0;

View File

@ -57,7 +57,7 @@ public:
virtual void updateToolTip(const QString &toolTip);
virtual void updateMenu(QPlatformMenu *menu);
virtual QRect geometry() const;
virtual void showMessage(const QString &msg, const QString &title,
virtual void showMessage(const QString &title, const QString &msg,
const QIcon& icon, MessageIcon iconType, int secs);
virtual bool isSystemTrayAvailable() const;

View File

@ -718,8 +718,8 @@ void QSystemTrayIconPrivate::updateToolTip_sys_qpa()
qpa_sys->updateToolTip(toolTip);
}
void QSystemTrayIconPrivate::showMessage_sys_qpa(const QString &message,
const QString &title,
void QSystemTrayIconPrivate::showMessage_sys_qpa(const QString &title,
const QString &message,
QSystemTrayIcon::MessageIcon icon,
int msecs)
{
@ -737,7 +737,7 @@ void QSystemTrayIconPrivate::showMessage_sys_qpa(const QString &message,
default:
break;
}
qpa_sys->showMessage(message, title, notificationIcon,
qpa_sys->showMessage(title, message, notificationIcon,
static_cast<QPlatformSystemTrayIcon::MessageIcon>(icon), msecs);
}

View File

@ -77,7 +77,7 @@ public:
void updateToolTip_sys();
void updateMenu_sys();
QRect geometry_sys() const;
void showMessage_sys(const QString &msg, const QString &title, QSystemTrayIcon::MessageIcon icon, int secs);
void showMessage_sys(const QString &title, const QString &msg, QSystemTrayIcon::MessageIcon icon, int secs);
static bool isSystemTrayAvailable_sys();
static bool supportsMessages_sys();
@ -98,7 +98,7 @@ private:
void updateToolTip_sys_qpa();
void updateMenu_sys_qpa();
QRect geometry_sys_qpa() const;
void showMessage_sys_qpa(const QString &msg, const QString &title, QSystemTrayIcon::MessageIcon icon, int secs);
void showMessage_sys_qpa(const QString &title, const QString &msg, QSystemTrayIcon::MessageIcon icon, int secs);
};
class QBalloonTip : public QWidget

View File

@ -111,13 +111,11 @@ bool QSystemTrayIconPrivate::supportsMessages_sys()
return false;
}
void QSystemTrayIconPrivate::showMessage_sys(const QString &message,
const QString &title,
QSystemTrayIcon::MessageIcon icon,
int msecs)
void QSystemTrayIconPrivate::showMessage_sys(const QString &title, const QString &message,
QSystemTrayIcon::MessageIcon icon, int msecs)
{
if (qpa_sys)
showMessage_sys_qpa(message, title, icon, msecs);
showMessage_sys_qpa(title, message, icon, msecs);
}
QT_END_NAMESPACE

View File

@ -341,11 +341,11 @@ bool QSystemTrayIconPrivate::supportsMessages_sys()
return true;
}
void QSystemTrayIconPrivate::showMessage_sys(const QString &message, const QString &title,
void QSystemTrayIconPrivate::showMessage_sys(const QString &title, const QString &message,
QSystemTrayIcon::MessageIcon icon, int msecs)
{
if (qpa_sys) {
showMessage_sys_qpa(message, title, icon, msecs);
showMessage_sys_qpa(title, message, icon, msecs);
return;
}
if (!sys)