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
Q_OBJECT
public:
ImagesListView(QWidget *parent);
explicit ImagesListView(QWidget *parent);
~ImagesListView() override;
/**
......
......@@ -896,7 +896,7 @@ QImage KImageMapEditor::getBackgroundImage() {
// The translated string must be divided into
// parts with about the same size that fit to the image
QString str = i18n("Drop an image or HTML file");
const QStringList strList = str.split(" ");
const QStringList strList = str.split(' ');
// Get the string parts
QString tmp;
......@@ -1718,7 +1718,7 @@ QHash<QString,QString> KImageMapEditor::getTagAttributes(QTextStream & s, QStrin
if (value.right(3)=="-->")
return dict;
if (value.startsWith("!--")) {
if (value.startsWith(QLatin1String("!--"))) {
while (!s.atEnd()) {
s >> w;
readText.append(w);
......@@ -2326,7 +2326,7 @@ static QUrl toRelative(const QUrl& urlToConvert,const QUrl& baseURL)
{
QString path = urlToConvert.path();
QString basePath = baseURL.path().endsWith('/') ? baseURL.path() : baseURL.path() + '/';
if (path.startsWith("/") && basePath != "/")
if (path.startsWith(QLatin1String("/")) && basePath != "/")
{
path.remove(0, 1);
basePath.remove(0, 1);
......@@ -2875,7 +2875,7 @@ void KImageMapEditor::imageUsemap() {
// Update the htmlCode of the HtmlElement
HtmlImgElement* imgEl = findHtmlImgElement(imageTag);
imgEl->htmlCode = "<";
imgEl->htmlCode = QLatin1String("<");
QString tagName = imgEl->imgTag->value("tagname");
imgEl->htmlCode += QString(tagName);
QHashIterator<QString, QString> it( *imgEl->imgTag );
......
......@@ -72,7 +72,7 @@ public:
class HtmlElement {
public:
HtmlElement(const QString & s) {
explicit HtmlElement(const QString & s) {
htmlCode = s;
};
virtual ~HtmlElement() {}
......@@ -93,7 +93,7 @@ public:
class HtmlImgElement : public HtmlElement {
public:
HtmlImgElement(const QString & s) : HtmlElement(s) {
explicit HtmlImgElement(const QString & s) : HtmlElement(s) {
imgTag = 0L;
};
~HtmlImgElement() override {}
......
......@@ -733,7 +733,7 @@ bool RectArea::setCoords(const QString & s)
{
_finished=true;
const QStringList list = s.split(",");
const QStringList list = s.split(',');
QRect r;
bool ok=true;
QStringList::ConstIterator it = list.begin();
......@@ -913,7 +913,7 @@ void CircleArea::updateSelectionPoints()
bool CircleArea::setCoords(const QString & s)
{
_finished=true;
const QStringList list = s.split(",");
const QStringList list = s.split(',');
bool ok=true;
QStringList::ConstIterator it = list.begin();
int x=(*it).toInt(&ok,10);it++;
......@@ -1158,7 +1158,7 @@ void PolyArea::updateSelectionPoints()
bool PolyArea::setCoords(const QString & s)
{
_finished=true;
const QStringList list = s.split(",");
const QStringList list = s.split(',');
_coords.clear();
_selectionPoints.clear();
......
......@@ -144,7 +144,6 @@ void KimeShell::fileNew()
// button is clicked
// 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_
// in its initial state. This is what we do here..
if ( ! m_part->url().isEmpty() || m_part->isModified() )
......@@ -178,7 +177,6 @@ void KimeShell::fileOpen()
"HTML Files (*.htm *.html);;All Files (*)"));
if (!url.isEmpty()) {
// 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_
// in its initial state. This is what we do here..
if ( m_part->url().isEmpty() && ! m_part->isModified() )
......
......@@ -29,7 +29,7 @@ class KimeShell : public KParts::MainWindow
Q_OBJECT
public:
KimeShell( const char *name=0 );
explicit KimeShell( const char *name=0 );
~KimeShell() override;
void setStdout(bool b);
......
......@@ -38,7 +38,7 @@ int main(int argc, char *argv[])
KAboutData aboutData( "kimagemapeditor", i18n("KImageMapEditor"),
KIMAGEMAPEDITOR_VERSION_STRING, i18n(description), KAboutLicense::GPL,
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.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"));
......
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