From 9ae60f3a18a344272f6b0973c5a645143fbed51d Mon Sep 17 00:00:00 2001 From: Tim Jenssen Date: Mon, 16 Jan 2012 13:51:20 +0100 Subject: rename button to defaultButton Change-Id: I0bdf5b48adee9c289f0f058012490473a2d7f760 Reviewed-by: Karsten Heimrich Reviewed-by: Alexander Lenhardt --- installerbuilder/libinstaller/messageboxhandler.cpp | 14 +++++++------- installerbuilder/libinstaller/messageboxhandler.h | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) (limited to 'installerbuilder') diff --git a/installerbuilder/libinstaller/messageboxhandler.cpp b/installerbuilder/libinstaller/messageboxhandler.cpp index 0357b7312..cd598dc0f 100644 --- a/installerbuilder/libinstaller/messageboxhandler.cpp +++ b/installerbuilder/libinstaller/messageboxhandler.cpp @@ -271,7 +271,7 @@ static QMessageBox::StandardButton showNewMessageBox(QWidget *parent, QMessageBo QMessageBox::StandardButton MessageBoxHandler::showMessageBox(MessageType messageType, QWidget *parent, const QString &identifier, const QString &title, const QString &text, QMessageBox::StandardButtons buttons, - QMessageBox::StandardButton button) const + QMessageBox::StandardButton defaultButton) const { static QHash messageTypeHash; if (messageTypeHash.isEmpty()) { @@ -285,7 +285,7 @@ QMessageBox::StandardButton MessageBoxHandler::showMessageBox(MessageType messag messageTypeHash.value(messageType),identifier, title, text); if (QApplication::type() == QApplication::Tty) - return button; + return defaultButton; if (m_automaticAnswers.contains(identifier)) return m_automaticAnswers.value(identifier); @@ -293,18 +293,18 @@ QMessageBox::StandardButton MessageBoxHandler::showMessageBox(MessageType messag if (m_defaultAction == AskUser) { switch (messageType) { case criticalType: - return showNewMessageBox(parent, QMessageBox::Critical, title, text, buttons, button); + return showNewMessageBox(parent, QMessageBox::Critical, title, text, buttons, defaultButton); case informationType: - return showNewMessageBox(parent, QMessageBox::Information, title, text, buttons, button); + return showNewMessageBox(parent, QMessageBox::Information, title, text, buttons, defaultButton); case questionType: - return showNewMessageBox(parent, QMessageBox::Question, title, text, buttons, button); + return showNewMessageBox(parent, QMessageBox::Question, title, text, buttons, defaultButton); case warningType: - return showNewMessageBox(parent, QMessageBox::Warning, title, text, buttons, button); + return showNewMessageBox(parent, QMessageBox::Warning, title, text, buttons, defaultButton); } } else { return autoReply(buttons); } Q_ASSERT_X(false, Q_FUNC_INFO, "Something went really wrong."); - return button; + return defaultButton; } diff --git a/installerbuilder/libinstaller/messageboxhandler.h b/installerbuilder/libinstaller/messageboxhandler.h index b1dfda1dd..f06a71530 100644 --- a/installerbuilder/libinstaller/messageboxhandler.h +++ b/installerbuilder/libinstaller/messageboxhandler.h @@ -109,7 +109,7 @@ private: QMessageBox::StandardButton showMessageBox(MessageType messageType, QWidget *parent, const QString &identifier, const QString &title, const QString &text, QMessageBox::StandardButtons buttons = QMessageBox::Ok, - QMessageBox::StandardButton button = QMessageBox::NoButton) const; + QMessageBox::StandardButton defaultButton = QMessageBox::NoButton) const; private: static MessageBoxHandler *m_instance; -- cgit v1.2.3