Fixed layout hierarchy
authorTorste Aikio <zokier@zokier.laptop>
Tue, 29 Jun 2010 06:32:51 +0000 (09:32 +0300)
committerTorste Aikio <zokier@zokier.laptop>
Tue, 29 Jun 2010 06:32:51 +0000 (09:32 +0300)
src/remote.cpp
src/settingsdlg.cpp

index 2ba0db2..1f41978 100644 (file)
@@ -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);
         }
index 43e590b..c721f49 100644 (file)
@@ -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();