summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArno <am@disconnect.de>2010-07-29 21:18:39 +0200
committerArno <am@disconnect.de>2010-07-29 21:18:39 +0200
commit82789cd9e72688b72add622f27598e9aad879af0 (patch)
tree880b4cb6c6d5e8fa3d6056c11fbd52292285f19e
parent5926a52a30428a2fa10ff8f367e4cb4355f62c2d (diff)
downloadSheMov-82789cd9e72688b72add622f27598e9aad879af0.tar.gz
SheMov-82789cd9e72688b72add622f27598e9aad879af0.tar.bz2
SheMov-82789cd9e72688b72add622f27598e9aad879af0.zip
Bugfix in AddCoverDialog::AddCoverDialog
mCurrentType wasn't initialized in AddCoverDialog constructor, so it ended up with a random number. Fortunately it was too big for a Pg::SmallInt and the db choked with the value being too big for a Pg::SmallInt. Fix: Connect QComboBox::currentIndexChanged(QString) first and then add items to the QComboBox. That triggers the SLOT and sets mCurrentType to the right value.
-rw-r--r--seriestreewidget.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/seriestreewidget.cpp b/seriestreewidget.cpp
index b5a48be..7e60c53 100644
--- a/seriestreewidget.cpp
+++ b/seriestreewidget.cpp
@@ -286,11 +286,11 @@ AddCoverDialog::AddCoverDialog(QWidget *parent, Qt::WindowFlags f) : QDialog(par
foreach(QString t, coverTypes.values()){
types << t;
}
+ connect(mFileType, SIGNAL(currentIndexChanged(QString)), this, SLOT(typeChanged(QString)));
mFileType->addItems(types);
QHBoxLayout *typesLayout = new QHBoxLayout;
typesLayout->setAlignment(Qt::AlignCenter);
typesLayout->addWidget(mFileType);
- connect(mFileType, SIGNAL(currentIndexChanged(QString)), this, SLOT(typeChanged(QString)));
//buttons
mOk = new QPushButton(tr("Ok"));