Commit 391eceda authored by Laurent Montel's avatar Laurent Montel
Browse files

Adapt to new api (scripted)

parent f75f0558
Pipeline #248823 passed with stage
in 49 seconds
......@@ -21,6 +21,7 @@
#include <KLocalizedString>
#include <KMessageBox>
#include <KSharedConfig>
#include <kwidgetsaddons_version.h>
//this is a widget for dispaying the recently played items in a list. It is subclassed so that we can hook up a context menu
RecentlyPlayedList::RecentlyPlayedList(QWidget *parent)
......@@ -121,9 +122,18 @@ void RecentlyPlayedList::itemDoubleClicked(QListWidgetItem* item)
QFileInfo fileInfo( url.toLocalFile() );
if( !fileInfo.exists() ) {
#if KWIDGETSADDONS_VERSION >= QT_VERSION_CHECK(5, 100, 0)
if (KMessageBox::questionTwoActions( this,
#else
if( KMessageBox::questionYesNo( this,
#endif
i18n( "This file could not be found. Would you like to remove it from the playlist?" ),
#if KWIDGETSADDONS_VERSION >= QT_VERSION_CHECK(5, 100, 0)
i18nc("@title:window", "File not found" ), KStandardGuiItem::remove(), KStandardGuiItem::cancel() ) == KMessageBox::ButtonCode::PrimaryAction) {
#else
i18nc("@title:window", "File not found" ) ) == KMessageBox::Yes ) {
#endif
removeEntry();
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment