From 379e43959c99ee96ec0f9432ba34518cf0805d77 Mon Sep 17 00:00:00 2001 From: Torste Aikio Date: Tue, 29 Jun 2010 09:32:51 +0300 Subject: [PATCH 1/1] Fixed layout hierarchy --- src/remote.cpp | 2 +- src/settingsdlg.cpp | 6 ++---- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/src/remote.cpp b/src/remote.cpp index 2ba0db2..1f41978 100644 --- a/src/remote.cpp +++ b/src/remote.cpp @@ -99,7 +99,7 @@ void Remote::updateInfo() void Remote::sendRating(Rating::Rating r) { - if (m_name != "") { + if (!m_name.isEmpty()) { if (!m_ratingNAM) { m_ratingNAM = new QNetworkAccessManager(this); } diff --git a/src/settingsdlg.cpp b/src/settingsdlg.cpp index 43e590b..c721f49 100644 --- a/src/settingsdlg.cpp +++ b/src/settingsdlg.cpp @@ -16,8 +16,8 @@ SettingsDlg::SettingsDlg(QWidget *parent) { QSettings settings(this); m_layout = new QVBoxLayout(this); - m_btnLayout = new QHBoxLayout(this); - m_remoteNameLayout = new QHBoxLayout(this); + m_btnLayout = new QHBoxLayout(m_layout); + m_remoteNameLayout = new QHBoxLayout(m_layout); m_advSettingsBtn = new QPushButton(tr("Advanced"), this); m_selectRemoteBtn = new QPushButton(tr("Select remote"), this); @@ -57,8 +57,6 @@ SettingsDlg::SettingsDlg(QWidget *parent) connect(m_rateDownBtn, SIGNAL(clicked()), this, SLOT(rateDownClicked())); - m_layout->addLayout(m_remoteNameLayout); - m_layout->addLayout(m_btnLayout); this->setLayout(m_layout); QString selectedRemote = QSettings(this).value("remoteName", "").toString(); -- 1.7.9.5