Permalink
Browse files

-fixed double negation,function name,unused param

  • Loading branch information...
1 parent 6a4df5b commit f5d0229d8a74758ab098089ab49f5e89145821e3 Saurabh Sood committed Jun 20, 2013
Showing with 9 additions and 9 deletions.
  1. +5 −5 src/firstscreen.cpp
  2. +3 −3 src/firstscreen.h
  3. +1 −1 src/mainwindow.cpp
View
10 src/firstscreen.cpp
@@ -67,7 +67,7 @@ FirstScreen::FirstScreen( PackageBackend *backend, QString *tmpFileName, const Q
if( checkbox )
m_checkboxes.append( checkbox );
- QObject::connect( packDetails, SIGNAL( checkboxToggled( bool ) ), this, SLOT( countCheckedPackages( bool ) ) );
+ QObject::connect( packDetails, SIGNAL( checkboxToggled( bool ) ), this, SLOT( checkPackageState() ) );
mainLayout->addWidget( packDetails );
j++;
@@ -101,18 +101,18 @@ void FirstScreen::showEvent( QShowEvent *s )
qDebug() << "number of untrusted sources is " << m_untrustedSources;
}
-void FirstScreen::countCheckedPackages( bool )
+void FirstScreen::checkPackageState()
{
int checkCount = 0;
foreach( QCheckBox *check, m_checkboxes ) {
if( check->isChecked() )
checkCount++;
}
- if( checkCount == 0 ) {
- emit disableInstallButton( false );
+ if( checkCount != 0 ) {
+ emit setPackageState( true );
} else {
- emit disableInstallButton( true );
+ emit setPackageState( false );
}
}
View
6 src/firstscreen.h
@@ -42,9 +42,9 @@ private slots:
void showEvent( QShowEvent * s);
/**
- * Count packages selected
+ * Check Selected Packages
*/
- void countCheckedPackages( bool );
+ void checkPackageState();
private:
PackageBackend *m_backend;
@@ -64,7 +64,7 @@ private slots:
void showNextScreen( int );
void countChanged( int, int );
void sizeUpdated( QString size );
- void disableInstallButton( bool value );
+ void setPackageState( bool value );
};
#endif
View
2 src/mainwindow.cpp
@@ -94,7 +94,7 @@ MainWindow::MainWindow( const QString& filename, QString tmpFileName, bool fakeR
QObject::connect( m_backend, SIGNAL( installationCompleted() ), m_header, SLOT( installationCompleted() ) );
QObject::connect( installer, SIGNAL( installationCompleted() ), m_header, SLOT( installationCompleted() ) );
QObject::connect( m_backend, SIGNAL( installationCompleted() ), installer, SLOT( showCompletionStatus() ) );
- QObject::connect( m_firstScreen, SIGNAL( disableInstallButton( bool ) ), this, SLOT( disableInstallButton( bool ) ) );
+ QObject::connect( m_firstScreen, SIGNAL( setPackageState( bool ) ), this, SLOT( disableInstallButton( bool ) ) );
show();
}

0 comments on commit f5d0229

Please sign in to comment.