Commit c1f53f12 authored by Yuri Chornoivan's avatar Yuri Chornoivan

Fix minor EBN issues and modernize some references

Summary:
The list of the issues:

http://ebn.kde.org/krazy/reports/kde-4.x/kdewebdev/kimagemapeditor/index.html

Test Plan: Compiles and runs.

Reviewers: #kde_applications, aacid

Reviewed By: #kde_applications, aacid

Differential Revision: https://phabricator.kde.org/D25353
parent f1fb5e3d
...@@ -50,7 +50,7 @@ class ImagesListView : public QTreeWidget ...@@ -50,7 +50,7 @@ class ImagesListView : public QTreeWidget
Q_OBJECT Q_OBJECT
public: public:
ImagesListView(QWidget *parent); explicit ImagesListView(QWidget *parent);
~ImagesListView() override; ~ImagesListView() override;
/** /**
......
...@@ -896,7 +896,7 @@ QImage KImageMapEditor::getBackgroundImage() { ...@@ -896,7 +896,7 @@ QImage KImageMapEditor::getBackgroundImage() {
// The translated string must be divided into // The translated string must be divided into
// parts with about the same size that fit to the image // parts with about the same size that fit to the image
QString str = i18n("Drop an image or HTML file"); QString str = i18n("Drop an image or HTML file");
const QStringList strList = str.split(" "); const QStringList strList = str.split(' ');
// Get the string parts // Get the string parts
QString tmp; QString tmp;
...@@ -1718,7 +1718,7 @@ QHash<QString,QString> KImageMapEditor::getTagAttributes(QTextStream & s, QStrin ...@@ -1718,7 +1718,7 @@ QHash<QString,QString> KImageMapEditor::getTagAttributes(QTextStream & s, QStrin
if (value.right(3)=="-->") if (value.right(3)=="-->")
return dict; return dict;
if (value.startsWith("!--")) { if (value.startsWith(QLatin1String("!--"))) {
while (!s.atEnd()) { while (!s.atEnd()) {
s >> w; s >> w;
readText.append(w); readText.append(w);
...@@ -2326,7 +2326,7 @@ static QUrl toRelative(const QUrl& urlToConvert,const QUrl& baseURL) ...@@ -2326,7 +2326,7 @@ static QUrl toRelative(const QUrl& urlToConvert,const QUrl& baseURL)
{ {
QString path = urlToConvert.path(); QString path = urlToConvert.path();
QString basePath = baseURL.path().endsWith('/') ? baseURL.path() : baseURL.path() + '/'; QString basePath = baseURL.path().endsWith('/') ? baseURL.path() : baseURL.path() + '/';
if (path.startsWith("/") && basePath != "/") if (path.startsWith(QLatin1String("/")) && basePath != "/")
{ {
path.remove(0, 1); path.remove(0, 1);
basePath.remove(0, 1); basePath.remove(0, 1);
...@@ -2875,7 +2875,7 @@ void KImageMapEditor::imageUsemap() { ...@@ -2875,7 +2875,7 @@ void KImageMapEditor::imageUsemap() {
// Update the htmlCode of the HtmlElement // Update the htmlCode of the HtmlElement
HtmlImgElement* imgEl = findHtmlImgElement(imageTag); HtmlImgElement* imgEl = findHtmlImgElement(imageTag);
imgEl->htmlCode = "<"; imgEl->htmlCode = QLatin1String("<");
QString tagName = imgEl->imgTag->value("tagname"); QString tagName = imgEl->imgTag->value("tagname");
imgEl->htmlCode += QString(tagName); imgEl->htmlCode += QString(tagName);
QHashIterator<QString, QString> it( *imgEl->imgTag ); QHashIterator<QString, QString> it( *imgEl->imgTag );
......
...@@ -72,7 +72,7 @@ public: ...@@ -72,7 +72,7 @@ public:
class HtmlElement { class HtmlElement {
public: public:
HtmlElement(const QString & s) { explicit HtmlElement(const QString & s) {
htmlCode = s; htmlCode = s;
}; };
virtual ~HtmlElement() {} virtual ~HtmlElement() {}
...@@ -93,7 +93,7 @@ public: ...@@ -93,7 +93,7 @@ public:
class HtmlImgElement : public HtmlElement { class HtmlImgElement : public HtmlElement {
public: public:
HtmlImgElement(const QString & s) : HtmlElement(s) { explicit HtmlImgElement(const QString & s) : HtmlElement(s) {
imgTag = 0L; imgTag = 0L;
}; };
~HtmlImgElement() override {} ~HtmlImgElement() override {}
......
...@@ -733,7 +733,7 @@ bool RectArea::setCoords(const QString & s) ...@@ -733,7 +733,7 @@ bool RectArea::setCoords(const QString & s)
{ {
_finished=true; _finished=true;
const QStringList list = s.split(","); const QStringList list = s.split(',');
QRect r; QRect r;
bool ok=true; bool ok=true;
QStringList::ConstIterator it = list.begin(); QStringList::ConstIterator it = list.begin();
...@@ -913,7 +913,7 @@ void CircleArea::updateSelectionPoints() ...@@ -913,7 +913,7 @@ void CircleArea::updateSelectionPoints()
bool CircleArea::setCoords(const QString & s) bool CircleArea::setCoords(const QString & s)
{ {
_finished=true; _finished=true;
const QStringList list = s.split(","); const QStringList list = s.split(',');
bool ok=true; bool ok=true;
QStringList::ConstIterator it = list.begin(); QStringList::ConstIterator it = list.begin();
int x=(*it).toInt(&ok,10);it++; int x=(*it).toInt(&ok,10);it++;
...@@ -1158,7 +1158,7 @@ void PolyArea::updateSelectionPoints() ...@@ -1158,7 +1158,7 @@ void PolyArea::updateSelectionPoints()
bool PolyArea::setCoords(const QString & s) bool PolyArea::setCoords(const QString & s)
{ {
_finished=true; _finished=true;
const QStringList list = s.split(","); const QStringList list = s.split(',');
_coords.clear(); _coords.clear();
_selectionPoints.clear(); _selectionPoints.clear();
......
...@@ -144,7 +144,6 @@ void KimeShell::fileNew() ...@@ -144,7 +144,6 @@ void KimeShell::fileNew()
// button is clicked // button is clicked
// About this function, the style guide ( // About this function, the style guide (
// http://developer.kde.org/documentation/standards/kde/style/basics/index.html )
// says that it should open a new window if the document is _not_ // says that it should open a new window if the document is _not_
// in its initial state. This is what we do here.. // in its initial state. This is what we do here..
if ( ! m_part->url().isEmpty() || m_part->isModified() ) if ( ! m_part->url().isEmpty() || m_part->isModified() )
...@@ -178,7 +177,6 @@ void KimeShell::fileOpen() ...@@ -178,7 +177,6 @@ void KimeShell::fileOpen()
"HTML Files (*.htm *.html);;All Files (*)")); "HTML Files (*.htm *.html);;All Files (*)"));
if (!url.isEmpty()) { if (!url.isEmpty()) {
// About this function, the style guide ( // About this function, the style guide (
// http://developer.kde.org/documentation/standards/kde/style/basics/index.html )
// says that it should open a new window if the document is _not_ // says that it should open a new window if the document is _not_
// in its initial state. This is what we do here.. // in its initial state. This is what we do here..
if ( m_part->url().isEmpty() && ! m_part->isModified() ) if ( m_part->url().isEmpty() && ! m_part->isModified() )
......
...@@ -29,7 +29,7 @@ class KimeShell : public KParts::MainWindow ...@@ -29,7 +29,7 @@ class KimeShell : public KParts::MainWindow
Q_OBJECT Q_OBJECT
public: public:
KimeShell( const char *name=0 ); explicit KimeShell( const char *name=0 );
~KimeShell() override; ~KimeShell() override;
void setStdout(bool b); void setStdout(bool b);
......
...@@ -38,7 +38,7 @@ int main(int argc, char *argv[]) ...@@ -38,7 +38,7 @@ int main(int argc, char *argv[])
KAboutData aboutData( "kimagemapeditor", i18n("KImageMapEditor"), KAboutData aboutData( "kimagemapeditor", i18n("KImageMapEditor"),
KIMAGEMAPEDITOR_VERSION_STRING, i18n(description), KAboutLicense::GPL, KIMAGEMAPEDITOR_VERSION_STRING, i18n(description), KAboutLicense::GPL,
i18n("(c) 2001-2007 Jan Schaefer"), QString(), i18n("(c) 2001-2007 Jan Schaefer"), QString(),
QStringLiteral("http://kde.org/applications/development/kimagemapeditor/"), QStringLiteral("janschaefer@users.sourceforge.net")); QStringLiteral("https://kde.org/applications/development/org.kde.kimagemapeditor"), QStringLiteral("janschaefer@users.sourceforge.net"));
aboutData.addAuthor(i18n("Jan Schaefer"),QString(), "janschaefer@users.sourceforge.net"); aboutData.addAuthor(i18n("Jan Schaefer"),QString(), "janschaefer@users.sourceforge.net");
aboutData.addCredit(i18n("Joerg Jaspert"),i18n("For helping me with the Makefiles, and creating the Debian package")); aboutData.addCredit(i18n("Joerg Jaspert"),i18n("For helping me with the Makefiles, and creating the Debian package"));
aboutData.addCredit(i18n("Aaron Seigo and Michael"),i18n("For helping me fixing --enable-final mode")); aboutData.addCredit(i18n("Aaron Seigo and Michael"),i18n("For helping me fixing --enable-final mode"));
......
Markdown is supported
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