fixed some signal/slot connections and warnings

This commit is contained in:
Luis Ángel San Martín 2013-10-28 10:43:53 +01:00
parent 820c8bdeb3
commit 759bd048fc
9 changed files with 18 additions and 22 deletions

View File

@ -58,8 +58,6 @@ ExportLibraryDialog::ExportLibraryDialog(QWidget * parent)
setModal(true); setModal(true);
setWindowTitle(tr("Create covers package")); setWindowTitle(tr("Create covers package"));
t.setInterval(500);
connect(&t,SIGNAL(timeout()),this,SLOT(updateProgress()));
} }
void ExportLibraryDialog::exportLibrary() void ExportLibraryDialog::exportLibrary()
@ -70,7 +68,6 @@ void ExportLibraryDialog::exportLibrary()
progressBar->show(); progressBar->show();
accept->setEnabled(false); accept->setEnabled(false);
emit exportPath(QDir::cleanPath(path->text())); emit exportPath(QDir::cleanPath(path->text()));
t.start();
} }
else else
QMessageBox::critical(NULL,tr("Problem found while writing"),tr("The selected path for the output file does not exist or is not a valid path. Be sure that you have write access to this folder")); QMessageBox::critical(NULL,tr("Problem found while writing"),tr("The selected path for the output file does not exist or is not a valid path. Be sure that you have write access to this folder"));
@ -92,7 +89,6 @@ void ExportLibraryDialog::close()
path->clear(); path->clear();
progressBar->hide(); progressBar->hide();
accept->setEnabled(false); accept->setEnabled(false);
t.stop();
progressCount=0; progressCount=0;
QDialog::close(); QDialog::close();
} }

View File

@ -28,7 +28,6 @@ private:
QPushButton * accept; QPushButton * accept;
QPushButton * cancel; QPushButton * cancel;
void run(); void run();
QTimer t;
signals: signals:
void exportPath(QString); void exportPath(QString);
}; };

View File

@ -41,7 +41,7 @@ ImportComicsInfoDialog::ImportComicsInfoDialog(QWidget *parent)
progressBar->setMaximum(0); progressBar->setMaximum(0);
progressBar->setTextVisible(false); progressBar->setTextVisible(false);
progressBar->hide(); progressBar->hide();
connect(accept,SIGNAL(progressBar()),this,SLOT(show())); connect(accept,SIGNAL(clicked()),progressBar,SLOT(show()));
QHBoxLayout *bottomLayout = new QHBoxLayout; QHBoxLayout *bottomLayout = new QHBoxLayout;
bottomLayout->addStretch(); bottomLayout->addStretch();

View File

@ -649,7 +649,7 @@ void LibraryWindow::createConnections()
connect(libraryCreator,SIGNAL(comicAdded(QString,QString)),importWidget,SLOT(newComic(QString,QString))); connect(libraryCreator,SIGNAL(comicAdded(QString,QString)),importWidget,SLOT(newComic(QString,QString)));
//libraryCreator errors //libraryCreator errors
connect(libraryCreator,SIGNAL(failedCreatingDB(QString)),this,SLOT(manageCreatingError(QString))); connect(libraryCreator,SIGNAL(failedCreatingDB(QString)),this,SLOT(manageCreatingError(QString)));
connect(libraryCreator,SIGNAL(failedUpdatingDB(QString)),this,SLOT(manageUpdatingError(QString))); connect(libraryCreator,SIGNAL(failedUpdatingDB(QString)),this,SLOT(manageUpdatingError(QString))); //TODO: implement failedUpdatingDB
//new import widget //new import widget
connect(importWidget,SIGNAL(stop()),this,SLOT(stopLibraryCreator())); connect(importWidget,SIGNAL(stop()),this,SLOT(stopLibraryCreator()));
@ -679,10 +679,10 @@ void LibraryWindow::createConnections()
connect(renameLibraryDialog,SIGNAL(renameLibrary(QString)),this,SLOT(rename(QString))); connect(renameLibraryDialog,SIGNAL(renameLibrary(QString)),this,SLOT(rename(QString)));
//navigations between view modes (tree,list and flow) //navigations between view modes (tree,list and flow)
connect(foldersView, SIGNAL(pressed(QModelIndex)), this, SLOT(loadCovers(QModelIndex))); connect(foldersView, SIGNAL(clicked(QModelIndex)), this, SLOT(loadCovers(QModelIndex)));
connect(foldersView, SIGNAL(pressed(QModelIndex)), this, SLOT(updateHistory(QModelIndex))); connect(foldersView, SIGNAL(clicked(QModelIndex)), this, SLOT(updateHistory(QModelIndex)));
connect(comicView, SIGNAL(pressed(QModelIndex)), this, SLOT(centerComicFlow(QModelIndex))); connect(comicView, SIGNAL(clicked(QModelIndex)), this, SLOT(centerComicFlow(QModelIndex)));
connect(comicFlow, SIGNAL(centerIndexChanged(int)), this, SLOT(updateComicView(int))); connect(comicFlow, SIGNAL(centerIndexChanged(int)), this, SLOT(updateComicView(int)));
connect(comicView, SIGNAL(comicRated(int,QModelIndex)), dmCV, SLOT(updateRating(int,QModelIndex))); connect(comicView, SIGNAL(comicRated(int,QModelIndex)), dmCV, SLOT(updateRating(int,QModelIndex)));

View File

@ -281,7 +281,7 @@ void ServerConfigDialog::generateQR(const QString & serverAddress)
QStringList attributes; QStringList attributes;
attributes << "-o" << "-" /*QCoreApplication::applicationDirPath()+"/utils/tmp.png"*/ << "-s" << "8" << "-l" << "H" << "-m" << "0" << serverAddress; attributes << "-o" << "-" /*QCoreApplication::applicationDirPath()+"/utils/tmp.png"*/ << "-s" << "8" << "-l" << "H" << "-m" << "0" << serverAddress;
connect(qrGenerator,SIGNAL(finished(int,QProcess::ExitStatus)),this,SLOT(updateImage(void))); connect(qrGenerator,SIGNAL(finished(int,QProcess::ExitStatus)),this,SLOT(updateImage(void)));
connect(qrGenerator,SIGNAL(error(QProcess::ProcessError)),this,SLOT(openingError(QProcess::ProcessError))); connect(qrGenerator,SIGNAL(error(QProcess::ProcessError)),this,SLOT(openingError(QProcess::ProcessError))); //TODO: implement openingError
qrGenerator->start(QCoreApplication::applicationDirPath()+"/utils/qrencode",attributes); qrGenerator->start(QCoreApplication::applicationDirPath()+"/utils/qrencode",attributes);
} }

View File

@ -39,6 +39,7 @@ void YACReaderLocalServer::sendResponse()
{ {
QLocalSocket *clientConnection = localServer->nextPendingConnection(); QLocalSocket *clientConnection = localServer->nextPendingConnection();
//connect(clientConnection, SIGNAL(disconnected()),clientConnection, SLOT(deleteLater())); //connect(clientConnection, SIGNAL(disconnected()),clientConnection, SLOT(deleteLater()));
clientConnection->setParent(0);
YACReaderClientConnectionWorker * worker = new YACReaderClientConnectionWorker(clientConnection); YACReaderClientConnectionWorker * worker = new YACReaderClientConnectionWorker(clientConnection);
if(worker != 0) if(worker != 0)

View File

@ -19,19 +19,19 @@ YACReaderGLFlowConfigWidget::YACReaderGLFlowConfigWidget(QWidget * parent /* = 0
QGroupBox *groupBox = new QGroupBox(tr("Presets:")); QGroupBox *groupBox = new QGroupBox(tr("Presets:"));
radioClassic = new QRadioButton(tr("Classic look")); radioClassic = new QRadioButton(tr("Classic look"));
connect(radioClassic,SIGNAL(toggled(bool)),this,SLOT(setClassicConfig())); //connect(radioClassic,SIGNAL(toggled(bool)),this,SLOT(setClassicConfig()));
radioStripe = new QRadioButton(tr("Stripe look")); radioStripe = new QRadioButton(tr("Stripe look"));
connect(radioStripe,SIGNAL(toggled(bool)),this,SLOT(setStripeConfig())); //connect(radioStripe,SIGNAL(toggled(bool)),this,SLOT(setStripeConfig()));
radioOver = new QRadioButton(tr("Overlapped Stripe look")); radioOver = new QRadioButton(tr("Overlapped Stripe look"));
connect(radioOver,SIGNAL(toggled(bool)),this,SLOT(setOverlappedStripeConfig())); //connect(radioOver,SIGNAL(toggled(bool)),this,SLOT(setOverlappedStripeConfig()));
radionModern = new QRadioButton(tr("Modern look")); radionModern = new QRadioButton(tr("Modern look"));
connect(radionModern,SIGNAL(toggled(bool)),this,SLOT(setModernConfig())); //connect(radionModern,SIGNAL(toggled(bool)),this,SLOT(setModernConfig()));
radioDown = new QRadioButton(tr("Roulette look")); radioDown = new QRadioButton(tr("Roulette look"));
connect(radioDown,SIGNAL(toggled(bool)),this,SLOT(setRouletteConfig())); //connect(radioDown,SIGNAL(toggled(bool)),this,SLOT(setRouletteConfig()));
QVBoxLayout *vbox = new QVBoxLayout; QVBoxLayout *vbox = new QVBoxLayout;
QHBoxLayout * opt1 = new QHBoxLayout; QHBoxLayout * opt1 = new QHBoxLayout;

View File

@ -30,7 +30,7 @@ void YACReaderLibraryListWidget::addItem(QString name, QString path)
librariesList.insert(itr,library); librariesList.insert(itr,library);
//connect(library,SIGNAL(selected(QString,QString)),this,SIGNAL(librarySelected(QString,QString))); //connect(library,SIGNAL(selected(QString,QString)),this,SIGNAL(librarySelected(QString,QString)));
connect(library,SIGNAL(selected(QString,QString)),this,SLOT(updateLibraries(QString,QString))); //connect(library,SIGNAL(selected(QString,QString)),this,SLOT(updateLibraries(QString,QString)));
mainLayout->insertWidget(i,library); mainLayout->insertWidget(i,library);
} }

View File

@ -24,7 +24,7 @@ YACReaderOptionsDialog::YACReaderOptionsDialog(QWidget * parent)
cancel->setDefault(true); cancel->setDefault(true);
connect(accept,SIGNAL(clicked()),this,SLOT(saveOptions())); connect(accept,SIGNAL(clicked()),this,SLOT(saveOptions()));
connect(cancel,SIGNAL(clicked()),this,SLOT(restoreOptions())); connect(cancel,SIGNAL(clicked()),this,SLOT(restoreOptions())); //TODO fix this
connect(cancel,SIGNAL(clicked()),this,SLOT(close())); connect(cancel,SIGNAL(clicked()),this,SLOT(close()));
useGL = new QCheckBox(tr("Use hardware acceleration (restart needed)")); useGL = new QCheckBox(tr("Use hardware acceleration (restart needed)"));
@ -82,7 +82,7 @@ YACReaderOptionsDialog::YACReaderOptionsDialog(QWidget * parent)
connect(gl->maxAngle,SIGNAL(valueChanged(int)),this,SIGNAL(optionsChanged())); connect(gl->maxAngle,SIGNAL(valueChanged(int)),this,SIGNAL(optionsChanged()));
connect(gl->performanceSlider, SIGNAL(valueChanged(int)),this,SLOT(savePerformance(int))); connect(gl->performanceSlider, SIGNAL(valueChanged(int)),this,SLOT(savePerformance(int)));
connect(gl->performanceSlider, SIGNAL(valueChanged(int)),this,SLOT(optionsChanged())); connect(gl->performanceSlider, SIGNAL(valueChanged(int)),this,SIGNAL(optionsChanged()));
connect(gl->vSyncCheck,SIGNAL(stateChanged(int)),this,SLOT(saveUseVSync(int))); connect(gl->vSyncCheck,SIGNAL(stateChanged(int)),this,SLOT(saveUseVSync(int)));
} }