diff --git a/.arcconfig b/.arcconfig new file mode 100644 --- /dev/null +++ b/.arcconfig @@ -0,0 +1,3 @@ +{ + "phabricator.uri" : "https://phabricator.kde.org/" +} diff --git a/.gitignore b/.gitignore --- a/.gitignore +++ b/.gitignore @@ -16,6 +16,6 @@ Makefile avail random_seed -/build*/ +/*build*/ CMakeLists.txt.user* *.unc-backup* diff --git a/app/formatdialog.cpp b/app/formatdialog.cpp --- a/app/formatdialog.cpp +++ b/app/formatdialog.cpp @@ -227,7 +227,7 @@ { nullptr, nullptr, 0, 0 } }; -static QString sLastFormat = QString::null; // format last used, whether +static QString sLastFormat = QString(); // format last used, whether // remembered or not FormatDialog::FormatDialog(QWidget *parent, ImageMetaInfo::ImageType type, diff --git a/app/galleryhistory.cpp b/app/galleryhistory.cpp --- a/app/galleryhistory.cpp +++ b/app/galleryhistory.cpp @@ -51,7 +51,7 @@ // Data for display - what the user sees static QString entryName(const FileTreeBranch *branch, const QString &relPath) { - QString name = QString::null; + QString name = QString(); FileTreeView *view = static_cast(branch->root()->treeWidget()); if (view == nullptr) { @@ -110,7 +110,7 @@ void GalleryHistory::slotActivated(int idx) { - QString branchName = QString::null; + QString branchName = QString(); QString relPath = itemData(idx).toString(); int ix = relPath.indexOf(GALLERY_PATH_SEP); // is the separator present? diff --git a/app/imgprintdialog.cpp b/app/imgprintdialog.cpp --- a/app/imgprintdialog.cpp +++ b/app/imgprintdialog.cpp @@ -318,7 +318,7 @@ return (i18n("A valid size must be specified for custom scaling. One or both of the specified dimensions is zero.")); } - return (QString::null); // no problems + return QString(); // no problems } diff --git a/app/imgsaver.h b/app/imgsaver.h --- a/app/imgsaver.h +++ b/app/imgsaver.h @@ -101,7 +101,7 @@ ImgSaver::ImageSaveStatus saveImage(const QImage *image, const QUrl &url, const ImageFormat &format, - const QString &subformat = QString::null); + const QString &subformat = QString()); /** * Save an image. @@ -200,7 +200,7 @@ * this must be either 1, 8, 24 or 32. The default is for no colour * conversion. * - * @return The file name as saved, or @c QString::null if there was + * @return The file name as saved, or @c QString() if there was * an error. **/ static QString tempSaveImage(const KookaImage *img, const ImageFormat &format, int colors = -1); diff --git a/app/imgsaver.cpp b/app/imgsaver.cpp --- a/app/imgsaver.cpp +++ b/app/imgsaver.cpp @@ -244,7 +244,7 @@ **/ QString ImgSaver::createFilename() { - if (!m_saveDirectory.isLocalFile()) return (QString::null); + if (!m_saveDirectory.isLocalFile()) return QString(); // TODO: allow non-local files QDir files(m_saveDirectory.path(), "kscan_[0-9][0-9][0-9][0-9].*"); QStringList l(files.entryList()); @@ -360,7 +360,7 @@ QString ImgSaver::findSubFormat(const ImageFormat &format) { //qDebug() << "for" << format; - return (QString::null); // no subformats currently used + return QString(); // no subformats currently used } QString ImgSaver::errorString(ImgSaver::ImageSaveStatus status) const @@ -396,7 +396,7 @@ bool copyRenameImage(bool isCopying, const QUrl &fromUrl, const QUrl &toUrl, bool askExt, QWidget *overWidget) { - QString errorString = QString::null; + QString errorString = QString(); /* Check if the provided filename has a extension */ QString extFrom = extension(fromUrl); diff --git a/app/kookaimage.cpp b/app/kookaimage.cpp --- a/app/kookaimage.cpp +++ b/app/kookaimage.cpp @@ -126,7 +126,7 @@ const QString fileName = url.adjusted(QUrl::RemoveFragment).toLocalFile(); qDebug() << "subimage" << subno << "from" << fileName; loadTiffDir(fileName, subno); // load TIFF subimage - return (QString::null); + return QString(); } } @@ -179,7 +179,7 @@ m_url = url; // record image source m_fileBound = true; // note loaded from file - return (QString::null); // loaded OK + return QString(); // loaded OK } @@ -258,7 +258,7 @@ #else return (i18n("TIFF not supported")); #endif // HAVE_TIFF - return (QString::null); // TIFF read succeeded + return QString(); // TIFF read succeeded } diff --git a/app/kookapref.cpp b/app/kookapref.cpp --- a/app/kookapref.cpp +++ b/app/kookapref.cpp @@ -137,7 +137,7 @@ // Support for the gallery location - moved here from Previewer class in libkscan -QString KookaPref::sGalleryRoot = QString::null; // global resolved location +QString KookaPref::sGalleryRoot = QString(); // global resolved location // The static variable above ensures that the user is only asked // at most once in an application run. @@ -211,7 +211,7 @@ if (galleryName.isEmpty()) { qWarning() << "Gallery name not configured"; - return (QString::null); + return QString(); } QString oldpath = QStandardPaths::locate(QStandardPaths::AppDataLocation, "ScanImages", QStandardPaths::LocateDirectory); @@ -257,7 +257,7 @@ "then you may do so by simply copying or moving the files.", newpath, oldpath), i18n("New Gallery Created"), - QString::null, + QString(), KMessageBox::Notify | KMessageBox::AllowLink); } } else { // no, don't create diff --git a/app/kookaview.cpp b/app/kookaview.cpp --- a/app/kookaview.cpp +++ b/app/kookaview.cpp @@ -489,7 +489,7 @@ KScanDevice::statusMessage(stat), selDevice.constData()); - int tryAgain = KMessageBox::warningContinueCancel(mMainWindow, msg, QString::null, + int tryAgain = KMessageBox::warningContinueCancel(mMainWindow, msg, QString(), KGuiItem("Retry")); if (tryAgain == KMessageBox::Cancel) { break; @@ -563,7 +563,7 @@ "you need to specify the device to use. " "Use the Add Scan Device option to enter the backend name and parameters, " "or see that dialog for more information."), - QString::null, + QString(), KGuiItem(i18n("Add Scan Device..."))) != KMessageBox::Continue) { return (""); diff --git a/app/scangallery.h b/app/scangallery.h --- a/app/scangallery.h +++ b/app/scangallery.h @@ -127,7 +127,7 @@ private: void loadImageForItem(FileTreeViewItem *item); - FileTreeBranch *openRoot(const QUrl &root, const QString &title = QString::null); + FileTreeBranch *openRoot(const QUrl &root, const QString &title = QString()); FileTreeViewItem *findItemByUrl(const QUrl &url, FileTreeBranch *branch = nullptr); QUrl itemDirectory(const FileTreeViewItem *item) const; diff --git a/app/scangallery.cpp b/app/scangallery.cpp --- a/app/scangallery.cpp +++ b/app/scangallery.cpp @@ -472,7 +472,7 @@ if (isSubImage) // subimages don't show size { item->setIcon(0, QIcon::fromTheme("edit-copy")); - item->setText(1, QString::null); + item->setText(1, QString()); } else { @@ -699,7 +699,7 @@ #ifdef DEBUG_LOADING qDebug() << "loading" << item->url(); #endif // DEBUG_LOADING - QString ret = QString::null; // no error so far + QString ret = QString(); // no error so far ImageFormat format = getImgFormat(item); // check for valid image format if (!format.isValid()) @@ -833,11 +833,11 @@ QString result = ""; const FileTreeViewItem *curr = highlightedFileTreeViewItem(); - if (curr==nullptr) return (QString::null); + if (curr==nullptr) return QString(); bool isLocal = false; const QUrl u = curr->fileItem()->mostLocalUrl(isLocal); - if (!isLocal) return (QString::null); + if (!isLocal) return QString(); return (u.toLocalFile()); } diff --git a/app/scanparamsdialog.cpp b/app/scanparamsdialog.cpp --- a/app/scanparamsdialog.cpp +++ b/app/scanparamsdialog.cpp @@ -179,12 +179,12 @@ void ScanParamsDialog::slotSave() { - QString name = QString::null; + QString name = QString(); QListWidgetItem *item = paramsList->currentItem(); if (item != nullptr) name = item->text(); //qDebug() << "selected set" << name; - QString newdesc = QString::null; + QString newdesc = QString(); if (sets.contains(name)) { newdesc = sets[name]; } else { diff --git a/app/statusbarmanager.cpp b/app/statusbarmanager.cpp --- a/app/statusbarmanager.cpp +++ b/app/statusbarmanager.cpp @@ -120,7 +120,7 @@ void StatusBarManager::clearStatus(StatusBarManager::Item item) { - setStatus(QString::null, item); + setStatus(QString(), item); } diff --git a/libdialogutil/recentsaver.h b/libdialogutil/recentsaver.h --- a/libdialogutil/recentsaver.h +++ b/libdialogutil/recentsaver.h @@ -92,7 +92,7 @@ * @return The resolved URL, or a null URL if there is no saved * history. **/ - QUrl recentUrl(const QString &suggestedName = QString::null); + QUrl recentUrl(const QString &suggestedName = QString()); /** * Resolve the saved recent location (if there is one) and a suggested @@ -104,7 +104,7 @@ * @return The resolved file path, or a null string if there is no * saved history. **/ - QString recentPath(const QString &suggestedName = QString::null); + QString recentPath(const QString &suggestedName = QString()); /** * Save the location selected by the file dialogue as a new recent location. diff --git a/libfiletree/filetreebranch.cpp b/libfiletree/filetreebranch.cpp --- a/libfiletree/filetreebranch.cpp +++ b/libfiletree/filetreebranch.cpp @@ -307,7 +307,7 @@ // // QUrl url = fi.url(); // //qDebug() << "for" << url; -// url.setFileName(QString::null); +// url.setFileName(QString()); // return (findItemByUrl(url)); //} diff --git a/libkookascan/autoselectbar.cpp b/libkookascan/autoselectbar.cpp --- a/libkookascan/autoselectbar.cpp +++ b/libkookascan/autoselectbar.cpp @@ -67,7 +67,7 @@ // Threshold setting slider/spinbox int maxThresh = item->maxValue().toInt(); - mThresholdSlider = new KScanSlider(nullptr, QString::null, 0, maxThresh); + mThresholdSlider = new KScanSlider(nullptr, QString(), 0, maxThresh); mThresholdSlider->setValue(initialValue); mThresholdSlider->setToolTip(item->toolTip()); l->setBuddy(mThresholdSlider); diff --git a/libkookascan/autoselectdialog.cpp b/libkookascan/autoselectdialog.cpp --- a/libkookascan/autoselectdialog.cpp +++ b/libkookascan/autoselectdialog.cpp @@ -68,7 +68,7 @@ int maxVal = item->maxValue().toInt(); int minVal = item->minValue().toInt(); - mMarginSlider = new KScanSlider(nullptr, QString::null, minVal, maxVal, true, defaultVal); + mMarginSlider = new KScanSlider(nullptr, QString(), minVal, maxVal, true, defaultVal); mMarginSlider->setValue(defaultVal); mMarginSlider->setToolTip(item->toolTip()); connect(mMarginSlider, SIGNAL(settingChanged(int)), SLOT(slotControlChanged())); @@ -93,7 +93,7 @@ maxVal = item->maxValue().toInt(); minVal = item->minValue().toInt(); - mDustsizeSlider = new KScanSlider(nullptr, QString::null, minVal, maxVal, true, defaultVal); + mDustsizeSlider = new KScanSlider(nullptr, QString(), minVal, maxVal, true, defaultVal); mDustsizeSlider->setValue(defaultVal); mDustsizeSlider->setToolTip(item->toolTip()); connect(mDustsizeSlider, SIGNAL(settingChanged(int)), SLOT(slotControlChanged())); diff --git a/libkookascan/kscancontrols.h b/libkookascan/kscancontrols.h --- a/libkookascan/kscancontrols.h +++ b/libkookascan/kscancontrols.h @@ -94,7 +94,7 @@ /** * Get the control's current text value. * - * @return the text value, or @c QString::null for a @c Number + * @return the text value, or @c QString() for a @c Number * or @c Group control. */ virtual QString text() const; diff --git a/libkookascan/kscancontrols.cpp b/libkookascan/kscancontrols.cpp --- a/libkookascan/kscancontrols.cpp +++ b/libkookascan/kscancontrols.cpp @@ -71,7 +71,7 @@ QString KScanControl::text() const { - return (QString::null); + return QString(); } void KScanControl::setText(const QString &text) {} @@ -257,7 +257,7 @@ QString KScanCheckbox::label() const { - return (QString::null); + return QString(); } // KScanCombo - combo box with list of options @@ -332,7 +332,7 @@ QString KScanCombo::textAt(int i) const { - return (i == -1 ? QString::null : mCombo->itemData(i).toString()); + return (i == -1 ? QString() : mCombo->itemData(i).toString()); } int KScanCombo::count() const @@ -392,7 +392,7 @@ QString KScanGroup::label() const { - return (QString::null); + return QString(); } // KScanPushButton - action button @@ -409,5 +409,5 @@ QString KScanPushButton::label() const { - return (QString::null); + return QString(); } diff --git a/libkookascan/kscandevice.h b/libkookascan/kscandevice.h --- a/libkookascan/kscandevice.h +++ b/libkookascan/kscandevice.h @@ -175,7 +175,7 @@ * If this is a null or empty string, a real scan is performed. * @return The status of the operation **/ - KScanDevice::Status acquireScan(const QString &filename = QString::null); + KScanDevice::Status acquireScan(const QString &filename = QString()); /** * Get the standard file name for saving the preview image for the diff --git a/libkookascan/kscanoptset.h b/libkookascan/kscanoptset.h --- a/libkookascan/kscanoptset.h +++ b/libkookascan/kscanoptset.h @@ -120,7 +120,7 @@ * optSet.saveConfig(saneDevice->scannerBackendName(), setDesc); * @endcode **/ - void saveConfig(const QByteArray &scannerName, const QString &desc = QString::null) const; + void saveConfig(const QByteArray &scannerName, const QString &desc = QString()) const; /** * Load an option set from the global scanner configuration file. diff --git a/libkookascan/kscanoptset.cpp b/libkookascan/kscanoptset.cpp --- a/libkookascan/kscanoptset.cpp +++ b/libkookascan/kscanoptset.cpp @@ -57,7 +57,7 @@ static QString setNameFromGroup(const QString &grpName) { QString prefix = ScanSettings::self()->saveSetDescItem()->group(); - if (!grpName.startsWith(prefix)) return (QString::null); + if (!grpName.startsWith(prefix)) return QString(); return (grpName.mid(prefix.length()+1)); } diff --git a/libkookascan/scanparams.cpp b/libkookascan/scanparams.cpp --- a/libkookascan/scanparams.cpp +++ b/libkookascan/scanparams.cpp @@ -157,7 +157,7 @@ { addGroup(nullptr); // hide last if present - mLayout->addWidget(new QLabel(QString::null, this), mNextRow, 0, 1, -1, Qt::AlignTop); + mLayout->addWidget(new QLabel(QString(), this), mNextRow, 0, 1, -1, Qt::AlignTop); mLayout->setRowStretch(mNextRow, 9); return (mNextRow > 0); @@ -269,7 +269,7 @@ lay->addWidget(pb, 5, 1, Qt::AlignRight); /* Initialise the progress dialog */ - mProgressDialog = new QProgressDialog(QString::null, i18n("Stop"), 0, 100, nullptr); + mProgressDialog = new QProgressDialog(QString(), i18n("Stop"), 0, 100, nullptr); mProgressDialog->setModal(true); mProgressDialog->setAutoClose(true); mProgressDialog->setAutoReset(true); @@ -279,7 +279,7 @@ // appears to show itself after the default 'minimumDuration' (= 4 seconds), // even despite the previous and no 'value' being set. mProgressDialog->reset(); - setScanDestination(QString::null); // reset destination display + setScanDestination(QString()); // reset destination display connect(mProgressDialog, &QProgressDialog::canceled, mSaneDevice, &KScanDevice::slotStopScanning); connect(mSaneDevice, &KScanDevice::sigScanProgress, this, &ScanParams::slotScanProgress); @@ -362,7 +362,7 @@ // Separator line after these. Using a KScanGroup with a null text, // so that it looks the same as any real group separators following. - frame->addGroup(new KScanGroup(frame, QString::null)); + frame->addGroup(new KScanGroup(frame, QString())); } // Mode setting @@ -449,7 +449,7 @@ frame->addRow(l, mAreaSelect, nullptr, Qt::AlignTop); // Insert another beautification line - frame->addGroup(new KScanGroup(frame, QString::null)); + frame->addGroup(new KScanGroup(frame, QString())); // Source selection mSourceSelect = mSaneDevice->getGuiElement(SANE_NAME_SCAN_SOURCE, frame); @@ -712,7 +712,7 @@ { //qDebug() << "scan mode=" << mScanMode; - setScanDestination(QString::null); // reset progress display + setScanDestination(QString()); // reset progress display // Check compatibility of scan settings int format; diff --git a/libkookascan/scansourcedialog.cpp b/libkookascan/scansourcedialog.cpp --- a/libkookascan/scansourcedialog.cpp +++ b/libkookascan/scansourcedialog.cpp @@ -77,7 +77,7 @@ "Note that you may see more sources than actually exist"), vbox); /* Combo Box for sources */ - d->sources = new KScanCombo(vbox, QString::null); + d->sources = new KScanCombo(vbox, QString()); d->sources->setList(list); connect(d->sources, SIGNAL(activated(int)), SLOT(slotChangeSource(int))); diff --git a/plugins/ocr/abstractocrdialogue.h b/plugins/ocr/abstractocrdialogue.h --- a/plugins/ocr/abstractocrdialogue.h +++ b/plugins/ocr/abstractocrdialogue.h @@ -92,7 +92,7 @@ QProgressBar *progressBar() const; - void ocrShowInfo(const QString &binary, const QString &version = QString::null); + void ocrShowInfo(const QString &binary, const QString &version = QString()); void ocrShowVersion(const QString &version); QWidget *addExtraSetupWidget(QWidget *wid = nullptr, bool stretchBefore = false); diff --git a/plugins/ocr/abstractocrdialogue.cpp b/plugins/ocr/abstractocrdialogue.cpp --- a/plugins/ocr/abstractocrdialogue.cpp +++ b/plugins/ocr/abstractocrdialogue.cpp @@ -445,7 +445,7 @@ { //qDebug() << "pixmap" << newPix.size(); if (m_previewPix != nullptr) { - m_previewPix->setText(QString::null); + m_previewPix->setText(QString()); m_previewPix->setPixmap(newPix); } } diff --git a/plugins/ocr/abstractocrengine.h b/plugins/ocr/abstractocrengine.h --- a/plugins/ocr/abstractocrengine.h +++ b/plugins/ocr/abstractocrengine.h @@ -124,16 +124,16 @@ * this must be either 1, 8, 24 or 32. The default is for no colour * conversion. * - * @return The file name as saved, or @c QString::null if there was + * @return The file name as saved, or @c QString() if there was * an error. **/ QString tempSaveImage(const KookaImage *img, const ImageFormat &format, int colors = -1); /** * Get a name to use for a temporary file. * * @param suffix File name suffix, no leading '.' is required - * @return The temporary file name, or @c QString::null if the file could not be created + * @return The temporary file name, or @c QString() if the file could not be created * * @note The temporary file is created and is left in place under the returned name, * but is not opened. Its name should be saved and eventually returned in the diff --git a/plugins/ocr/abstractocrengine.cpp b/plugins/ocr/abstractocrengine.cpp --- a/plugins/ocr/abstractocrengine.cpp +++ b/plugins/ocr/abstractocrengine.cpp @@ -250,7 +250,7 @@ i18n("OCR Temporary Files"), KStandardGuiItem::del(), KStandardGuiItem::close(), - QString::null, + QString(), KMessageBox::AllowLink)==KMessageBox::Yes) retain = false; } @@ -411,7 +411,7 @@ { qDebug() << "error creating temporary file" << protoName; setErrorText(xi18nc("@info", "Cannot create temporary file %1", protoName)); - return (QString::null); + return QString(); } QString tmpName = QFile::encodeName(tmpFile.fileName()); @@ -422,7 +422,7 @@ QString AbstractOcrEngine::tempSaveImage(const KookaImage *img, const ImageFormat &format, int colors) { - if (img==nullptr) return (QString::null); // no image to save + if (img==nullptr) return QString(); // no image to save QString tmpName = tempFileName(format.extension(), "imagetemp"); const KookaImage *tmpImg = nullptr; @@ -445,7 +445,7 @@ break; default: qWarning() << "bad colour depth" << colors; - return (QString::null); + return QString(); } tmpImg = new KookaImage(img->convertToFormat(newfmt)); diff --git a/plugins/ocr/gocr/ocrgocrdialog.cpp b/plugins/ocr/gocr/ocrgocrdialog.cpp --- a/plugins/ocr/gocr/ocrgocrdialog.cpp +++ b/plugins/ocr/gocr/ocrgocrdialog.cpp @@ -51,7 +51,7 @@ OcrGocrDialog::OcrGocrDialog(AbstractOcrEngine *plugin, QWidget *pnt) : AbstractOcrDialogue(plugin, pnt), - m_ocrCmd(QString::null) + m_ocrCmd(QString()) { } @@ -68,7 +68,7 @@ QLabel *l = new QLabel(ski->label(), w); gl->addWidget(l, 0, 0); - sliderGrayLevel = new KScanSlider(w, QString::null, 0, 254, true, 160); + sliderGrayLevel = new KScanSlider(w, QString(), 0, 254, true, 160); int numdefault = KookaSettings::ocrGocrGrayLevel(); sliderGrayLevel->setValue(numdefault); sliderGrayLevel->setToolTip(ski->toolTip()); @@ -79,7 +79,7 @@ Q_ASSERT(ski!=nullptr); l = new QLabel(ski->label(), w); gl->addWidget(l, 1, 0); - sliderDustSize = new KScanSlider(w, QString::null, 0, 60, true, 10); + sliderDustSize = new KScanSlider(w, QString(), 0, 60, true, 10); numdefault = KookaSettings::ocrGocrDustSize(); sliderDustSize->setValue(numdefault); sliderDustSize->setToolTip(ski->toolTip()); @@ -90,7 +90,7 @@ Q_ASSERT(ski!=nullptr); l = new QLabel(ski->label(), w); gl->addWidget(l, 2, 0); - sliderSpace = new KScanSlider(w, QString::null, 0, 60, true, 0); + sliderSpace = new KScanSlider(w, QString(), 0, 60, true, 0); numdefault = KookaSettings::ocrGocrSpaceWidth(); sliderSpace->setValue(numdefault); sliderSpace->setToolTip(ski->toolTip()); diff --git a/plugins/ocr/gocr/ocrgocrengine.cpp b/plugins/ocr/gocr/ocrgocrengine.cpp --- a/plugins/ocr/gocr/ocrgocrengine.cpp +++ b/plugins/ocr/gocr/ocrgocrengine.cpp @@ -69,8 +69,8 @@ : AbstractOcrEngine(pnt, "OcrGocrEngine") { m_tempDir = nullptr; - m_inputFile = QString::null; // input image file - m_resultFile = QString::null; // OCR result text file + m_inputFile = QString(); // input image file + m_resultFile = QString(); // OCR result text file } diff --git a/plugins/ocr/kadmos/ocrkadmosdialog.cpp b/plugins/ocr/kadmos/ocrkadmosdialog.cpp --- a/plugins/ocr/kadmos/ocrkadmosdialog.cpp +++ b/plugins/ocr/kadmos/ocrkadmosdialog.cpp @@ -288,7 +288,7 @@ slotFontChanged(0); // Load machine print font language list } - ocrShowInfo(QString::null); + ocrShowInfo(QString()); return err; } diff --git a/plugins/ocr/kadmos/ocrkadmosengine.cpp b/plugins/ocr/kadmos/ocrkadmosengine.cpp --- a/plugins/ocr/kadmos/ocrkadmosengine.cpp +++ b/plugins/ocr/kadmos/ocrkadmosengine.cpp @@ -47,7 +47,7 @@ OcrKadmosEngine::OcrKadmosEngine(QWidget *parent) : OcrEngine(parent) { - m_tmpFile = QString::null; + m_tmpFile = QString(); } OcrKadmosEngine::~OcrKadmosEngine() @@ -211,7 +211,7 @@ #ifdef USE_KADMOS_FILEOP if (!m_tmpFile.isNull()) { result << m_tmpFile; - m_tmpFile = QString::null; + m_tmpFile = QString(); } #endif diff --git a/plugins/ocr/ocrad/ocrocraddialog.cpp b/plugins/ocr/ocrad/ocrocraddialog.cpp --- a/plugins/ocr/ocrad/ocrocraddialog.cpp +++ b/plugins/ocr/ocrad/ocrocraddialog.cpp @@ -58,9 +58,9 @@ m_setupWidget(nullptr), m_orfUrlRequester(nullptr), m_layoutMode(0), - m_ocrCmd(QString::null), + m_ocrCmd(QString()), m_versionNum(0), - m_versionStr(QString::null) + m_versionStr(QString()) { } @@ -223,15 +223,15 @@ KookaSettings::setOcrOcradLayoutDetection(m_layoutMode->currentIndex()); int ix = m_characterSet->currentIndex(); - QString value = (m_characterSet->itemData(ix).toBool() ? m_characterSet->currentText() : QString::null); + QString value = (m_characterSet->itemData(ix).toBool() ? m_characterSet->currentText() : QString()); KookaSettings::setOcrOcradCharset(value); ix = m_filter->currentIndex(); - value = (m_filter->itemData(ix).toBool() ? m_filter->currentText() : QString::null); + value = (m_filter->itemData(ix).toBool() ? m_filter->currentText() : QString()); KookaSettings::setOcrOcradFilter(value); ix = m_transform->currentIndex(); - value = (m_transform->itemData(ix).toBool() ? m_transform->currentText() : QString::null); + value = (m_transform->itemData(ix).toBool() ? m_transform->currentText() : QString()); KookaSettings::setOcrOcradTransform(value); KookaSettings::setOcrOcradInvert(m_invert->isChecked()); @@ -252,7 +252,7 @@ if (m_orfUrlRequester != nullptr) { return (m_orfUrlRequester->url().url()); } else { - return (QString::null); + return QString(); } } diff --git a/plugins/ocr/ocrad/ocrocradengine.cpp b/plugins/ocr/ocrad/ocrocradengine.cpp --- a/plugins/ocr/ocrad/ocrocradengine.cpp +++ b/plugins/ocr/ocrad/ocrocradengine.cpp @@ -58,8 +58,8 @@ OcrOcradEngine::OcrOcradEngine(QObject *pnt, const QVariantList &args) : AbstractOcrEngine(pnt, "OcrOcradEngine") { - m_ocrImagePBM = QString::null; - m_tempOrfName = QString::null; + m_ocrImagePBM = QString(); + m_tempOrfName = QString(); ocradVersion = 0; } @@ -383,7 +383,7 @@ wd.setProperty(OcrWordData::Rectangle, wordRect); addWord(word, wd); - word = QString::null; // reset for next time + word = QString(); // reset for next time wordRect = QRect(); } else { word.append(detectedChar); // append char to word @@ -400,7 +400,7 @@ wd.setProperty(OcrWordData::Rectangle, wordRect); addWord(word, wd); - word = QString::null; // reset for next time + word = QString(); // reset for next time wordRect = QRect(); } @@ -414,7 +414,7 @@ finishResultDocument(); qDebug() << "Finished analysing ORF"; - return (QString::null); // no error detected + return QString(); // no error detected }