Commit 55544d67 authored by Friedrich W. H. Kossebau's avatar Friedrich W. H. Kossebau
Browse files

More port away from deprecated API

parent 21941436
......@@ -430,7 +430,7 @@ void ComicApplet::slotStorePosition()
void ComicApplet::slotShop()
{
KRun::runUrl(mCurrent.shopUrl(), "text/html", nullptr);
KRun::runUrl(mCurrent.shopUrl(), QStringLiteral("text/html"), nullptr, KRun::RunFlags());
}
void ComicApplet::createComicBook()
......
......@@ -86,7 +86,7 @@ ComicArchiveDialog::ComicArchiveDialog( const QString &pluginName, const QString
archiveTypeChanged( ComicArchiveJob::ArchiveAll );
//TODO suggest file name!
ui.dest->fileDialog()->setAcceptMode( QFileDialog::AcceptSave );
ui.dest->setAcceptMode(QFileDialog::AcceptSave);
if ( !savingDir.isEmpty() ) {
ui.dest->setStartDir(QUrl::fromLocalFile(savingDir));
}
......
......@@ -26,7 +26,7 @@
#include <KConfigDialog>
#include <KNS3/DownloadDialog>
#include <KNS3/DownloadManager>
#include <KNSCore/DownloadManager>
ComicUpdater::ComicUpdater( QObject *parent )
: QObject( parent ),
......@@ -85,18 +85,18 @@ void ComicUpdater::checkForUpdate()
}
}
void ComicUpdater::slotUpdatesFound( const KNS3::Entry::List &entries )
void ComicUpdater::slotUpdatesFound(const KNSCore::EntryInternal::List& entries)
{
for ( int i = 0; i < entries.count(); ++i ) {
downloadManager()->installEntry( entries[ i ] );
}
}
KNS3::DownloadManager *ComicUpdater::downloadManager()
KNSCore::DownloadManager *ComicUpdater::downloadManager()
{
if ( !mDownloadManager ) {
mDownloadManager = new KNS3::DownloadManager( "comic.knsrc", this );
connect(mDownloadManager, &KNS3::DownloadManager::searchResult, this, &ComicUpdater::slotUpdatesFound);
mDownloadManager = new KNSCore::DownloadManager(QStringLiteral("comic.knsrc"), this );
connect(mDownloadManager, &KNSCore::DownloadManager::searchResult, this, &ComicUpdater::slotUpdatesFound);
}
return mDownloadManager;
......
......@@ -24,7 +24,7 @@
#include <QWidget>
#include <QTime>
#include <KNS3/Entry>
#include <KNSCore/EntryInternal>
#include <Plasma/DataEngine>
class ComicModel;
......@@ -32,6 +32,8 @@ class ComicModel;
namespace KNS3 {
class DownloadDialog;
}
namespace KNSCore {
class DownloadManager;
}
......@@ -62,13 +64,13 @@ class ComicUpdater : public QObject
* for updates and do them automatically
*/
void checkForUpdate();
void slotUpdatesFound( const KNS3::Entry::List &entries );
void slotUpdatesFound(const KNSCore::EntryInternal::List& entries);
private:
KNS3::DownloadManager *downloadManager();
KNSCore::DownloadManager *downloadManager();
private:
KNS3::DownloadManager *mDownloadManager;
KNSCore::DownloadManager *mDownloadManager;
KConfigGroup mGroup;
int mUpdateIntervall;
QDateTime mLastUpdate;
......
......@@ -256,22 +256,22 @@ bool StaticDateWrapper::isValid (int year, int month, int day)
QString StaticDateWrapper::longDayName (int weekday)
{
return QDate::longDayName(weekday);
return QLocale::system().dayName(weekday, QLocale::LongFormat);
}
QString StaticDateWrapper::longMonthName (int month)
{
return QDate::longMonthName(month);
return QLocale::system().monthName(month, QLocale::LongFormat);
}
QString StaticDateWrapper::shortDayName (int weekday)
{
return QDate::shortDayName(weekday);
return QLocale::system().dayName(weekday, QLocale::ShortFormat);
}
QString StaticDateWrapper::shortMonthName (int month)
{
return QDate::shortMonthName(month);
return QLocale::system().monthName(month, QLocale::ShortFormat);
}
ComicProviderWrapper::ComicProviderWrapper(ComicProviderKross *parent)
......
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