Modernize: Use nullptr

master
Unknown 2019-03-29 17:23:22 +01:00
parent dbc060bba9
commit a990d042ae
11 changed files with 72 additions and 72 deletions

View File

@ -9,7 +9,7 @@ class ColorLineEdit : public QLineEdit {
Q_OBJECT
public:
explicit ColorLineEdit(QWidget *parent = NULL);
explicit ColorLineEdit(QWidget *parent = nullptr);
public slots:
void selectColor();

View File

@ -16,7 +16,7 @@ class ColorsTxtWizard : public QWizard
Q_OBJECT
public:
ColorsTxtWizard(QWidget *parent = 0);
ColorsTxtWizard(QWidget *parent = nullptr);
void setNodesTxtFilePath(const QString &nodesTxtFilePath);
};
@ -25,7 +25,7 @@ class IntroPage : public QWizardPage
Q_OBJECT
public:
IntroPage(QWidget *parent = 0);
IntroPage(QWidget *parent = nullptr);
private:
QLabel *label;
@ -36,7 +36,7 @@ class NodesTxtPage : public QWizardPage
Q_OBJECT
public:
NodesTxtPage(QWidget *parent = 0);
NodesTxtPage(QWidget *parent = nullptr);
private slots:
void browse();
@ -51,7 +51,7 @@ class TextureFoldersPage : public QWizardPage
Q_OBJECT
public:
TextureFoldersPage(QWidget *parent = 0);
TextureFoldersPage(QWidget *parent = nullptr);
bool isComplete(void) const;
private slots:
@ -71,7 +71,7 @@ class OutputFilePage : public QWizardPage
Q_OBJECT
public:
OutputFilePage(QWidget *parent = 0);
OutputFilePage(QWidget *parent = nullptr);
private slots:
void browse();
@ -85,7 +85,7 @@ class ConclusionPage : public QWizardPage
Q_OBJECT
public:
ConclusionPage(QWidget *parent = 0);
ConclusionPage(QWidget *parent = nullptr);
bool isComplete(void) const override;
protected:

View File

@ -34,7 +34,7 @@ class ConfigDialog : public QDialog
Q_OBJECT
public:
explicit ConfigDialog(const ConfigSettings &settings, MainWindow *app, QWidget *parent = 0);
explicit ConfigDialog(const ConfigSettings &settings, MainWindow *app, QWidget *parent = nullptr);
~ConfigDialog();
ConfigSettings getSettings() const;

View File

@ -26,21 +26,21 @@ public:
};
Q_ENUM(Figure)
explicit DrawMapFigure(QObject *parent = 0);
explicit DrawMapFigure(QObject *parent = nullptr);
/**
* @brief DrawMapFigure
* @param str QString to convert to DrawMapFigure
* @param parent
*/
explicit DrawMapFigure(const QString &str, QObject *parent = 0);
explicit DrawMapFigure(const QString &str, QObject *parent = nullptr);
explicit DrawMapFigure(QColor color, QObject *parent = 0) :
explicit DrawMapFigure(QColor color, QObject *parent = nullptr) :
QObject(parent), color(color) { }
explicit DrawMapFigure(QPoint point, QColor color, QObject *parent = 0) :
explicit DrawMapFigure(QPoint point, QColor color, QObject *parent = nullptr) :
QObject(parent), point(point), color(color) {}
explicit DrawMapFigure(Geometry *geometry, QColor color, QObject *parent = 0) :
explicit DrawMapFigure(Geometry *geometry, QColor color, QObject *parent = nullptr) :
QObject(parent), geometry(geometry), color(color) { }
//DrawMapFigure(const DrawMapFigure &f) {}

View File

@ -11,7 +11,7 @@ class DrawMapFigureTableModel : public QAbstractTableModel
Q_OBJECT
public:
explicit DrawMapFigureTableModel(QObject *parent = 0);
explicit DrawMapFigureTableModel(QObject *parent = nullptr);
// Header:
QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const override;

View File

@ -15,7 +15,7 @@ class FigureDelegate : public QStyledItemDelegate
Q_OBJECT
public:
FigureDelegate(QObject *parent = 0);
FigureDelegate(QObject *parent = nullptr);
QWidget *createEditor(QWidget *parent, const QStyleOptionViewItem &option,
const QModelIndex &index) const Q_DECL_OVERRIDE;

View File

@ -20,7 +20,7 @@ class GeometryWidget : public QWidget
Q_PROPERTY(QString geometry READ getGeometry WRITE set NOTIFY editingFinished USER true)
public:
explicit GeometryWidget(QWidget *parent = 0);
explicit GeometryWidget(QWidget *parent = nullptr);
~GeometryWidget();
bool set(const QString& geomStr, Geometry::Format format = Geometry::FormatUnknown); //{ return set(geomStr.toStdString().c_str(), format); }

View File

@ -37,7 +37,7 @@ class MainWindow : public QMainWindow
Q_OBJECT
public:
explicit MainWindow(Translator *translator, QWidget *parent = 0);
explicit MainWindow(Translator *translator, QWidget *parent = nullptr);
~MainWindow();
enum class GeometryGranularity {

View File

@ -19,7 +19,7 @@ class MinetestMapperExe : public QObject
{
Q_OBJECT
public:
explicit MinetestMapperExe(const QString &program, QObject *parent = 0);
explicit MinetestMapperExe(const QString &program, QObject *parent = nullptr);
enum Tree{
Unknown,

View File

@ -1306,7 +1306,7 @@ Nodes higher than this level will not be drawn. This can be used to avoid floati
</message>
<message>
<location filename="../mainwindow.ui" line="2419"/>
<location filename="../mainwindow.cpp" line="1024"/>
<location filename="../mainwindow.cpp" line="1022"/>
<source>Cancel</source>
<translation>Abbrechen</translation>
</message>
@ -1339,7 +1339,7 @@ Nodes higher than this level will not be drawn. This can be used to avoid floati
</message>
<message>
<location filename="../mainwindow.ui" line="2707"/>
<location filename="../mainwindow.cpp" line="866"/>
<location filename="../mainwindow.cpp" line="864"/>
<source>About MinetestMapper</source>
<translation>Über MinetestMapper</translation>
</message>
@ -1383,7 +1383,7 @@ Nodes higher than this level will not be drawn. This can be used to avoid floati
</message>
<message>
<location filename="../mainwindow.ui" line="2847"/>
<location filename="../mainwindow.cpp" line="888"/>
<location filename="../mainwindow.cpp" line="886"/>
<source>New Profile</source>
<translation>Neues Profil</translation>
</message>
@ -1413,7 +1413,7 @@ Nodes higher than this level will not be drawn. This can be used to avoid floati
</message>
<message>
<location filename="../mainwindow.ui" line="2806"/>
<location filename="../mainwindow.cpp" line="852"/>
<location filename="../mainwindow.cpp" line="850"/>
<source>About MinetestMapper GUI</source>
<translation>Über MinetestMapperGUI</translation>
</message>
@ -1583,69 +1583,69 @@ Please make shure Minetest Mapper Gui can access to the file/directory</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mainwindow.cpp" line="810"/>
<location filename="../mainwindow.cpp" line="808"/>
<source>Open Minetest World</source>
<translation>Minetest Welt-Ordner öffnen</translation>
</message>
<message>
<location filename="../mainwindow.cpp" line="820"/>
<location filename="../mainwindow.cpp" line="818"/>
<source>Save generated map to...</source>
<translation>Karte speichern nach...</translation>
</message>
<message>
<location filename="../mainwindow.cpp" line="820"/>
<location filename="../mainwindow.cpp" line="818"/>
<source>png image (*.png)</source>
<translation>png Grafik (*.png)</translation>
</message>
<message>
<location filename="../mainwindow.cpp" line="827"/>
<location filename="../mainwindow.cpp" line="825"/>
<source>Open HeightmapNodes File</source>
<translation>Öffne HeightmapNodes Datei</translation>
</message>
<message>
<location filename="../mainwindow.cpp" line="829"/>
<location filename="../mainwindow.cpp" line="837"/>
<location filename="../mainwindow.cpp" line="845"/>
<location filename="../mainwindow.cpp" line="827"/>
<location filename="../mainwindow.cpp" line="835"/>
<location filename="../mainwindow.cpp" line="843"/>
<source>TXT File (*.txt)</source>
<translation>TXT Datei (*.txt)</translation>
</message>
<message>
<location filename="../mainwindow.cpp" line="835"/>
<location filename="../mainwindow.cpp" line="833"/>
<source>Open HeightmapColors File</source>
<translation>Öffne Höhenkarte Farbdefinitionsdatei</translation>
</message>
<message>
<location filename="../mainwindow.cpp" line="843"/>
<location filename="../mainwindow.cpp" line="841"/>
<source>Open colors.txt File</source>
<translation>Öffne colors.txt Datei</translation>
</message>
<message>
<location filename="../mainwindow.cpp" line="853"/>
<location filename="../mainwindow.cpp" line="851"/>
<source>&lt;h1&gt;About MinetestMapperGUI&lt;/h1&gt;The &lt;b&gt;MinetestMapper Gui&lt;/b&gt; is written by addi.&lt;br /&gt;It is licensed under a &lt;a href=&quot;http://creativecommons.org/licenses/by/3.0/&quot;&gt;Creative Commons Attribution 3.0 Unported License&lt;/a&gt;.&lt;br&gt;The current version is %1. &lt;br&gt;The sourcecode is aviable on &lt;a href=&apos;https://bitbucket.org/adrido/minetestmappergui/&apos;&gt;Bitbucket&lt;/a&gt;.&lt;br&gt;You may also want to read the &lt;a href=&apos;https://forum.minetest.net/viewtopic.php?f=14&amp;t=12139&apos;&gt;Minetest forum thread&lt;/a&gt;.&lt;br&gt;&lt;br&gt;&lt;b&gt;Thanks to:&lt;/b&gt;&lt;br&gt;McKrustenkaese for his great icon</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mainwindow.cpp" line="867"/>
<location filename="../mainwindow.cpp" line="865"/>
<source>&lt;h1&gt;About MinetestMapper&lt;/h1&gt;The &lt;b&gt;MinetestMapper&lt;/b&gt; is written by:&lt;br&gt;Miroslav Bendík &lt;miroslav.bendik@gmail.com&gt;&lt;br&gt;ShadowNinja &lt;shadowninja@minetest.net&gt;&lt;br&gt;sfan5 &lt;sfan5@live.de&gt;&lt;br&gt;Rogier &lt;rogier777@gmail.com&gt;&lt;br&gt;&lt;br&gt;&lt;u&gt;Version:&lt;/u&gt; %1 (%2)&lt;br&gt;&lt;u&gt;License:&lt;/u&gt; LGPLv2.1+ and BSD 2-clause.&lt;br&gt;&lt;u&gt;Source Code:&lt;/u&gt; &lt;a href=&apos;https://github.com/Rogier-5/minetest-mapper-cpp&apos;&gt;Github&lt;/a&gt;&lt;br&gt;</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mainwindow.cpp" line="948"/>
<location filename="../mainwindow.cpp" line="946"/>
<source>map center</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mainwindow.cpp" line="953"/>
<location filename="../mainwindow.cpp" line="951"/>
<source>map origin (top left)</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mainwindow.cpp" line="1003"/>
<location filename="../mainwindow.cpp" line="1001"/>
<source>Create a colors.txt</source>
<translation>Erstelle eine colors.txt Datei</translation>
</message>
<message>
<location filename="../mainwindow.cpp" line="1004"/>
<location filename="../mainwindow.cpp" line="1002"/>
<source>There is a nodes.txt but no colors.txt in the world directory
Do you want to generate one?
If you select &apos;No&apos; the default colors.txt will be used.</source>
@ -1654,34 +1654,34 @@ Möchtest du eine erstellen?
Wenn du auf &apos;Nein&apos; clickst, wird eine standard colors.txt Datei verwendet.</translation>
</message>
<message>
<location filename="../mainwindow.cpp" line="1021"/>
<location filename="../mainwindow.cpp" line="1019"/>
<source>No colors.txt file</source>
<translation>Keine colors.txt Datei</translation>
</message>
<message>
<location filename="../mainwindow.cpp" line="1022"/>
<location filename="../mainwindow.cpp" line="1020"/>
<source>ERROR: Still no colors.txt file found inside world directory.
Do you want to cancel or proceed with default colors.txt file?</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mainwindow.cpp" line="1025"/>
<location filename="../mainwindow.cpp" line="1023"/>
<source>Proceed with default</source>
<translation>Mit standard Datei fortfahren</translation>
</message>
<message>
<location filename="../mainwindow.cpp" line="1097"/>
<location filename="../mainwindow.cpp" line="1095"/>
<source>Could not open Terminal</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mainwindow.cpp" line="1098"/>
<location filename="../mainwindow.cpp" line="1096"/>
<source>Error: Could not open scriptfile (%1) for Terminal</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mainwindow.cpp" line="1122"/>
<location filename="../mainwindow.cpp" line="1120"/>
<source>Open Directory</source>
<translation type="unfinished"></translation>
</message>
@ -1716,12 +1716,12 @@ Bitte erneut eine gültige minetestmapper Anwendung auswählen. (Bearbeiten-&gt;
Möchten Sie die Einstellungen jetzt öffnen? </translation>
</message>
<message>
<location filename="../mainwindow.cpp" line="881"/>
<location filename="../mainwindow.cpp" line="879"/>
<source>preview: %1</source>
<translation>Vorschau: %1</translation>
</message>
<message>
<location filename="../mainwindow.cpp" line="889"/>
<location filename="../mainwindow.cpp" line="887"/>
<source>Name of the new Profile:</source>
<translation>Name des Neuen Profils:</translation>
</message>

View File

@ -994,7 +994,7 @@ Nodes higher than this level will not be drawn. This can be used to avoid floati
</message>
<message>
<location filename="../mainwindow.ui" line="2419"/>
<location filename="../mainwindow.cpp" line="1024"/>
<location filename="../mainwindow.cpp" line="1022"/>
<source>Cancel</source>
<translation type="unfinished"></translation>
</message>
@ -1052,7 +1052,7 @@ Nodes higher than this level will not be drawn. This can be used to avoid floati
</message>
<message>
<location filename="../mainwindow.ui" line="2707"/>
<location filename="../mainwindow.cpp" line="866"/>
<location filename="../mainwindow.cpp" line="864"/>
<source>About MinetestMapper</source>
<translation type="unfinished"></translation>
</message>
@ -1088,7 +1088,7 @@ Nodes higher than this level will not be drawn. This can be used to avoid floati
</message>
<message>
<location filename="../mainwindow.ui" line="2806"/>
<location filename="../mainwindow.cpp" line="852"/>
<location filename="../mainwindow.cpp" line="850"/>
<source>About MinetestMapper GUI</source>
<translation type="unfinished"></translation>
</message>
@ -1139,7 +1139,7 @@ Nodes higher than this level will not be drawn. This can be used to avoid floati
</message>
<message>
<location filename="../mainwindow.ui" line="2847"/>
<location filename="../mainwindow.cpp" line="888"/>
<location filename="../mainwindow.cpp" line="886"/>
<source>New Profile</source>
<translation type="unfinished"></translation>
</message>
@ -1315,113 +1315,113 @@ Please make shure Minetest Mapper Gui can access to the file/directory</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mainwindow.cpp" line="810"/>
<location filename="../mainwindow.cpp" line="808"/>
<source>Open Minetest World</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mainwindow.cpp" line="820"/>
<location filename="../mainwindow.cpp" line="818"/>
<source>Save generated map to...</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mainwindow.cpp" line="820"/>
<location filename="../mainwindow.cpp" line="818"/>
<source>png image (*.png)</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mainwindow.cpp" line="827"/>
<location filename="../mainwindow.cpp" line="825"/>
<source>Open HeightmapNodes File</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mainwindow.cpp" line="829"/>
<location filename="../mainwindow.cpp" line="837"/>
<location filename="../mainwindow.cpp" line="845"/>
<location filename="../mainwindow.cpp" line="827"/>
<location filename="../mainwindow.cpp" line="835"/>
<location filename="../mainwindow.cpp" line="843"/>
<source>TXT File (*.txt)</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mainwindow.cpp" line="835"/>
<location filename="../mainwindow.cpp" line="833"/>
<source>Open HeightmapColors File</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mainwindow.cpp" line="843"/>
<location filename="../mainwindow.cpp" line="841"/>
<source>Open colors.txt File</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mainwindow.cpp" line="853"/>
<location filename="../mainwindow.cpp" line="851"/>
<source>&lt;h1&gt;About MinetestMapperGUI&lt;/h1&gt;The &lt;b&gt;MinetestMapper Gui&lt;/b&gt; is written by addi.&lt;br /&gt;It is licensed under a &lt;a href=&quot;http://creativecommons.org/licenses/by/3.0/&quot;&gt;Creative Commons Attribution 3.0 Unported License&lt;/a&gt;.&lt;br&gt;The current version is %1. &lt;br&gt;The sourcecode is aviable on &lt;a href=&apos;https://bitbucket.org/adrido/minetestmappergui/&apos;&gt;Bitbucket&lt;/a&gt;.&lt;br&gt;You may also want to read the &lt;a href=&apos;https://forum.minetest.net/viewtopic.php?f=14&amp;t=12139&apos;&gt;Minetest forum thread&lt;/a&gt;.&lt;br&gt;&lt;br&gt;&lt;b&gt;Thanks to:&lt;/b&gt;&lt;br&gt;McKrustenkaese for his great icon</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mainwindow.cpp" line="867"/>
<location filename="../mainwindow.cpp" line="865"/>
<source>&lt;h1&gt;About MinetestMapper&lt;/h1&gt;The &lt;b&gt;MinetestMapper&lt;/b&gt; is written by:&lt;br&gt;Miroslav Bendík &lt;miroslav.bendik@gmail.com&gt;&lt;br&gt;ShadowNinja &lt;shadowninja@minetest.net&gt;&lt;br&gt;sfan5 &lt;sfan5@live.de&gt;&lt;br&gt;Rogier &lt;rogier777@gmail.com&gt;&lt;br&gt;&lt;br&gt;&lt;u&gt;Version:&lt;/u&gt; %1 (%2)&lt;br&gt;&lt;u&gt;License:&lt;/u&gt; LGPLv2.1+ and BSD 2-clause.&lt;br&gt;&lt;u&gt;Source Code:&lt;/u&gt; &lt;a href=&apos;https://github.com/Rogier-5/minetest-mapper-cpp&apos;&gt;Github&lt;/a&gt;&lt;br&gt;</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mainwindow.cpp" line="948"/>
<location filename="../mainwindow.cpp" line="946"/>
<source>map center</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mainwindow.cpp" line="953"/>
<location filename="../mainwindow.cpp" line="951"/>
<source>map origin (top left)</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mainwindow.cpp" line="1003"/>
<location filename="../mainwindow.cpp" line="1001"/>
<source>Create a colors.txt</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mainwindow.cpp" line="1004"/>
<location filename="../mainwindow.cpp" line="1002"/>
<source>There is a nodes.txt but no colors.txt in the world directory
Do you want to generate one?
If you select &apos;No&apos; the default colors.txt will be used.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mainwindow.cpp" line="1021"/>
<location filename="../mainwindow.cpp" line="1019"/>
<source>No colors.txt file</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mainwindow.cpp" line="1022"/>
<location filename="../mainwindow.cpp" line="1020"/>
<source>ERROR: Still no colors.txt file found inside world directory.
Do you want to cancel or proceed with default colors.txt file?</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mainwindow.cpp" line="1025"/>
<location filename="../mainwindow.cpp" line="1023"/>
<source>Proceed with default</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mainwindow.cpp" line="1097"/>
<location filename="../mainwindow.cpp" line="1095"/>
<source>Could not open Terminal</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mainwindow.cpp" line="1098"/>
<location filename="../mainwindow.cpp" line="1096"/>
<source>Error: Could not open scriptfile (%1) for Terminal</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mainwindow.cpp" line="1122"/>
<location filename="../mainwindow.cpp" line="1120"/>
<source>Open Directory</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mainwindow.cpp" line="881"/>
<location filename="../mainwindow.cpp" line="879"/>
<source>preview: %1</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mainwindow.cpp" line="889"/>
<location filename="../mainwindow.cpp" line="887"/>
<source>Name of the new Profile:</source>
<translation type="unfinished"></translation>
</message>