+ fix reported Qt warning

This commit is contained in:
wmayer
2016-04-13 17:16:32 +02:00
parent 08df5cbc59
commit df6eb69f56
2 changed files with 12 additions and 13 deletions

View File

@@ -48,16 +48,15 @@ namespace Gui {
namespace Dialog {
QByteArray toParamEntry(QString name)
{
QString tmp = QString::fromLatin1(name.toLatin1());
name.replace(QString::fromLatin1(" "),QString::fromLatin1("_"));
name.replace(QString::fromLatin1(" "), QString::fromLatin1("_"));
return name.toLatin1();
}
void DlgCheckableMessageBox::showMessage(QString header, QString message, bool check,QString checkText )
void DlgCheckableMessageBox::showMessage(const QString& header, const QString& message, bool check, const QString& checkText)
{
bool checked = App::GetApplication().GetParameterGroupByPath( QByteArray("User parameter:BaseApp/CheckMessages"))->GetBool(toParamEntry(header));
if(!checked){
if (!checked) {
DlgCheckableMessageBox *mb = new DlgCheckableMessageBox(Gui::getMainWindow());
mb->setWindowTitle(header);
mb->setIconPixmap(QMessageBox::standardIcon(QMessageBox::Warning));
@@ -97,11 +96,11 @@ DlgCheckableMessageBox::~DlgCheckableMessageBox()
delete m_d;
}
void DlgCheckableMessageBox::setPrefEntry( const QString& entry )
void DlgCheckableMessageBox::setPrefEntry(const QString& entry)
{
paramEntry = toParamEntry(entry);
bool checked = App::GetApplication().GetParameterGroupByPath( QByteArray("User parameter:BaseApp/CheckMessages"))->GetBool(paramEntry);
setChecked(checked);
paramEntry = toParamEntry(entry);
bool checked = App::GetApplication().GetParameterGroupByPath(QByteArray("User parameter:BaseApp/CheckMessages"))->GetBool(paramEntry);
setChecked(checked);
}
@@ -236,4 +235,4 @@ QMessageBox::StandardButton DlgCheckableMessageBox::dialogButtonBoxToMessageBoxB
} // namespace Dialog
} // namespace Gui
#include "moc_DlgCheckableMessageBox.cpp"
#include "moc_DlgCheckableMessageBox.cpp"