diff --git a/CMakeLists.txt b/CMakeLists.txt --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -40,7 +40,6 @@ find_package(Phonon4Qt5 REQUIRED) find_package(KF5 ${KF5_MIN_VERSION} REQUIRED COMPONENTS - Completion Crash DocTools I18n diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -27,7 +27,6 @@ add_executable(klettres ${klettres_SRCS}) target_link_libraries(klettres - KF5::Completion KF5::Crash KF5::NewStuff KF5::I18n diff --git a/src/klettres.cpp b/src/klettres.cpp --- a/src/klettres.cpp +++ b/src/klettres.cpp @@ -33,6 +33,7 @@ #include #include #include +#include //KDE includes #include @@ -444,7 +445,7 @@ QIcon KLettres::charIcon(QChar c) { ///Create a name and path for the icon - // + // // FIXME: This code used KStandardDirs::locateLocal("icon", ...) before // and I am not sure if GenericCacheLocation is what we are aiming // for. So best would be if somebody experienced in QStandardPaths diff --git a/src/klettresview.h b/src/klettresview.h --- a/src/klettresview.h +++ b/src/klettresview.h @@ -21,7 +21,7 @@ #ifndef KLETTRESVIEW_H #define KLETTRESVIEW_H -#include +#include class QPixmap; class QRect; @@ -62,7 +62,7 @@ ///A Klettres object KLettres *m_klettres; ///The line where the user enters his/her input - KLineEdit *m_letterEdit; + QLineEdit *m_letterEdit; ///set the chosen theme void setTheme(KLTheme *theme); diff --git a/src/klettresview.cpp b/src/klettresview.cpp --- a/src/klettresview.cpp +++ b/src/klettresview.cpp @@ -42,7 +42,7 @@ m_klettres = parent; //lineEdit for user input - m_letterEdit = new KLineEdit( this ); + m_letterEdit = new QLineEdit( this ); m_letterEdit->setToolTip(i18n("Type the letter or syllable that you just heard" ) ); m_letterEdit->setFont(Prefs::font()); m_letterEdit->setContextMenuPolicy(Qt::NoContextMenu); @@ -156,27 +156,27 @@ m_cursorPos = 1; //reset everything so when you change language or levels //it all restarts nicely - QObject::disconnect(m_letterEdit, &KLineEdit::textChanged, this, &KLettresView::slotProcess); + QObject::disconnect(m_letterEdit, &QLineEdit::textChanged, this, &KLettresView::slotProcess); m_letterEdit->clear(); m_letterEdit->setCursorPosition(0); m_letterEdit->setMaxLength( 1 ); m_letterEdit->setFocus(); m_upperLetter.clear(); chooseSound(); randomInt++; - QObject::connect(m_letterEdit, &KLineEdit::textChanged, this, &KLettresView::slotProcess); + QObject::connect(m_letterEdit, &QLineEdit::textChanged, this, &KLettresView::slotProcess); } void KLettresView::slotProcess(const QString &inputLetter) { QString lang = Prefs::language(); - QObject::disconnect(m_letterEdit, &KLineEdit::textChanged, this, &KLettresView::slotProcess); + QObject::disconnect(m_letterEdit, &QLineEdit::textChanged, this, &KLettresView::slotProcess); //check if backspace if (inputLetter.length() != m_cursorPos) { m_cursorPos--; m_letterEdit->setMaxLength( m_cursorPos ); - QObject::connect(m_letterEdit, &KLineEdit::textChanged, this, &KLettresView::slotProcess); + QObject::connect(m_letterEdit, &QLineEdit::textChanged, this, &KLettresView::slotProcess); return; } QChar input_character = inputLetter.at(inputLetter.length()-1); @@ -198,7 +198,7 @@ } else { qCDebug(KLETTRES_LOG) << "cursor " << m_cursorPos << endl; m_letterEdit->backspace(); - QObject::connect(m_letterEdit, &KLineEdit::textChanged, this, &KLettresView::slotProcess); + QObject::connect(m_letterEdit, &QLineEdit::textChanged, this, &KLettresView::slotProcess); } } @@ -216,7 +216,7 @@ m_letterEdit->setCursorPosition( m_cursorPos ); m_letterEdit->setFocus(); m_cursorPos ++; - QObject::connect(m_letterEdit, &KLineEdit::textChanged, this, &KLettresView::slotProcess); + QObject::connect(m_letterEdit, &QLineEdit::textChanged, this, &KLettresView::slotProcess); } else { game(); //another syllable } @@ -227,7 +227,7 @@ m_letterEdit->setFocus(); //play sound again m_klettres->soundFactory->playSound(m_random); - QObject::connect(m_letterEdit, &KLineEdit::textChanged, this, &KLettresView::slotProcess); + QObject::connect(m_letterEdit, &QLineEdit::textChanged, this, &KLettresView::slotProcess); } }