Commit 6ae16cec authored by Friedrich W. H. Kossebau's avatar Friedrich W. H. Kossebau
Browse files

Use nullptr

parent 469a3399
......@@ -34,7 +34,7 @@ public:
ComicHighlightRole = Qt::UserRole+4
};
ActiveComicModel(QObject *parent = 0);
ActiveComicModel(QObject *parent = nullptr);
QHash<int, QByteArray> roleNames() const override;
......
......@@ -31,7 +31,7 @@ class CheckNewStrips : public QObject
Q_OBJECT
public:
CheckNewStrips( const QStringList &identifiers, Plasma::DataEngine *engine, int minutes, QObject *parent = 0 );
CheckNewStrips( const QStringList &identifiers, Plasma::DataEngine *engine, int minutes, QObject *parent = nullptr );
Q_SIGNALS:
/**
......
......@@ -55,7 +55,7 @@ const int ComicApplet::CACHE_LIMIT = 20;
ComicApplet::ComicApplet( QObject *parent, const QVariantList &args )
: Plasma::Applet( parent, args ),
mProxy(0),
mProxy(nullptr),
mActiveComicModel(new ActiveComicModel(parent)),
mDifferentComic( true ),
mShowComicUrl( false ),
......@@ -67,10 +67,10 @@ ComicApplet::ComicApplet( QObject *parent, const QVariantList &args )
mMiddleClick( true ),
mCheckNewComicStripsInterval(0),
mMaxComicLimit( CACHE_LIMIT ),
mCheckNewStrips( 0 ),
mActionShop( 0 ),
mEngine( 0 ),
mSavingDir(0)
mCheckNewStrips(nullptr),
mActionShop(nullptr),
mEngine(nullptr),
mSavingDir(nullptr)
{
setHasConfigurationInterface( true );
}
......@@ -311,7 +311,7 @@ void ComicApplet::updateUsedComics()
mActionNextNewStripTab->setEnabled( isTabHighlighted(mCurrent.id()) );
delete mCheckNewStrips;
mCheckNewStrips = 0;
mCheckNewStrips = nullptr;
if (mEngine && mCheckNewComicStripsInterval ) {
mCheckNewStrips = new CheckNewStrips( mTabIdentifier, mEngine, mCheckNewComicStripsInterval, this );
connect( mCheckNewStrips, &CheckNewStrips::lastStrip, this, &ComicApplet::slotFoundLastStrip );
......@@ -428,7 +428,7 @@ void ComicApplet::slotStorePosition()
void ComicApplet::slotShop()
{
KRun::runUrl(mCurrent.shopUrl(), "text/html", 0);
KRun::runUrl(mCurrent.shopUrl(), "text/html", nullptr);
}
void ComicApplet::createComicBook()
......
......@@ -34,7 +34,7 @@ class ComicArchiveDialog : public QDialog
Q_OBJECT
public:
ComicArchiveDialog( const QString &pluginName, const QString &comicName, IdentifierType identifierType, const QString &currentIdentifierSuffix, const QString &firstIdentifierSuffix, const QString &savingDir = QString(), QWidget *parent = 0 );
ComicArchiveDialog( const QString &pluginName, const QString &comicName, IdentifierType identifierType, const QString &currentIdentifierSuffix, const QString &firstIdentifierSuffix, const QString &savingDir = QString(), QWidget *parent = nullptr );
Q_SIGNALS:
void archive( int archiveType, const QUrl &dest, const QString &fromIdentifier, const QString &toIdentifier );
......
......@@ -41,7 +41,7 @@ ComicArchiveJob::ComicArchiveJob( const QUrl &dest, Plasma::DataEngine *engine,
mTotalFiles( -1 ),
mEngine( engine ),
mZipFile( new QTemporaryFile ),
mZip( 0 ),
mZip(nullptr),
mPluginName( pluginName ),
mDest( dest )
{
......
......@@ -51,7 +51,7 @@ class ComicArchiveJob : public KJob
* "garfield:2010-03-04", here "garfield" is the plugin name
* @see setToIdentifier, setFromIdentifier
*/
ComicArchiveJob( const QUrl &dest, Plasma::DataEngine *engine, ArchiveType archiveType, IdentifierType identifierType, const QString &pluginName, QObject *parent = 0 );
ComicArchiveJob( const QUrl &dest, Plasma::DataEngine *engine, ArchiveType archiveType, IdentifierType identifierType, const QString &pluginName, QObject *parent = nullptr );
~ComicArchiveJob() override;
/**
......
......@@ -32,7 +32,7 @@ class ComicModel : public QAbstractTableModel, public Plasma::DataEngineConsumer
Q_OBJECT
public:
ComicModel( Plasma::DataEngine *engine, const QString &source, const QStringList &usedComics, QObject *parent = 0 );
ComicModel( Plasma::DataEngine *engine, const QString &source, const QStringList &usedComics, QObject *parent = nullptr );
void setComics( const Plasma::DataEngine::Data &comics, const QStringList &usedComics );
......
......@@ -39,7 +39,7 @@ bool ComicSaver::save(const ComicData &comic)
const QString name = title + " - " + comic.current() + ".png";
QUrl destUrl = QUrl::fromLocalFile( mSavingDir->getDir() + '/'+ name );
destUrl = QFileDialog::getSaveFileUrl(0, QString(), destUrl, "*.png" );
destUrl = QFileDialog::getSaveFileUrl(nullptr, QString(), destUrl, "*.png" );
if ( !destUrl.isValid() ) {
return false;
......
......@@ -30,9 +30,9 @@
ComicUpdater::ComicUpdater( QObject *parent )
: QObject( parent ),
mDownloadManager( 0 ),
mDownloadManager(nullptr),
mUpdateIntervall( 3 ),
m_updateTimer( 0 )
m_updateTimer(nullptr)
{
}
......
......@@ -46,7 +46,7 @@ class ComicUpdater : public QObject
Q_OBJECT
public:
explicit ComicUpdater( QObject *parent = 0 );
explicit ComicUpdater( QObject *parent = nullptr );
~ComicUpdater() override;
void init( const KConfigGroup &group );
......
......@@ -95,7 +95,7 @@ StripSelector *StripSelectorFactory::create(IdentifierType type)
return new StringStripSelector();
}
return 0;
return nullptr;
}
......@@ -111,7 +111,7 @@ StringStripSelector::~StringStripSelector()
void StringStripSelector::select(const ComicData &currentStrip)
{
bool ok;
const QString strip = QInputDialog::getText(0, i18n("Go to Strip"), i18n("Strip identifier:"), QLineEdit::Normal,
const QString strip = QInputDialog::getText(nullptr, i18n("Go to Strip"), i18n("Strip identifier:"), QLineEdit::Normal,
currentStrip.current(), &ok);
if (ok) {
emit stripChosen(strip);
......@@ -130,7 +130,7 @@ NumberStripSelector::~NumberStripSelector()
void NumberStripSelector::select(const ComicData &currentStrip)
{
QScopedPointer<ChooseStripNumDialog> pageDialog(new ChooseStripNumDialog(0, currentStrip.current().toInt(),
QScopedPointer<ChooseStripNumDialog> pageDialog(new ChooseStripNumDialog(nullptr, currentStrip.current().toInt(),
currentStrip.firstStripNum(), currentStrip.maxStripNum()));
if (pageDialog->exec() == QDialog::Accepted) {
emit stripChosen(QString::number(pageDialog->getStripNumber()));
......
......@@ -56,7 +56,7 @@ class StripSelector : public QObject
void stripChosen(const QString &strip);
protected:
explicit StripSelector(QObject *parent = 0);
explicit StripSelector(QObject *parent = nullptr);
};
/**
......
......@@ -27,7 +27,7 @@
class StringStripSelector : public StripSelector
{
public:
explicit StringStripSelector(QObject *parent = 0);
explicit StringStripSelector(QObject *parent = nullptr);
~StringStripSelector() override;
void select(const ComicData &currentStrip) override;
......@@ -36,7 +36,7 @@ class StringStripSelector : public StripSelector
class NumberStripSelector : public StripSelector
{
public:
explicit NumberStripSelector(QObject *parent = 0);
explicit NumberStripSelector(QObject *parent = nullptr);
~NumberStripSelector() override;
void select(const ComicData &currentStrip) override;
......@@ -47,7 +47,7 @@ class DateStripSelector : public StripSelector
Q_OBJECT
public:
explicit DateStripSelector(QObject *parent = 0);
explicit DateStripSelector(QObject *parent = nullptr);
~DateStripSelector() override;
void select(const ComicData &currentStrip) override;
......
......@@ -92,7 +92,7 @@ bool MinimizeAll::match(const WId& wid, bool includehidden) const
void MinimizeAll::deactivate(bool unminimize)
{
if (m_active) {
disconnect(KWindowSystem::self(), 0, this, 0);
disconnect(KWindowSystem::self(), nullptr, this, nullptr);
if (unminimize) {
Q_FOREACH (auto wid, m_minimizedWindows) {
......
......@@ -51,8 +51,8 @@
#include <QtGui/QFontDatabase>
DocumentHandler::DocumentHandler()
: m_target(0)
, m_doc(0)
: m_target(nullptr)
, m_doc(nullptr)
, m_cursorPosition(-1)
, m_selectionStart(0)
, m_selectionEnd(0)
......@@ -61,7 +61,7 @@ DocumentHandler::DocumentHandler()
void DocumentHandler::setTarget(QQuickItem *target)
{
m_doc = 0;
m_doc = nullptr;
m_target = target;
if (!m_target)
return;
......
......@@ -32,7 +32,7 @@ class NoteManager : public QObject
Q_OBJECT
public:
explicit NoteManager(QObject* parent = 0);
explicit NoteManager(QObject* parent = nullptr);
/**
* Loads the note for the ID given
......
......@@ -85,7 +85,7 @@ void ContentTracker::connectToActivityManager()
this, &ContentTracker::focusChanged);
} else {
delete m_activityManagerIface;
m_activityManagerIface = 0;
m_activityManagerIface = nullptr;
qWarning() << "activityManager not reachable";
}
}
......
......@@ -34,7 +34,7 @@ class ContentTracker : public QObject
Q_PROPERTY(QString title READ title NOTIFY changed)
public:
ContentTracker(QObject *parent = 0);
ContentTracker(QObject *parent = nullptr);
~ContentTracker() override;
QString uri() const;
......
......@@ -145,7 +145,7 @@ bool ComicEngine::updateSourceEvent(const QString &identifier)
bool isCurrentComic = parts[1].isEmpty();
QVariantList args;
ComicProvider *provider = 0;
ComicProvider *provider = nullptr;
//const QString type = service->property(QLatin1String("X-KDE-PlasmaComicProvider-SuffixType"), QVariant::String).toString();
const QString type = pkg.metadata().value("X-KDE-PlasmaComicProvider-SuffixType");
......
......@@ -26,7 +26,7 @@ class ComicPackage : public KPackage::PackageStructure
Q_OBJECT
public:
explicit ComicPackage(QObject *parent = 0, const QVariantList& args = QVariantList());
explicit ComicPackage(QObject *parent = nullptr, const QVariantList& args = QVariantList());
void initPackage(KPackage::Package *package) override;
};
......
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