From kde-commits Sun Mar 10 22:27:40 2013 From: Peter Hedlund Date: Sun, 10 Mar 2013 22:27:40 +0000 To: kde-commits Subject: [kwordquiz] src: More Krazy fixes. Message-Id: <20130310222740.E4FC4A604F () git ! kde ! org> X-MARC-Message: https://marc.info/?l=kde-commits&m=136295447304031 Git commit 144541fd2de8dd3c53e7ad24cd12066764c5408f by Peter Hedlund. Committed on 10/03/2013 at 23:27. Pushed by hedlund into branch 'master'. More Krazy fixes. M +12 -12 src/kwordquiz.cpp M +1 -1 src/kwqcleardialog.cpp M +1 -1 src/kwqquizmodel.h M +4 -4 src/kwqtableview.cpp M +1 -1 src/kwqtutor.cpp M +2 -2 src/multipleview.cpp M +8 -8 src/prefcardappearance.cpp http://commits.kde.org/kwordquiz/144541fd2de8dd3c53e7ad24cd12066764c5408f diff --git a/src/kwordquiz.cpp b/src/kwordquiz.cpp index 85cd436..2c263a0 100644 --- a/src/kwordquiz.cpp +++ b/src/kwordquiz.cpp @@ -123,7 +123,7 @@ void KWordQuizApp::initActions() fileOpen->setToolTip(fileOpen->whatsThis()); fileOpen->setStatusTip(fileOpen->whatsThis()); = - fileOpenRecent =3D KStandardAction::openRecent(this, SLOT(slotFileOpenRe= cent(const KUrl&)), actionCollection()); + fileOpenRecent =3D KStandardAction::openRecent(this, SLOT(slotFileOpenRe= cent(KUrl)), actionCollection()); = fileGHNS =3D KNS3::standardAction(i18n("Download New Vocabularies..."), = this, SLOT(slotFileGHNS()), actionCollection(), "file_ghns"); fileGHNS->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_G)); @@ -164,8 +164,8 @@ void KWordQuizApp::initActions() editUndo =3D m_undoStack->createUndoAction(actionCollection()); editRedo =3D m_undoStack->createRedoAction(actionCollection()); connect(m_undoStack, SIGNAL(cleanChanged(bool)), this, SLOT(slotCleanCha= nged(bool))); - connect(m_undoStack, SIGNAL(undoTextChanged(const QString &)), this, SLO= T(slotUndoTextChanged(const QString &))); - connect(m_undoStack, SIGNAL(redoTextChanged(const QString &)), this, SLO= T(slotRedoTextChanged(const QString &))); + connect(m_undoStack, SIGNAL(undoTextChanged(QString)), this, SLOT(slotUn= doTextChanged(QString))); + connect(m_undoStack, SIGNAL(redoTextChanged(QString)), this, SLOT(slotRe= doTextChanged(QString))); = editCut =3D KStandardAction::cut(this, SLOT(slotEditCut()), actionCollec= tion()); editCut->setWhatsThis(i18n("Cuts the text from the selected cells and pl= aces it on the clipboard")); @@ -281,7 +281,7 @@ void KWordQuizApp::initActions() vocabLayouts->setMenu(m); = m_layoutActionGroup =3D new QActionGroup(this); - connect(m_layoutActionGroup, SIGNAL(triggered(QAction *)), this, SLOT(sl= otLayoutActionGroupTriggered(QAction *))); + connect(m_layoutActionGroup, SIGNAL(triggered(QAction*)), this, SLOT(slo= tLayoutActionGroupTriggered(QAction*))); = m_modeActionMenu =3D actionCollection()->add("mode_0"); m_modeActionMenu->setIcon(KIcon("mode1")); @@ -293,7 +293,7 @@ void KWordQuizApp::initActions() connect(m_modeActionMenu, SIGNAL(triggered(bool)), this, SLOT(slotModeCh= ange())); = m_modeActionGroup =3D new QActionGroup(this); - connect(m_modeActionGroup, SIGNAL(triggered(QAction *)), this, SLOT(slot= ModeActionGroupTriggered(QAction *))); + connect(m_modeActionGroup, SIGNAL(triggered(QAction*)), this, SLOT(slotM= odeActionGroupTriggered(QAction*))); = for (int i =3D 1; i <=3D5; ++i) { a =3D actionCollection()->addAction(QString("mode_%1").arg(QString::nu= mber(i))); @@ -440,7 +440,7 @@ void KWordQuizApp::initActions() configNotifications->setToolTip(configNotifications->whatsThis()); configNotifications->setStatusTip(configNotifications->whatsThis()); = - configApp =3D KStandardAction::preferences(this, SLOT( slotConfigure()),= actionCollection()); + configApp =3D KStandardAction::preferences(this, SLOT(slotConfigure()), = actionCollection()); configApp->setWhatsThis(i18n("Specifies preferences for the vocabulary e= ditor and quiz sessions")); configApp->setToolTip(configApp->whatsThis()); configApp->setToolTip(configApp->whatsThis()); @@ -508,7 +508,7 @@ void KWordQuizApp::initView() m_pageWidget =3D new KPageWidget(this); m_pageWidget->setFaceType( KPageView::List ); setCentralWidget(m_pageWidget); - connect(m_pageWidget, SIGNAL(currentPageChanged(KPageWidgetItem *, KPage= WidgetItem *)), this, SLOT(slotCurrentPageChanged(KPageWidgetItem *, KPageW= idgetItem *))); + connect(m_pageWidget, SIGNAL(currentPageChanged(KPageWidgetItem*, KPageW= idgetItem*)), this, SLOT(slotCurrentPageChanged(KPageWidgetItem*, KPageWidg= etItem*))); = QVBoxLayout *editorLayout =3D new QVBoxLayout(); editorLayout->setMargin(0); @@ -527,7 +527,7 @@ void KWordQuizApp::initView() m_tableView->setColumnWidth(1, qvariant_cast(m_tableModel->header= Data(1, Qt::Horizontal, Qt::SizeHintRole)).width()); setCaption(m_doc->url().fileName(),false); m_tableView->setContextMenuPolicy(Qt::CustomContextMenu); - connect(m_tableView, SIGNAL(customContextMenuRequested(const QPoint &)),= this, SLOT(slotTableContextMenuRequested(const QPoint &))); + connect(m_tableView, SIGNAL(customContextMenuRequested(QPoint)), this, S= LOT(slotTableContextMenuRequested(QPoint))); connect(m_tableModel, SIGNAL(modelReset()), m_tableView, SLOT(slotModelR= eset())); = m_searchLine->setVisible(Prefs::showSearch()); @@ -1174,7 +1174,7 @@ void KWordQuizApp::slotCurrentPageChanged(KPageWidget= Item *current, KPageWidgetI } m_quiz =3D new KWQQuizModel(this); m_quiz->setSourceModel(m_sortFilterModel); - connect(m_quiz, SIGNAL(checkingAnswer(int )), m_tableView, SLOT(slotCh= eckedAnswer(int ))); + connect(m_quiz, SIGNAL(checkingAnswer(int)), m_tableView, SLOT(slotChe= ckedAnswer(int))); m_quiz->setQuizType(Prefs::EnumStartSession::Flashcard); m_quiz->setQuizMode(Prefs::mode()); if (m_quiz->init()) @@ -1206,7 +1206,7 @@ void KWordQuizApp::slotCurrentPageChanged(KPageWidget= Item *current, KPageWidgetI } m_quiz =3D new KWQQuizModel(this); m_quiz->setSourceModel(m_sortFilterModel); - connect(m_quiz, SIGNAL(checkingAnswer(int )), m_tableView, SLOT(slotCh= eckedAnswer(int ))); + connect(m_quiz, SIGNAL(checkingAnswer(int)), m_tableView, SLOT(slotChe= ckedAnswer(int))); m_quiz->setQuizType(Prefs::EnumStartSession::MultipleChoice); m_quiz->setQuizMode(Prefs::mode()); if (m_quiz->init()) @@ -1235,7 +1235,7 @@ void KWordQuizApp::slotCurrentPageChanged(KPageWidget= Item *current, KPageWidgetI } m_quiz =3D new KWQQuizModel(this); m_quiz->setSourceModel(m_sortFilterModel); - connect(m_quiz, SIGNAL(checkingAnswer(int )), m_tableView, SLOT(slotCh= eckedAnswer(int ))); + connect(m_quiz, SIGNAL(checkingAnswer(int)), m_tableView, SLOT(slotChe= ckedAnswer(int))); m_quiz->setQuizType(Prefs::EnumStartSession::QA); m_quiz->setQuizMode(Prefs::mode()); if (m_quiz->init()) @@ -1277,7 +1277,7 @@ void KWordQuizApp::slotConfigure() = //KConfigDialog didn't find an instance of this dialog, so lets create i= t : KWordQuizPrefs* dialog =3D new KWordQuizPrefs(this, "settings", Prefs::= self(), actionCollection()); - connect(dialog, SIGNAL(settingsChanged(const QString &)), this, SLOT(slo= tApplyPreferences())); + connect(dialog, SIGNAL(settingsChanged(QString)), this, SLOT(slotApplyPr= eferences())); dialog->show(); } = diff --git a/src/kwqcleardialog.cpp b/src/kwqcleardialog.cpp index e7e2c7e..573f0f4 100644 --- a/src/kwqcleardialog.cpp +++ b/src/kwqcleardialog.cpp @@ -28,7 +28,7 @@ KWQClearDialog::KWQClearDialog(QWidget* parent): KDialog(= parent) setButtons(Ok|Cancel); setupUi(mainWidget()); = - connect(clearButtonGroup, SIGNAL(changed(int )), this, SLOT(buttonGrou= pChanged(int))); + connect(clearButtonGroup, SIGNAL(changed(int)), this, SLOT(buttonGroup= Changed(int))); = updateCheckBoxes(); } diff --git a/src/kwqquizmodel.h b/src/kwqquizmodel.h index 061360c..1a8460f 100644 --- a/src/kwqquizmodel.h +++ b/src/kwqquizmodel.h @@ -35,7 +35,7 @@ class KWQQuizModel : public QSortFilterProxyModel public: enum QuizIcon {IconLeftCol, IconRightCol, IconQuestion, IconCorrect, I= conError}; = - KWQQuizModel(QObject *parent); + explicit KWQQuizModel(QObject *parent); = void setSourceModel(KWQSortFilterModel * sourceModel); KWQSortFilterModel * sourceModel() const; diff --git a/src/kwqtableview.cpp b/src/kwqtableview.cpp index 26e9ea5..9d9f067 100644 --- a/src/kwqtableview.cpp +++ b/src/kwqtableview.cpp @@ -59,7 +59,7 @@ KWQTableView::KWQTableView(KUndoStack *undoStack, QWidget= *parent) : QTableView( setSelectionBehavior(QAbstractItemView::SelectItems); setEditTriggers(QAbstractItemView::AnyKeyPressed | QAbstractItemView::Ed= itKeyPressed | QAbstractItemView::DoubleClicked); setTabKeyNavigation(true); - connect(horizontalHeader(), SIGNAL(sectionResized(int, int, int)), this,= SLOT(horizontalHeaderResized(int, int, int))); + connect(horizontalHeader(), SIGNAL(sectionResized(int,int,int)), this, S= LOT(horizontalHeaderResized(int,int,int))); connect(horizontalHeader(), SIGNAL(sectionClicked(int)), this, SLOT(slot= HeaderClicked(int))); m_delegate =3D new KWQTableDelegate(this); setItemDelegate(m_delegate); @@ -627,9 +627,9 @@ void KWQTableView::setModel(KWQSortFilterModel * model) m_model =3D model; setCurrentIndex(model->index(0, 0)); scrollTo(currentIndex()); - connect(verticalHeader(), SIGNAL(sectionResized(int, int, int)), this, S= LOT(verticalHeaderResized(int, int, int))); - connect(horizontalHeader(), SIGNAL(sectionResized(int, int, int)), this,= SLOT(horizontalHeaderResized(int, int, int))); - connect(m_model, SIGNAL(headerDataChanged(Qt::Orientation, int, int)), t= his, SLOT(horizontalHeaderDataChanged(Qt::Orientation, int, int))); + connect(verticalHeader(), SIGNAL(sectionResized(int,int,int)), this, SLO= T(verticalHeaderResized(int,int,int))); + connect(horizontalHeader(), SIGNAL(sectionResized(int,int,int)), this, S= LOT(horizontalHeaderResized(int,int,int))); + connect(m_model, SIGNAL(headerDataChanged(Qt::Orientation,int,int)), thi= s, SLOT(horizontalHeaderDataChanged(Qt::Orientation,int,int))); } = void KWQTableView::closeEditor(QWidget * editor, QAbstractItemDelegate::En= dEditHint hint) diff --git a/src/kwqtutor.cpp b/src/kwqtutor.cpp index 8fa5aea..2e91b19 100644 --- a/src/kwqtutor.cpp +++ b/src/kwqtutor.cpp @@ -157,7 +157,7 @@ void KWQTutor::showPrefMenu() = //KConfigDialog didn't find an instance of this dialog, so lets create i= t : KWQTutorPrefs* dialog =3D new KWQTutorPrefs(0, "settings", Prefs::self(= ), m_globalCollection); - connect(dialog, SIGNAL(settingsChanged(const QString &)), this, SLOT(slo= tApplyPreferences())); + connect(dialog, SIGNAL(settingsChanged(QString)), this, SLOT(slotApplyPr= eferences())); dialog->show(); } = diff --git a/src/multipleview.cpp b/src/multipleview.cpp index 5c96911..ecde93b 100644 --- a/src/multipleview.cpp +++ b/src/multipleview.cpp @@ -38,9 +38,9 @@ MultipleView::MultipleView(QWidget *parent, KActionCollec= tion *actionCollection) m_choicesButtons->addButton(opt1, 1); m_choicesButtons->addButton(opt2, 2); m_choicesButtons->addButton(opt3, 3); - connect(m_choicesButtons, SIGNAL(buttonClicked(int )), this, SLOT(slotCh= oiceClicked(int ))); + connect(m_choicesButtons, SIGNAL(buttonClicked(int)), this, SLOT(slotCho= iceClicked(int))); m_choicesActions =3D new QActionGroup(this); - connect(m_choicesActions, SIGNAL(triggered(QAction *)), this, SLOT(slotC= hoiceActionTriggered(QAction *))); + connect(m_choicesActions, SIGNAL(triggered(QAction*)), this, SLOT(slotCh= oiceActionTriggered(QAction*))); m_choicesActions->addAction(m_actionCollection->action("quiz_Opt1")); m_choicesActions->addAction(m_actionCollection->action("quiz_Opt2")); m_choicesActions->addAction(m_actionCollection->action("quiz_Opt3")); diff --git a/src/prefcardappearance.cpp b/src/prefcardappearance.cpp index fefea84..8f814fc 100644 --- a/src/prefcardappearance.cpp +++ b/src/prefcardappearance.cpp @@ -26,14 +26,14 @@ PrefCardAppearance::PrefCardAppearance(QWidget *parent)= : QWidget(parent) setupUi(this); = connect(flipButton, SIGNAL(clicked()), this, SLOT(slotFlipButtonClicked(= ))); - connect(kcfg_FrontFont, SIGNAL(fontSelected(const QFont&)), this, SLOT(s= lotFontChanged(const QFont&))); - connect(kcfg_FrontTextColor, SIGNAL(changed(const QColor&)), this, SLOT(= slotTextColorChanged(const QColor&))); - connect(kcfg_FrontCardColor, SIGNAL(changed(const QColor&)), this, SLOT(= slotCardColorChanged(const QColor&))); - connect(kcfg_FrontFrameColor, SIGNAL(changed(const QColor&)), this, SLOT= (slotFrameColorChanged(const QColor&))); - connect(kcfg_BackFont, SIGNAL(fontSelected(const QFont&)), this, SLOT(sl= otFontChanged(const QFont&))); - connect(kcfg_BackTextColor, SIGNAL(changed(const QColor&)), this, SLOT(s= lotTextColorChanged(const QColor&))); - connect(kcfg_BackCardColor, SIGNAL(changed(const QColor&)), this, SLOT(s= lotCardColorChanged(const QColor&))); - connect(kcfg_BackFrameColor, SIGNAL(changed(const QColor&)), this, SLOT(= slotFrameColorChanged(const QColor&))); + connect(kcfg_FrontFont, SIGNAL(fontSelected(QFont)), this, SLOT(slotFont= Changed(QFont&))); + connect(kcfg_FrontTextColor, SIGNAL(changed(QColor)), this, SLOT(slotTex= tColorChanged(QColor))); + connect(kcfg_FrontCardColor, SIGNAL(changed(QColor)), this, SLOT(slotCar= dColorChanged(QColor))); + connect(kcfg_FrontFrameColor, SIGNAL(changed(QColor)), this, SLOT(slotFr= ameColorChanged(QColor))); + connect(kcfg_BackFont, SIGNAL(fontSelected(QFont)), this, SLOT(slotFontC= hanged(QFont))); + connect(kcfg_BackTextColor, SIGNAL(changed(QColor)), this, SLOT(slotText= ColorChanged(QColor))); + connect(kcfg_BackCardColor, SIGNAL(changed(QColor)), this, SLOT(slotCard= ColorChanged(QColor))); + connect(kcfg_BackFrameColor, SIGNAL(changed(QColor)), this, SLOT(slotFra= meColorChanged(QColor))); connect(widgetStack, SIGNAL(currentChanged(int)), this, SLOT(slotCurrent= Changed(int))); = widgetStack->setCurrentWidget(frontStackPage);