diff --git a/src/libtiled/mapreader.h b/src/libtiled/mapreader.h index 8a8c169452..8ca2d41e40 100644 --- a/src/libtiled/mapreader.h +++ b/src/libtiled/mapreader.h @@ -42,7 +42,7 @@ class Map; namespace Internal { class MapReaderPrivate; -} +} // namespace Internal /** * A fast QXmlStreamReader based reader for the TMX and TSX formats. diff --git a/src/libtiled/mapwriter.h b/src/libtiled/mapwriter.h index 17cefc3bd3..4c94672ec4 100644 --- a/src/libtiled/mapwriter.h +++ b/src/libtiled/mapwriter.h @@ -45,7 +45,7 @@ class Tileset; namespace Internal { class MapWriterPrivate; -} +} // namespace Internal /** * A QXmlStreamWriter based writer for the TMX and TSX formats. diff --git a/src/libtiled/templatemanager.h b/src/libtiled/templatemanager.h index 997634989a..05acd01a64 100644 --- a/src/libtiled/templatemanager.h +++ b/src/libtiled/templatemanager.h @@ -69,4 +69,4 @@ inline ObjectTemplate *TemplateManager::findObjectTemplate(const QString &fileNa return mObjectTemplates.value(fileName); } -} // namespace Tiled::Internal +} // namespace Tiled diff --git a/src/tiled/aboutdialog.cpp b/src/tiled/aboutdialog.cpp index e703ca318b..9ca9e34578 100644 --- a/src/tiled/aboutdialog.cpp +++ b/src/tiled/aboutdialog.cpp @@ -30,7 +30,7 @@ #include -using namespace Tiled::Internal; +using namespace Tiled; AboutDialog::AboutDialog(QWidget *parent): QDialog(parent) { diff --git a/src/tiled/aboutdialog.h b/src/tiled/aboutdialog.h index 1f4490a66c..2f67db4968 100644 --- a/src/tiled/aboutdialog.h +++ b/src/tiled/aboutdialog.h @@ -25,7 +25,6 @@ #include "ui_aboutdialog.h" namespace Tiled { -namespace Internal { class AboutDialog : public QDialog, private Ui::AboutDialog { @@ -38,5 +37,4 @@ private slots: void donate(); }; -} // namespace Internal } // namespace Tiled diff --git a/src/tiled/abstractobjecttool.cpp b/src/tiled/abstractobjecttool.cpp index 13e12985bf..a4430d03dd 100644 --- a/src/tiled/abstractobjecttool.cpp +++ b/src/tiled/abstractobjecttool.cpp @@ -48,7 +48,6 @@ #include using namespace Tiled; -using namespace Tiled::Internal; static bool isTileObject(MapObject *mapObject) { @@ -175,13 +174,13 @@ void AbstractObjectTool::languageChanged() { mFlipHorizontal->setToolTip(tr("Flip Horizontally")); mFlipVertical->setToolTip(tr("Flip Vertically")); - mRotateLeft->setToolTip(QCoreApplication::translate("Tiled::Internal::StampActions", "Rotate Left")); - mRotateRight->setToolTip(QCoreApplication::translate("Tiled::Internal::StampActions", "Rotate Right")); + mRotateLeft->setToolTip(QCoreApplication::translate("Tiled::StampActions", "Rotate Left")); + mRotateRight->setToolTip(QCoreApplication::translate("Tiled::StampActions", "Rotate Right")); - mFlipHorizontal->setShortcut(QKeySequence(QCoreApplication::translate("Tiled::Internal::StampActions", "X"))); - mFlipVertical->setShortcut(QKeySequence(QCoreApplication::translate("Tiled::Internal::StampActions", "Y"))); - mRotateLeft->setShortcut(QKeySequence(QCoreApplication::translate("Tiled::Internal::StampActions", "Shift+Z"))); - mRotateRight->setShortcut(QKeySequence(QCoreApplication::translate("Tiled::Internal::StampActions", "Z"))); + mFlipHorizontal->setShortcut(QKeySequence(QCoreApplication::translate("Tiled::StampActions", "X"))); + mFlipVertical->setShortcut(QKeySequence(QCoreApplication::translate("Tiled::StampActions", "Y"))); + mRotateLeft->setShortcut(QKeySequence(QCoreApplication::translate("Tiled::StampActions", "Shift+Z"))); + mRotateRight->setShortcut(QKeySequence(QCoreApplication::translate("Tiled::StampActions", "Z"))); } void AbstractObjectTool::populateToolBar(QToolBar *toolBar) @@ -281,12 +280,12 @@ static QString saveObjectTemplate(const MapObject *mapObject) if (!mapObject->name().isEmpty()) suggestedFileName += mapObject->name(); else - suggestedFileName += QCoreApplication::translate("Tiled::Internal::MainWindow", "untitled"); + suggestedFileName += QCoreApplication::translate("Tiled::MainWindow", "untitled"); suggestedFileName += QLatin1String(".tx"); QWidget *parent = DocumentManager::instance()->widget()->window(); QString fileName = QFileDialog::getSaveFileName(parent, - QCoreApplication::translate("Tiled::Internal::MainWindow", "Save Template"), + QCoreApplication::translate("Tiled::MainWindow", "Save Template"), suggestedFileName, filter, &selectedFilter); @@ -300,7 +299,7 @@ static QString saveObjectTemplate(const MapObject *mapObject) objectTemplate.setObject(mapObject); if (!format->write(&objectTemplate, fileName)) { - QMessageBox::critical(nullptr, QCoreApplication::translate("Tiled::Internal::MainWindow", "Error Saving Template"), + QMessageBox::critical(nullptr, QCoreApplication::translate("Tiled::MainWindow", "Error Saving Template"), format->errorString()); return QString(); } diff --git a/src/tiled/abstractobjecttool.h b/src/tiled/abstractobjecttool.h index cfe9057350..e45a3c2715 100644 --- a/src/tiled/abstractobjecttool.h +++ b/src/tiled/abstractobjecttool.h @@ -29,8 +29,6 @@ namespace Tiled { class MapObject; class ObjectGroup; -namespace Internal { - class MapObjectItem; /** @@ -106,5 +104,4 @@ private slots: QAction *mRotateRight; }; -} // namespace Internal } // namespace Tiled diff --git a/src/tiled/abstracttilefilltool.cpp b/src/tiled/abstracttilefilltool.cpp index da53254d9a..84c4985dc6 100644 --- a/src/tiled/abstracttilefilltool.cpp +++ b/src/tiled/abstracttilefilltool.cpp @@ -28,7 +28,6 @@ #include using namespace Tiled; -using namespace Internal; AbstractTileFillTool::AbstractTileFillTool(const QString &name, const QIcon &icon, diff --git a/src/tiled/abstracttilefilltool.h b/src/tiled/abstracttilefilltool.h index ca5fad4a5e..a31111b319 100644 --- a/src/tiled/abstracttilefilltool.h +++ b/src/tiled/abstracttilefilltool.h @@ -31,8 +31,6 @@ namespace Tiled { class WangSet; -namespace Internal { - class MapDocument; class StampActions; class WangFiller; @@ -141,5 +139,4 @@ inline bool AbstractTileFillTool::isCapturing() const return mCaptureStampHelper.isActive(); } -} // namespace Internal } // namespace Tiled diff --git a/src/tiled/abstracttileselectiontool.cpp b/src/tiled/abstracttileselectiontool.cpp index 724252efd9..23aaaa3da7 100644 --- a/src/tiled/abstracttileselectiontool.cpp +++ b/src/tiled/abstracttileselectiontool.cpp @@ -30,7 +30,6 @@ #include using namespace Tiled; -using namespace Tiled::Internal; AbstractTileSelectionTool::AbstractTileSelectionTool(const QString &name, const QIcon &icon, diff --git a/src/tiled/abstracttileselectiontool.h b/src/tiled/abstracttileselectiontool.h index 57e4561d35..5901a01bc1 100644 --- a/src/tiled/abstracttileselectiontool.h +++ b/src/tiled/abstracttileselectiontool.h @@ -27,7 +27,6 @@ class QAction; class QActionGroup; namespace Tiled { -namespace Internal { class MapDocument; @@ -78,5 +77,4 @@ class AbstractTileSelectionTool : public AbstractTileTool QActionGroup *mActionGroup; }; -} // namespace Internal } // namespace Tiled diff --git a/src/tiled/abstracttiletool.cpp b/src/tiled/abstracttiletool.cpp index 0bf707fc14..4fd2459846 100644 --- a/src/tiled/abstracttiletool.cpp +++ b/src/tiled/abstracttiletool.cpp @@ -32,7 +32,6 @@ #include using namespace Tiled; -using namespace Tiled::Internal; AbstractTileTool::AbstractTileTool(const QString &name, const QIcon &icon, diff --git a/src/tiled/abstracttiletool.h b/src/tiled/abstracttiletool.h index e27c69f23f..5e9eae35da 100644 --- a/src/tiled/abstracttiletool.h +++ b/src/tiled/abstracttiletool.h @@ -26,8 +26,6 @@ namespace Tiled { class TileLayer; -namespace Internal { - class BrushItem; class MapDocument; class TileStamp; @@ -130,5 +128,4 @@ class AbstractTileTool : public AbstractTool bool mBrushVisible; }; -} // namespace Internal } // namespace Tiled diff --git a/src/tiled/abstracttool.cpp b/src/tiled/abstracttool.cpp index 6441980532..71f70384c0 100644 --- a/src/tiled/abstracttool.cpp +++ b/src/tiled/abstracttool.cpp @@ -27,7 +27,6 @@ #include namespace Tiled { -namespace Internal { AbstractTool::AbstractTool(const QString &name, const QIcon &icon, const QKeySequence &shortcut, QObject *parent) @@ -127,5 +126,4 @@ Layer *AbstractTool::currentLayer() const return mMapDocument ? mMapDocument->currentLayer() : nullptr; } -} // namespace Internal } // namespace Tiled diff --git a/src/tiled/abstracttool.h b/src/tiled/abstracttool.h index 90be717c86..56576cbc69 100644 --- a/src/tiled/abstracttool.h +++ b/src/tiled/abstracttool.h @@ -39,8 +39,6 @@ class Layer; class Tile; class ObjectTemplate; -namespace Internal { - class MapDocument; class MapScene; class ToolManager; @@ -260,7 +258,6 @@ inline ToolManager *AbstractTool::toolManager() const return mToolManager; } -} // namespace Internal } // namespace Tiled -Q_DECLARE_METATYPE(Tiled::Internal::AbstractTool*) +Q_DECLARE_METATYPE(Tiled::AbstractTool*) diff --git a/src/tiled/actionmanager.cpp b/src/tiled/actionmanager.cpp index 9227a445d8..e627b90bd7 100644 --- a/src/tiled/actionmanager.cpp +++ b/src/tiled/actionmanager.cpp @@ -23,7 +23,6 @@ #include namespace Tiled { -namespace Internal { class ActionManagerPrivate { @@ -65,5 +64,4 @@ QAction *ActionManager::findAction(Id id) return d->mIdToAction.value(id); } -} // namespace Internal } // namespace Tiled diff --git a/src/tiled/actionmanager.h b/src/tiled/actionmanager.h index 3064d5cc58..b94a841275 100644 --- a/src/tiled/actionmanager.h +++ b/src/tiled/actionmanager.h @@ -27,7 +27,6 @@ class QAction; namespace Tiled { -namespace Internal { class MainWindow; @@ -51,8 +50,7 @@ class ActionManager : public QObject explicit ActionManager(QObject *parent = nullptr); ~ActionManager(); - friend class Tiled::Internal::MainWindow; // creation + friend class Tiled::MainWindow; // creation }; -} // namespace Internal } // namespace Tiled diff --git a/src/tiled/addpropertydialog.cpp b/src/tiled/addpropertydialog.cpp index 0efc9fcec3..2da57a379a 100644 --- a/src/tiled/addpropertydialog.cpp +++ b/src/tiled/addpropertydialog.cpp @@ -30,7 +30,6 @@ #include using namespace Tiled; -using namespace Tiled::Internal; static const char * const TYPE_KEY = "AddPropertyDialog/PropertyType"; diff --git a/src/tiled/addremovelayer.cpp b/src/tiled/addremovelayer.cpp index 7511e5897a..20d1a7cbdd 100644 --- a/src/tiled/addremovelayer.cpp +++ b/src/tiled/addremovelayer.cpp @@ -27,7 +27,6 @@ #include namespace Tiled { -namespace Internal { AddRemoveLayer::AddRemoveLayer(MapDocument *mapDocument, int index, @@ -83,5 +82,4 @@ RemoveLayer::RemoveLayer(MapDocument *mapDocument, setText(QCoreApplication::translate("Undo Commands", "Remove Layer")); } -} // namespace Internal } // namespace Tiled diff --git a/src/tiled/addremovelayer.h b/src/tiled/addremovelayer.h index 41e60e0b66..b8e2453ac5 100644 --- a/src/tiled/addremovelayer.h +++ b/src/tiled/addremovelayer.h @@ -29,8 +29,6 @@ namespace Tiled { class GroupLayer; class Layer; -namespace Internal { - class MapDocument; /** @@ -98,5 +96,4 @@ class RemoveLayer : public AddRemoveLayer { removeLayer(); } }; -} // namespace Internal } // namespace Tiled diff --git a/src/tiled/addremovemapobject.cpp b/src/tiled/addremovemapobject.cpp index 22a59c8d9c..a53835c71c 100644 --- a/src/tiled/addremovemapobject.cpp +++ b/src/tiled/addremovemapobject.cpp @@ -31,7 +31,6 @@ #include "qtcompat_p.h" using namespace Tiled; -using namespace Tiled::Internal; AddRemoveMapObjects::AddRemoveMapObjects(MapDocument *mapDocument, const QVector &entries, diff --git a/src/tiled/addremovemapobject.h b/src/tiled/addremovemapobject.h index 6c632b8069..57e7298234 100644 --- a/src/tiled/addremovemapobject.h +++ b/src/tiled/addremovemapobject.h @@ -28,8 +28,6 @@ namespace Tiled { class MapObject; class ObjectGroup; -namespace Internal { - class MapDocument; /** @@ -103,5 +101,4 @@ class RemoveMapObjects : public AddRemoveMapObjects void redo() override; }; -} // namespace Internal } // namespace Tiled diff --git a/src/tiled/addremoveterrain.cpp b/src/tiled/addremoveterrain.cpp index 145858a0f2..9b09ea3049 100644 --- a/src/tiled/addremoveterrain.cpp +++ b/src/tiled/addremoveterrain.cpp @@ -28,7 +28,6 @@ #include using namespace Tiled; -using namespace Tiled::Internal; AddRemoveTerrain::AddRemoveTerrain(TilesetDocument *tilesetDocument, int index, diff --git a/src/tiled/addremoveterrain.h b/src/tiled/addremoveterrain.h index a4ddfec480..de91c6f3aa 100644 --- a/src/tiled/addremoveterrain.h +++ b/src/tiled/addremoveterrain.h @@ -27,8 +27,6 @@ namespace Tiled { class Terrain; class Tileset; -namespace Internal { - class TilesetDocument; /** @@ -78,5 +76,4 @@ class RemoveTerrain : public AddRemoveTerrain void redo() override { removeTerrain(); } }; -} // namespace Internal } // namespace Tiled diff --git a/src/tiled/addremovetiles.cpp b/src/tiled/addremovetiles.cpp index 9e2dd02f51..1db3158a54 100644 --- a/src/tiled/addremovetiles.cpp +++ b/src/tiled/addremovetiles.cpp @@ -26,7 +26,6 @@ #include namespace Tiled { -namespace Internal { AddRemoveTiles::AddRemoveTiles(TilesetDocument *tilesetDocument, const QList &tiles, @@ -71,5 +70,4 @@ RemoveTiles::RemoveTiles(TilesetDocument *tilesetDocument, setText(QCoreApplication::translate("Undo Commands", "Remove Tiles")); } -} // namespace Internal } // namespace Tiled diff --git a/src/tiled/addremovetiles.h b/src/tiled/addremovetiles.h index 4773b2a2e9..6026627bca 100644 --- a/src/tiled/addremovetiles.h +++ b/src/tiled/addremovetiles.h @@ -26,8 +26,6 @@ namespace Tiled { class Tile; -namespace Internal { - class TilesetDocument; /** @@ -84,5 +82,4 @@ class RemoveTiles : public AddRemoveTiles { removeTiles(); } }; -} // namespace Internal } // namespace Tiled diff --git a/src/tiled/addremovetileset.cpp b/src/tiled/addremovetileset.cpp index c945739180..7cc9fdbf02 100644 --- a/src/tiled/addremovetileset.cpp +++ b/src/tiled/addremovetileset.cpp @@ -24,7 +24,6 @@ #include "mapdocument.h" using namespace Tiled; -using namespace Tiled::Internal; AddRemoveTileset::AddRemoveTileset(MapDocument *mapDocument, int index, diff --git a/src/tiled/addremovetileset.h b/src/tiled/addremovetileset.h index 608e8abeb4..b4dd72237d 100644 --- a/src/tiled/addremovetileset.h +++ b/src/tiled/addremovetileset.h @@ -27,7 +27,6 @@ #include namespace Tiled { -namespace Internal { class MapDocument; @@ -86,5 +85,4 @@ class RemoveTileset : public AddRemoveTileset { removeTileset(); } }; -} // namespace Internal } // namespace Tiled diff --git a/src/tiled/addremovewangset.cpp b/src/tiled/addremovewangset.cpp index d9a190a789..8c1d69694a 100644 --- a/src/tiled/addremovewangset.cpp +++ b/src/tiled/addremovewangset.cpp @@ -28,7 +28,6 @@ #include using namespace Tiled; -using namespace Internal; AddRemoveWangSet::AddRemoveWangSet(TilesetDocument *tilesetDocument, int index, diff --git a/src/tiled/addremovewangset.h b/src/tiled/addremovewangset.h index e8bca08591..cbb2c04801 100644 --- a/src/tiled/addremovewangset.h +++ b/src/tiled/addremovewangset.h @@ -26,9 +26,6 @@ namespace Tiled { class WangSet; class Tileset; - -namespace Internal { - class TilesetDocument; class AddRemoveWangSet : public QUndoCommand @@ -67,5 +64,4 @@ class RemoveWangSet : public AddRemoveWangSet void redo() override { removeWangSet(); } }; -} // namespace internal -} // namespace tiled +} // namespace Tiled diff --git a/src/tiled/adjusttileindexes.cpp b/src/tiled/adjusttileindexes.cpp index 1fce6a7184..82fcf0c54f 100644 --- a/src/tiled/adjusttileindexes.cpp +++ b/src/tiled/adjusttileindexes.cpp @@ -42,7 +42,6 @@ #include namespace Tiled { -namespace Internal { AdjustTileIndexes::AdjustTileIndexes(MapDocument *mapDocument, const Tileset &tileset) @@ -316,5 +315,4 @@ AdjustTileMetaData::AdjustTileMetaData(TilesetDocument *tilesetDocument) new ChangeTileTerrain(tilesetDocument, terrainChanges, this); } -} // namespace Internal } // namespace Tiled diff --git a/src/tiled/adjusttileindexes.h b/src/tiled/adjusttileindexes.h index 9373045cf1..abf80104cd 100644 --- a/src/tiled/adjusttileindexes.h +++ b/src/tiled/adjusttileindexes.h @@ -26,8 +26,6 @@ namespace Tiled { class Tileset; -namespace Internal { - class MapDocument; class TilesetDocument; @@ -51,5 +49,4 @@ class AdjustTileMetaData : public QUndoCommand AdjustTileMetaData(TilesetDocument *tilesetDocument); }; -} // namespace Internal } // namespace Tiled diff --git a/src/tiled/automapper.cpp b/src/tiled/automapper.cpp index f9e764d59c..77796cbe9e 100644 --- a/src/tiled/automapper.cpp +++ b/src/tiled/automapper.cpp @@ -41,7 +41,6 @@ #include "qtcompat_p.h" using namespace Tiled; -using namespace Tiled::Internal; /* * About the order of the methods in this file. diff --git a/src/tiled/automapper.h b/src/tiled/automapper.h index dcf6daeb59..993803d751 100644 --- a/src/tiled/automapper.h +++ b/src/tiled/automapper.h @@ -37,8 +37,6 @@ class MapObject; class ObjectGroup; class TileLayer; -namespace Internal { - class MapDocument; struct InputLayer @@ -374,5 +372,4 @@ class AutoMapper : public QObject QString mWarning; }; -} // namespace Internal } // namespace Tiled diff --git a/src/tiled/automapperwrapper.cpp b/src/tiled/automapperwrapper.cpp index 767f9120b6..f579f4333b 100644 --- a/src/tiled/automapperwrapper.cpp +++ b/src/tiled/automapperwrapper.cpp @@ -28,7 +28,6 @@ #include "qtcompat_p.h" using namespace Tiled; -using namespace Tiled::Internal; AutoMapperWrapper::AutoMapperWrapper(MapDocument *mapDocument, QVector autoMapper, diff --git a/src/tiled/automapperwrapper.h b/src/tiled/automapperwrapper.h index 6311ab6168..297d98e208 100644 --- a/src/tiled/automapperwrapper.h +++ b/src/tiled/automapperwrapper.h @@ -27,7 +27,6 @@ namespace Tiled { -namespace Internal { class MapDocument; @@ -56,5 +55,4 @@ class AutoMapperWrapper : public QUndoCommand QVector mLayersBefore; }; -} // namespace Internal } // namespace Tiled diff --git a/src/tiled/automappingmanager.cpp b/src/tiled/automappingmanager.cpp index 55882ab5f1..b26fc4c8c6 100644 --- a/src/tiled/automappingmanager.cpp +++ b/src/tiled/automappingmanager.cpp @@ -36,7 +36,6 @@ #include using namespace Tiled; -using namespace Tiled::Internal; AutomappingManager::AutomappingManager(QObject *parent) : QObject(parent) diff --git a/src/tiled/automappingmanager.h b/src/tiled/automappingmanager.h index 41ff2fc0c5..6e454437fb 100644 --- a/src/tiled/automappingmanager.h +++ b/src/tiled/automappingmanager.h @@ -30,8 +30,6 @@ namespace Tiled { class Layer; -namespace Internal { - class AutoMapper; class MapDocument; @@ -142,5 +140,4 @@ private slots: QString rulesFileName() const; }; -} // namespace Internal } // namespace Tiled diff --git a/src/tiled/automappingutils.cpp b/src/tiled/automappingutils.cpp index 5723a728bd..425ac13f0c 100644 --- a/src/tiled/automappingutils.cpp +++ b/src/tiled/automappingutils.cpp @@ -30,7 +30,6 @@ #include namespace Tiled { -namespace Internal { void eraseRegionObjectGroup(MapDocument *mapDocument, ObjectGroup *layer, @@ -96,5 +95,4 @@ const QList objectsInRegion(const ObjectGroup *layer, return ret; } -} // namespace Internal } // namespace Tiled diff --git a/src/tiled/automappingutils.h b/src/tiled/automappingutils.h index f8c396763c..5bac0363f3 100644 --- a/src/tiled/automappingutils.h +++ b/src/tiled/automappingutils.h @@ -27,8 +27,6 @@ namespace Tiled { class MapObject; class ObjectGroup; -namespace Internal { - class MapDocument; const QList objectsInRegion(const ObjectGroup *layer, @@ -40,5 +38,4 @@ void eraseRegionObjectGroup(MapDocument *mapDocument, QRegion tileRegionOfObjectGroup(const ObjectGroup *layer); -} // namespace Internal } // namespace Tiled diff --git a/src/tiled/brokenlinks.cpp b/src/tiled/brokenlinks.cpp index a1b525dce1..29c31170c1 100644 --- a/src/tiled/brokenlinks.cpp +++ b/src/tiled/brokenlinks.cpp @@ -54,7 +54,6 @@ #include namespace Tiled { -namespace Internal { QString BrokenLink::filePath() const { @@ -484,15 +483,15 @@ void BrokenLinksWidget::selectionChanged() const BrokenLink &link = mBrokenLinksModel->brokenLink(firstIndex.row()); switch (link.type) { - case Tiled::Internal::MapTilesetReference: - case Tiled::Internal::ObjectTemplateReference: + case MapTilesetReference: + case ObjectTemplateReference: mLocateButton->setText(tr("Locate File...")); break; - case Tiled::Internal::ObjectTemplateTilesetReference: + case ObjectTemplateTilesetReference: mLocateButton->setText(tr("Open Template...")); break; - case Tiled::Internal::TilesetTileImageSource: - case Tiled::Internal::TilesetImageSource: + case TilesetTileImageSource: + case TilesetImageSource: if (isTileset) mLocateButton->setText(tr("Locate File...")); else @@ -673,7 +672,7 @@ bool BrokenLinksWidget::tryFixLink(const BrokenLink &link, const QString &newFil SharedTileset newTileset = TilesetManager::instance()->findTileset(newFilePath); if (!newTileset || newTileset->status() == LoadingError) { QString error; - newTileset = Tiled::readTileset(newFilePath, &error); + newTileset = readTileset(newFilePath, &error); if (!newTileset) { QMessageBox::critical(window(), tr("Error Reading Tileset"), error); @@ -708,5 +707,4 @@ bool BrokenLinksWidget::tryFixLink(const BrokenLink &link, const QString &newFil return true; } -} // namespace Internal } // namespace Tiled diff --git a/src/tiled/brokenlinks.h b/src/tiled/brokenlinks.h index 6794bc558c..fc8488c554 100644 --- a/src/tiled/brokenlinks.h +++ b/src/tiled/brokenlinks.h @@ -38,8 +38,6 @@ class Tile; class Tileset; class ObjectTemplate; -namespace Internal { - class Document; class TilesetDocument; @@ -153,5 +151,4 @@ private slots: QAbstractButton *mLocateButton; }; -} // namespace Internal } // namespace Tiled diff --git a/src/tiled/brushitem.cpp b/src/tiled/brushitem.cpp index 83272028ac..27e3dc4188 100644 --- a/src/tiled/brushitem.cpp +++ b/src/tiled/brushitem.cpp @@ -33,7 +33,6 @@ #include using namespace Tiled; -using namespace Tiled::Internal; BrushItem::BrushItem(): mMapDocument(nullptr) diff --git a/src/tiled/brushitem.h b/src/tiled/brushitem.h index 0cd39cc893..e05e7c57c0 100644 --- a/src/tiled/brushitem.h +++ b/src/tiled/brushitem.h @@ -27,7 +27,6 @@ #include namespace Tiled { -namespace Internal { class MapDocument; @@ -102,5 +101,4 @@ inline const QRegion &BrushItem::tileRegion() const return mRegion; } -} // namespace Internal } // namespace Tiled diff --git a/src/tiled/bucketfilltool.cpp b/src/tiled/bucketfilltool.cpp index 7d63842c21..4040ba49b2 100644 --- a/src/tiled/bucketfilltool.cpp +++ b/src/tiled/bucketfilltool.cpp @@ -38,7 +38,6 @@ #include using namespace Tiled; -using namespace Tiled::Internal; BucketFillTool::BucketFillTool(QObject *parent) : AbstractTileFillTool(tr("Bucket Fill Tool"), diff --git a/src/tiled/bucketfilltool.h b/src/tiled/bucketfilltool.h index 04b5138618..64ee324720 100644 --- a/src/tiled/bucketfilltool.h +++ b/src/tiled/bucketfilltool.h @@ -30,8 +30,6 @@ namespace Tiled { class WangSet; -namespace Internal { - class MapDocument; class StampActions; class WangFiller; @@ -77,5 +75,4 @@ private slots: void makeConnections(); }; -} // namespace Internal } // namespace Tiled diff --git a/src/tiled/capturestamphelper.cpp b/src/tiled/capturestamphelper.cpp index d0cc02c10c..e013774760 100644 --- a/src/tiled/capturestamphelper.cpp +++ b/src/tiled/capturestamphelper.cpp @@ -27,7 +27,6 @@ #include namespace Tiled { -namespace Internal { CaptureStampHelper::CaptureStampHelper() : mActive(false) @@ -108,5 +107,4 @@ QRect CaptureStampHelper::capturedArea(QPoint tilePosition) const return captured; } -} // namespace Internal } // namespace Tiled diff --git a/src/tiled/capturestamphelper.h b/src/tiled/capturestamphelper.h index 568ca0e994..ca49da761c 100644 --- a/src/tiled/capturestamphelper.h +++ b/src/tiled/capturestamphelper.h @@ -26,7 +26,6 @@ #include namespace Tiled { -namespace Internal { class MapDocument; @@ -48,7 +47,6 @@ class CaptureStampHelper bool mActive; }; -} // namespace Internal } // namespace Tiled #endif // CAPTURESTAMPHELPER_H diff --git a/src/tiled/changeimagelayerposition.cpp b/src/tiled/changeimagelayerposition.cpp index 210a4f5cd4..d18210b5e4 100644 --- a/src/tiled/changeimagelayerposition.cpp +++ b/src/tiled/changeimagelayerposition.cpp @@ -26,7 +26,6 @@ #include using namespace Tiled; -using namespace Tiled::Internal; ChangeImageLayerPosition::ChangeImageLayerPosition( MapDocument *mapDocument, diff --git a/src/tiled/changeimagelayerposition.h b/src/tiled/changeimagelayerposition.h index d929b22917..cc8527d82d 100644 --- a/src/tiled/changeimagelayerposition.h +++ b/src/tiled/changeimagelayerposition.h @@ -27,8 +27,6 @@ namespace Tiled { class ImageLayer; -namespace Internal { - class MapDocument; class ChangeImageLayerPosition : public QUndoCommand @@ -55,5 +53,4 @@ class ChangeImageLayerPosition : public QUndoCommand const QPoint mRedoPos; }; -} // namespace Internal } // namespace Tiled diff --git a/src/tiled/changeimagelayerproperties.cpp b/src/tiled/changeimagelayerproperties.cpp index d97ac99c9c..d9ca3ca871 100644 --- a/src/tiled/changeimagelayerproperties.cpp +++ b/src/tiled/changeimagelayerproperties.cpp @@ -28,7 +28,6 @@ #include using namespace Tiled; -using namespace Tiled::Internal; ChangeImageLayerProperties::ChangeImageLayerProperties( MapDocument *mapDocument, diff --git a/src/tiled/changeimagelayerproperties.h b/src/tiled/changeimagelayerproperties.h index 134fcb1418..394545a4fb 100644 --- a/src/tiled/changeimagelayerproperties.h +++ b/src/tiled/changeimagelayerproperties.h @@ -30,8 +30,6 @@ namespace Tiled { class ImageLayer; -namespace Internal { - class MapDocument; class ChangeImageLayerProperties : public QUndoCommand @@ -62,5 +60,4 @@ class ChangeImageLayerProperties : public QUndoCommand const QUrl mRedoSource; }; -} // namespace Internal } // namespace Tiled diff --git a/src/tiled/changelayer.cpp b/src/tiled/changelayer.cpp index 6a88e4270d..ec554867f7 100644 --- a/src/tiled/changelayer.cpp +++ b/src/tiled/changelayer.cpp @@ -28,7 +28,6 @@ #include namespace Tiled { -namespace Internal { SetLayerVisible::SetLayerVisible(MapDocument *mapDocument, Layer *layer, @@ -124,5 +123,4 @@ void SetLayerOffset::setOffset(const QPointF &offset) } -} // namespace Internal } // namespace Tiled diff --git a/src/tiled/changelayer.h b/src/tiled/changelayer.h index aeea70d1df..4f8f4fa849 100644 --- a/src/tiled/changelayer.h +++ b/src/tiled/changelayer.h @@ -29,8 +29,6 @@ namespace Tiled { class Layer; -namespace Internal { - class MapDocument; /** @@ -127,5 +125,4 @@ class SetLayerOffset : public QUndoCommand QPointF mNewOffset; }; -} // namespace Internal } // namespace Tiled diff --git a/src/tiled/changemapobject.cpp b/src/tiled/changemapobject.cpp index 9bb7589376..0cf4b596b0 100644 --- a/src/tiled/changemapobject.cpp +++ b/src/tiled/changemapobject.cpp @@ -29,7 +29,6 @@ #include "qtcompat_p.h" using namespace Tiled; -using namespace Tiled::Internal; ChangeMapObject::ChangeMapObject(MapDocument *mapDocument, MapObject *mapObject, diff --git a/src/tiled/changemapobject.h b/src/tiled/changemapobject.h index d108a77035..1acb373af0 100644 --- a/src/tiled/changemapobject.h +++ b/src/tiled/changemapobject.h @@ -32,8 +32,6 @@ class MapObject; class ObjectTemplate; class Tile; -namespace Internal { - class MapDocument; class MapObjectModel; @@ -175,5 +173,4 @@ class ReplaceObjectsWithTemplate : public QUndoCommand ObjectTemplate *mObjectTemplate; }; -} // namespace Internal } // namespace Tiled diff --git a/src/tiled/changemapobjectsorder.cpp b/src/tiled/changemapobjectsorder.cpp index 399e18dfc1..95d6b09fe0 100644 --- a/src/tiled/changemapobjectsorder.cpp +++ b/src/tiled/changemapobjectsorder.cpp @@ -27,7 +27,6 @@ #include using namespace Tiled; -using namespace Tiled::Internal; ChangeMapObjectsOrder::ChangeMapObjectsOrder(MapDocument *mapDocument, ObjectGroup *objectGroup, diff --git a/src/tiled/changemapobjectsorder.h b/src/tiled/changemapobjectsorder.h index 791f0e3812..44a3c3a4f0 100644 --- a/src/tiled/changemapobjectsorder.h +++ b/src/tiled/changemapobjectsorder.h @@ -26,8 +26,6 @@ namespace Tiled { class ObjectGroup; -namespace Internal { - class MapDocument; class ChangeMapObjectsOrder : public QUndoCommand @@ -51,5 +49,4 @@ class ChangeMapObjectsOrder : public QUndoCommand int mCount; }; -} // namespace Internal } // namespace Tiled diff --git a/src/tiled/changemapproperty.cpp b/src/tiled/changemapproperty.cpp index 65a100ee09..85a06ce195 100644 --- a/src/tiled/changemapproperty.cpp +++ b/src/tiled/changemapproperty.cpp @@ -28,7 +28,6 @@ #include using namespace Tiled; -using namespace Tiled::Internal; ChangeMapProperty::ChangeMapProperty(MapDocument *mapDocument, ChangeMapProperty::Property property, diff --git a/src/tiled/changemapproperty.h b/src/tiled/changemapproperty.h index 3f3c18557b..84e3bcbd6b 100644 --- a/src/tiled/changemapproperty.h +++ b/src/tiled/changemapproperty.h @@ -26,7 +26,6 @@ #include namespace Tiled { -namespace Internal { class MapDocument; @@ -123,5 +122,4 @@ class ChangeMapProperty : public QUndoCommand }; }; -} // namespace Internal } // namespace Tiled diff --git a/src/tiled/changeobjectgroupproperties.cpp b/src/tiled/changeobjectgroupproperties.cpp index 7a344819a5..1769850878 100644 --- a/src/tiled/changeobjectgroupproperties.cpp +++ b/src/tiled/changeobjectgroupproperties.cpp @@ -28,7 +28,6 @@ #include using namespace Tiled; -using namespace Tiled::Internal; ChangeObjectGroupProperties::ChangeObjectGroupProperties( MapDocument *mapDocument, diff --git a/src/tiled/changeobjectgroupproperties.h b/src/tiled/changeobjectgroupproperties.h index 15af683ee2..f65165b83c 100644 --- a/src/tiled/changeobjectgroupproperties.h +++ b/src/tiled/changeobjectgroupproperties.h @@ -27,7 +27,6 @@ #include namespace Tiled { -namespace Internal { class MapDocument; @@ -58,5 +57,4 @@ class ChangeObjectGroupProperties : public QUndoCommand ObjectGroup::DrawOrder mRedoDrawOrder; }; -} // namespace Internal } // namespace Tiled diff --git a/src/tiled/changepolygon.cpp b/src/tiled/changepolygon.cpp index c724a627f9..1f3758e40b 100644 --- a/src/tiled/changepolygon.cpp +++ b/src/tiled/changepolygon.cpp @@ -28,7 +28,6 @@ #include using namespace Tiled; -using namespace Tiled::Internal; ChangePolygon::ChangePolygon(MapDocument *mapDocument, MapObject *mapObject, diff --git a/src/tiled/changepolygon.h b/src/tiled/changepolygon.h index 79ec997587..b4e83e70b7 100644 --- a/src/tiled/changepolygon.h +++ b/src/tiled/changepolygon.h @@ -27,8 +27,6 @@ namespace Tiled { class MapObject; -namespace Internal { - class MapDocument; /** @@ -104,5 +102,4 @@ class SplitPolyline : public QUndoCommand bool mOwnsSecondPolyline; }; -} // namespace Internal } // namespace Tiled diff --git a/src/tiled/changeproperties.cpp b/src/tiled/changeproperties.cpp index 62bc6a4d4f..95215da5e7 100644 --- a/src/tiled/changeproperties.cpp +++ b/src/tiled/changeproperties.cpp @@ -25,7 +25,6 @@ #include using namespace Tiled; -using namespace Tiled::Internal; ChangeProperties::ChangeProperties(Document *document, const QString &kind, diff --git a/src/tiled/changeproperties.h b/src/tiled/changeproperties.h index 7efe26fa1a..d60fc70749 100644 --- a/src/tiled/changeproperties.h +++ b/src/tiled/changeproperties.h @@ -27,7 +27,6 @@ #include namespace Tiled { -namespace Internal { class Document; @@ -134,5 +133,4 @@ class RenameProperty : public QUndoCommand const QString &newName); }; -} // namespace Internal } // namespace Tiled diff --git a/src/tiled/changeselectedarea.cpp b/src/tiled/changeselectedarea.cpp index 7b8d19ceef..56d8cf6774 100644 --- a/src/tiled/changeselectedarea.cpp +++ b/src/tiled/changeselectedarea.cpp @@ -24,7 +24,7 @@ #include -using namespace Tiled::Internal; +using namespace Tiled; ChangeSelectedArea::ChangeSelectedArea(MapDocument *mapDocument, const QRegion &newSelection, diff --git a/src/tiled/changeselectedarea.h b/src/tiled/changeselectedarea.h index 536e86afee..e89c1b2f26 100644 --- a/src/tiled/changeselectedarea.h +++ b/src/tiled/changeselectedarea.h @@ -24,7 +24,6 @@ #include namespace Tiled { -namespace Internal { class MapDocument; @@ -49,5 +48,4 @@ class ChangeSelectedArea: public QUndoCommand QRegion mSelection; }; -} // namespace Internal } // namespace Tiled diff --git a/src/tiled/changetile.cpp b/src/tiled/changetile.cpp index 5bac9d7ac5..c8e54f3858 100644 --- a/src/tiled/changetile.cpp +++ b/src/tiled/changetile.cpp @@ -26,7 +26,6 @@ #include namespace Tiled { -namespace Internal { ChangeTileType::ChangeTileType(TilesetDocument *tilesetDocument, const QList &tiles, @@ -49,5 +48,4 @@ void ChangeTileType::swap() } } -} // namespace Internal } // namespace Tiled diff --git a/src/tiled/changetile.h b/src/tiled/changetile.h index 9df2f7da43..c1d32ce6e1 100644 --- a/src/tiled/changetile.h +++ b/src/tiled/changetile.h @@ -27,8 +27,6 @@ namespace Tiled { class Tile; -namespace Internal { - class TilesetDocument; class ChangeTileType : public QUndoCommand @@ -52,5 +50,4 @@ class ChangeTileType : public QUndoCommand QVector mTypes; }; -} // namespace Internal } // namespace Tiled diff --git a/src/tiled/changetileanimation.cpp b/src/tiled/changetileanimation.cpp index 4a91c423fc..2905c00af8 100644 --- a/src/tiled/changetileanimation.cpp +++ b/src/tiled/changetileanimation.cpp @@ -26,7 +26,6 @@ #include namespace Tiled { -namespace Internal { ChangeTileAnimation::ChangeTileAnimation(TilesetDocument *document, Tile *tile, @@ -51,5 +50,4 @@ void ChangeTileAnimation::swap() emit mTilesetDocument->tileAnimationChanged(mTile); } -} // namespace Internal } // namespace Tiled diff --git a/src/tiled/changetileanimation.h b/src/tiled/changetileanimation.h index c1f3486741..df316f12a4 100644 --- a/src/tiled/changetileanimation.h +++ b/src/tiled/changetileanimation.h @@ -25,7 +25,6 @@ #include namespace Tiled { -namespace Internal { class TilesetDocument; @@ -48,5 +47,4 @@ class ChangeTileAnimation : public QUndoCommand QVector mFrames; }; -} // namespace Internal } // namespace Tiled diff --git a/src/tiled/changetileimagesource.cpp b/src/tiled/changetileimagesource.cpp index c361b53173..32666b18d6 100644 --- a/src/tiled/changetileimagesource.cpp +++ b/src/tiled/changetileimagesource.cpp @@ -27,7 +27,6 @@ #include namespace Tiled { -namespace Internal { ChangeTileImageSource::ChangeTileImageSource(TilesetDocument *tilesetDocument, Tile *tile, @@ -49,5 +48,4 @@ void ChangeTileImageSource::apply(const QUrl &imageSource) imageSource); } -} // namespace Internal } // namespace Tiled diff --git a/src/tiled/changetileimagesource.h b/src/tiled/changetileimagesource.h index dec3f8ab95..b5316c7a4d 100644 --- a/src/tiled/changetileimagesource.h +++ b/src/tiled/changetileimagesource.h @@ -27,8 +27,6 @@ namespace Tiled { class Tile; -namespace Internal { - class TilesetDocument; class ChangeTileImageSource : public QUndoCommand @@ -50,5 +48,4 @@ class ChangeTileImageSource : public QUndoCommand QUrl mNewImageSource; }; -} // namespace Internal } // namespace Tiled diff --git a/src/tiled/changetileobjectgroup.cpp b/src/tiled/changetileobjectgroup.cpp index 64980508e9..3cb5cab5ec 100644 --- a/src/tiled/changetileobjectgroup.cpp +++ b/src/tiled/changetileobjectgroup.cpp @@ -27,7 +27,6 @@ #include namespace Tiled { -namespace Internal { ChangeTileObjectGroup::ChangeTileObjectGroup(TilesetDocument *tilesetDocument, Tile *tile, @@ -48,5 +47,4 @@ void ChangeTileObjectGroup::swap() emit mTilesetDocument->tileObjectGroupChanged(mTile); } -} // namespace Internal } // namespace Tiled diff --git a/src/tiled/changetileobjectgroup.h b/src/tiled/changetileobjectgroup.h index 37624e7a48..69db696064 100644 --- a/src/tiled/changetileobjectgroup.h +++ b/src/tiled/changetileobjectgroup.h @@ -29,8 +29,6 @@ namespace Tiled { class ObjectGroup; class Tile; -namespace Internal { - class TilesetDocument; class ChangeTileObjectGroup : public QUndoCommand @@ -56,5 +54,4 @@ class ChangeTileObjectGroup : public QUndoCommand std::unique_ptr mObjectGroup; }; -} // namespace Internal } // namespace Tiled diff --git a/src/tiled/changetileprobability.cpp b/src/tiled/changetileprobability.cpp index cbf5278204..dd2f8bbdc6 100644 --- a/src/tiled/changetileprobability.cpp +++ b/src/tiled/changetileprobability.cpp @@ -26,7 +26,6 @@ #include namespace Tiled { -namespace Internal { ChangeTileProbability::ChangeTileProbability(TilesetDocument *tilesetDocument, const QList& tiles, @@ -66,6 +65,5 @@ void ChangeTileProbability::swap() } } -} // namespace Internal } // namespace Tiled diff --git a/src/tiled/changetileprobability.h b/src/tiled/changetileprobability.h index d389de9add..8da59938b7 100644 --- a/src/tiled/changetileprobability.h +++ b/src/tiled/changetileprobability.h @@ -26,8 +26,6 @@ namespace Tiled { class Tile; -namespace Internal { - class TilesetDocument; class ChangeTileProbability : public QUndoCommand @@ -53,5 +51,4 @@ class ChangeTileProbability : public QUndoCommand QList mProbabilities; }; -} // namespace Internal } // namespace Tiled diff --git a/src/tiled/changetileterrain.cpp b/src/tiled/changetileterrain.cpp index 571891f0b1..02e63d6533 100644 --- a/src/tiled/changetileterrain.cpp +++ b/src/tiled/changetileterrain.cpp @@ -26,7 +26,6 @@ #include namespace Tiled { -namespace Internal { ChangeTileTerrain::ChangeTileTerrain() : mTilesetDocument(nullptr) @@ -140,5 +139,4 @@ void ChangeTileTerrain::initText() "Change Tile Terrain")); } -} // namespace Internal } // namespace Tiled diff --git a/src/tiled/changetileterrain.h b/src/tiled/changetileterrain.h index e99f338e92..8d4ca7a94a 100644 --- a/src/tiled/changetileterrain.h +++ b/src/tiled/changetileterrain.h @@ -30,8 +30,6 @@ namespace Tiled { class Tile; class Tileset; -namespace Internal { - class TilesetDocument; class ChangeTileTerrain : public QUndoCommand @@ -81,5 +79,4 @@ class ChangeTileTerrain : public QUndoCommand bool mMergeable; }; -} // namespace Internal } // namespace Tiled diff --git a/src/tiled/changetilewangid.cpp b/src/tiled/changetilewangid.cpp index 8fb406042b..89930be954 100644 --- a/src/tiled/changetilewangid.cpp +++ b/src/tiled/changetilewangid.cpp @@ -26,7 +26,6 @@ #include using namespace Tiled; -using namespace Internal; ChangeTileWangId::ChangeTileWangId() : mTilesetDocument(nullptr) diff --git a/src/tiled/changetilewangid.h b/src/tiled/changetilewangid.h index 8b5236ea77..2b51479e74 100644 --- a/src/tiled/changetilewangid.h +++ b/src/tiled/changetilewangid.h @@ -26,7 +26,6 @@ #include namespace Tiled { -namespace Internal { class TilesetDocument; @@ -73,5 +72,4 @@ class ChangeTileWangId : public QUndoCommand bool mMergeable; }; -} // namespace Internal } // namespace Tiled diff --git a/src/tiled/changewangcolordata.cpp b/src/tiled/changewangcolordata.cpp index aceee3465e..cc73013f68 100644 --- a/src/tiled/changewangcolordata.cpp +++ b/src/tiled/changewangcolordata.cpp @@ -24,7 +24,6 @@ #include "tilesetdocument.h" using namespace Tiled; -using namespace Internal; ChangeWangColorName::ChangeWangColorName(TilesetDocument *tilesetDocument, WangColor *wangColor, diff --git a/src/tiled/changewangcolordata.h b/src/tiled/changewangcolordata.h index 2b13d802a6..4b62c82a59 100644 --- a/src/tiled/changewangcolordata.h +++ b/src/tiled/changewangcolordata.h @@ -28,8 +28,6 @@ namespace Tiled { class WangColor; -namespace Internal { - class TilesetDocument; class ChangeWangColorName : public QUndoCommand @@ -101,5 +99,4 @@ class ChangeWangColorProbability : public QUndoCommand qreal mNewProbability; }; -} // namespace Internal } // namespace Tiled diff --git a/src/tiled/changewangsetdata.cpp b/src/tiled/changewangsetdata.cpp index f004195d3d..22bf6e673c 100644 --- a/src/tiled/changewangsetdata.cpp +++ b/src/tiled/changewangsetdata.cpp @@ -30,7 +30,6 @@ #include "qtcompat_p.h" using namespace Tiled; -using namespace Internal; ChangeWangSetEdgeCount::ChangeWangSetEdgeCount(TilesetDocument *tilesetDocument, WangSet *wangSet, diff --git a/src/tiled/changewangsetdata.h b/src/tiled/changewangsetdata.h index 59457a2d94..7ec7153a84 100644 --- a/src/tiled/changewangsetdata.h +++ b/src/tiled/changewangsetdata.h @@ -29,8 +29,6 @@ namespace Tiled { class Tileset; class Tile; -namespace Internal { - class TilesetDocument; class ChangeWangSetEdgeCount : public QUndoCommand @@ -119,5 +117,4 @@ class SetWangSetImage : public QUndoCommand int mNewImageTileId; }; -} // namespace Internal } // namespace Tiled diff --git a/src/tiled/clickablelabel.cpp b/src/tiled/clickablelabel.cpp index a66a7990d5..96d2427b5a 100644 --- a/src/tiled/clickablelabel.cpp +++ b/src/tiled/clickablelabel.cpp @@ -21,7 +21,6 @@ #include "clickablelabel.h" using namespace Tiled; -using namespace Tiled::Internal; ClickableLabel::ClickableLabel(QWidget *parent) : QLabel(parent) diff --git a/src/tiled/clickablelabel.h b/src/tiled/clickablelabel.h index 74e8077b1e..c21de35b6c 100644 --- a/src/tiled/clickablelabel.h +++ b/src/tiled/clickablelabel.h @@ -23,7 +23,6 @@ #include namespace Tiled { -namespace Internal { class ClickableLabel : public QLabel { @@ -44,4 +43,3 @@ class ClickableLabel : public QLabel }; } // namespace Tiled -} // namespace Internal diff --git a/src/tiled/clipboardmanager.cpp b/src/tiled/clipboardmanager.cpp index f4f6772c31..4b84842778 100644 --- a/src/tiled/clipboardmanager.cpp +++ b/src/tiled/clipboardmanager.cpp @@ -44,7 +44,6 @@ static const char * const TMX_MIMETYPE = "text/tmx"; using namespace Tiled; -using namespace Tiled::Internal; ClipboardManager *ClipboardManager::mInstance; diff --git a/src/tiled/clipboardmanager.h b/src/tiled/clipboardmanager.h index ef73e02f51..3dcf6d5605 100644 --- a/src/tiled/clipboardmanager.h +++ b/src/tiled/clipboardmanager.h @@ -31,8 +31,6 @@ namespace Tiled { class ObjectGroup; class Map; -namespace Internal { - class MapDocument; class MapView; @@ -107,5 +105,4 @@ inline bool ClipboardManager::hasProperties() const Q_DECLARE_OPERATORS_FOR_FLAGS(ClipboardManager::PasteFlags) -} // namespace Internal } // namespace Tiled diff --git a/src/tiled/colorbutton.cpp b/src/tiled/colorbutton.cpp index 8f36566ddb..791ed547cf 100644 --- a/src/tiled/colorbutton.cpp +++ b/src/tiled/colorbutton.cpp @@ -26,7 +26,6 @@ #include using namespace Tiled; -using namespace Tiled::Internal; ColorButton::ColorButton(QWidget *parent) : QToolButton(parent) diff --git a/src/tiled/colorbutton.h b/src/tiled/colorbutton.h index 82d3e8f6e4..bb55fc109b 100644 --- a/src/tiled/colorbutton.h +++ b/src/tiled/colorbutton.h @@ -24,7 +24,6 @@ #include namespace Tiled { -namespace Internal { /** * A tool button for letting the user pick a color. When clicked it shows a @@ -53,5 +52,4 @@ class ColorButton : public QToolButton QColor mColor; }; -} // namespace Internal } // namespace Tiled diff --git a/src/tiled/command.cpp b/src/tiled/command.cpp index d36109b0ca..f08aa72a4f 100644 --- a/src/tiled/command.cpp +++ b/src/tiled/command.cpp @@ -31,7 +31,6 @@ #include using namespace Tiled; -using namespace Tiled::Internal; QString Command::finalWorkingDirectory() const { diff --git a/src/tiled/command.h b/src/tiled/command.h index a023c93cb5..5c40fc23f3 100644 --- a/src/tiled/command.h +++ b/src/tiled/command.h @@ -30,7 +30,6 @@ #endif namespace Tiled { -namespace Internal { struct Command { @@ -110,5 +109,4 @@ private slots: #endif }; -} // namespace Internal } // namespace Tiled diff --git a/src/tiled/commandbutton.cpp b/src/tiled/commandbutton.cpp index 30e188e677..eff4fddcfe 100644 --- a/src/tiled/commandbutton.cpp +++ b/src/tiled/commandbutton.cpp @@ -30,7 +30,6 @@ using namespace Tiled; using namespace Tiled::Utils; -using namespace Tiled::Internal; CommandButton::CommandButton(QWidget *parent) : QToolButton(parent) diff --git a/src/tiled/commandbutton.h b/src/tiled/commandbutton.h index 0605ddf0ea..9115ba8511 100644 --- a/src/tiled/commandbutton.h +++ b/src/tiled/commandbutton.h @@ -25,7 +25,6 @@ class QMenu; namespace Tiled { -namespace Internal { class MainWindow; class DocumentManager; @@ -50,5 +49,4 @@ private slots: QMenu *mMenu; }; -} // namespace Internal } // namespace Tiled diff --git a/src/tiled/commanddatamodel.cpp b/src/tiled/commanddatamodel.cpp index a7742b3bfc..d7f5d51b42 100644 --- a/src/tiled/commanddatamodel.cpp +++ b/src/tiled/commanddatamodel.cpp @@ -27,7 +27,6 @@ #include "qtcompat_p.h" using namespace Tiled; -using namespace Tiled::Internal; static const char *commandMimeType = "application/x-tiled-commandptr"; diff --git a/src/tiled/commanddatamodel.h b/src/tiled/commanddatamodel.h index 2b3d470ad6..5fa5dbce51 100644 --- a/src/tiled/commanddatamodel.h +++ b/src/tiled/commanddatamodel.h @@ -28,7 +28,6 @@ class QMenu; namespace Tiled { -namespace Internal { class CommandDataModel : public QAbstractTableModel { @@ -175,5 +174,4 @@ public slots: QList mCommands; }; -} // namespace Internal } // namespace Tiled diff --git a/src/tiled/commanddialog.cpp b/src/tiled/commanddialog.cpp index b22360b1cc..d49666c9fa 100644 --- a/src/tiled/commanddialog.cpp +++ b/src/tiled/commanddialog.cpp @@ -33,7 +33,6 @@ #include using namespace Tiled; -using namespace Tiled::Internal; CommandDialog::CommandDialog(QWidget *parent) : QDialog(parent) diff --git a/src/tiled/commanddialog.h b/src/tiled/commanddialog.h index a7bc6f2be8..86ab42b78e 100644 --- a/src/tiled/commanddialog.h +++ b/src/tiled/commanddialog.h @@ -28,7 +28,6 @@ class CommandDialog; } namespace Tiled { -namespace Internal { class CommandDataModel; @@ -101,5 +100,4 @@ private slots: CommandDataModel *mModel; }; -} // namespace Internal } // namespace Tiled diff --git a/src/tiled/commanddialog.ui b/src/tiled/commanddialog.ui index dcb0b1051e..215047f7ab 100644 --- a/src/tiled/commanddialog.ui +++ b/src/tiled/commanddialog.ui @@ -24,7 +24,7 @@ - + 0 @@ -197,7 +197,7 @@ - Tiled::Internal::CommandTreeView + Tiled::CommandTreeView QTreeView
commanddialog.h
diff --git a/src/tiled/commandlineparser.cpp b/src/tiled/commandlineparser.cpp index e43fb7850b..880f509f92 100644 --- a/src/tiled/commandlineparser.cpp +++ b/src/tiled/commandlineparser.cpp @@ -27,7 +27,6 @@ #include "qtcompat_p.h" using namespace Tiled; -using namespace Tiled::Internal; CommandLineParser::CommandLineParser() : mLongestArgument(0) diff --git a/src/tiled/commandlineparser.h b/src/tiled/commandlineparser.h index e32319f483..fa7bb89fa1 100644 --- a/src/tiled/commandlineparser.h +++ b/src/tiled/commandlineparser.h @@ -26,7 +26,6 @@ #include namespace Tiled { -namespace Internal { /** * C-style callback function taking an arbitrary data pointer. @@ -145,5 +144,4 @@ class CommandLineParser bool mShowHelp; }; -} // namespace Internal } // namespace Tiled diff --git a/src/tiled/commandmanager.cpp b/src/tiled/commandmanager.cpp index 442d990c8e..6bb5cc1d37 100644 --- a/src/tiled/commandmanager.cpp +++ b/src/tiled/commandmanager.cpp @@ -32,7 +32,6 @@ #include namespace Tiled { -namespace Internal { CommandManager *CommandManager::mInstance; @@ -135,5 +134,4 @@ void CommandManager::retranslateUi() mEditCommands->setText(tr("Edit Commands...")); } -} // namespace Internal } // namespace Tiled diff --git a/src/tiled/commandmanager.h b/src/tiled/commandmanager.h index 87d63311da..b1b3d939ad 100644 --- a/src/tiled/commandmanager.h +++ b/src/tiled/commandmanager.h @@ -29,8 +29,6 @@ namespace Tiled { class LoggingInterface; -namespace Internal { - class CommandDataModel; class CommandManager : public QObject @@ -86,5 +84,4 @@ public slots: LoggingInterface *mLogger; }; -} // namespace Internal } // namespace Tiled diff --git a/src/tiled/consoledock.cpp b/src/tiled/consoledock.cpp index f3bf90cffb..a9f64c904b 100644 --- a/src/tiled/consoledock.cpp +++ b/src/tiled/consoledock.cpp @@ -30,7 +30,6 @@ #include namespace Tiled { -namespace Internal { ConsoleDock::ConsoleDock(QWidget *parent) : QDockWidget(parent) @@ -167,5 +166,4 @@ void ConsoleDock::registerOutput(LoggingInterface *output) connect(output, &LoggingInterface::error, this, &ConsoleDock::appendError); } -} // namespace Internal } // namespace Tiled diff --git a/src/tiled/consoledock.h b/src/tiled/consoledock.h index 703ddddd37..c0fa4a08f5 100644 --- a/src/tiled/consoledock.h +++ b/src/tiled/consoledock.h @@ -29,8 +29,6 @@ namespace Tiled { class LoggingInterface; -namespace Internal { - class ConsoleDock : public QDockWidget { Q_OBJECT @@ -58,5 +56,4 @@ private slots: int mHistoryPosition = 0; }; -} // namespace Internal } // namespace Tiled diff --git a/src/tiled/createellipseobjecttool.cpp b/src/tiled/createellipseobjecttool.cpp index 17b1cecf27..158aadea8c 100644 --- a/src/tiled/createellipseobjecttool.cpp +++ b/src/tiled/createellipseobjecttool.cpp @@ -24,7 +24,6 @@ #include "utils.h" using namespace Tiled; -using namespace Tiled::Internal; CreateEllipseObjectTool::CreateEllipseObjectTool(QObject *parent) : CreateScalableObjectTool(parent) diff --git a/src/tiled/createellipseobjecttool.h b/src/tiled/createellipseobjecttool.h index 7378ffeb7a..3d48861a8f 100644 --- a/src/tiled/createellipseobjecttool.h +++ b/src/tiled/createellipseobjecttool.h @@ -23,7 +23,6 @@ #include "createscalableobjecttool.h" namespace Tiled { -namespace Internal { class CreateEllipseObjectTool : public CreateScalableObjectTool { @@ -41,5 +40,4 @@ class CreateEllipseObjectTool : public CreateScalableObjectTool void languageChangedImpl(); }; -} // namespace Internal } // namespace Tiled diff --git a/src/tiled/createobjecttool.cpp b/src/tiled/createobjecttool.cpp index ad6b0bf654..43e0edab84 100644 --- a/src/tiled/createobjecttool.cpp +++ b/src/tiled/createobjecttool.cpp @@ -41,7 +41,6 @@ #include using namespace Tiled; -using namespace Tiled::Internal; CreateObjectTool::CreateObjectTool(QObject *parent) : AbstractObjectTool(QString(), diff --git a/src/tiled/createobjecttool.h b/src/tiled/createobjecttool.h index 804c060d27..ac7a52007e 100644 --- a/src/tiled/createobjecttool.h +++ b/src/tiled/createobjecttool.h @@ -28,8 +28,6 @@ namespace Tiled { class Tile; -namespace Internal { - class MapObjectItem; class ObjectGroupItem; @@ -95,5 +93,4 @@ class CreateObjectTool : public AbstractObjectTool std::unique_ptr mObjectGroupItem; }; -} // namespace Internal } // namespace Tiled diff --git a/src/tiled/createpointobjecttool.cpp b/src/tiled/createpointobjecttool.cpp index 50b87f69c9..bea8311c25 100644 --- a/src/tiled/createpointobjecttool.cpp +++ b/src/tiled/createpointobjecttool.cpp @@ -28,7 +28,6 @@ #include "utils.h" using namespace Tiled; -using namespace Tiled::Internal; CreatePointObjectTool::CreatePointObjectTool(QObject *parent) : CreateObjectTool(parent) diff --git a/src/tiled/createpointobjecttool.h b/src/tiled/createpointobjecttool.h index 128cb0bcb7..6ff691fa98 100644 --- a/src/tiled/createpointobjecttool.h +++ b/src/tiled/createpointobjecttool.h @@ -23,7 +23,6 @@ #include "createobjecttool.h" namespace Tiled { -namespace Internal { class CreatePointObjectTool : public CreateObjectTool { @@ -41,5 +40,4 @@ class CreatePointObjectTool : public CreateObjectTool void languageChangedImpl(); }; -} // namespace Internal } // namespace Tiled diff --git a/src/tiled/createpolygonobjecttool.cpp b/src/tiled/createpolygonobjecttool.cpp index 0b9ccecd74..b14f0597b1 100644 --- a/src/tiled/createpolygonobjecttool.cpp +++ b/src/tiled/createpolygonobjecttool.cpp @@ -46,7 +46,6 @@ #include "qtcompat_p.h" using namespace Tiled; -using namespace Tiled::Internal; CreatePolygonObjectTool::CreatePolygonObjectTool(QObject *parent) : CreateObjectTool(parent) diff --git a/src/tiled/createpolygonobjecttool.h b/src/tiled/createpolygonobjecttool.h index 2f4a671f4c..ac3c9a1b86 100644 --- a/src/tiled/createpolygonobjecttool.h +++ b/src/tiled/createpolygonobjecttool.h @@ -25,7 +25,6 @@ namespace Tiled { -namespace Internal { class PointHandle; @@ -101,5 +100,4 @@ private slots: PointHandle *mClickedHandle; }; -} // namespace Internal } // namespace Tiled diff --git a/src/tiled/createrectangleobjecttool.cpp b/src/tiled/createrectangleobjecttool.cpp index e70ab74e24..989b4af40f 100644 --- a/src/tiled/createrectangleobjecttool.cpp +++ b/src/tiled/createrectangleobjecttool.cpp @@ -24,7 +24,6 @@ #include "utils.h" using namespace Tiled; -using namespace Tiled::Internal; CreateRectangleObjectTool::CreateRectangleObjectTool(QObject *parent) : CreateScalableObjectTool(parent) diff --git a/src/tiled/createrectangleobjecttool.h b/src/tiled/createrectangleobjecttool.h index d68febdaeb..30bc32356e 100644 --- a/src/tiled/createrectangleobjecttool.h +++ b/src/tiled/createrectangleobjecttool.h @@ -23,7 +23,6 @@ #include "createscalableobjecttool.h" namespace Tiled { -namespace Internal { class CreateRectangleObjectTool : public CreateScalableObjectTool { @@ -41,5 +40,4 @@ class CreateRectangleObjectTool : public CreateScalableObjectTool void languageChangedImpl(); }; -} // namespace Internal } // namespace Tiled diff --git a/src/tiled/createscalableobjecttool.cpp b/src/tiled/createscalableobjecttool.cpp index 66c9063f3c..6967c3e133 100644 --- a/src/tiled/createscalableobjecttool.cpp +++ b/src/tiled/createscalableobjecttool.cpp @@ -28,7 +28,6 @@ #include "utils.h" using namespace Tiled; -using namespace Tiled::Internal; CreateScalableObjectTool::CreateScalableObjectTool(QObject *parent) : CreateObjectTool(parent) diff --git a/src/tiled/createscalableobjecttool.h b/src/tiled/createscalableobjecttool.h index 5ca72def99..89554c839b 100644 --- a/src/tiled/createscalableobjecttool.h +++ b/src/tiled/createscalableobjecttool.h @@ -23,7 +23,6 @@ #include "createobjecttool.h" namespace Tiled { -namespace Internal { class CreateScalableObjectTool : public CreateObjectTool { @@ -42,5 +41,4 @@ class CreateScalableObjectTool : public CreateObjectTool QPointF mStartPos; }; -} // namespace Internal } // namespace Tiled diff --git a/src/tiled/createtemplatetool.cpp b/src/tiled/createtemplatetool.cpp index 5cfdde58a7..b144b1723e 100644 --- a/src/tiled/createtemplatetool.cpp +++ b/src/tiled/createtemplatetool.cpp @@ -30,7 +30,6 @@ #include "utils.h" using namespace Tiled; -using namespace Tiled::Internal; CreateTemplateTool::CreateTemplateTool(QObject *parent) : CreateObjectTool(parent) diff --git a/src/tiled/createtemplatetool.h b/src/tiled/createtemplatetool.h index 8a8b86f3e1..4928f33ab8 100644 --- a/src/tiled/createtemplatetool.h +++ b/src/tiled/createtemplatetool.h @@ -27,8 +27,6 @@ namespace Tiled { class ObjectTemplate; -namespace Internal { - class CreateTemplateTool : public CreateObjectTool { Q_OBJECT @@ -45,5 +43,4 @@ class CreateTemplateTool : public CreateObjectTool void languageChangedImpl(); }; -} // namespace Internal } // namespace Tiled diff --git a/src/tiled/createtextobjecttool.cpp b/src/tiled/createtextobjecttool.cpp index b5313cc154..61407ef80c 100644 --- a/src/tiled/createtextobjecttool.cpp +++ b/src/tiled/createtextobjecttool.cpp @@ -28,7 +28,6 @@ #include "utils.h" namespace Tiled { -namespace Internal { CreateTextObjectTool::CreateTextObjectTool(QObject *parent) : CreateObjectTool(parent) @@ -78,5 +77,4 @@ MapObject *CreateTextObjectTool::createNewMapObject() return newMapObject; } -} // namespace Internal } // namespace Tiled diff --git a/src/tiled/createtextobjecttool.h b/src/tiled/createtextobjecttool.h index b511a88c36..bfab5d5ca1 100644 --- a/src/tiled/createtextobjecttool.h +++ b/src/tiled/createtextobjecttool.h @@ -23,7 +23,6 @@ #include "createobjecttool.h" namespace Tiled { -namespace Internal { class CreateTextObjectTool : public CreateObjectTool { @@ -44,5 +43,4 @@ class CreateTextObjectTool : public CreateObjectTool void languageChangedImpl(); }; -} // namespace Internal } // namespace Tiled diff --git a/src/tiled/createtileobjecttool.cpp b/src/tiled/createtileobjecttool.cpp index 76e02ad168..641ff01624 100644 --- a/src/tiled/createtileobjecttool.cpp +++ b/src/tiled/createtileobjecttool.cpp @@ -29,7 +29,6 @@ #include "utils.h" using namespace Tiled; -using namespace Tiled::Internal; CreateTileObjectTool::CreateTileObjectTool(QObject *parent) : CreateObjectTool(parent) diff --git a/src/tiled/createtileobjecttool.h b/src/tiled/createtileobjecttool.h index db477c0d10..610aac82d2 100644 --- a/src/tiled/createtileobjecttool.h +++ b/src/tiled/createtileobjecttool.h @@ -24,7 +24,6 @@ namespace Tiled { -namespace Internal { class CreateTileObjectTool : public CreateObjectTool { @@ -45,5 +44,4 @@ class CreateTileObjectTool : public CreateObjectTool void languageChangedImpl(); }; -} // namespace Internal } // namespace Tiled diff --git a/src/tiled/document.cpp b/src/tiled/document.cpp index 5af73813ef..fc1ce5ba7c 100644 --- a/src/tiled/document.cpp +++ b/src/tiled/document.cpp @@ -28,7 +28,6 @@ #include namespace Tiled { -namespace Internal { QList Document::sDocumentInstances; @@ -133,5 +132,4 @@ void Document::setChangedOnDisk(bool changedOnDisk) mChangedOnDisk = changedOnDisk; } -} // namespace Internal } // namespace Tiled diff --git a/src/tiled/document.h b/src/tiled/document.h index ef5ec969cc..840e05c9f5 100644 --- a/src/tiled/document.h +++ b/src/tiled/document.h @@ -37,8 +37,6 @@ class FileFormat; class Object; class Tile; -namespace Internal { - class EditableAsset; /** @@ -92,7 +90,7 @@ class Document : public QObject, QUndoStack *undoStack(); bool isModified() const; - Q_INVOKABLE virtual Tiled::Internal::EditableAsset *editable() = 0; + Q_INVOKABLE virtual Tiled::EditableAsset *editable() = 0; Object *currentObject() const { return mCurrentObject; } void setCurrentObject(Object *object); @@ -188,5 +186,4 @@ inline const QList &Document::documentInstances() using DocumentPtr = QSharedPointer; -} // namespace Internal } // namespace Tiled diff --git a/src/tiled/documentmanager.cpp b/src/tiled/documentmanager.cpp index 2bb34e5d9a..d2054c9606 100644 --- a/src/tiled/documentmanager.cpp +++ b/src/tiled/documentmanager.cpp @@ -63,7 +63,6 @@ #include "qtcompat_p.h" using namespace Tiled; -using namespace Tiled::Internal; DocumentManager *DocumentManager::mInstance; @@ -497,7 +496,7 @@ bool DocumentManager::saveDocument(Document *document, const QString &fileName) QString error; if (!document->save(fileName, &error)) { - QMessageBox::critical(mWidget->window(), QCoreApplication::translate("Tiled::Internal::MainWindow", "Error Saving File"), error); + QMessageBox::critical(mWidget->window(), QCoreApplication::translate("Tiled::MainWindow", "Error Saving File"), error); return false; } @@ -540,12 +539,12 @@ bool DocumentManager::saveDocumentAs(Document *document) !Utils::fileNameMatchesNameFilter(QFileInfo(fileName).fileName(), selectedFilter)) { QMessageBox messageBox(QMessageBox::Warning, - QCoreApplication::translate("Tiled::Internal::MainWindow", "Extension Mismatch"), - QCoreApplication::translate("Tiled::Internal::MainWindow", "The file extension does not match the chosen file type."), + QCoreApplication::translate("Tiled::MainWindow", "Extension Mismatch"), + QCoreApplication::translate("Tiled::MainWindow", "The file extension does not match the chosen file type."), QMessageBox::Yes | QMessageBox::No, mWidget->window()); - messageBox.setInformativeText(QCoreApplication::translate("Tiled::Internal::MainWindow", + messageBox.setInformativeText(QCoreApplication::translate("Tiled::MainWindow", "Tiled may not automatically recognize your file when loading. " "Are you sure you want to save with this extension?")); @@ -564,7 +563,7 @@ bool DocumentManager::saveDocumentAs(Document *document) FormatHelper helper(FileFormat::ReadWrite); filter = helper.filter(); - auto suggestedFileName = QCoreApplication::translate("Tiled::Internal::MainWindow", "untitled"); + auto suggestedFileName = QCoreApplication::translate("Tiled::MainWindow", "untitled"); suggestedFileName.append(QLatin1String(".tmx")); fileName = getSaveFileName(suggestedFileName); @@ -584,7 +583,7 @@ bool DocumentManager::saveDocumentAs(Document *document) auto suggestedFileName = tilesetDocument->tileset()->name().trimmed(); if (suggestedFileName.isEmpty()) - suggestedFileName = QCoreApplication::translate("Tiled::Internal::MainWindow", "untitled"); + suggestedFileName = QCoreApplication::translate("Tiled::MainWindow", "untitled"); suggestedFileName.append(QLatin1String(".tsx")); fileName = getSaveFileName(suggestedFileName); diff --git a/src/tiled/documentmanager.h b/src/tiled/documentmanager.h index 31549eea4d..cc8a6e456e 100644 --- a/src/tiled/documentmanager.h +++ b/src/tiled/documentmanager.h @@ -40,8 +40,6 @@ namespace Tiled { class FileSystemWatcher; class ObjectTemplate; -namespace Internal { - class AbstractTool; class BrokenLinksModel; class BrokenLinksWidget; @@ -254,5 +252,4 @@ inline TilesetDocumentsModel *DocumentManager::tilesetDocumentsModel() const return mTilesetDocumentsModel; } -} // namespace Tiled::Internal } // namespace Tiled diff --git a/src/tiled/editableasset.cpp b/src/tiled/editableasset.cpp index 61967305d8..3871fd891c 100644 --- a/src/tiled/editableasset.cpp +++ b/src/tiled/editableasset.cpp @@ -23,7 +23,6 @@ #include namespace Tiled { -namespace Internal { EditableAsset::EditableAsset(QObject *parent) : QObject(parent) @@ -55,5 +54,4 @@ void EditableAsset::redo() undoStack()->redo(); } -} // namespace Internal } // namespace Tiled diff --git a/src/tiled/editableasset.h b/src/tiled/editableasset.h index b60c08d0a8..3e995e9438 100644 --- a/src/tiled/editableasset.h +++ b/src/tiled/editableasset.h @@ -26,7 +26,6 @@ class QUndoCommand; class QUndoStack; namespace Tiled { -namespace Internal { class EditableAsset : public QObject { @@ -62,7 +61,6 @@ inline QUndoStack *EditableAsset::undoStack() const return mUndoStack; } -} // namespace Internal } // namespace Tiled -Q_DECLARE_METATYPE(Tiled::Internal::EditableAsset*) +Q_DECLARE_METATYPE(Tiled::EditableAsset*) diff --git a/src/tiled/editablelayer.cpp b/src/tiled/editablelayer.cpp index f358e001ed..4338e642e5 100644 --- a/src/tiled/editablelayer.cpp +++ b/src/tiled/editablelayer.cpp @@ -26,7 +26,6 @@ #include "scriptmanager.h" namespace Tiled { -namespace Internal { EditableLayer::EditableLayer(EditableMap *map, Layer *layer, QObject *parent) : QObject(parent) @@ -98,5 +97,4 @@ void EditableLayer::setOffset(QPointF offset) mLayer->setOffset(offset); } -} // namespace Internal } // namespace Tiled diff --git a/src/tiled/editablelayer.h b/src/tiled/editablelayer.h index 2d8e80327d..8922fd5a05 100644 --- a/src/tiled/editablelayer.h +++ b/src/tiled/editablelayer.h @@ -27,7 +27,6 @@ #include namespace Tiled { -namespace Internal { class EditableMap; @@ -40,7 +39,7 @@ class EditableLayer : public QObject Q_PROPERTY(bool visible READ isVisible WRITE setVisible) Q_PROPERTY(bool locked READ isLocked WRITE setLocked) Q_PROPERTY(QPointF offset READ offset WRITE setOffset) - Q_PROPERTY(Tiled::Internal::EditableMap *map READ map) + Q_PROPERTY(Tiled::EditableMap *map READ map) public: explicit EditableLayer(EditableMap *map, @@ -109,7 +108,6 @@ inline Layer *EditableLayer::layer() const return mLayer; } -} // namespace Internal } // namespace Tiled -Q_DECLARE_METATYPE(Tiled::Internal::EditableLayer*) +Q_DECLARE_METATYPE(Tiled::EditableLayer*) diff --git a/src/tiled/editablemap.cpp b/src/tiled/editablemap.cpp index ac278f371e..6e4b105230 100644 --- a/src/tiled/editablemap.cpp +++ b/src/tiled/editablemap.cpp @@ -44,7 +44,6 @@ #include "qtcompat_p.h" namespace Tiled { -namespace Internal { EditableMap::EditableMap(MapDocument *mapDocument, QObject *parent) : EditableAsset(parent) @@ -293,5 +292,4 @@ void EditableMap::editableLayerDeleted(EditableLayer *editableLayer) mEditableLayers.remove(editableLayer->layer()); } -} // namespace Internal } // namespace Tiled diff --git a/src/tiled/editablemap.h b/src/tiled/editablemap.h index b49208714f..b17c7133bc 100644 --- a/src/tiled/editablemap.h +++ b/src/tiled/editablemap.h @@ -25,7 +25,6 @@ #include "mapdocument.h" namespace Tiled { -namespace Internal { class EditableLayer; @@ -46,7 +45,7 @@ class EditableMap : public EditableAsset Q_PROPERTY(Tiled::Map::RenderOrder renderOrder READ renderOrder WRITE setRenderOrder) Q_PROPERTY(QColor backgroundColor READ backgroundColor WRITE setBackgroundColor) Q_PROPERTY(Tiled::Map::LayerDataFormat layerDataFormat READ layerDataFormat WRITE setLayerDataFormat) - Q_PROPERTY(Tiled::Internal::EditableSelectedArea *selectedArea READ selectedArea CONSTANT) + Q_PROPERTY(Tiled::EditableSelectedArea *selectedArea READ selectedArea CONSTANT) Q_PROPERTY(int layerCount READ layerCount) public: @@ -70,9 +69,9 @@ class EditableMap : public EditableAsset QColor backgroundColor() const; Map::LayerDataFormat layerDataFormat() const; int layerCount() const; - Q_INVOKABLE Tiled::Internal::EditableLayer *layerAt(int index); + Q_INVOKABLE Tiled::EditableLayer *layerAt(int index); Q_INVOKABLE void removeLayerAt(int index); - Q_INVOKABLE void insertLayerAt(int index, Tiled::Internal::EditableLayer *layer); + Q_INVOKABLE void insertLayerAt(int index, Tiled::EditableLayer *layer); void setTileWidth(int value); void setTileHeight(int value); @@ -206,7 +205,6 @@ inline EditableSelectedArea *EditableMap::selectedArea() return &mSelectedArea; } -} // namespace Internal } // namespace Tiled -Q_DECLARE_METATYPE(Tiled::Internal::EditableMap*) +Q_DECLARE_METATYPE(Tiled::EditableMap*) diff --git a/src/tiled/editableselectedarea.cpp b/src/tiled/editableselectedarea.cpp index 251d4a3927..a22e5580a2 100644 --- a/src/tiled/editableselectedarea.cpp +++ b/src/tiled/editableselectedarea.cpp @@ -26,7 +26,6 @@ #include namespace Tiled { -namespace Internal { EditableSelectedArea::EditableSelectedArea(MapDocument *mapDocument, QObject *parent) : QObject(parent) @@ -82,5 +81,4 @@ void EditableSelectedArea::set(const QRegion ®ion) } } -} // namespace Internal } // namespace Tiled diff --git a/src/tiled/editableselectedarea.h b/src/tiled/editableselectedarea.h index 493662e0da..bc0f331205 100644 --- a/src/tiled/editableselectedarea.h +++ b/src/tiled/editableselectedarea.h @@ -28,7 +28,6 @@ class QUndoCommand; namespace Tiled { -namespace Internal { class MapDocument; @@ -43,16 +42,16 @@ class EditableSelectedArea : public QObject public slots: void set(const QRect &rect); void set(const QRectF &rect); - void set(const Tiled::Internal::RegionValueType ®ion); + void set(const Tiled::RegionValueType ®ion); void add(const QRect &rect); void add(const QRectF &rect); - void add(const Tiled::Internal::RegionValueType ®ion); + void add(const Tiled::RegionValueType ®ion); void subtract(const QRect &rect); void subtract(const QRectF &rect); - void subtract(const Tiled::Internal::RegionValueType ®ion); + void subtract(const Tiled::RegionValueType ®ion); void intersect(const QRect &rect); void intersect(const QRectF &rect); - void intersect(const Tiled::Internal::RegionValueType ®ion); + void intersect(const Tiled::RegionValueType ®ion); private: void set(const QRegion ®ion); @@ -81,5 +80,4 @@ inline void EditableSelectedArea::intersect(const QRectF &rect) intersect(rect.toRect()); } -} // namespace Internal } // namespace Tiled diff --git a/src/tiled/editabletilelayer.cpp b/src/tiled/editabletilelayer.cpp index ce39fb67a3..12b1fb4835 100644 --- a/src/tiled/editabletilelayer.cpp +++ b/src/tiled/editabletilelayer.cpp @@ -21,7 +21,6 @@ #include "editabletilelayer.h" namespace Tiled { -namespace Internal { EditableTileLayer::EditableTileLayer(EditableMap *map, TileLayer *layer, @@ -40,5 +39,4 @@ Cell EditableTileLayer::cellAt(int x, int y) const return tileLayer()->cellAt(x, y); } -} // namespace Internal } // namespace Tiled diff --git a/src/tiled/editabletilelayer.h b/src/tiled/editabletilelayer.h index 919005ccdc..d581faf08b 100644 --- a/src/tiled/editabletilelayer.h +++ b/src/tiled/editabletilelayer.h @@ -25,7 +25,6 @@ #include "tilelayer.h" namespace Tiled { -namespace Internal { class EditableTileLayer : public EditableLayer { @@ -45,7 +44,7 @@ class EditableTileLayer : public EditableLayer int height() const; QSize size() const; - Q_INVOKABLE Tiled::Internal::RegionValueType region() const; + Q_INVOKABLE Tiled::RegionValueType region() const; Tiled::Cell cell() const { return Tiled::Cell(); } Q_INVOKABLE Tiled::Cell cellAt(int x, int y) const; @@ -79,7 +78,6 @@ inline TileLayer *EditableTileLayer::tileLayer() const return static_cast(layer()); } -} // namespace Internal } // namespace Tiled -Q_DECLARE_METATYPE(Tiled::Internal::EditableTileLayer*) +Q_DECLARE_METATYPE(Tiled::EditableTileLayer*) diff --git a/src/tiled/editabletileset.cpp b/src/tiled/editabletileset.cpp index 399ddc7dd6..6c767370fe 100644 --- a/src/tiled/editabletileset.cpp +++ b/src/tiled/editabletileset.cpp @@ -24,7 +24,6 @@ #include "tilesetdocument.h" namespace Tiled { -namespace Internal { EditableTileset::EditableTileset(TilesetDocument *tilesetDocument, QObject *parent) @@ -59,5 +58,4 @@ Tileset *EditableTileset::tileset() const return mTilesetDocument->tileset().data(); } -} // namespace Internal } // namespace Tiled diff --git a/src/tiled/editabletileset.h b/src/tiled/editabletileset.h index dbfe301d4a..51badd6b60 100644 --- a/src/tiled/editabletileset.h +++ b/src/tiled/editabletileset.h @@ -24,7 +24,6 @@ #include "tileset.h" namespace Tiled { -namespace Internal { class TilesetDocument; @@ -108,7 +107,6 @@ inline QColor EditableTileset::backgroundColor() const return tileset()->backgroundColor(); } -} // namespace Internal } // namespace Tiled -Q_DECLARE_METATYPE(Tiled::Internal::EditableTileset*) +Q_DECLARE_METATYPE(Tiled::EditableTileset*) diff --git a/src/tiled/editor.cpp b/src/tiled/editor.cpp index 8deb724878..de5109d7b1 100644 --- a/src/tiled/editor.cpp +++ b/src/tiled/editor.cpp @@ -21,12 +21,10 @@ #include "editor.h" namespace Tiled { -namespace Internal { Editor::Editor(QObject *parent) : QObject(parent) { } -} // namespace Internal } // namespace Tiled diff --git a/src/tiled/editor.h b/src/tiled/editor.h index 2822426c9b..79c760e05d 100644 --- a/src/tiled/editor.h +++ b/src/tiled/editor.h @@ -26,7 +26,6 @@ class QToolBar; class QDockWidget; namespace Tiled { -namespace Internal { class Document; class Zoomable; @@ -74,5 +73,4 @@ class Editor : public QObject Q_DECLARE_OPERATORS_FOR_FLAGS(Editor::StandardActions) -} // namespace Internal } // namespace Tiled diff --git a/src/tiled/editpolygontool.cpp b/src/tiled/editpolygontool.cpp index 71d3dd476b..ad8032429b 100644 --- a/src/tiled/editpolygontool.cpp +++ b/src/tiled/editpolygontool.cpp @@ -52,7 +52,6 @@ #include using namespace Tiled; -using namespace Tiled::Internal; EditPolygonTool::EditPolygonTool(QObject *parent) : AbstractObjectTool(tr("Edit Polygons"), diff --git a/src/tiled/editpolygontool.h b/src/tiled/editpolygontool.h index dec4865591..1dbe5357b4 100644 --- a/src/tiled/editpolygontool.h +++ b/src/tiled/editpolygontool.h @@ -30,7 +30,6 @@ class QGraphicsItem; namespace Tiled { -namespace Internal { class PointHandle; class SelectionRectangle; @@ -136,5 +135,4 @@ private slots: QSet mHighlightedHandles; }; -} // namespace Internal } // namespace Tiled diff --git a/src/tiled/eraser.cpp b/src/tiled/eraser.cpp index 71497c85ce..ba64d9eb60 100644 --- a/src/tiled/eraser.cpp +++ b/src/tiled/eraser.cpp @@ -29,7 +29,6 @@ #include "tilelayer.h" using namespace Tiled; -using namespace Tiled::Internal; Eraser::Eraser(QObject *parent) : AbstractTileTool(tr("Eraser"), diff --git a/src/tiled/eraser.h b/src/tiled/eraser.h index 0ab8a1b18c..6a86febffe 100644 --- a/src/tiled/eraser.h +++ b/src/tiled/eraser.h @@ -23,7 +23,6 @@ #include "abstracttiletool.h" namespace Tiled { -namespace Internal { /** * Implements a simple eraser tool. @@ -58,5 +57,4 @@ class Eraser : public AbstractTileTool QPoint mStart; }; -} // namespace Internal } // namespace Tiled diff --git a/src/tiled/erasetiles.cpp b/src/tiled/erasetiles.cpp index a29c7e543b..a4258b4e97 100644 --- a/src/tiled/erasetiles.cpp +++ b/src/tiled/erasetiles.cpp @@ -26,7 +26,6 @@ #include using namespace Tiled; -using namespace Tiled::Internal; EraseTiles::EraseTiles(MapDocument *mapDocument, TileLayer *tileLayer, diff --git a/src/tiled/erasetiles.h b/src/tiled/erasetiles.h index d8d50049c3..4643fc19c3 100644 --- a/src/tiled/erasetiles.h +++ b/src/tiled/erasetiles.h @@ -31,8 +31,6 @@ namespace Tiled { class Tile; class TileLayer; -namespace Internal { - class MapDocument; class EraseTiles : public QUndoCommand @@ -69,5 +67,4 @@ class EraseTiles : public QUndoCommand bool mMergeable; }; -} // namespace Internal } // namespace Tiled diff --git a/src/tiled/exportasimagedialog.cpp b/src/tiled/exportasimagedialog.cpp index 792757c762..419254d73e 100644 --- a/src/tiled/exportasimagedialog.cpp +++ b/src/tiled/exportasimagedialog.cpp @@ -44,7 +44,6 @@ static const char * const DRAW_GRID_KEY = "SaveAsImage/DrawGrid"; static const char * const INCLUDE_BACKGROUND_COLOR = "SaveAsImage/IncludeBackgroundColor"; using namespace Tiled; -using namespace Tiled::Internal; QString ExportAsImageDialog::mPath; diff --git a/src/tiled/exportasimagedialog.h b/src/tiled/exportasimagedialog.h index 4c599de0db..52a30597d1 100644 --- a/src/tiled/exportasimagedialog.h +++ b/src/tiled/exportasimagedialog.h @@ -27,7 +27,6 @@ class ExportAsImageDialog; } namespace Tiled { -namespace Internal { class MapDocument; @@ -64,5 +63,4 @@ private slots: static QString mPath; }; -} // namespace Internal } // namespace Tiled diff --git a/src/tiled/exporthelper.cpp b/src/tiled/exporthelper.cpp index 83b3a423a9..c85ce7f2d9 100644 --- a/src/tiled/exporthelper.cpp +++ b/src/tiled/exporthelper.cpp @@ -24,7 +24,6 @@ #include "objectgroup.h" namespace Tiled { -namespace Internal { /** * Prepares a tileset for export. @@ -142,5 +141,4 @@ void ExportHelper::resolveTypeAndProperties(MapObject *object) const object->setProperties(properties); } -} // namespace Internal } // namespace Tiled diff --git a/src/tiled/exporthelper.h b/src/tiled/exporthelper.h index b08d0911a7..02a8f74764 100644 --- a/src/tiled/exporthelper.h +++ b/src/tiled/exporthelper.h @@ -26,7 +26,6 @@ #include namespace Tiled { -namespace Internal { /** * Applies certain export options to a map and its tilesets, or to a specific @@ -50,5 +49,4 @@ class ExportHelper const Preferences::ExportOptions mOptions; }; -} // namespace Internal } // namespace Tiled diff --git a/src/tiled/filechangedwarning.cpp b/src/tiled/filechangedwarning.cpp index 6e6fbeb363..3f435c1fe0 100644 --- a/src/tiled/filechangedwarning.cpp +++ b/src/tiled/filechangedwarning.cpp @@ -27,7 +27,6 @@ #include namespace Tiled { -namespace Internal { FileChangedWarning::FileChangedWarning(QWidget *parent) : QWidget(parent) @@ -70,5 +69,4 @@ void FileChangedWarning::paintEvent(QPaintEvent *event) } -} // namespace Internal } // namespace Tiled diff --git a/src/tiled/filechangedwarning.h b/src/tiled/filechangedwarning.h index a9018ba53a..d26b699464 100644 --- a/src/tiled/filechangedwarning.h +++ b/src/tiled/filechangedwarning.h @@ -26,7 +26,6 @@ class QLabel; class QDialogButtonBox; namespace Tiled { -namespace Internal { class FileChangedWarning : public QWidget { @@ -47,5 +46,4 @@ class FileChangedWarning : public QWidget QDialogButtonBox *mButtons; }; -} // namespace Internal } // namespace Tiled diff --git a/src/tiled/fileedit.cpp b/src/tiled/fileedit.cpp index 780e4270d6..5496d4d61d 100644 --- a/src/tiled/fileedit.cpp +++ b/src/tiled/fileedit.cpp @@ -28,7 +28,6 @@ #include namespace Tiled { -namespace Internal { FileEdit::FileEdit(QWidget *parent) : QWidget(parent) @@ -133,5 +132,4 @@ void FileEdit::buttonClicked() emit fileUrlChanged(url); } -} // namespace Internal } // namespace Tiled diff --git a/src/tiled/fileedit.h b/src/tiled/fileedit.h index 0aa40b08ac..4277015c6f 100644 --- a/src/tiled/fileedit.h +++ b/src/tiled/fileedit.h @@ -27,7 +27,6 @@ class QLineEdit; namespace Tiled { -namespace Internal { /** * A widget that combines a line edit with a button to choose a file. @@ -66,5 +65,4 @@ private slots: QColor mErrorTextColor; }; -} // namespace Internal } // namespace Tiled diff --git a/src/tiled/flexiblescrollbar.cpp b/src/tiled/flexiblescrollbar.cpp index 5926edf99b..f08fbc2304 100644 --- a/src/tiled/flexiblescrollbar.cpp +++ b/src/tiled/flexiblescrollbar.cpp @@ -21,7 +21,6 @@ #include "flexiblescrollbar.h" namespace Tiled { -namespace Internal { FlexibleScrollBar::FlexibleScrollBar(Qt::Orientation orientation, QWidget *parent) : QScrollBar(orientation, parent) @@ -97,5 +96,4 @@ void FlexibleScrollBar::setOverrideRange(int min, int max) mInternalRangeChange = false; } -} // namespace Internal } // namespace Tiled diff --git a/src/tiled/flexiblescrollbar.h b/src/tiled/flexiblescrollbar.h index 1df8780fed..4435f85386 100644 --- a/src/tiled/flexiblescrollbar.h +++ b/src/tiled/flexiblescrollbar.h @@ -23,7 +23,6 @@ #include namespace Tiled { -namespace Internal { class FlexibleScrollBar : public QScrollBar { @@ -47,5 +46,4 @@ class FlexibleScrollBar : public QScrollBar bool mInternalRangeChange; }; -} // namespace Internal } // namespace Tiled diff --git a/src/tiled/flipmapobjects.cpp b/src/tiled/flipmapobjects.cpp index 7d078ae40f..7d2c23c2e1 100644 --- a/src/tiled/flipmapobjects.cpp +++ b/src/tiled/flipmapobjects.cpp @@ -28,7 +28,6 @@ #include using namespace Tiled; -using namespace Tiled::Internal; FlipMapObjects::FlipMapObjects(MapDocument *mapDocument, const QList &mapObjects, diff --git a/src/tiled/flipmapobjects.h b/src/tiled/flipmapobjects.h index 61e422588e..616bc7444d 100644 --- a/src/tiled/flipmapobjects.h +++ b/src/tiled/flipmapobjects.h @@ -26,7 +26,6 @@ #include namespace Tiled { -namespace Internal { class MapDocument; @@ -54,5 +53,4 @@ class FlipMapObjects : public QUndoCommand QVector mNewCellStates; }; -} // namespace Internal } // namespace Tiled diff --git a/src/tiled/grouplayeritem.cpp b/src/tiled/grouplayeritem.cpp index fcd14c09b9..9b423c63ef 100644 --- a/src/tiled/grouplayeritem.cpp +++ b/src/tiled/grouplayeritem.cpp @@ -21,7 +21,6 @@ #include "grouplayeritem.h" namespace Tiled { -namespace Internal { GroupLayerItem::GroupLayerItem(GroupLayer *groupLayer, QGraphicsItem *parent) : LayerItem(groupLayer, parent) @@ -41,5 +40,4 @@ void GroupLayerItem::paint(QPainter *, { } -} // namespace Internal } // namespace Tiled diff --git a/src/tiled/grouplayeritem.h b/src/tiled/grouplayeritem.h index 93c957a5d0..dacefa752c 100644 --- a/src/tiled/grouplayeritem.h +++ b/src/tiled/grouplayeritem.h @@ -25,7 +25,6 @@ #include "grouplayer.h" namespace Tiled { -namespace Internal { class GroupLayerItem : public LayerItem { @@ -46,5 +45,4 @@ inline GroupLayer *GroupLayerItem::groupLayer() const return static_cast(layer()); } -} // namespace Internal } // namespace Tiled diff --git a/src/tiled/iconcheckdelegate.cpp b/src/tiled/iconcheckdelegate.cpp index a180f20fc1..64ac120cca 100644 --- a/src/tiled/iconcheckdelegate.cpp +++ b/src/tiled/iconcheckdelegate.cpp @@ -27,7 +27,6 @@ #include using namespace Tiled; -using namespace Tiled::Internal; IconCheckDelegate::IconCheckDelegate(IconType icon, bool exclusive, diff --git a/src/tiled/iconcheckdelegate.h b/src/tiled/iconcheckdelegate.h index 27ba76894f..29f2e784ce 100644 --- a/src/tiled/iconcheckdelegate.h +++ b/src/tiled/iconcheckdelegate.h @@ -24,7 +24,6 @@ #include namespace Tiled { -namespace Internal { /** * Delegate for drawing an icon in LayerView and ObjectsView for displaying @@ -70,5 +69,4 @@ class IconCheckDelegate : public QItemDelegate bool mExclusive; }; -} // namespace Internal } // namespace Tiled diff --git a/src/tiled/id.cpp b/src/tiled/id.cpp index dc4967109e..0547fe191f 100644 --- a/src/tiled/id.cpp +++ b/src/tiled/id.cpp @@ -27,7 +27,6 @@ #include namespace Tiled { -namespace Internal { class StringHash { @@ -85,5 +84,4 @@ QByteArray Id::name() const return stringFromId.value(mId).string; } -} // namespace Internal } // namespace Tiled diff --git a/src/tiled/id.h b/src/tiled/id.h index c80b313955..7d77e22a17 100644 --- a/src/tiled/id.h +++ b/src/tiled/id.h @@ -23,7 +23,6 @@ #include namespace Tiled { -namespace Internal { class Id { @@ -47,5 +46,4 @@ inline uint qHash(Id id) Q_DECL_NOTHROW return id.mId; } -} // namespace Internal } // namespace Tiled diff --git a/src/tiled/imagecolorpickerwidget.cpp b/src/tiled/imagecolorpickerwidget.cpp index d9f9c98d76..03e8c5e623 100644 --- a/src/tiled/imagecolorpickerwidget.cpp +++ b/src/tiled/imagecolorpickerwidget.cpp @@ -28,7 +28,6 @@ #include using namespace Tiled; -using namespace Tiled::Internal; ImageColorPickerWidget::ImageColorPickerWidget(QWidget *parent) : QFrame(parent, Qt::Popup), diff --git a/src/tiled/imagecolorpickerwidget.h b/src/tiled/imagecolorpickerwidget.h index 04b5342a5a..7ae4ceac1d 100644 --- a/src/tiled/imagecolorpickerwidget.h +++ b/src/tiled/imagecolorpickerwidget.h @@ -30,7 +30,6 @@ class ImageColorPickerWidget; } namespace Tiled { -namespace Internal { /** * A popup widget for selecting a colour from an image. @@ -64,5 +63,4 @@ private slots: void onMouseRelease(QMouseEvent*); }; -} // namespace Internal } // namespace Tiled diff --git a/src/tiled/imagecolorpickerwidget.ui b/src/tiled/imagecolorpickerwidget.ui index 4b337e9590..b062c33503 100644 --- a/src/tiled/imagecolorpickerwidget.ui +++ b/src/tiled/imagecolorpickerwidget.ui @@ -48,7 +48,7 @@ 5 - + 0 @@ -119,7 +119,7 @@ - Tiled::Internal::ClickableLabel + Tiled::ClickableLabel QLabel
clickablelabel.h
diff --git a/src/tiled/imagelayeritem.cpp b/src/tiled/imagelayeritem.cpp index 2e298328f7..d2ddef5333 100644 --- a/src/tiled/imagelayeritem.cpp +++ b/src/tiled/imagelayeritem.cpp @@ -28,7 +28,6 @@ #include using namespace Tiled; -using namespace Tiled::Internal; ImageLayerItem::ImageLayerItem(ImageLayer *layer, MapDocument *mapDocument, QGraphicsItem *parent) : LayerItem(layer, parent) diff --git a/src/tiled/imagelayeritem.h b/src/tiled/imagelayeritem.h index 1b65e7aa43..49c1d4c1a9 100644 --- a/src/tiled/imagelayeritem.h +++ b/src/tiled/imagelayeritem.h @@ -26,7 +26,6 @@ #include "imagelayer.h" namespace Tiled { -namespace Internal { class MapDocument; @@ -72,5 +71,4 @@ inline ImageLayer *ImageLayerItem::imageLayer() const return static_cast(layer()); } -} // namespace Internal } // namespace Tiled diff --git a/src/tiled/languagemanager.cpp b/src/tiled/languagemanager.cpp index afdaa89bb4..0f06bf322e 100644 --- a/src/tiled/languagemanager.cpp +++ b/src/tiled/languagemanager.cpp @@ -29,7 +29,7 @@ #include #include -using namespace Tiled::Internal; +using namespace Tiled; LanguageManager *LanguageManager::mInstance; diff --git a/src/tiled/languagemanager.h b/src/tiled/languagemanager.h index 8dd5f527c7..ada2668661 100644 --- a/src/tiled/languagemanager.h +++ b/src/tiled/languagemanager.h @@ -25,7 +25,6 @@ class QTranslator; namespace Tiled { -namespace Internal { class LanguageManager { @@ -58,5 +57,4 @@ class LanguageManager static LanguageManager *mInstance; }; -} // namespace Internal } // namespace Tiled diff --git a/src/tiled/layerdock.cpp b/src/tiled/layerdock.cpp index a226868cfd..a9a8b7c416 100644 --- a/src/tiled/layerdock.cpp +++ b/src/tiled/layerdock.cpp @@ -49,7 +49,6 @@ #include using namespace Tiled; -using namespace Tiled::Internal; LayerDock::LayerDock(QWidget *parent): QDockWidget(parent), diff --git a/src/tiled/layerdock.h b/src/tiled/layerdock.h index 2d895a9f38..e346f39d8e 100644 --- a/src/tiled/layerdock.h +++ b/src/tiled/layerdock.h @@ -33,7 +33,6 @@ class QModelIndex; class QUndoStack; namespace Tiled { -namespace Internal { class LayerView; @@ -112,5 +111,4 @@ private slots: bool mUpdatingSelectedLayers; }; -} // namespace Internal } // namespace Tiled diff --git a/src/tiled/layeritem.cpp b/src/tiled/layeritem.cpp index 5fecbd11c6..ef171d5248 100644 --- a/src/tiled/layeritem.cpp +++ b/src/tiled/layeritem.cpp @@ -23,7 +23,6 @@ #include "layer.h" namespace Tiled { -namespace Internal { LayerItem::LayerItem(Layer *layer, QGraphicsItem *parent) : QGraphicsItem(parent) @@ -34,5 +33,4 @@ LayerItem::LayerItem(Layer *layer, QGraphicsItem *parent) setPos(layer->offset()); } -} // namespace Internal } // namespace Tiled diff --git a/src/tiled/layeritem.h b/src/tiled/layeritem.h index 9602a4dfc0..0d737b59d3 100644 --- a/src/tiled/layeritem.h +++ b/src/tiled/layeritem.h @@ -26,8 +26,6 @@ namespace Tiled { class Layer; -namespace Internal { - class LayerItem : public QGraphicsItem { public: @@ -39,5 +37,4 @@ class LayerItem : public QGraphicsItem Layer *mLayer; }; -} // namespace Internal } // namespace Tiled diff --git a/src/tiled/layermodel.cpp b/src/tiled/layermodel.cpp index a70c009604..207d5f1ebb 100644 --- a/src/tiled/layermodel.cpp +++ b/src/tiled/layermodel.cpp @@ -34,7 +34,6 @@ #include using namespace Tiled; -using namespace Tiled::Internal; LayerModel::LayerModel(QObject *parent): QAbstractItemModel(parent), diff --git a/src/tiled/layermodel.h b/src/tiled/layermodel.h index f1fb2f86ab..0150212a3a 100644 --- a/src/tiled/layermodel.h +++ b/src/tiled/layermodel.h @@ -29,8 +29,6 @@ class GroupLayer; class Layer; class Map; -namespace Internal { - class MapDocument; /** @@ -119,5 +117,4 @@ inline MapDocument *LayerModel::mapDocument() const return mMapDocument; } -} // namespace Internal } // namespace Tiled diff --git a/src/tiled/layeroffsettool.cpp b/src/tiled/layeroffsettool.cpp index 5ec42b23aa..95d036da9d 100644 --- a/src/tiled/layeroffsettool.cpp +++ b/src/tiled/layeroffsettool.cpp @@ -37,7 +37,6 @@ #include "qtcompat_p.h" using namespace Tiled; -using namespace Tiled::Internal; LayerOffsetTool::LayerOffsetTool(QObject *parent) : AbstractTool(tr("Offset Layers"), diff --git a/src/tiled/layeroffsettool.h b/src/tiled/layeroffsettool.h index dcead941dc..e75df936d0 100644 --- a/src/tiled/layeroffsettool.h +++ b/src/tiled/layeroffsettool.h @@ -24,7 +24,6 @@ #include "abstracttool.h" namespace Tiled { -namespace Internal { class LayerOffsetTool : public AbstractTool { @@ -71,5 +70,4 @@ protected slots: QVector mDraggingLayers; }; -} // namespace Internal } // namespace Tiled diff --git a/src/tiled/macsupport.h b/src/tiled/macsupport.h index 99187772e2..d74a77810c 100644 --- a/src/tiled/macsupport.h +++ b/src/tiled/macsupport.h @@ -33,5 +33,5 @@ class MacSupport /** * Adds fullscreen button to window for Lion. */ - static void addFullscreen(Tiled::Internal::MainWindow *window); + static void addFullscreen(Tiled::MainWindow *window); }; diff --git a/src/tiled/macsupport.mm b/src/tiled/macsupport.mm index 351c23b78e..f906159756 100644 --- a/src/tiled/macsupport.mm +++ b/src/tiled/macsupport.mm @@ -31,7 +31,7 @@ return [string respondsToSelector:@selector(linguisticTagsInRange:scheme:options:orthography:tokenRanges:)]; } -void MacSupport::addFullscreen(Tiled::Internal::MainWindow *window) +void MacSupport::addFullscreen(Tiled::MainWindow *window) { #if defined(MAC_OS_X_VERSION_10_7) && MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_7 if (isLion()) // checks if lion is running diff --git a/src/tiled/magicwandtool.cpp b/src/tiled/magicwandtool.cpp index 2b8edf393a..c74d2db878 100644 --- a/src/tiled/magicwandtool.cpp +++ b/src/tiled/magicwandtool.cpp @@ -27,7 +27,6 @@ #include "tilepainter.h" using namespace Tiled; -using namespace Tiled::Internal; MagicWandTool::MagicWandTool(QObject *parent) : AbstractTileSelectionTool(tr("Magic Wand"), diff --git a/src/tiled/magicwandtool.h b/src/tiled/magicwandtool.h index c98edb2605..c69c058169 100644 --- a/src/tiled/magicwandtool.h +++ b/src/tiled/magicwandtool.h @@ -29,7 +29,6 @@ #include "tilelayer.h" namespace Tiled { -namespace Internal { class MapDocument; @@ -49,5 +48,4 @@ class MagicWandTool : public AbstractTileSelectionTool void tilePositionChanged(const QPoint &tilePos) override; }; -} // namespace Internal } // namespace Tiled diff --git a/src/tiled/main.cpp b/src/tiled/main.cpp index 6088073f5c..186a81f9c2 100644 --- a/src/tiled/main.cpp +++ b/src/tiled/main.cpp @@ -57,7 +57,6 @@ #define AS_STRING(x) STRINGIFY(x) using namespace Tiled; -using namespace Tiled::Internal; namespace { diff --git a/src/tiled/maintoolbar.cpp b/src/tiled/maintoolbar.cpp index 96edb5abc6..e8292c6f34 100644 --- a/src/tiled/maintoolbar.cpp +++ b/src/tiled/maintoolbar.cpp @@ -32,7 +32,6 @@ #include namespace Tiled { -namespace Internal { MainToolBar::MainToolBar(QWidget *parent) : QToolBar(parent) @@ -138,5 +137,4 @@ void MainToolBar::retranslateUi() mUndoAction->setIconText(tr("Undo")); } -} // namespace Internal } // namespace Tiled diff --git a/src/tiled/maintoolbar.h b/src/tiled/maintoolbar.h index 6b44b2450b..70bb297c86 100644 --- a/src/tiled/maintoolbar.h +++ b/src/tiled/maintoolbar.h @@ -25,7 +25,6 @@ class QToolButton; namespace Tiled { -namespace Internal { class CommandButton; class Document; @@ -56,5 +55,4 @@ private slots: CommandButton *mCommandButton; }; -} // namespace Internal } // namespace Tiled diff --git a/src/tiled/mainwindow.cpp b/src/tiled/mainwindow.cpp index 8b27b980d8..36f2fb657a 100644 --- a/src/tiled/mainwindow.cpp +++ b/src/tiled/mainwindow.cpp @@ -98,7 +98,6 @@ #endif using namespace Tiled; -using namespace Tiled::Internal; using namespace Tiled::Utils; diff --git a/src/tiled/mainwindow.h b/src/tiled/mainwindow.h index cfc7298db0..1719c47c4f 100644 --- a/src/tiled/mainwindow.h +++ b/src/tiled/mainwindow.h @@ -47,8 +47,6 @@ class FileFormat; class TileLayer; class Terrain; -namespace Internal { - class ActionManager; class AutomappingManager; class DocumentManager; @@ -223,5 +221,4 @@ private slots: QMap mMainWindowStates; }; -} // namespace Internal } // namespace Tiled diff --git a/src/tiled/mapdocument.cpp b/src/tiled/mapdocument.cpp index 915eb630ac..6b3eb29792 100644 --- a/src/tiled/mapdocument.cpp +++ b/src/tiled/mapdocument.cpp @@ -67,7 +67,6 @@ #include "qtcompat_p.h" using namespace Tiled; -using namespace Tiled::Internal; MapDocument::MapDocument(Map *map, const QString &fileName) : Document(MapDocumentType, fileName) diff --git a/src/tiled/mapdocument.h b/src/tiled/mapdocument.h index 7cf173ee36..c51b0509c6 100644 --- a/src/tiled/mapdocument.h +++ b/src/tiled/mapdocument.h @@ -51,8 +51,6 @@ class Terrain; class Tile; class WangSet; -namespace Internal { - class LayerModel; class MapDocument; class MapObjectModel; @@ -121,7 +119,7 @@ class MapDocument : public Document */ Map *map() const { return mMap.get(); } - Q_INVOKABLE Tiled::Internal::EditableAsset *editable() override; + Q_INVOKABLE Tiled::EditableAsset *editable() override; int layerIndex(const Layer *layer) const; @@ -381,7 +379,6 @@ public slots: bool mAllowTileObjects = true; }; -} // namespace Internal } // namespace Tiled -Q_DECLARE_OPERATORS_FOR_FLAGS(Tiled::Internal::MapDocument::TileLayerChangeFlags) +Q_DECLARE_OPERATORS_FOR_FLAGS(Tiled::MapDocument::TileLayerChangeFlags) diff --git a/src/tiled/mapdocumentactionhandler.cpp b/src/tiled/mapdocumentactionhandler.cpp index e06e690785..f9258b51f9 100644 --- a/src/tiled/mapdocumentactionhandler.cpp +++ b/src/tiled/mapdocumentactionhandler.cpp @@ -52,7 +52,6 @@ #include namespace Tiled { -namespace Internal { MapDocumentActionHandler *MapDocumentActionHandler::mInstance; @@ -821,5 +820,4 @@ void MapDocumentActionHandler::updateActions() mActionRemoveObjects->setText(removeText); } -} // namespace Internal } // namespace Tiled diff --git a/src/tiled/mapdocumentactionhandler.h b/src/tiled/mapdocumentactionhandler.h index f0157dadd3..1aeaaeaec8 100644 --- a/src/tiled/mapdocumentactionhandler.h +++ b/src/tiled/mapdocumentactionhandler.h @@ -32,8 +32,6 @@ namespace Tiled { class ObjectGroup; class MapObject; -namespace Internal { - class MapDocument; /** @@ -174,5 +172,4 @@ private slots: static MapDocumentActionHandler *mInstance; }; -} // namespace Internal } // namespace Tiled diff --git a/src/tiled/mapeditor.cpp b/src/tiled/mapeditor.cpp index f8a82de748..1c6a5e1568 100644 --- a/src/tiled/mapeditor.cpp +++ b/src/tiled/mapeditor.cpp @@ -101,7 +101,6 @@ static const char STATE_KEY[] = "MapEditor/State"; static const char MAPSTATES_KEY[] = "MapEditor/MapStates"; namespace Tiled { -namespace Internal { /** * A proxy model that makes sure no items are checked or checkable and that @@ -932,5 +931,4 @@ void MapEditor::retranslateUi() mToolSpecificToolBar->setWindowTitle(tr("Tool Options")); } -} // namespace Internal } // namespace Tiled diff --git a/src/tiled/mapeditor.h b/src/tiled/mapeditor.h index 9e35826062..2a7f263a57 100644 --- a/src/tiled/mapeditor.h +++ b/src/tiled/mapeditor.h @@ -40,8 +40,6 @@ namespace Tiled { class Terrain; -namespace Internal { - class AbstractTool; class BucketFillTool; class ComboBoxProxyModel; @@ -194,5 +192,4 @@ inline MapView *MapEditor::currentMapView() const return viewForDocument(mCurrentMapDocument); } -} // namespace Internal } // namespace Tiled diff --git a/src/tiled/mapitem.cpp b/src/tiled/mapitem.cpp index da6c9d03c3..0861e1c527 100644 --- a/src/tiled/mapitem.cpp +++ b/src/tiled/mapitem.cpp @@ -45,7 +45,6 @@ #include "qtcompat_p.h" namespace Tiled { -namespace Internal { static const qreal darkeningFactor = 0.6; static const qreal opacityFactor = 0.4; @@ -678,7 +677,6 @@ void MapItem::updateSelectedLayersHighlight() } } -} // namespace Internal } // namespace Tiled #include "mapitem.moc" diff --git a/src/tiled/mapitem.h b/src/tiled/mapitem.h index c44af3cc85..57dc855ed0 100644 --- a/src/tiled/mapitem.h +++ b/src/tiled/mapitem.h @@ -37,8 +37,6 @@ class Tile; class TileLayer; class Tileset; -namespace Internal { - class BorderItem; class LayerItem; class MapObjectItem; @@ -140,5 +138,4 @@ inline MapDocument *MapItem::mapDocument() const return mMapDocument.data(); } -} // namespace Internal } // namespace Tiled diff --git a/src/tiled/mapobjectitem.cpp b/src/tiled/mapobjectitem.cpp index eef0de949c..5c59759f1f 100644 --- a/src/tiled/mapobjectitem.cpp +++ b/src/tiled/mapobjectitem.cpp @@ -39,7 +39,6 @@ #include using namespace Tiled; -using namespace Tiled::Internal; MapObjectItem::MapObjectItem(MapObject *object, MapDocument *mapDocument, QGraphicsItem *parent): diff --git a/src/tiled/mapobjectitem.h b/src/tiled/mapobjectitem.h index 0fd918d3e9..3a08b2f7a0 100644 --- a/src/tiled/mapobjectitem.h +++ b/src/tiled/mapobjectitem.h @@ -28,8 +28,6 @@ namespace Tiled { class MapObject; -namespace Internal { - class Handle; class MapDocument; class ObjectGroupItem; @@ -112,7 +110,6 @@ inline bool MapObjectItem::isHoverIndicator() const return mIsHoveredIndicator; } -} // namespace Internal } // namespace Tiled -Q_DECLARE_METATYPE(Tiled::Internal::MapObjectItem*) +Q_DECLARE_METATYPE(Tiled::MapObjectItem*) diff --git a/src/tiled/mapobjectmodel.cpp b/src/tiled/mapobjectmodel.cpp index 28de43936a..9a6c7edb98 100644 --- a/src/tiled/mapobjectmodel.cpp +++ b/src/tiled/mapobjectmodel.cpp @@ -35,7 +35,6 @@ #include using namespace Tiled; -using namespace Tiled::Internal; MapObjectModel::MapObjectModel(QObject *parent): QAbstractItemModel(parent), diff --git a/src/tiled/mapobjectmodel.h b/src/tiled/mapobjectmodel.h index 8d640d4940..854b176229 100644 --- a/src/tiled/mapobjectmodel.h +++ b/src/tiled/mapobjectmodel.h @@ -34,8 +34,6 @@ class MapObject; class Map; class ObjectGroup; -namespace Internal { - class MapDocument; /** @@ -126,5 +124,4 @@ private slots: QIcon mObjectGroupIcon; }; -} // namespace Internal } // namespace Tiled diff --git a/src/tiled/mapscene.cpp b/src/tiled/mapscene.cpp index ee6d2bdca2..70af3734bb 100644 --- a/src/tiled/mapscene.cpp +++ b/src/tiled/mapscene.cpp @@ -48,7 +48,6 @@ #include "qtcompat_p.h" using namespace Tiled; -using namespace Tiled::Internal; MapScene::MapScene(QObject *parent): QGraphicsScene(parent), diff --git a/src/tiled/mapscene.h b/src/tiled/mapscene.h index 47eca49af9..34d4db08c4 100644 --- a/src/tiled/mapscene.h +++ b/src/tiled/mapscene.h @@ -39,8 +39,6 @@ class Tile; class TileLayer; class Tileset; -namespace Internal { - class AbstractTool; class LayerItem; class MapDocument; @@ -121,5 +119,4 @@ inline MapDocument *MapScene::mapDocument() const return mMapDocument; } -} // namespace Internal } // namespace Tiled diff --git a/src/tiled/mapsdock.cpp b/src/tiled/mapsdock.cpp index b1c1f5fcfc..94df5ab673 100644 --- a/src/tiled/mapsdock.cpp +++ b/src/tiled/mapsdock.cpp @@ -39,7 +39,6 @@ #include using namespace Tiled; -using namespace Tiled::Internal; /** * Class represents the file system model with disabled dragging of directories. diff --git a/src/tiled/mapsdock.h b/src/tiled/mapsdock.h index ef7fa350ea..5bc8e10a90 100644 --- a/src/tiled/mapsdock.h +++ b/src/tiled/mapsdock.h @@ -30,7 +30,6 @@ class QModelIndex; class QTreeView; namespace Tiled { -namespace Internal { class MapsView; @@ -87,5 +86,4 @@ private slots: QFileSystemModel *mFileSystemModel; }; -} // namespace Internal } // namespace Tiled diff --git a/src/tiled/mapview.cpp b/src/tiled/mapview.cpp index 8564aeffca..d9a2277b04 100644 --- a/src/tiled/mapview.cpp +++ b/src/tiled/mapview.cpp @@ -39,7 +39,6 @@ #endif using namespace Tiled; -using namespace Tiled::Internal; MapView::MapView(QWidget *parent, Mode mode) : QGraphicsView(parent) diff --git a/src/tiled/mapview.h b/src/tiled/mapview.h index a55fc320ba..ba1935f779 100644 --- a/src/tiled/mapview.h +++ b/src/tiled/mapview.h @@ -24,7 +24,6 @@ #include namespace Tiled { -namespace Internal { class MapScene; class Zoomable; @@ -104,5 +103,4 @@ private slots: Zoomable *mZoomable; }; -} // namespace Internal } // namespace Tiled diff --git a/src/tiled/minimap.cpp b/src/tiled/minimap.cpp index 56cf87f920..f272e2d582 100644 --- a/src/tiled/minimap.cpp +++ b/src/tiled/minimap.cpp @@ -36,7 +36,6 @@ #include using namespace Tiled; -using namespace Tiled::Internal; MiniMap::MiniMap(QWidget *parent) : QFrame(parent) diff --git a/src/tiled/minimap.h b/src/tiled/minimap.h index 4d7dd3a0a3..6c79629257 100644 --- a/src/tiled/minimap.h +++ b/src/tiled/minimap.h @@ -28,7 +28,6 @@ #include namespace Tiled { -namespace Internal { class MapDocument; @@ -79,5 +78,4 @@ private slots: void centerViewOnLocalPixel(QPoint centerPos, int delta = 0); }; -} // namespace Internal } // namespace Tiled diff --git a/src/tiled/minimapdock.cpp b/src/tiled/minimapdock.cpp index 7543b11807..d1117c4970 100644 --- a/src/tiled/minimapdock.cpp +++ b/src/tiled/minimapdock.cpp @@ -25,7 +25,6 @@ #include using namespace Tiled; -using namespace Tiled::Internal; MiniMapDock::MiniMapDock(QWidget *parent) : QDockWidget(parent) diff --git a/src/tiled/minimapdock.h b/src/tiled/minimapdock.h index 4a56b1a6bb..71641d1876 100644 --- a/src/tiled/minimapdock.h +++ b/src/tiled/minimapdock.h @@ -23,7 +23,6 @@ #include namespace Tiled { -namespace Internal { class MiniMap; class MapDocument; @@ -49,5 +48,4 @@ class MiniMapDock : public QDockWidget MiniMap *mMiniMap; }; -} // namespace Internal } // namespace Tiled diff --git a/src/tiled/minimaprenderer.cpp b/src/tiled/minimaprenderer.cpp index b51a4b3aaf..4f55b96492 100644 --- a/src/tiled/minimaprenderer.cpp +++ b/src/tiled/minimaprenderer.cpp @@ -39,7 +39,6 @@ #include "qtcompat_p.h" using namespace Tiled; -using namespace Tiled::Internal; MiniMapRenderer::MiniMapRenderer(Map *map) : mMap(map) diff --git a/src/tiled/minimaprenderer.h b/src/tiled/minimaprenderer.h index 87f02474a1..79537343a9 100644 --- a/src/tiled/minimaprenderer.h +++ b/src/tiled/minimaprenderer.h @@ -29,8 +29,6 @@ namespace Tiled { class Map; class MapRenderer; -namespace Internal { - class MiniMapRenderer { public: @@ -59,7 +57,6 @@ class MiniMapRenderer MapRenderer *mRenderer; }; -Q_DECLARE_OPERATORS_FOR_FLAGS(Tiled::Internal::MiniMapRenderer::RenderFlags) +Q_DECLARE_OPERATORS_FOR_FLAGS(Tiled::MiniMapRenderer::RenderFlags) -} // namespace Internal } // namespace Tiled diff --git a/src/tiled/movelayer.cpp b/src/tiled/movelayer.cpp index 7d9fdf9fd9..002b701ddc 100644 --- a/src/tiled/movelayer.cpp +++ b/src/tiled/movelayer.cpp @@ -31,7 +31,6 @@ #include namespace Tiled { -namespace Internal { MoveLayer::MoveLayer(MapDocument *mapDocument, Layer *layer, Direction direction): mMapDocument(mapDocument), @@ -115,4 +114,3 @@ void MoveLayer::moveLayer() } } // namespace Tiled -} // namespace Internal diff --git a/src/tiled/movelayer.h b/src/tiled/movelayer.h index 8217efcaea..afe8cad7cb 100644 --- a/src/tiled/movelayer.h +++ b/src/tiled/movelayer.h @@ -27,8 +27,6 @@ namespace Tiled { class Layer; class Map; -namespace Internal { - class MapDocument; /** @@ -64,5 +62,4 @@ class MoveLayer : public QUndoCommand Direction mDirection; }; -} // namespace Internal } // namespace Tiled diff --git a/src/tiled/movemapobject.cpp b/src/tiled/movemapobject.cpp index 1eac0a8cb8..44e6916874 100644 --- a/src/tiled/movemapobject.cpp +++ b/src/tiled/movemapobject.cpp @@ -27,7 +27,6 @@ #include using namespace Tiled; -using namespace Tiled::Internal; MoveMapObject::MoveMapObject(MapDocument *mapDocument, MapObject *mapObject, diff --git a/src/tiled/movemapobject.h b/src/tiled/movemapobject.h index aba253a545..ba4855294c 100644 --- a/src/tiled/movemapobject.h +++ b/src/tiled/movemapobject.h @@ -27,8 +27,6 @@ namespace Tiled { class MapObject; -namespace Internal { - class MapDocument; class MoveMapObject : public QUndoCommand @@ -55,5 +53,4 @@ class MoveMapObject : public QUndoCommand QPointF mNewPos; }; -} // namespace Internal } // namespace Tiled diff --git a/src/tiled/movemapobjecttogroup.cpp b/src/tiled/movemapobjecttogroup.cpp index d9d31c8cbf..a764d61d8e 100644 --- a/src/tiled/movemapobjecttogroup.cpp +++ b/src/tiled/movemapobjecttogroup.cpp @@ -28,7 +28,6 @@ #include using namespace Tiled; -using namespace Tiled::Internal; MoveMapObjectToGroup::MoveMapObjectToGroup(MapDocument *mapDocument, MapObject *mapObject, diff --git a/src/tiled/movemapobjecttogroup.h b/src/tiled/movemapobjecttogroup.h index 8bd59ed539..8563caaf13 100644 --- a/src/tiled/movemapobjecttogroup.h +++ b/src/tiled/movemapobjecttogroup.h @@ -27,8 +27,6 @@ namespace Tiled { class MapObject; class ObjectGroup; -namespace Internal { - class MapDocument; class MoveMapObjectToGroup : public QUndoCommand @@ -49,5 +47,4 @@ class MoveMapObjectToGroup : public QUndoCommand int mOldIndex; }; -} // namespace Internal } // namespace Tiled diff --git a/src/tiled/moveterrain.cpp b/src/tiled/moveterrain.cpp index fd85f8914f..9e6eeeaeff 100644 --- a/src/tiled/moveterrain.cpp +++ b/src/tiled/moveterrain.cpp @@ -29,7 +29,6 @@ #include using namespace Tiled; -using namespace Tiled::Internal; MoveTerrain::MoveTerrain(TilesetDocument *tilesetDocument, int index) : mTilesetDocument(tilesetDocument) diff --git a/src/tiled/moveterrain.h b/src/tiled/moveterrain.h index 7104e93d2f..1bd7f59fb8 100644 --- a/src/tiled/moveterrain.h +++ b/src/tiled/moveterrain.h @@ -28,8 +28,6 @@ namespace Tiled { class Terrain; class Tileset; -namespace Internal { - class TilesetDocument; /** @@ -77,5 +75,4 @@ class MoveTerrainDown : public MoveTerrain void redo() override { moveTerrainDown(); } }; -} // namespace Internal } // namespace Tiled diff --git a/src/tiled/newmapdialog.cpp b/src/tiled/newmapdialog.cpp index 8b82adc611..afc7519775 100644 --- a/src/tiled/newmapdialog.cpp +++ b/src/tiled/newmapdialog.cpp @@ -45,7 +45,6 @@ static const char * const TILE_WIDTH_KEY = "Map/TileWidth"; static const char * const TILE_HEIGHT_KEY = "Map/TileHeight"; using namespace Tiled; -using namespace Tiled::Internal; template static Type comboBoxValue(QComboBox *comboBox) diff --git a/src/tiled/newmapdialog.h b/src/tiled/newmapdialog.h index ec0cc72b92..e5fc11c4d1 100644 --- a/src/tiled/newmapdialog.h +++ b/src/tiled/newmapdialog.h @@ -29,7 +29,6 @@ class NewMapDialog; } namespace Tiled { -namespace Internal { /** * A dialog for the creation of a new map. @@ -57,5 +56,4 @@ private slots: Ui::NewMapDialog *mUi; }; -} // namespace Internal } // namespace Tiled diff --git a/src/tiled/newsbutton.cpp b/src/tiled/newsbutton.cpp index 81e713b74b..b59856f7e7 100644 --- a/src/tiled/newsbutton.cpp +++ b/src/tiled/newsbutton.cpp @@ -30,7 +30,6 @@ static const char newsArchiveUrl[] = "https://www.mapeditor.org/news"; namespace Tiled { -namespace Internal { NewsButton::NewsButton(QWidget *parent) : QToolButton(parent) @@ -125,5 +124,4 @@ void NewsButton::showNewsMenu() setDown(false); } -} // namespace Internal } // namespace Tiled diff --git a/src/tiled/newsbutton.h b/src/tiled/newsbutton.h index 186fb0d344..c155505fbd 100644 --- a/src/tiled/newsbutton.h +++ b/src/tiled/newsbutton.h @@ -23,7 +23,6 @@ #include namespace Tiled { -namespace Internal { class NewsButton : public QToolButton { @@ -40,5 +39,4 @@ class NewsButton : public QToolButton QIcon mUnreadIcon; }; -} // namespace Internal } // namespace Tiled diff --git a/src/tiled/newsfeed.cpp b/src/tiled/newsfeed.cpp index 2e2e12b912..6e7a5cde83 100644 --- a/src/tiled/newsfeed.cpp +++ b/src/tiled/newsfeed.cpp @@ -32,7 +32,6 @@ static const char feedUrl[] = "https://www.mapeditor.org/rss.xml"; namespace Tiled { -namespace Internal { NewsFeed::NewsFeed() : mNetworkAccessManager(new QNetworkAccessManager(this)) @@ -175,5 +174,4 @@ void NewsFeed::setLastRead(const QDateTime &dateTime) emit refreshed(); } -} // namespace Internal } // namespace Tiled diff --git a/src/tiled/newsfeed.h b/src/tiled/newsfeed.h index 81912b97ba..6dc4b441aa 100644 --- a/src/tiled/newsfeed.h +++ b/src/tiled/newsfeed.h @@ -31,7 +31,6 @@ class QNetworkAccessManager; class QNetworkReply; namespace Tiled { -namespace Internal { class NewsItem { @@ -105,5 +104,4 @@ inline QString NewsFeed::errorString() const return mErrorString; } -} // namespace Internal } // namespace Tiled diff --git a/src/tiled/newtilesetdialog.cpp b/src/tiled/newtilesetdialog.cpp index 4629ab449c..70402f685c 100644 --- a/src/tiled/newtilesetdialog.cpp +++ b/src/tiled/newtilesetdialog.cpp @@ -43,7 +43,6 @@ static const char * const SPACING_KEY = "Tileset/Spacing"; static const char * const MARGIN_KEY = "Tileset/Margin"; using namespace Tiled; -using namespace Tiled::Internal; enum TilesetType { TilesetImage, diff --git a/src/tiled/newtilesetdialog.h b/src/tiled/newtilesetdialog.h index 7177b949dc..9d1ee0523b 100644 --- a/src/tiled/newtilesetdialog.h +++ b/src/tiled/newtilesetdialog.h @@ -30,7 +30,6 @@ class NewTilesetDialog; } namespace Tiled { -namespace Internal { /** * A dialog for the creation of a new tileset, or for editing the parameters @@ -78,5 +77,4 @@ private slots: SharedTileset mNewTileset; }; -} // namespace Internal } // namespace Tiled diff --git a/src/tiled/newtilesetdialog.ui b/src/tiled/newtilesetdialog.ui index 1eae62d6ad..a1947dacf4 100644 --- a/src/tiled/newtilesetdialog.ui +++ b/src/tiled/newtilesetdialog.ui @@ -142,7 +142,7 @@
- + false @@ -332,7 +332,7 @@ - Tiled::Internal::ColorButton + Tiled::ColorButton QToolButton
colorbutton.h
diff --git a/src/tiled/noeditorwidget.cpp b/src/tiled/noeditorwidget.cpp index 0ceb07a317..aa10d8c475 100644 --- a/src/tiled/noeditorwidget.cpp +++ b/src/tiled/noeditorwidget.cpp @@ -27,7 +27,6 @@ #include namespace Tiled { -namespace Internal { NoEditorWidget::NoEditorWidget(QWidget *parent) : QWidget(parent), @@ -72,5 +71,4 @@ void NoEditorWidget::openFile() DocumentManager::instance()->openFileDialog(); } -} // namespace Internal } // namespace Tiled diff --git a/src/tiled/noeditorwidget.h b/src/tiled/noeditorwidget.h index df39b6d6df..9302340622 100644 --- a/src/tiled/noeditorwidget.h +++ b/src/tiled/noeditorwidget.h @@ -23,7 +23,6 @@ #include namespace Tiled { -namespace Internal { namespace Ui { class NoEditorWidget; @@ -49,5 +48,4 @@ private slots: Ui::NoEditorWidget *ui; }; -} // namespace Internal } // namespace Tiled diff --git a/src/tiled/noeditorwidget.ui b/src/tiled/noeditorwidget.ui index 290aab156c..11479d5570 100644 --- a/src/tiled/noeditorwidget.ui +++ b/src/tiled/noeditorwidget.ui @@ -1,7 +1,7 @@ - Tiled::Internal::NoEditorWidget - + Tiled::NoEditorWidget + 0 diff --git a/src/tiled/objectgroupitem.cpp b/src/tiled/objectgroupitem.cpp index d9f1747c15..032bbe22c6 100644 --- a/src/tiled/objectgroupitem.cpp +++ b/src/tiled/objectgroupitem.cpp @@ -21,7 +21,6 @@ #include "objectgroupitem.h" using namespace Tiled; -using namespace Tiled::Internal; ObjectGroupItem::ObjectGroupItem(ObjectGroup *objectGroup, QGraphicsItem *parent) : LayerItem(objectGroup, parent) diff --git a/src/tiled/objectgroupitem.h b/src/tiled/objectgroupitem.h index 19842b998a..7fb6492e3e 100644 --- a/src/tiled/objectgroupitem.h +++ b/src/tiled/objectgroupitem.h @@ -25,7 +25,6 @@ #include "objectgroup.h" namespace Tiled { -namespace Internal { /** * A graphics item representing an object group in a QGraphicsView. It only @@ -52,5 +51,4 @@ inline ObjectGroup *ObjectGroupItem::objectGroup() const return static_cast(layer()); } -} // namespace Internal } // namespace Tiled diff --git a/src/tiled/objectsdock.cpp b/src/tiled/objectsdock.cpp index 7d66b1ea45..47505aafe9 100644 --- a/src/tiled/objectsdock.cpp +++ b/src/tiled/objectsdock.cpp @@ -49,7 +49,6 @@ static const char FIRST_COLUMN_WIDTH_KEY[] = "ObjectsDock/FirstSectionSize"; static const char VISIBLE_COLUMNS_KEY[] = "ObjectsDock/VisibleSections"; using namespace Tiled; -using namespace Tiled::Internal; ObjectsDock::ObjectsDock(QWidget *parent) : QDockWidget(parent) diff --git a/src/tiled/objectsdock.h b/src/tiled/objectsdock.h index 4d1e9e9de0..303ee7b662 100644 --- a/src/tiled/objectsdock.h +++ b/src/tiled/objectsdock.h @@ -31,8 +31,6 @@ namespace Tiled { class Layer; class MapObject; -namespace Internal { - class Document; class MapDocument; class MapObjectModel; @@ -122,5 +120,4 @@ private slots: bool mSynching; }; -} // namespace Internal } // namespace Tiled diff --git a/src/tiled/objectselectionitem.cpp b/src/tiled/objectselectionitem.cpp index 9a90a28d01..97a4a2f6dd 100644 --- a/src/tiled/objectselectionitem.cpp +++ b/src/tiled/objectselectionitem.cpp @@ -40,7 +40,6 @@ #include namespace Tiled { -namespace Internal { static const qreal labelMargin = 2; static const qreal labelDistance = 4; @@ -551,5 +550,4 @@ void ObjectSelectionItem::addRemoveObjectOutlines() mObjectOutlines.swap(outlineItems); } -} // namespace Internal } // namespace Tiled diff --git a/src/tiled/objectselectionitem.h b/src/tiled/objectselectionitem.h index 0ac6c5e1e1..c619c2b1c1 100644 --- a/src/tiled/objectselectionitem.h +++ b/src/tiled/objectselectionitem.h @@ -32,8 +32,6 @@ class Layer; class MapObject; class Tile; -namespace Internal { - class MapDocument; class MapObjectItem; class MapObjectLabel; @@ -83,5 +81,4 @@ private slots: std::unique_ptr mHoveredMapObjectItem; }; -} // namespace Internal } // namespace Tiled diff --git a/src/tiled/objectselectiontool.cpp b/src/tiled/objectselectiontool.cpp index fb8b27daf8..9086197c4a 100644 --- a/src/tiled/objectselectiontool.cpp +++ b/src/tiled/objectselectiontool.cpp @@ -58,10 +58,8 @@ #include using namespace Tiled; -using namespace Tiled::Internal; namespace Tiled { -namespace Internal { enum AnchorPosition { TopLeftAnchor, @@ -309,7 +307,6 @@ void ResizeHandle::paint(QPainter *painter, painter->drawPath(mArrow); } -} // namespace Internal } // namespace Tiled diff --git a/src/tiled/objectselectiontool.h b/src/tiled/objectselectiontool.h index b09a6eb995..f6201cc350 100644 --- a/src/tiled/objectselectiontool.h +++ b/src/tiled/objectselectiontool.h @@ -31,7 +31,6 @@ class QGraphicsItem; namespace Tiled { -namespace Internal { class Handle; class OriginIndicator; @@ -166,5 +165,4 @@ private slots: Qt::KeyboardModifiers mModifiers; }; -} // namespace Internal } // namespace Tiled diff --git a/src/tiled/objecttemplatemodel.cpp b/src/tiled/objecttemplatemodel.cpp index 5ec967d483..90f86923d0 100644 --- a/src/tiled/objecttemplatemodel.cpp +++ b/src/tiled/objecttemplatemodel.cpp @@ -30,7 +30,6 @@ #include namespace Tiled { -namespace Internal { ObjectTemplateModel::ObjectTemplateModel(QObject *parent): QFileSystemModel(parent) @@ -121,5 +120,4 @@ void ObjectTemplateModel::updateNameFilters() setNameFilters(nameFilters); } -} // namespace Internal } // namespace Tiled diff --git a/src/tiled/objecttemplatemodel.h b/src/tiled/objecttemplatemodel.h index 54490a6ae1..568547f044 100644 --- a/src/tiled/objecttemplatemodel.h +++ b/src/tiled/objecttemplatemodel.h @@ -27,8 +27,6 @@ namespace Tiled { class ObjectTemplate; -namespace Internal { - class ObjectTemplateModel : public QFileSystemModel { Q_OBJECT @@ -51,5 +49,4 @@ private slots: void updateNameFilters(); }; -} // namespace Internal } // namespace Tiled diff --git a/src/tiled/objecttypeseditor.cpp b/src/tiled/objecttypeseditor.cpp index 114e534659..2a34cc8439 100644 --- a/src/tiled/objecttypeseditor.cpp +++ b/src/tiled/objecttypeseditor.cpp @@ -39,7 +39,6 @@ #include namespace Tiled { -namespace Internal { class ColorDelegate : public QStyledItemDelegate { @@ -600,5 +599,4 @@ void ObjectTypesEditor::currentItemChanged(QtBrowserItem *item) mRenamePropertyAction->setEnabled(itemSelected); } -} // namespace Internal } // namespace Tiled diff --git a/src/tiled/objecttypeseditor.h b/src/tiled/objecttypeseditor.h index 65803db0bf..0ae6eb2e09 100644 --- a/src/tiled/objecttypeseditor.h +++ b/src/tiled/objecttypeseditor.h @@ -35,7 +35,6 @@ class QtVariantProperty; class QtVariantPropertyManager; namespace Tiled { -namespace Internal { class ObjectTypesModel; @@ -104,5 +103,4 @@ private slots: QAction *mRenamePropertyAction; }; -} // namespace Internal } // namespace Tiled diff --git a/src/tiled/objecttypesmodel.cpp b/src/tiled/objecttypesmodel.cpp index b81c79e8e0..52d54d9290 100644 --- a/src/tiled/objecttypesmodel.cpp +++ b/src/tiled/objecttypesmodel.cpp @@ -21,7 +21,6 @@ #include "objecttypesmodel.h" using namespace Tiled; -using namespace Tiled::Internal; static bool objectTypeLessThan(const ObjectType &a, const ObjectType &b) { diff --git a/src/tiled/objecttypesmodel.h b/src/tiled/objecttypesmodel.h index 6ee3281206..c6697199e0 100644 --- a/src/tiled/objecttypesmodel.h +++ b/src/tiled/objecttypesmodel.h @@ -26,7 +26,6 @@ #include namespace Tiled { -namespace Internal { class ObjectTypesModel : public QAbstractTableModel { @@ -65,5 +64,4 @@ public slots: ObjectTypes mObjectTypes; }; -} // namespace Internal } // namespace Tiled diff --git a/src/tiled/offsetlayer.cpp b/src/tiled/offsetlayer.cpp index 873a455c47..09ed412d9b 100644 --- a/src/tiled/offsetlayer.cpp +++ b/src/tiled/offsetlayer.cpp @@ -34,7 +34,6 @@ #include "qtcompat_p.h" using namespace Tiled; -using namespace Tiled::Internal; /** * Creates an undo command that offsets the layer at \a index by \a offset, diff --git a/src/tiled/offsetlayer.h b/src/tiled/offsetlayer.h index 1bcacc868f..5d52cb6a54 100644 --- a/src/tiled/offsetlayer.h +++ b/src/tiled/offsetlayer.h @@ -29,8 +29,6 @@ namespace Tiled { class Layer; -namespace Internal { - class MapDocument; /** @@ -60,5 +58,4 @@ class OffsetLayer : public QUndoCommand QPointF mNewOffset; }; -} // namespace Internal } // namespace Tiled diff --git a/src/tiled/offsetmapdialog.cpp b/src/tiled/offsetmapdialog.cpp index 0bcb2f959e..23261991ff 100644 --- a/src/tiled/offsetmapdialog.cpp +++ b/src/tiled/offsetmapdialog.cpp @@ -27,7 +27,6 @@ #include "ui_offsetmapdialog.h" namespace Tiled { -namespace Internal { OffsetMapDialog::OffsetMapDialog(MapDocument *mapDocument, QWidget *parent) : QDialog(parent) @@ -176,5 +175,4 @@ void OffsetMapDialog::boundsSelectionChanged() } } -} // namespace Internal } // namespace Tiled diff --git a/src/tiled/offsetmapdialog.h b/src/tiled/offsetmapdialog.h index c06612d9ee..c2f5b86509 100644 --- a/src/tiled/offsetmapdialog.h +++ b/src/tiled/offsetmapdialog.h @@ -31,8 +31,6 @@ namespace Tiled { class Layer; -namespace Internal { - class MapDocument; class OffsetMapDialog : public QDialog @@ -75,5 +73,4 @@ private slots: MapDocument *mMapDocument; }; -} // namespace Internal } // namespace Tiled diff --git a/src/tiled/painttilelayer.cpp b/src/tiled/painttilelayer.cpp index 0be1abef29..67140f236d 100644 --- a/src/tiled/painttilelayer.cpp +++ b/src/tiled/painttilelayer.cpp @@ -28,7 +28,6 @@ #include using namespace Tiled; -using namespace Tiled::Internal; PaintTileLayer::PaintTileLayer(MapDocument *mapDocument, TileLayer *target, diff --git a/src/tiled/painttilelayer.h b/src/tiled/painttilelayer.h index fe8358d205..3a64aebe74 100644 --- a/src/tiled/painttilelayer.h +++ b/src/tiled/painttilelayer.h @@ -30,8 +30,6 @@ namespace Tiled { class TileLayer; -namespace Internal { - class MapDocument; /** @@ -109,5 +107,4 @@ inline void PaintTileLayer::setMergeable(bool mergeable) mMergeable = mergeable; } -} // namespace Internal } // namespace Tiled diff --git a/src/tiled/patreondialog.cpp b/src/tiled/patreondialog.cpp index f9a63d9ee6..a089b6e8d8 100644 --- a/src/tiled/patreondialog.cpp +++ b/src/tiled/patreondialog.cpp @@ -29,7 +29,7 @@ #include #include -using namespace Tiled::Internal; +using namespace Tiled; PatreonDialog::PatreonDialog(QWidget *parent) : QDialog(parent), diff --git a/src/tiled/patreondialog.h b/src/tiled/patreondialog.h index d3b2f8c199..b680f5b04d 100644 --- a/src/tiled/patreondialog.h +++ b/src/tiled/patreondialog.h @@ -27,7 +27,6 @@ class PatreonDialog; } namespace Tiled { -namespace Internal { class PatreonDialog : public QDialog { @@ -46,5 +45,4 @@ private slots: Ui::PatreonDialog *ui; }; -} // namespace Internal } // namespace Tiled diff --git a/src/tiled/pluginlistmodel.cpp b/src/tiled/pluginlistmodel.cpp index 6931d4a901..209a963dd8 100644 --- a/src/tiled/pluginlistmodel.cpp +++ b/src/tiled/pluginlistmodel.cpp @@ -26,7 +26,6 @@ #include namespace Tiled { -namespace Internal { PluginListModel::PluginListModel(QObject *parent) : QAbstractListModel(parent) @@ -110,6 +109,5 @@ bool PluginListModel::setData(const QModelIndex &index, const QVariant &value, i return false; } -} // namespace Internal } // namespace Tiled diff --git a/src/tiled/pluginlistmodel.h b/src/tiled/pluginlistmodel.h index 6d010613e3..a8d5b2f5dc 100644 --- a/src/tiled/pluginlistmodel.h +++ b/src/tiled/pluginlistmodel.h @@ -24,7 +24,6 @@ #include namespace Tiled { -namespace Internal { class PluginListModel : public QAbstractListModel { @@ -46,5 +45,4 @@ class PluginListModel : public QAbstractListModel QIcon mPluginErrorIcon; }; -} // namespace Internal } // namespace Tiled diff --git a/src/tiled/pointhandle.cpp b/src/tiled/pointhandle.cpp index d100ffec75..269a0553ba 100644 --- a/src/tiled/pointhandle.cpp +++ b/src/tiled/pointhandle.cpp @@ -28,7 +28,6 @@ #include namespace Tiled { -namespace Internal { PointHandle::PointHandle(MapObject *mapObject, int pointIndex) : QGraphicsItem() @@ -88,5 +87,4 @@ void PointHandle::paint(QPainter *painter, painter->drawEllipse(QRectF(-4, -4, 8, 8)); } -} // namespace Internal } // namespace Tiled diff --git a/src/tiled/pointhandle.h b/src/tiled/pointhandle.h index ec6bb9b13b..318360324d 100644 --- a/src/tiled/pointhandle.h +++ b/src/tiled/pointhandle.h @@ -27,7 +27,6 @@ namespace Tiled { class MapObject; -namespace Internal { /** * A handle that allows moving around a point of a polygon. @@ -63,7 +62,6 @@ class PointHandle : public QGraphicsItem bool mHighlighted; }; -} // namespace Internal } // namespace Tiled #endif // POINTHANDLE_H diff --git a/src/tiled/preferences.cpp b/src/tiled/preferences.cpp index f2270292e3..cb1f5b0b8f 100644 --- a/src/tiled/preferences.cpp +++ b/src/tiled/preferences.cpp @@ -34,7 +34,6 @@ #include using namespace Tiled; -using namespace Tiled::Internal; Preferences *Preferences::mInstance; diff --git a/src/tiled/preferences.h b/src/tiled/preferences.h index 243825cf22..472fa853c1 100644 --- a/src/tiled/preferences.h +++ b/src/tiled/preferences.h @@ -31,7 +31,6 @@ class QSettings; namespace Tiled { -namespace Internal { /** * This class holds user preferences and provides a convenient interface to @@ -392,7 +391,6 @@ inline bool Preferences::wheelZoomsByDefault() const return mWheelZoomsByDefault; } -} // namespace Internal } // namespace Tiled -Q_DECLARE_OPERATORS_FOR_FLAGS(Tiled::Internal::Preferences::ExportOptions) +Q_DECLARE_OPERATORS_FOR_FLAGS(Tiled::Preferences::ExportOptions) diff --git a/src/tiled/preferencesdialog.cpp b/src/tiled/preferencesdialog.cpp index b9d6e99318..a831dfe42b 100644 --- a/src/tiled/preferencesdialog.cpp +++ b/src/tiled/preferencesdialog.cpp @@ -31,7 +31,6 @@ #include "qtcompat_p.h" using namespace Tiled; -using namespace Tiled::Internal; PreferencesDialog::PreferencesDialog(QWidget *parent) : QDialog(parent) diff --git a/src/tiled/preferencesdialog.h b/src/tiled/preferencesdialog.h index 010036c1f8..f99ac5fb00 100644 --- a/src/tiled/preferencesdialog.h +++ b/src/tiled/preferencesdialog.h @@ -29,7 +29,6 @@ class PreferencesDialog; } namespace Tiled { -namespace Internal { /** * The preferences dialog. Allows the user to configure some general behaviour @@ -64,5 +63,4 @@ private slots: }; -} // namespace Internal } // namespace Tiled diff --git a/src/tiled/preferencesdialog.ui b/src/tiled/preferencesdialog.ui index db8194bc02..7bcbe85791 100644 --- a/src/tiled/preferencesdialog.ui +++ b/src/tiled/preferencesdialog.ui @@ -127,7 +127,7 @@ - + @@ -258,7 +258,7 @@
- + @@ -271,7 +271,7 @@ - + @@ -421,7 +421,7 @@
- Tiled::Internal::ColorButton + Tiled::ColorButton QToolButton
colorbutton.h
diff --git a/src/tiled/propertiesdock.cpp b/src/tiled/propertiesdock.cpp index fd2f624b1b..5f8f9213bf 100644 --- a/src/tiled/propertiesdock.cpp +++ b/src/tiled/propertiesdock.cpp @@ -43,7 +43,6 @@ #include namespace Tiled { -namespace Internal { PropertiesDock::PropertiesDock(QWidget *parent) : QDockWidget(parent) @@ -493,5 +492,4 @@ void PropertiesDock::retranslateUi() mActionRenameProperty->setText(tr("Rename Property")); } -} // namespace Internal } // namespace Tiled diff --git a/src/tiled/propertiesdock.h b/src/tiled/propertiesdock.h index 8c13762f5d..ed928fd6de 100644 --- a/src/tiled/propertiesdock.h +++ b/src/tiled/propertiesdock.h @@ -30,8 +30,6 @@ namespace Tiled { class Object; class Tileset; -namespace Internal { - class Document; class PropertyBrowser; @@ -78,5 +76,4 @@ private slots: QAction *mActionRenameProperty; }; -} // namespace Internal } // namespace Tiled diff --git a/src/tiled/propertybrowser.cpp b/src/tiled/propertybrowser.cpp index 9a3af39fda..5a3276e9b7 100644 --- a/src/tiled/propertybrowser.cpp +++ b/src/tiled/propertybrowser.cpp @@ -71,7 +71,6 @@ #include namespace Tiled { -namespace Internal { PropertyBrowser::PropertyBrowser(QWidget *parent) : QtTreePropertyBrowser(parent) @@ -1891,10 +1890,10 @@ void PropertyBrowser::retranslateUi() mStaggerIndexNames.append(tr("Odd")); mStaggerIndexNames.append(tr("Even")); - mOrientationNames.append(QCoreApplication::translate("Tiled::Internal::NewMapDialog", "Orthogonal")); - mOrientationNames.append(QCoreApplication::translate("Tiled::Internal::NewMapDialog", "Isometric")); - mOrientationNames.append(QCoreApplication::translate("Tiled::Internal::NewMapDialog", "Isometric (Staggered)")); - mOrientationNames.append(QCoreApplication::translate("Tiled::Internal::NewMapDialog", "Hexagonal (Staggered)")); + mOrientationNames.append(QCoreApplication::translate("Tiled::NewMapDialog", "Orthogonal")); + mOrientationNames.append(QCoreApplication::translate("Tiled::NewMapDialog", "Isometric")); + mOrientationNames.append(QCoreApplication::translate("Tiled::NewMapDialog", "Isometric (Staggered)")); + mOrientationNames.append(QCoreApplication::translate("Tiled::NewMapDialog", "Hexagonal (Staggered)")); mTilesetOrientationNames.append(mOrientationNames.at(0)); mTilesetOrientationNames.append(mOrientationNames.at(1)); @@ -1920,5 +1919,4 @@ void PropertyBrowser::retranslateUi() addProperties(); } -} // namespace Internal } // namespace Tiled diff --git a/src/tiled/propertybrowser.h b/src/tiled/propertybrowser.h index fd32ae3b7c..e20b3467aa 100644 --- a/src/tiled/propertybrowser.h +++ b/src/tiled/propertybrowser.h @@ -43,8 +43,6 @@ class Tile; class TileLayer; class Tileset; -namespace Internal { - class Document; class MapDocument; class TilesetDocument; @@ -247,5 +245,4 @@ inline Object *PropertyBrowser::object() const return mObject; } -} // namespace Internal } // namespace Tiled diff --git a/src/tiled/raiselowerhelper.cpp b/src/tiled/raiselowerhelper.cpp index 7f8d78bb93..0e0828acb6 100644 --- a/src/tiled/raiselowerhelper.cpp +++ b/src/tiled/raiselowerhelper.cpp @@ -33,7 +33,6 @@ #include namespace Tiled { -namespace Internal { void RaiseLowerHelper::raise() { @@ -267,5 +266,4 @@ void RaiseLowerHelper::push(const QList &commands, undoStack->endMacro(); } -} // namespace Internal } // namespace Tiled diff --git a/src/tiled/raiselowerhelper.h b/src/tiled/raiselowerhelper.h index 05685ea767..5b09c1cff5 100644 --- a/src/tiled/raiselowerhelper.h +++ b/src/tiled/raiselowerhelper.h @@ -31,8 +31,6 @@ namespace Tiled { class ObjectGroup; -namespace Internal { - class MapDocument; class MapScene; @@ -72,5 +70,4 @@ class RaiseLowerHelper RangeSet mSelectionRanges; }; -} // namespace Internal } // namespace Tiled diff --git a/src/tiled/randompicker.h b/src/tiled/randompicker.h index e5e25afca3..ebcf7f63a5 100644 --- a/src/tiled/randompicker.h +++ b/src/tiled/randompicker.h @@ -25,7 +25,6 @@ #include namespace Tiled { -namespace Internal { inline std::default_random_engine &globalRandomEngine() { @@ -97,5 +96,4 @@ class RandomPicker QMap mThresholds; }; -} // namespace Internal } // namespace Tiled diff --git a/src/tiled/rangeset.h b/src/tiled/rangeset.h index 27d81a909b..dc5fba7116 100644 --- a/src/tiled/rangeset.h +++ b/src/tiled/rangeset.h @@ -23,7 +23,6 @@ #include namespace Tiled { -namespace Internal { /** * Logically, a set, but implemented as a set of ranges. This class is only @@ -185,5 +184,4 @@ class RangeSet } }; -} // namespace Internal } // namespace Tiled diff --git a/src/tiled/regionvaluetype.cpp b/src/tiled/regionvaluetype.cpp index f9f9c946bd..11894f2abb 100644 --- a/src/tiled/regionvaluetype.cpp +++ b/src/tiled/regionvaluetype.cpp @@ -21,7 +21,6 @@ #include "regionvaluetype.h" namespace Tiled { -namespace Internal { RegionValueType::RegionValueType() { @@ -57,5 +56,4 @@ QString RegionValueType::toString() const } } -} // namespace Internal } // namespace Tiled diff --git a/src/tiled/regionvaluetype.h b/src/tiled/regionvaluetype.h index c18a8b2378..d99b2f28fb 100644 --- a/src/tiled/regionvaluetype.h +++ b/src/tiled/regionvaluetype.h @@ -24,7 +24,6 @@ #include namespace Tiled { -namespace Internal { class RegionValueType { @@ -42,13 +41,13 @@ class RegionValueType Q_INVOKABLE void add(const QRect &rect); Q_INVOKABLE void add(const QRectF &rect); - Q_INVOKABLE void add(const Tiled::Internal::RegionValueType ®ion); + Q_INVOKABLE void add(const Tiled::RegionValueType ®ion); Q_INVOKABLE void subtract(const QRect &rect); Q_INVOKABLE void subtract(const QRectF &rect); - Q_INVOKABLE void subtract(const Tiled::Internal::RegionValueType ®ion); + Q_INVOKABLE void subtract(const Tiled::RegionValueType ®ion); Q_INVOKABLE void intersect(const QRect &rect); Q_INVOKABLE void intersect(const QRectF &rect); - Q_INVOKABLE void intersect(const Tiled::Internal::RegionValueType ®ion); + Q_INVOKABLE void intersect(const Tiled::RegionValueType ®ion); QRect boundingRect() const; const QRegion ®ion() const; @@ -113,7 +112,6 @@ inline const QRegion &RegionValueType::region() const return mRegion; } -} // namespace Internal } // namespace Tiled -Q_DECLARE_METATYPE(Tiled::Internal::RegionValueType) +Q_DECLARE_METATYPE(Tiled::RegionValueType) diff --git a/src/tiled/renamelayer.cpp b/src/tiled/renamelayer.cpp index 3cba35adf2..261fd24cc6 100644 --- a/src/tiled/renamelayer.cpp +++ b/src/tiled/renamelayer.cpp @@ -28,7 +28,6 @@ #include using namespace Tiled; -using namespace Tiled::Internal; RenameLayer::RenameLayer(MapDocument *mapDocument, Layer *layer, diff --git a/src/tiled/renamelayer.h b/src/tiled/renamelayer.h index 586454e60a..ddc082090c 100644 --- a/src/tiled/renamelayer.h +++ b/src/tiled/renamelayer.h @@ -26,8 +26,6 @@ namespace Tiled { class Layer; -namespace Internal { - class MapDocument; class RenameLayer : public QUndoCommand @@ -48,5 +46,4 @@ class RenameLayer : public QUndoCommand QString mName; }; -} // namespace Internal } // namespace Tiled diff --git a/src/tiled/renameterrain.cpp b/src/tiled/renameterrain.cpp index b377ea585b..3ade5e3ff5 100644 --- a/src/tiled/renameterrain.cpp +++ b/src/tiled/renameterrain.cpp @@ -28,7 +28,6 @@ #include namespace Tiled { -namespace Internal { RenameTerrain::RenameTerrain(TilesetDocument *tilesetDocument, int terrainId, @@ -52,5 +51,4 @@ void RenameTerrain::redo() mTerrainModel->setTerrainName(mTerrainId, mNewName); } -} // namespace Internal } // namespace Tiled diff --git a/src/tiled/renameterrain.h b/src/tiled/renameterrain.h index 48a3ab4094..ccd1d89599 100644 --- a/src/tiled/renameterrain.h +++ b/src/tiled/renameterrain.h @@ -26,8 +26,6 @@ namespace Tiled { class Tileset; -namespace Internal { - class TilesetDocument; class TilesetTerrainModel; @@ -49,5 +47,4 @@ class RenameTerrain : public QUndoCommand QString mNewName; }; -} // namespace Internal } // namespace Tiled diff --git a/src/tiled/renamewangset.cpp b/src/tiled/renamewangset.cpp index dc5760e1aa..216bf2587b 100644 --- a/src/tiled/renamewangset.cpp +++ b/src/tiled/renamewangset.cpp @@ -27,7 +27,6 @@ #include using namespace Tiled; -using namespace Internal; RenameWangSet::RenameWangSet(TilesetDocument *tilesetDocument, WangSet *wangSet, diff --git a/src/tiled/renamewangset.h b/src/tiled/renamewangset.h index 3bdacc936c..078b717961 100644 --- a/src/tiled/renamewangset.h +++ b/src/tiled/renamewangset.h @@ -26,8 +26,6 @@ namespace Tiled { class WangSet; -namespace Internal { - class TilesetDocument; class RenameWangSet : public QUndoCommand @@ -47,5 +45,4 @@ class RenameWangSet : public QUndoCommand QString mNewName; }; -} // namespace Internal } // namespace Tiled diff --git a/src/tiled/reparentlayers.cpp b/src/tiled/reparentlayers.cpp index a03a7ebeb7..fa7d7e72c9 100644 --- a/src/tiled/reparentlayers.cpp +++ b/src/tiled/reparentlayers.cpp @@ -28,7 +28,6 @@ #include "qtcompat_p.h" namespace Tiled { -namespace Internal { ReparentLayers::ReparentLayers(MapDocument *mapDocument, const QList &layers, @@ -97,5 +96,4 @@ void ReparentLayers::redo() mMapDocument->setCurrentLayer(currentLayer); } -} // namespace Internal } // namespace Tiled diff --git a/src/tiled/reparentlayers.h b/src/tiled/reparentlayers.h index 69f412fed9..d80243c284 100644 --- a/src/tiled/reparentlayers.h +++ b/src/tiled/reparentlayers.h @@ -28,8 +28,6 @@ namespace Tiled { class GroupLayer; class Layer; -namespace Internal { - class MapDocument; /** @@ -60,5 +58,4 @@ class ReparentLayers : public QUndoCommand QVector mUndoInfo; }; -} // namespace Internal } // namespace Tiled diff --git a/src/tiled/replacetemplate.cpp b/src/tiled/replacetemplate.cpp index d3285dddbf..019938c042 100644 --- a/src/tiled/replacetemplate.cpp +++ b/src/tiled/replacetemplate.cpp @@ -27,7 +27,6 @@ #include namespace Tiled { -namespace Internal { ReplaceTemplate::ReplaceTemplate(MapDocument *mapDocument, const ObjectTemplate *oldObjectTemplate, @@ -51,5 +50,4 @@ void ReplaceTemplate::swap() std::swap(mOldObjectTemplate, mNewObjectTemplate); } -} // namespace Internal } // namespace Tiled diff --git a/src/tiled/replacetemplate.h b/src/tiled/replacetemplate.h index e9023ffad9..a7679506c8 100644 --- a/src/tiled/replacetemplate.h +++ b/src/tiled/replacetemplate.h @@ -27,8 +27,6 @@ namespace Tiled { class ObjectTemplate; -namespace Internal { - class MapDocument; class ReplaceTemplate : public QUndoCommand @@ -51,5 +49,4 @@ class ReplaceTemplate : public QUndoCommand const ObjectTemplate *mNewObjectTemplate; }; -} // namespace Internal } // namespace Tiled diff --git a/src/tiled/replacetileset.cpp b/src/tiled/replacetileset.cpp index 8a4b0c1534..241d8b9c79 100644 --- a/src/tiled/replacetileset.cpp +++ b/src/tiled/replacetileset.cpp @@ -26,7 +26,6 @@ #include namespace Tiled { -namespace Internal { ReplaceTileset::ReplaceTileset(MapDocument *mapDocument, int index, @@ -45,5 +44,4 @@ void ReplaceTileset::swap() mTileset = mMapDocument->replaceTileset(mIndex, mTileset); } -} // namespace Internal } // namespace Tiled diff --git a/src/tiled/replacetileset.h b/src/tiled/replacetileset.h index a6210df90a..78fa0a624f 100644 --- a/src/tiled/replacetileset.h +++ b/src/tiled/replacetileset.h @@ -25,7 +25,6 @@ #include namespace Tiled { -namespace Internal { class MapDocument; @@ -47,5 +46,4 @@ class ReplaceTileset : public QUndoCommand SharedTileset mTileset; }; -} // namespace Internal } // namespace Tiled diff --git a/src/tiled/resizedialog.cpp b/src/tiled/resizedialog.cpp index 99a519f195..50bb3f735e 100644 --- a/src/tiled/resizedialog.cpp +++ b/src/tiled/resizedialog.cpp @@ -27,7 +27,7 @@ #include -using namespace Tiled::Internal; +using namespace Tiled; static const char * const REMOVE_OBJECTS_KEY = "ResizeMap/RemoveObjects"; diff --git a/src/tiled/resizedialog.h b/src/tiled/resizedialog.h index 9b68890f88..fd1a890d17 100644 --- a/src/tiled/resizedialog.h +++ b/src/tiled/resizedialog.h @@ -29,7 +29,6 @@ class ResizeDialog; } namespace Tiled { -namespace Internal { class ResizeDialog : public QDialog { @@ -57,5 +56,4 @@ private slots: Ui::ResizeDialog *mUi; }; -} // namespace Internal } // namespace Tiled diff --git a/src/tiled/resizedialog.ui b/src/tiled/resizedialog.ui index 5b1a686c58..6afb278db1 100644 --- a/src/tiled/resizedialog.ui +++ b/src/tiled/resizedialog.ui @@ -140,7 +140,7 @@ - + @@ -169,7 +169,7 @@ - Tiled::Internal::ResizeHelper + Tiled::ResizeHelper QWidget
resizehelper.h
1 diff --git a/src/tiled/resizehelper.cpp b/src/tiled/resizehelper.cpp index ffda00e562..ddd61488c9 100644 --- a/src/tiled/resizehelper.cpp +++ b/src/tiled/resizehelper.cpp @@ -24,7 +24,7 @@ #include #include -using namespace Tiled::Internal; +using namespace Tiled; ResizeHelper::ResizeHelper(QWidget *parent) : QWidget(parent) diff --git a/src/tiled/resizehelper.h b/src/tiled/resizehelper.h index 980ee7bbd7..0cab3d75aa 100644 --- a/src/tiled/resizehelper.h +++ b/src/tiled/resizehelper.h @@ -30,7 +30,6 @@ class QMouseEvent; class QResizeEvent; namespace Tiled { -namespace Internal { /** * A special widget designed as an aid for resizing a canvas. Based on a @@ -98,5 +97,4 @@ public slots: std::function mMiniMapRenderer; }; -} // namespace Internal } // namespace Tiled diff --git a/src/tiled/resizemap.cpp b/src/tiled/resizemap.cpp index abaf01fc20..ec40b6b54b 100644 --- a/src/tiled/resizemap.cpp +++ b/src/tiled/resizemap.cpp @@ -26,7 +26,6 @@ #include namespace Tiled { -namespace Internal { ResizeMap::ResizeMap(MapDocument *mapDocument, const QSize &size, @@ -60,5 +59,4 @@ void ResizeMap::swapSize() emit mMapDocument->mapChanged(); } -} // namespace Internal } // namespace Tiled diff --git a/src/tiled/resizemap.h b/src/tiled/resizemap.h index 64419ca0dd..6e66b84249 100644 --- a/src/tiled/resizemap.h +++ b/src/tiled/resizemap.h @@ -24,7 +24,6 @@ #include namespace Tiled { -namespace Internal { class MapDocument; @@ -49,5 +48,4 @@ class ResizeMap : public QUndoCommand QSize mSize; }; -} // namespace Internal } // namespace Tiled diff --git a/src/tiled/resizemapobject.cpp b/src/tiled/resizemapobject.cpp index c34642214a..174bd2f020 100644 --- a/src/tiled/resizemapobject.cpp +++ b/src/tiled/resizemapobject.cpp @@ -27,7 +27,6 @@ #include using namespace Tiled; -using namespace Tiled::Internal; ResizeMapObject::ResizeMapObject(MapDocument *mapDocument, MapObject *mapObject, diff --git a/src/tiled/resizemapobject.h b/src/tiled/resizemapobject.h index 466b1dbda6..e3ee2d7e09 100644 --- a/src/tiled/resizemapobject.h +++ b/src/tiled/resizemapobject.h @@ -27,8 +27,6 @@ namespace Tiled { class MapObject; -namespace Internal { - class MapDocument; class ResizeMapObject : public QUndoCommand @@ -54,5 +52,4 @@ class ResizeMapObject : public QUndoCommand bool mOldChangeState; }; -} // namespace Internal } // namespace Tiled diff --git a/src/tiled/resizetilelayer.cpp b/src/tiled/resizetilelayer.cpp index 4dbf62f22a..f4c1272d3d 100644 --- a/src/tiled/resizetilelayer.cpp +++ b/src/tiled/resizetilelayer.cpp @@ -28,7 +28,6 @@ #include using namespace Tiled; -using namespace Tiled::Internal; ResizeTileLayer::ResizeTileLayer(MapDocument *mapDocument, TileLayer *layer, diff --git a/src/tiled/resizetilelayer.h b/src/tiled/resizetilelayer.h index c2b7b08cac..a6cefc9182 100644 --- a/src/tiled/resizetilelayer.h +++ b/src/tiled/resizetilelayer.h @@ -29,8 +29,6 @@ namespace Tiled { class Layer; class TileLayer; -namespace Internal { - class MapDocument; /** @@ -61,5 +59,4 @@ class ResizeTileLayer : public QUndoCommand TileLayer *mResizedLayer; }; -} // namespace Internal } // namespace Tiled diff --git a/src/tiled/reversingproxymodel.cpp b/src/tiled/reversingproxymodel.cpp index 470230f209..1f48e67a53 100644 --- a/src/tiled/reversingproxymodel.cpp +++ b/src/tiled/reversingproxymodel.cpp @@ -25,7 +25,6 @@ #include "reversingproxymodel.h" namespace Tiled { -namespace Internal { // Stupid hack needed because createIndex is protected class FriendModel : public QAbstractItemModel @@ -450,4 +449,3 @@ void ReversingProxyModel::sourceRowsRemoved(const QModelIndex &parent, int start } } // namespace Tiled -} // namespace Internal diff --git a/src/tiled/reversingproxymodel.h b/src/tiled/reversingproxymodel.h index 07f8614515..ef7dd33569 100644 --- a/src/tiled/reversingproxymodel.h +++ b/src/tiled/reversingproxymodel.h @@ -23,7 +23,6 @@ #include namespace Tiled { -namespace Internal { /** * Displays the source model "upside down". @@ -83,4 +82,3 @@ private slots: }; } // namespace Tiled -} // namespace Internal diff --git a/src/tiled/rotatemapobject.cpp b/src/tiled/rotatemapobject.cpp index e2951ad465..abd260185c 100644 --- a/src/tiled/rotatemapobject.cpp +++ b/src/tiled/rotatemapobject.cpp @@ -27,7 +27,6 @@ #include using namespace Tiled; -using namespace Tiled::Internal; RotateMapObject::RotateMapObject(MapDocument *mapDocument, MapObject *mapObject, diff --git a/src/tiled/rotatemapobject.h b/src/tiled/rotatemapobject.h index c7297d62a1..284888a269 100644 --- a/src/tiled/rotatemapobject.h +++ b/src/tiled/rotatemapobject.h @@ -26,8 +26,6 @@ namespace Tiled { class MapObject; -namespace Internal { - class MapDocument; class RotateMapObject : public QUndoCommand @@ -53,5 +51,4 @@ class RotateMapObject : public QUndoCommand bool mOldChangeState; }; -} // namespace Internal } // namespace Tiled diff --git a/src/tiled/scriptmanager.cpp b/src/tiled/scriptmanager.cpp index 89a86d9811..f0be2ac136 100644 --- a/src/tiled/scriptmanager.cpp +++ b/src/tiled/scriptmanager.cpp @@ -35,7 +35,6 @@ #include namespace Tiled { -namespace Internal { std::unique_ptr ScriptManager::mInstance; @@ -126,5 +125,4 @@ void ScriptManager::throwError(const QString &message) #endif } -} // namespace Internal } // namespace Tiled diff --git a/src/tiled/scriptmanager.h b/src/tiled/scriptmanager.h index 5c14daa755..e6d2a50901 100644 --- a/src/tiled/scriptmanager.h +++ b/src/tiled/scriptmanager.h @@ -28,7 +28,6 @@ class QJSEngine; namespace Tiled { -namespace Internal { class ScriptModule; @@ -72,5 +71,4 @@ inline QJSEngine *ScriptManager::engine() const return mEngine; } -} // namespace Internal } // namespace Tiled diff --git a/src/tiled/scriptmodule.cpp b/src/tiled/scriptmodule.cpp index 1f535a06ce..7cceb2fbe2 100644 --- a/src/tiled/scriptmodule.cpp +++ b/src/tiled/scriptmodule.cpp @@ -30,7 +30,6 @@ #include namespace Tiled { -namespace Internal { ScriptModule::ScriptModule(QObject *parent) : QObject(parent) @@ -170,5 +169,4 @@ void ScriptModule::currentDocumentChanged(Document *document) emit activeAssetChanged(document ? document->editable() : nullptr); } -} // namespace Internal } // namespace Tiled diff --git a/src/tiled/scriptmodule.h b/src/tiled/scriptmodule.h index 97181aa594..bb2d6d42a1 100644 --- a/src/tiled/scriptmodule.h +++ b/src/tiled/scriptmodule.h @@ -28,8 +28,6 @@ namespace Tiled { class LoggingInterface; -namespace Internal { - class EditableAsset; /** @@ -43,7 +41,7 @@ class ScriptModule : public QObject Q_PROPERTY(QString platform READ platform) Q_PROPERTY(QString arch READ arch) - Q_PROPERTY(Tiled::Internal::EditableAsset *activeAsset READ activeAsset WRITE setActiveAsset NOTIFY activeAssetChanged) + Q_PROPERTY(Tiled::EditableAsset *activeAsset READ activeAsset WRITE setActiveAsset NOTIFY activeAssetChanged) Q_PROPERTY(QList openAssets READ openAssets) public: @@ -60,13 +58,13 @@ class ScriptModule : public QObject QList openAssets() const; signals: - void assetCreated(Tiled::Internal::EditableAsset *asset); - void assetOpened(Tiled::Internal::EditableAsset *asset); - void assetAboutToBeSaved(Tiled::Internal::EditableAsset *asset); - void assetSaved(Tiled::Internal::EditableAsset *asset); - void assetAboutToBeClosed(Tiled::Internal::EditableAsset *asset); + void assetCreated(Tiled::EditableAsset *asset); + void assetOpened(Tiled::EditableAsset *asset); + void assetAboutToBeSaved(Tiled::EditableAsset *asset); + void assetSaved(Tiled::EditableAsset *asset); + void assetAboutToBeClosed(Tiled::EditableAsset *asset); - void activeAssetChanged(Tiled::Internal::EditableAsset *asset); + void activeAssetChanged(Tiled::EditableAsset *asset); public slots: void trigger(const QByteArray &actionName) const; @@ -90,5 +88,4 @@ private slots: LoggingInterface *mLogger; }; -} // namespace Internal } // namespace Tiled diff --git a/src/tiled/selectionrectangle.cpp b/src/tiled/selectionrectangle.cpp index 35a0a59641..a205b0a7b5 100644 --- a/src/tiled/selectionrectangle.cpp +++ b/src/tiled/selectionrectangle.cpp @@ -28,7 +28,6 @@ #include using namespace Tiled; -using namespace Tiled::Internal; SelectionRectangle::SelectionRectangle(QGraphicsItem *parent) : QGraphicsItem(parent) diff --git a/src/tiled/selectionrectangle.h b/src/tiled/selectionrectangle.h index 60e19105eb..7d0bfc0288 100644 --- a/src/tiled/selectionrectangle.h +++ b/src/tiled/selectionrectangle.h @@ -23,7 +23,6 @@ #include namespace Tiled { -namespace Internal { /** * The rectangle used for indicating the dragged area when selecting items. @@ -44,5 +43,4 @@ class SelectionRectangle : public QGraphicsItem QRectF mRectangle; }; -} // namespace Internal } // namespace Tiled diff --git a/src/tiled/selectsametiletool.cpp b/src/tiled/selectsametiletool.cpp index 30c104adb3..dce3ab2789 100644 --- a/src/tiled/selectsametiletool.cpp +++ b/src/tiled/selectsametiletool.cpp @@ -25,7 +25,6 @@ #include "mapdocument.h" using namespace Tiled; -using namespace Tiled::Internal; SelectSameTileTool::SelectSameTileTool(QObject *parent) : AbstractTileSelectionTool(tr("Select Same Tile"), diff --git a/src/tiled/selectsametiletool.h b/src/tiled/selectsametiletool.h index 08ed62fb2f..badb556d28 100644 --- a/src/tiled/selectsametiletool.h +++ b/src/tiled/selectsametiletool.h @@ -27,7 +27,6 @@ #include "tilelayer.h" namespace Tiled { -namespace Internal { class MapDocument; @@ -47,5 +46,4 @@ class SelectSameTileTool : public AbstractTileSelectionTool void tilePositionChanged(const QPoint &tilePos) override; }; -} // namespace Internal } // namespace Tiled diff --git a/src/tiled/shapefilltool.cpp b/src/tiled/shapefilltool.cpp index cb606aae5b..f7da5b1e22 100644 --- a/src/tiled/shapefilltool.cpp +++ b/src/tiled/shapefilltool.cpp @@ -34,7 +34,6 @@ #include using namespace Tiled; -using namespace Internal; ShapeFillTool::ShapeFillTool(QObject *parent) : AbstractTileFillTool(tr("Shape Fill Tool"), diff --git a/src/tiled/shapefilltool.h b/src/tiled/shapefilltool.h index c9944d2e79..82be7ef74b 100644 --- a/src/tiled/shapefilltool.h +++ b/src/tiled/shapefilltool.h @@ -25,7 +25,6 @@ class QAction; namespace Tiled { -namespace Internal { class ShapeFillTool : public AbstractTileFillTool { @@ -69,5 +68,4 @@ class ShapeFillTool : public AbstractTileFillTool void updateFillOverlay(); }; -} // namespace Internal } // namespace Tiled diff --git a/src/tiled/snaphelper.cpp b/src/tiled/snaphelper.cpp index 91a76a21cd..a061ee1855 100644 --- a/src/tiled/snaphelper.cpp +++ b/src/tiled/snaphelper.cpp @@ -24,7 +24,6 @@ #include "preferences.h" namespace Tiled { -namespace Internal { SnapHelper::SnapHelper(const MapRenderer *renderer, Qt::KeyboardModifiers modifiers) @@ -63,5 +62,4 @@ void SnapHelper::snap(QPointF &pixelPos) const } } -} // namespace Internal } // namespace Tiled diff --git a/src/tiled/snaphelper.h b/src/tiled/snaphelper.h index e904d69d18..8a23d67031 100644 --- a/src/tiled/snaphelper.h +++ b/src/tiled/snaphelper.h @@ -24,7 +24,6 @@ #include "maprenderer.h" namespace Tiled { -namespace Internal { class SnapHelper { @@ -44,5 +43,4 @@ class SnapHelper bool mSnapToPixels; }; -} // namespace Internal } // namespace Tiled diff --git a/src/tiled/stampactions.cpp b/src/tiled/stampactions.cpp index c250659a58..7262d6fa9b 100644 --- a/src/tiled/stampactions.cpp +++ b/src/tiled/stampactions.cpp @@ -24,7 +24,6 @@ #include using namespace Tiled; -using namespace Tiled::Internal; StampActions::StampActions(QObject *parent) : QObject(parent) { diff --git a/src/tiled/stampactions.h b/src/tiled/stampactions.h index 6d11d0fc83..06e1d7a9be 100644 --- a/src/tiled/stampactions.h +++ b/src/tiled/stampactions.h @@ -26,7 +26,6 @@ class QAction; class QToolBar; namespace Tiled { -namespace Internal { class StampActions : public QObject { @@ -55,5 +54,4 @@ class StampActions : public QObject QAction *mRotateRight; }; -} // namespace Internal } // namespace Tiled diff --git a/src/tiled/stampbrush.cpp b/src/tiled/stampbrush.cpp index 5c95d75fad..ae3e1503d3 100644 --- a/src/tiled/stampbrush.cpp +++ b/src/tiled/stampbrush.cpp @@ -43,7 +43,6 @@ #include using namespace Tiled; -using namespace Tiled::Internal; StampBrush::StampBrush(QObject *parent) : AbstractTileTool(tr("Stamp Brush"), diff --git a/src/tiled/stampbrush.h b/src/tiled/stampbrush.h index 1cbfb4e433..cf0e5344f5 100644 --- a/src/tiled/stampbrush.h +++ b/src/tiled/stampbrush.h @@ -32,8 +32,6 @@ namespace Tiled { class Tile; class WangSet; -namespace Internal { - class MapDocument; class StampActions; class WangFiller; @@ -162,5 +160,4 @@ public slots: StampActions *mStampActions; }; -} // namespace Internal } // namespace Tiled diff --git a/src/tiled/standardautoupdater.cpp b/src/tiled/standardautoupdater.cpp index 629674ca78..185bd56b5d 100644 --- a/src/tiled/standardautoupdater.cpp +++ b/src/tiled/standardautoupdater.cpp @@ -22,8 +22,7 @@ #include "preferences.h" -using namespace Tiled::Internal; - +using namespace Tiled; StandardAutoUpdater::StandardAutoUpdater() { diff --git a/src/tiled/stylehelper.cpp b/src/tiled/stylehelper.cpp index 51b6abe9a7..49a2070e4d 100644 --- a/src/tiled/stylehelper.cpp +++ b/src/tiled/stylehelper.cpp @@ -29,7 +29,6 @@ #include namespace Tiled { -namespace Internal { StyleHelper *StyleHelper::mInstance; @@ -143,5 +142,4 @@ void StyleHelper::apply() emit styleApplied(); } -} // namespace Internal } // namespace Tiled diff --git a/src/tiled/stylehelper.h b/src/tiled/stylehelper.h index cb71ac4137..dbf82748cc 100644 --- a/src/tiled/stylehelper.h +++ b/src/tiled/stylehelper.h @@ -24,7 +24,6 @@ #include namespace Tiled { -namespace Internal { class StyleHelper : public QObject { @@ -51,5 +50,4 @@ class StyleHelper : public QObject static StyleHelper *mInstance; }; -} // namespace Internal } // namespace Tiled diff --git a/src/tiled/swaptiles.cpp b/src/tiled/swaptiles.cpp index d52068cdd6..de2fa9c7fd 100644 --- a/src/tiled/swaptiles.cpp +++ b/src/tiled/swaptiles.cpp @@ -29,7 +29,6 @@ #include namespace Tiled { -namespace Internal { SwapTiles::SwapTiles(MapDocument *mapDocument, Tile *tile1, @@ -96,5 +95,4 @@ void SwapTiles::swap() emit mMapDocument->mapObjectModel()->objectsChanged(changedObjects); } -} // namespace Internal } // namespace Tiled diff --git a/src/tiled/swaptiles.h b/src/tiled/swaptiles.h index ba58b78d9c..4053b97c46 100644 --- a/src/tiled/swaptiles.h +++ b/src/tiled/swaptiles.h @@ -29,8 +29,6 @@ namespace Tiled { class Tile; -namespace Internal { - class MapDocument; /** @@ -61,7 +59,6 @@ class SwapTiles : public QUndoCommand Tile *mTile2; }; -} // namespace Internal } // namespace Tiled #endif // SWAPTILES_H diff --git a/src/tiled/templatesdock.cpp b/src/tiled/templatesdock.cpp index c9de23c87e..299e77f396 100644 --- a/src/tiled/templatesdock.cpp +++ b/src/tiled/templatesdock.cpp @@ -51,7 +51,6 @@ #include using namespace Tiled; -using namespace Tiled::Internal; // This references created dummy documents, to make sure they are shared if the // same template is open in the MapEditor and the TilesetEditor. diff --git a/src/tiled/templatesdock.h b/src/tiled/templatesdock.h index f2e8a7bffd..617b770d70 100644 --- a/src/tiled/templatesdock.h +++ b/src/tiled/templatesdock.h @@ -38,8 +38,6 @@ class ObjectTemplate; class MapObject; class Tile; -namespace Internal { - class AbstractTool; class MapScene; class MapView; @@ -135,5 +133,4 @@ public slots: inline void TemplatesDock::setPropertiesDock(PropertiesDock *propertiesDock) { mPropertiesDock = propertiesDock; } -} // namespace Internal } // namespace Tiled diff --git a/src/tiled/terrainbrush.cpp b/src/tiled/terrainbrush.cpp index 0af32f025c..3a7cacb3dd 100644 --- a/src/tiled/terrainbrush.cpp +++ b/src/tiled/terrainbrush.cpp @@ -42,7 +42,6 @@ #include using namespace Tiled; -using namespace Tiled::Internal; TerrainBrush::TerrainBrush(QObject *parent) : AbstractTileTool(tr("Terrain Brush"), diff --git a/src/tiled/terrainbrush.h b/src/tiled/terrainbrush.h index 2b806a08cb..e108b5d967 100644 --- a/src/tiled/terrainbrush.h +++ b/src/tiled/terrainbrush.h @@ -30,8 +30,6 @@ namespace Tiled { class Tile; class Terrain; -namespace Internal { - class MapDocument; /** @@ -142,5 +140,4 @@ class TerrainBrush : public AbstractTileTool int mLineReferenceX, mLineReferenceY; }; -} // namespace Internal } // namespace Tiled diff --git a/src/tiled/terraindock.cpp b/src/tiled/terraindock.cpp index b3dd01ba04..9aef69fc8a 100644 --- a/src/tiled/terraindock.cpp +++ b/src/tiled/terraindock.cpp @@ -44,10 +44,8 @@ #include using namespace Tiled; -using namespace Tiled::Internal; namespace Tiled { -namespace Internal { static Terrain *firstTerrain(MapDocument *mapDocument) { @@ -99,7 +97,6 @@ class TerrainFilterModel : public QSortFilterProxyModel bool mEnabled; }; -} // namespace Internal } // namespace Tiled TerrainDock::TerrainDock(QWidget *parent) diff --git a/src/tiled/terraindock.h b/src/tiled/terraindock.h index c9cbecb6cf..a9d7207c53 100644 --- a/src/tiled/terraindock.h +++ b/src/tiled/terraindock.h @@ -34,8 +34,6 @@ namespace Tiled { class Terrain; -namespace Internal { - class Document; class TerrainFilterModel; class TerrainModel; @@ -119,5 +117,4 @@ private slots: bool mInitializing; }; -} // namespace Internal } // namespace Tiled diff --git a/src/tiled/terrainmodel.cpp b/src/tiled/terrainmodel.cpp index c623d7e6e8..4be94d1662 100644 --- a/src/tiled/terrainmodel.cpp +++ b/src/tiled/terrainmodel.cpp @@ -38,7 +38,6 @@ #include using namespace Tiled; -using namespace Tiled::Internal; TerrainModel::TerrainModel(QAbstractItemModel *tilesetDocumentsModel, QObject *parent): diff --git a/src/tiled/terrainmodel.h b/src/tiled/terrainmodel.h index 402d7cc6bd..8a70c2d68b 100644 --- a/src/tiled/terrainmodel.h +++ b/src/tiled/terrainmodel.h @@ -30,8 +30,6 @@ namespace Tiled { class Tileset; class Terrain; -namespace Internal { - class TilesetDocument; /** @@ -107,5 +105,4 @@ private slots: QList mTilesetDocuments; }; -} // namespace Internal } // namespace Tiled diff --git a/src/tiled/terrainview.cpp b/src/tiled/terrainview.cpp index 0c1d9c0790..f09eab5229 100644 --- a/src/tiled/terrainview.cpp +++ b/src/tiled/terrainview.cpp @@ -37,7 +37,6 @@ #include using namespace Tiled; -using namespace Tiled::Internal; TerrainView::TerrainView(QWidget *parent) : QTreeView(parent) diff --git a/src/tiled/terrainview.h b/src/tiled/terrainview.h index c12d8378ef..4f84f52cb1 100644 --- a/src/tiled/terrainview.h +++ b/src/tiled/terrainview.h @@ -26,7 +26,6 @@ #include namespace Tiled { -namespace Internal { class TilesetDocument; class Zoomable; @@ -70,7 +69,6 @@ private slots: TilesetDocument *mTilesetDocument; }; -} // namespace Internal } // namespace Tiled -Q_DECLARE_METATYPE(Tiled::Internal::TerrainView *) +Q_DECLARE_METATYPE(Tiled::TerrainView *) diff --git a/src/tiled/texteditordialog.cpp b/src/tiled/texteditordialog.cpp index f1f3155bbe..eef207363f 100644 --- a/src/tiled/texteditordialog.cpp +++ b/src/tiled/texteditordialog.cpp @@ -24,7 +24,6 @@ #include "utils.h" namespace Tiled { -namespace Internal { TextEditorDialog::TextEditorDialog(QWidget *parent) : QDialog(parent) @@ -67,5 +66,4 @@ void TextEditorDialog::changeEvent(QEvent *e) } } -} // namespace Internal } // namespace Tiled diff --git a/src/tiled/texteditordialog.h b/src/tiled/texteditordialog.h index ab50ad61a1..9eebe71c71 100644 --- a/src/tiled/texteditordialog.h +++ b/src/tiled/texteditordialog.h @@ -27,7 +27,6 @@ class TextEditorDialog; } namespace Tiled { -namespace Internal { class TextEditorDialog : public QDialog { @@ -47,5 +46,4 @@ class TextEditorDialog : public QDialog Ui::TextEditorDialog *mUi; }; -} // namespace Internal } // namespace Tiled diff --git a/src/tiled/textpropertyedit.cpp b/src/tiled/textpropertyedit.cpp index bd1629aede..4ff9e9c182 100644 --- a/src/tiled/textpropertyedit.cpp +++ b/src/tiled/textpropertyedit.cpp @@ -34,7 +34,6 @@ #include namespace Tiled { -namespace Internal { namespace { @@ -181,5 +180,4 @@ void TextPropertyEdit::onButtonClicked() } } -} // namespace Internal } // namespace Tiled diff --git a/src/tiled/textpropertyedit.h b/src/tiled/textpropertyedit.h index 628f0390f4..691b3499ec 100644 --- a/src/tiled/textpropertyedit.h +++ b/src/tiled/textpropertyedit.h @@ -28,7 +28,6 @@ class QLineEdit; namespace Tiled { -namespace Internal { QString escapeNewlines(const QString &string); @@ -60,5 +59,4 @@ private slots: QString mCachedText; }; -} // namespace Internal } // namespace Tiled diff --git a/src/tiled/tileanimationeditor.cpp b/src/tiled/tileanimationeditor.cpp index 4ee5b7a6a7..45ec5d6ad7 100644 --- a/src/tiled/tileanimationeditor.cpp +++ b/src/tiled/tileanimationeditor.cpp @@ -43,7 +43,6 @@ static const char * const FRAME_DURATION_KEY = "Animation/FrameDuration"; namespace Tiled { -namespace Internal { class FrameListModel : public QAbstractListModel { @@ -565,7 +564,6 @@ void TileAnimationEditor::resetPreview() "Preview")); } -} // namespace Internal } // namespace Tiled #include "tileanimationeditor.moc" diff --git a/src/tiled/tileanimationeditor.h b/src/tiled/tileanimationeditor.h index 36073b52c8..f14562e4f3 100644 --- a/src/tiled/tileanimationeditor.h +++ b/src/tiled/tileanimationeditor.h @@ -34,8 +34,6 @@ class Tile; class TileAnimationDriver; class Tileset; -namespace Internal { - class FrameListModel; class TilesetDocument; @@ -92,5 +90,4 @@ private slots: int mPreviewUnusedTime; }; -} // namespace Internal } // namespace Tiled diff --git a/src/tiled/tileanimationeditor.ui b/src/tiled/tileanimationeditor.ui index 4fc9227605..0dd13fcde7 100644 --- a/src/tiled/tileanimationeditor.ui +++ b/src/tiled/tileanimationeditor.ui @@ -153,7 +153,7 @@ - + 0 @@ -186,7 +186,7 @@ - Tiled::Internal::TilesetView + Tiled::TilesetView QTableView
tilesetview.h
diff --git a/src/tiled/tilecollisiondock.cpp b/src/tiled/tilecollisiondock.cpp index ecdd4c6337..e4eead8e2d 100644 --- a/src/tiled/tilecollisiondock.cpp +++ b/src/tiled/tilecollisiondock.cpp @@ -55,7 +55,6 @@ #include namespace Tiled { -namespace Internal { TileCollisionDock::TileCollisionDock(QWidget *parent) : QDockWidget(parent) @@ -375,8 +374,7 @@ void TileCollisionDock::changeEvent(QEvent *e) void TileCollisionDock::retranslateUi() { - setWindowTitle(QCoreApplication::translate("Tiled::Internal::MainWindow", "Tile Collision Editor")); + setWindowTitle(QCoreApplication::translate("Tiled::MainWindow", "Tile Collision Editor")); } -} // namespace Internal } // namespace Tiled diff --git a/src/tiled/tilecollisiondock.h b/src/tiled/tilecollisiondock.h index 703b86588b..32bc4d26a5 100644 --- a/src/tiled/tilecollisiondock.h +++ b/src/tiled/tilecollisiondock.h @@ -32,8 +32,6 @@ class Object; class Tile; class Tileset; -namespace Internal { - class AbstractTool; class MapScene; class MapView; @@ -117,7 +115,6 @@ inline bool TileCollisionDock::hasSelectedObjects() const return mHasSelectedObjects; } -} // namespace Internal } // namespace Tiled #endif // TILECOLLISIONDOCK_H diff --git a/src/tiled/tiledapplication.cpp b/src/tiled/tiledapplication.cpp index 877dc86032..ede806dd7d 100644 --- a/src/tiled/tiledapplication.cpp +++ b/src/tiled/tiledapplication.cpp @@ -25,7 +25,6 @@ #include using namespace Tiled; -using namespace Tiled::Internal; TiledApplication::TiledApplication(int &argc, char **argv) : QtSingleApplication(argc, argv) diff --git a/src/tiled/tiledapplication.h b/src/tiled/tiledapplication.h index 9353c4c585..411de4810a 100644 --- a/src/tiled/tiledapplication.h +++ b/src/tiled/tiledapplication.h @@ -23,7 +23,6 @@ #include namespace Tiled { -namespace Internal { /** * Custom QApplication subclass which handles the QFileOpenEvent, in order @@ -46,5 +45,4 @@ private slots: void onMessageReceived(const QString &message); }; -} // namespace Internal } // namespace Tiled diff --git a/src/tiled/tiledproxystyle.cpp b/src/tiled/tiledproxystyle.cpp index 2e8b6d2d7f..84db7b00f5 100644 --- a/src/tiled/tiledproxystyle.cpp +++ b/src/tiled/tiledproxystyle.cpp @@ -33,7 +33,6 @@ #include using namespace Tiled; -using namespace Tiled::Internal; /* * Below there are a lot of helper functions which are copied from various diff --git a/src/tiled/tiledproxystyle.h b/src/tiled/tiledproxystyle.h index 7ea832b795..db72eb0349 100644 --- a/src/tiled/tiledproxystyle.h +++ b/src/tiled/tiledproxystyle.h @@ -23,7 +23,6 @@ #include namespace Tiled { -namespace Internal { class TiledProxyStyle : public QProxyStyle { @@ -86,5 +85,4 @@ inline bool TiledProxyStyle::isDark() const return mIsDark; } -} // namespace Internal } // namespace Tiled diff --git a/src/tiled/tilelayeritem.cpp b/src/tiled/tilelayeritem.cpp index 5eb69871fe..d29e69e5d0 100644 --- a/src/tiled/tilelayeritem.cpp +++ b/src/tiled/tilelayeritem.cpp @@ -29,7 +29,6 @@ #include using namespace Tiled; -using namespace Tiled::Internal; TileLayerItem::TileLayerItem(TileLayer *layer, MapDocument *mapDocument, QGraphicsItem *parent) : LayerItem(layer, parent) diff --git a/src/tiled/tilelayeritem.h b/src/tiled/tilelayeritem.h index ebd6a340eb..343f18306b 100644 --- a/src/tiled/tilelayeritem.h +++ b/src/tiled/tilelayeritem.h @@ -25,7 +25,6 @@ #include "tilelayer.h" namespace Tiled { -namespace Internal { class MapDocument; @@ -71,5 +70,4 @@ inline TileLayer *TileLayerItem::tileLayer() const return static_cast(layer()); } -} // namespace Internal } // namespace Tiled diff --git a/src/tiled/tilepainter.cpp b/src/tiled/tilepainter.cpp index 4c79774bcf..7eba968e5c 100644 --- a/src/tiled/tilepainter.cpp +++ b/src/tiled/tilepainter.cpp @@ -27,7 +27,6 @@ #include using namespace Tiled; -using namespace Tiled::Internal; namespace { diff --git a/src/tiled/tilepainter.h b/src/tiled/tilepainter.h index d3c7ef1fab..bdddd749c3 100644 --- a/src/tiled/tilepainter.h +++ b/src/tiled/tilepainter.h @@ -26,7 +26,6 @@ #include namespace Tiled { -namespace Internal { class MapDocument; @@ -124,4 +123,3 @@ inline Cell TilePainter::cellAt(QPoint pos) const } } // namespace Tiled -} // namespace Internal diff --git a/src/tiled/tileselectionitem.cpp b/src/tiled/tileselectionitem.cpp index 6dc114063c..66c4a2ee1a 100644 --- a/src/tiled/tileselectionitem.cpp +++ b/src/tiled/tileselectionitem.cpp @@ -31,7 +31,6 @@ #include using namespace Tiled; -using namespace Tiled::Internal; TileSelectionItem::TileSelectionItem(MapDocument *mapDocument, QGraphicsItem *parent) diff --git a/src/tiled/tileselectionitem.h b/src/tiled/tileselectionitem.h index 350ec8825f..27d0380b85 100644 --- a/src/tiled/tileselectionitem.h +++ b/src/tiled/tileselectionitem.h @@ -26,8 +26,6 @@ namespace Tiled { class Layer; -namespace Internal { - class MapDocument; /** @@ -63,5 +61,4 @@ private slots: QRectF mBoundingRect; }; -} // namespace Internal } // namespace Tiled diff --git a/src/tiled/tileselectiontool.cpp b/src/tiled/tileselectiontool.cpp index 58c0603d03..290f6d0ea1 100644 --- a/src/tiled/tileselectiontool.cpp +++ b/src/tiled/tileselectiontool.cpp @@ -30,7 +30,6 @@ #include using namespace Tiled; -using namespace Tiled::Internal; TileSelectionTool::TileSelectionTool(QObject *parent) : AbstractTileSelectionTool(tr("Rectangular Select"), diff --git a/src/tiled/tileselectiontool.h b/src/tiled/tileselectiontool.h index 45759fff95..242858cc7c 100644 --- a/src/tiled/tileselectiontool.h +++ b/src/tiled/tileselectiontool.h @@ -23,7 +23,6 @@ #include "abstracttileselectiontool.h" namespace Tiled { -namespace Internal { class TileSelectionTool : public AbstractTileSelectionTool { @@ -54,5 +53,4 @@ class TileSelectionTool : public AbstractTileSelectionTool bool mSelecting; }; -} // namespace Internal } // namespace Tiled diff --git a/src/tiled/tilesetchanges.cpp b/src/tiled/tilesetchanges.cpp index 3c3148fade..f8a77c49d1 100644 --- a/src/tiled/tilesetchanges.cpp +++ b/src/tiled/tilesetchanges.cpp @@ -27,7 +27,6 @@ #include namespace Tiled { -namespace Internal { RenameTileset::RenameTileset(TilesetDocument *tilesetDocument, const QString &newName) @@ -211,5 +210,4 @@ void ChangeTilesetGridSize::swap() emit mTilesetDocument->tilesetChanged(&tileset); } -} // namespace Internal } // namespace Tiled diff --git a/src/tiled/tilesetchanges.h b/src/tiled/tilesetchanges.h index f40d0ad310..94e8604e5e 100644 --- a/src/tiled/tilesetchanges.h +++ b/src/tiled/tilesetchanges.h @@ -33,8 +33,6 @@ namespace Tiled { class Tileset; -namespace Internal { - class TilesetDocument; class RenameTileset : public QUndoCommand @@ -175,5 +173,4 @@ class ChangeTilesetGridSize : public QUndoCommand QSize mGridSize; }; -} // namespace Internal } // namespace Tiled diff --git a/src/tiled/tilesetdock.cpp b/src/tiled/tilesetdock.cpp index 28ac96fc45..c8102b3850 100644 --- a/src/tiled/tilesetdock.cpp +++ b/src/tiled/tilesetdock.cpp @@ -69,7 +69,6 @@ #include using namespace Tiled; -using namespace Tiled::Internal; namespace { diff --git a/src/tiled/tilesetdock.h b/src/tiled/tilesetdock.h index 473a7c78bb..01355fd7b6 100644 --- a/src/tiled/tilesetdock.h +++ b/src/tiled/tilesetdock.h @@ -46,8 +46,6 @@ class Tile; class TileLayer; class Tileset; -namespace Internal { - class Document; class MapDocument; class TilesetDocument; @@ -188,5 +186,4 @@ private slots: bool mSynchronizingSelection; }; -} // namespace Internal } // namespace Tiled diff --git a/src/tiled/tilesetdocument.cpp b/src/tiled/tilesetdocument.cpp index 852a598ff7..1c0045aa0d 100644 --- a/src/tiled/tilesetdocument.cpp +++ b/src/tiled/tilesetdocument.cpp @@ -36,7 +36,6 @@ #include namespace Tiled { -namespace Internal { class ReloadTileset : public QUndoCommand { @@ -400,5 +399,4 @@ void TilesetDocument::onWangSetRemoved(WangSet *wangSet) mWangColorModels.erase(wangSet); } -} // namespace Internal } // namespace Tiled diff --git a/src/tiled/tilesetdocument.h b/src/tiled/tilesetdocument.h index 17042afece..bcf58e98a1 100644 --- a/src/tiled/tilesetdocument.h +++ b/src/tiled/tilesetdocument.h @@ -32,7 +32,6 @@ namespace Tiled { -namespace Internal { class EditableTileset; class MapDocument; @@ -80,7 +79,7 @@ class TilesetDocument : public Document void swapTileset(SharedTileset &tileset); const SharedTileset &tileset() const; - Q_INVOKABLE Tiled::Internal::EditableAsset *editable() override; + Q_INVOKABLE Tiled::EditableAsset *editable() override; bool isEmbedded() const; void setClean(); @@ -207,5 +206,4 @@ inline const QList &TilesetDocument::selectedTiles() const return mSelectedTiles; } -} // namespace Internal } // namespace Tiled diff --git a/src/tiled/tilesetdocumentsmodel.cpp b/src/tiled/tilesetdocumentsmodel.cpp index e4d8e34950..7c00dc104e 100644 --- a/src/tiled/tilesetdocumentsmodel.cpp +++ b/src/tiled/tilesetdocumentsmodel.cpp @@ -28,7 +28,6 @@ #include namespace Tiled { -namespace Internal { TilesetDocumentsModel::TilesetDocumentsModel(QObject *parent) : QAbstractListModel(parent) @@ -135,5 +134,4 @@ bool TilesetDocumentsFilterModel::filterAcceptsRow(int sourceRow, const QModelIn return accepted; } -} // namespace Internal } // namespace Tiled diff --git a/src/tiled/tilesetdocumentsmodel.h b/src/tiled/tilesetdocumentsmodel.h index a0fa8cde9a..00f9d67ef8 100644 --- a/src/tiled/tilesetdocumentsmodel.h +++ b/src/tiled/tilesetdocumentsmodel.h @@ -31,8 +31,6 @@ namespace Tiled { class Tileset; -namespace Internal { - class MapDocument; /** @@ -112,7 +110,6 @@ class TilesetDocumentsFilterModel : public QSortFilterProxyModel MapDocument *mMapDocument; }; -} // namespace Internal } // namespace Tiled #endif // TILESETDOCUMENTSMODEL_H diff --git a/src/tiled/tileseteditor.cpp b/src/tiled/tileseteditor.cpp index a4b2317b7a..2ab6b89008 100644 --- a/src/tiled/tileseteditor.cpp +++ b/src/tiled/tileseteditor.cpp @@ -78,7 +78,6 @@ static const char SIZE_KEY[] = "TilesetEditor/Size"; static const char STATE_KEY[] = "TilesetEditor/State"; namespace Tiled { -namespace Internal { namespace { @@ -611,7 +610,7 @@ void TilesetEditor::retranslateUi() mRemoveTiles->setText(tr("Remove Tiles")); mShowAnimationEditor->setText(tr("Tile Animation Editor")); - mTileCollisionDock->toggleViewAction()->setShortcut(QCoreApplication::translate("Tiled::Internal::MainWindow", "Ctrl+Shift+O")); + mTileCollisionDock->toggleViewAction()->setShortcut(QCoreApplication::translate("Tiled::MainWindow", "Ctrl+Shift+O")); } static bool hasTileInTileset(const QUrl &imageSource, const Tileset &tileset) @@ -1048,7 +1047,6 @@ void TilesetEditor::updateAddRemoveActions() mRemoveTiles->setEnabled(isCollection && hasSelection); } -} // namespace Internal } // namespace Tiled #include "tileseteditor.moc" diff --git a/src/tiled/tileseteditor.h b/src/tiled/tileseteditor.h index 97b748e545..6022a732a4 100644 --- a/src/tiled/tileseteditor.h +++ b/src/tiled/tileseteditor.h @@ -41,8 +41,6 @@ class Terrain; class Tile; class Tileset; -namespace Internal { - class PropertiesDock; class TemplatesDock; class TerrainDock; @@ -185,5 +183,4 @@ inline TileAnimationEditor *TilesetEditor::tileAnimationEditor() const return mTileAnimationEditor; } -} // namespace Internal } // namespace Tiled diff --git a/src/tiled/tilesetmodel.cpp b/src/tiled/tilesetmodel.cpp index 12b5b3013d..9cbbd132f9 100644 --- a/src/tiled/tilesetmodel.cpp +++ b/src/tiled/tilesetmodel.cpp @@ -29,7 +29,6 @@ #include using namespace Tiled; -using namespace Tiled::Internal; TilesetModel::TilesetModel(Tileset *tileset, QObject *parent): QAbstractListModel(parent), diff --git a/src/tiled/tilesetmodel.h b/src/tiled/tilesetmodel.h index d98c0a5015..5c437ba62d 100644 --- a/src/tiled/tilesetmodel.h +++ b/src/tiled/tilesetmodel.h @@ -28,7 +28,6 @@ namespace Tiled { class Tile; class Tileset; -namespace Internal { /** * A model wrapping a tileset of a map. Used to display the tiles. @@ -145,5 +144,4 @@ public slots: QList mTileIds; }; -} // namespace Internal } // namespace Tiled diff --git a/src/tiled/tilesetparametersedit.cpp b/src/tiled/tilesetparametersedit.cpp index 2ff8b84796..17dec4e330 100644 --- a/src/tiled/tilesetparametersedit.cpp +++ b/src/tiled/tilesetparametersedit.cpp @@ -31,7 +31,6 @@ #include namespace Tiled { -namespace Internal { TilesetParametersEdit::TilesetParametersEdit(QWidget *parent) : QWidget(parent) @@ -84,5 +83,4 @@ void TilesetParametersEdit::buttonClicked() } } -} // namespace Internal } // namespace Tiled diff --git a/src/tiled/tilesetparametersedit.h b/src/tiled/tilesetparametersedit.h index 572f6adc2c..ee7b4ca147 100644 --- a/src/tiled/tilesetparametersedit.h +++ b/src/tiled/tilesetparametersedit.h @@ -25,7 +25,6 @@ class QLabel; namespace Tiled { -namespace Internal { class TilesetDocument; @@ -56,5 +55,4 @@ inline TilesetDocument *TilesetParametersEdit::tilesetDocument() const return mTilesetDocument; } -} // namespace Internal } // namespace Tiled diff --git a/src/tiled/tilesetterrainmodel.cpp b/src/tiled/tilesetterrainmodel.cpp index 87cb6c559b..0915b7d1bf 100644 --- a/src/tiled/tilesetterrainmodel.cpp +++ b/src/tiled/tilesetterrainmodel.cpp @@ -27,7 +27,6 @@ #include "tile.h" using namespace Tiled; -using namespace Tiled::Internal; TilesetTerrainModel::TilesetTerrainModel(TilesetDocument *tilesetDocument, QObject *parent): diff --git a/src/tiled/tilesetterrainmodel.h b/src/tiled/tilesetterrainmodel.h index 5acbcc8098..6072e4dbc6 100644 --- a/src/tiled/tilesetterrainmodel.h +++ b/src/tiled/tilesetterrainmodel.h @@ -27,8 +27,6 @@ namespace Tiled { class Tileset; class Terrain; -namespace Internal { - class TilesetDocument; /** @@ -114,5 +112,4 @@ class TilesetTerrainModel : public QAbstractListModel TilesetDocument *mTilesetDocument; }; -} // namespace Internal } // namespace Tiled diff --git a/src/tiled/tilesetview.cpp b/src/tiled/tilesetview.cpp index 5173170230..30ae6fc6be 100644 --- a/src/tiled/tilesetview.cpp +++ b/src/tiled/tilesetview.cpp @@ -48,7 +48,6 @@ #include using namespace Tiled; -using namespace Tiled::Internal; namespace { diff --git a/src/tiled/tilesetview.h b/src/tiled/tilesetview.h index 46481018ea..da0998291d 100644 --- a/src/tiled/tilesetview.h +++ b/src/tiled/tilesetview.h @@ -29,8 +29,6 @@ namespace Tiled { class Terrain; -namespace Internal { - class TilesetDocument; class Zoomable; @@ -206,7 +204,6 @@ inline bool TilesetView::markAnimatedTiles() const return mMarkAnimatedTiles; } -} // namespace Internal } // namespace Tiled -Q_DECLARE_METATYPE(Tiled::Internal::TilesetView *) +Q_DECLARE_METATYPE(Tiled::TilesetView *) diff --git a/src/tiled/tilesetwangsetmodel.cpp b/src/tiled/tilesetwangsetmodel.cpp index e3a034b70f..bae9f07565 100644 --- a/src/tiled/tilesetwangsetmodel.cpp +++ b/src/tiled/tilesetwangsetmodel.cpp @@ -27,7 +27,6 @@ #include "tile.h" using namespace Tiled; -using namespace Internal; TilesetWangSetModel::TilesetWangSetModel(TilesetDocument *mapDocument, QObject *parent): diff --git a/src/tiled/tilesetwangsetmodel.h b/src/tiled/tilesetwangsetmodel.h index b8dd74f5cd..fb19ea9cee 100644 --- a/src/tiled/tilesetwangsetmodel.h +++ b/src/tiled/tilesetwangsetmodel.h @@ -28,8 +28,6 @@ class Tileset; class WangSet; class WangColor; -namespace Internal { - class TilesetDocument; class TilesetWangSetModel : public QAbstractListModel @@ -92,5 +90,4 @@ class TilesetWangSetModel : public QAbstractListModel TilesetDocument *mTilesetDocument; }; -} // namespace Internal } // namespace Tiled diff --git a/src/tiled/tilestamp.cpp b/src/tiled/tilestamp.cpp index 6b9b002538..44473f7ac4 100644 --- a/src/tiled/tilestamp.cpp +++ b/src/tiled/tilestamp.cpp @@ -29,7 +29,6 @@ #include namespace Tiled { -namespace Internal { class TileStampData : public QSharedData { @@ -341,5 +340,4 @@ TileStamp TileStamp::fromJson(const QJsonObject &json, const QDir &mapDir) return stamp; } -} // namespace Internal } // namespace Tiled diff --git a/src/tiled/tilestamp.h b/src/tiled/tilestamp.h index e5cfdafe7d..8d9968c78e 100644 --- a/src/tiled/tilestamp.h +++ b/src/tiled/tilestamp.h @@ -30,7 +30,6 @@ #include namespace Tiled { -namespace Internal { struct TileStampVariation { @@ -52,7 +51,6 @@ struct TileStampVariation class TileStampData; - class TileStamp { public: @@ -111,5 +109,4 @@ inline void TileStamp::addVariation(const TileStampVariation &variation) addVariation(variation.map->clone(), variation.probability); } -} // namespace Internal } // namespace Tiled diff --git a/src/tiled/tilestampmanager.cpp b/src/tiled/tilestampmanager.cpp index 64f7499b37..64a5d4d20d 100644 --- a/src/tiled/tilestampmanager.cpp +++ b/src/tiled/tilestampmanager.cpp @@ -44,7 +44,6 @@ #include using namespace Tiled; -using namespace Tiled::Internal; static QString stampFilePath(const QString &name) { diff --git a/src/tiled/tilestampmanager.h b/src/tiled/tilestampmanager.h index de0edf6828..4538d69d2b 100644 --- a/src/tiled/tilestampmanager.h +++ b/src/tiled/tilestampmanager.h @@ -32,8 +32,6 @@ namespace Tiled { class Map; class TileLayer; -namespace Internal { - class MapDocument; class TileStamp; class TileStampModel; @@ -117,5 +115,4 @@ inline TileStampModel *TileStampManager::tileStampModel() const return mTileStampModel; } -} // namespace Tiled::Internal } // namespace Tiled diff --git a/src/tiled/tilestampmodel.cpp b/src/tiled/tilestampmodel.cpp index bc9bb1d610..a3fa4ba4ca 100644 --- a/src/tiled/tilestampmodel.cpp +++ b/src/tiled/tilestampmodel.cpp @@ -23,7 +23,6 @@ #include "minimaprenderer.h" namespace Tiled { -namespace Internal { TileStampModel::TileStampModel(QObject *parent) : QAbstractItemModel(parent) @@ -336,5 +335,4 @@ void TileStampModel::clear() endResetModel(); } -} // namespace Internal } // namespace Tiled diff --git a/src/tiled/tilestampmodel.h b/src/tiled/tilestampmodel.h index 9ce17a7e93..0a0d005a18 100644 --- a/src/tiled/tilestampmodel.h +++ b/src/tiled/tilestampmodel.h @@ -28,7 +28,6 @@ namespace Tiled { class Map; -namespace Internal { struct TileStampVariation; @@ -103,5 +102,4 @@ inline const QList &TileStampModel::stamps() const return mStamps; } -} // namespace Internal } // namespace Tiled diff --git a/src/tiled/tilestampsdock.cpp b/src/tiled/tilestampsdock.cpp index 770b293704..e097afc8ed 100644 --- a/src/tiled/tilestampsdock.cpp +++ b/src/tiled/tilestampsdock.cpp @@ -38,7 +38,6 @@ #include namespace Tiled { -namespace Internal { TileStampsDock::TileStampsDock(TileStampManager *stampManager, QWidget *parent) : QDockWidget(parent) @@ -337,5 +336,4 @@ bool TileStampView::event(QEvent *event) return QTreeView::event(event); } -} // namespace Internal } // namespace Tiled diff --git a/src/tiled/tilestampsdock.h b/src/tiled/tilestampsdock.h index d41a454849..a338d20ff7 100644 --- a/src/tiled/tilestampsdock.h +++ b/src/tiled/tilestampsdock.h @@ -29,8 +29,6 @@ namespace Tiled { class TileLayer; -namespace Internal { - class TileStamp; class TileStampManager; class TileStampModel; @@ -98,5 +96,4 @@ class TileStampView : public QTreeView bool event(QEvent *event) override; }; -} // namespace Internal } // namespace Tiled diff --git a/src/tiled/tmxmapformat.cpp b/src/tiled/tmxmapformat.cpp index 5184e388fb..bb237c3bda 100644 --- a/src/tiled/tmxmapformat.cpp +++ b/src/tiled/tmxmapformat.cpp @@ -31,7 +31,6 @@ #include using namespace Tiled; -using namespace Tiled::Internal; TmxMapFormat::TmxMapFormat(QObject *parent) : MapFormat(parent) diff --git a/src/tiled/tmxmapformat.h b/src/tiled/tmxmapformat.h index afcf5fa368..fee19f2e0a 100644 --- a/src/tiled/tmxmapformat.h +++ b/src/tiled/tmxmapformat.h @@ -29,7 +29,6 @@ namespace Tiled { class Tileset; class MapObject; -namespace Internal { /** * A reader and writer for Tiled's .tmx map format. @@ -130,5 +129,4 @@ class XmlObjectTemplateFormat : public ObjectTemplateFormat QString mError; }; -} // namespace Internal } // namespace Tiled diff --git a/src/tiled/toolmanager.cpp b/src/tiled/toolmanager.cpp index 126b2cc45e..a04ce2106e 100644 --- a/src/tiled/toolmanager.cpp +++ b/src/tiled/toolmanager.cpp @@ -27,7 +27,6 @@ #include using namespace Tiled; -using namespace Tiled::Internal; ToolManager::ToolManager(QObject *parent) : QObject(parent) diff --git a/src/tiled/toolmanager.h b/src/tiled/toolmanager.h index e7604df0a7..aea378551f 100644 --- a/src/tiled/toolmanager.h +++ b/src/tiled/toolmanager.h @@ -30,8 +30,6 @@ namespace Tiled { class Tile; class ObjectTemplate; -namespace Internal { - class AbstractTool; class MapDocument; @@ -149,5 +147,4 @@ inline void ToolManager::setObjectTemplate(ObjectTemplate *objectTemplate) mObjectTemplate = objectTemplate; } -} // namespace Internal } // namespace Tiled diff --git a/src/tiled/treeviewcombobox.cpp b/src/tiled/treeviewcombobox.cpp index bbaf6651d9..0266ec46f0 100644 --- a/src/tiled/treeviewcombobox.cpp +++ b/src/tiled/treeviewcombobox.cpp @@ -28,7 +28,6 @@ #include namespace Tiled { -namespace Internal { TreeViewComboBoxView::TreeViewComboBoxView(QWidget *parent) : QTreeView(parent) @@ -170,5 +169,4 @@ TreeViewComboBoxView *TreeViewComboBox::view() const return m_view; } -} // namespace Internal } // namespace Tiled diff --git a/src/tiled/treeviewcombobox.h b/src/tiled/treeviewcombobox.h index 743ee1f959..377b513031 100644 --- a/src/tiled/treeviewcombobox.h +++ b/src/tiled/treeviewcombobox.h @@ -29,7 +29,6 @@ #include namespace Tiled { -namespace Internal { class TreeViewComboBoxView : public QTreeView { @@ -75,5 +74,4 @@ inline QModelIndex TreeViewComboBox::currentModelIndex() const return m_view->currentIndex(); } -} // namespace Internal } // namespace Tiled diff --git a/src/tiled/undocommands.cpp b/src/tiled/undocommands.cpp index 092f07c323..71cdaf6761 100644 --- a/src/tiled/undocommands.cpp +++ b/src/tiled/undocommands.cpp @@ -23,7 +23,6 @@ #include namespace Tiled { -namespace Internal { bool cloneChildren(const QUndoCommand *command, QUndoCommand *parent) { @@ -41,5 +40,4 @@ bool cloneChildren(const QUndoCommand *command, QUndoCommand *parent) return true; } -} // namespace Internal } // namespace Tiled diff --git a/src/tiled/undocommands.h b/src/tiled/undocommands.h index ab49d451cd..65701a5e48 100644 --- a/src/tiled/undocommands.h +++ b/src/tiled/undocommands.h @@ -23,7 +23,6 @@ class QUndoCommand; namespace Tiled { -namespace Internal { /** * These undo command IDs are used by Qt to determine whether two undo commands @@ -55,5 +54,4 @@ class ClonableUndoCommand bool cloneChildren(const QUndoCommand *command, QUndoCommand *parent); -} // namespace Internal } // namespace Tiled diff --git a/src/tiled/undodock.cpp b/src/tiled/undodock.cpp index 3af3d351c7..7640f3b2f5 100644 --- a/src/tiled/undodock.cpp +++ b/src/tiled/undodock.cpp @@ -26,7 +26,6 @@ #include using namespace Tiled; -using namespace Tiled::Internal; UndoDock::UndoDock(QWidget *parent) : QDockWidget(parent) diff --git a/src/tiled/undodock.h b/src/tiled/undodock.h index 784c150c91..418521ccde 100644 --- a/src/tiled/undodock.h +++ b/src/tiled/undodock.h @@ -27,7 +27,6 @@ class QUndoStack; class QUndoView; namespace Tiled { -namespace Internal { /** * A dock widget showing the undo stack. Mainly for debugging, but can also be @@ -50,5 +49,4 @@ class UndoDock : public QDockWidget QUndoView *mUndoView; }; -} // namespace Internal } // namespace Tiled diff --git a/src/tiled/utils.cpp b/src/tiled/utils.cpp index b8a42b35bb..4fb86505a1 100644 --- a/src/tiled/utils.cpp +++ b/src/tiled/utils.cpp @@ -120,7 +120,7 @@ void restoreGeometry(QWidget *widget) { Q_ASSERT(!widget->objectName().isEmpty()); - const QSettings *settings = Internal::Preferences::instance()->settings(); + const QSettings *settings = Preferences::instance()->settings(); const QString key = widget->objectName() + QLatin1String("/Geometry"); widget->restoreGeometry(settings->value(key).toByteArray()); @@ -139,7 +139,7 @@ void saveGeometry(QWidget *widget) { Q_ASSERT(!widget->objectName().isEmpty()); - QSettings *settings = Internal::Preferences::instance()->settings(); + QSettings *settings = Preferences::instance()->settings(); const QString key = widget->objectName() + QLatin1String("/Geometry"); settings->setValue(key, widget->saveGeometry()); diff --git a/src/tiled/varianteditorfactory.cpp b/src/tiled/varianteditorfactory.cpp index 70da7a31d9..44f1560ceb 100644 --- a/src/tiled/varianteditorfactory.cpp +++ b/src/tiled/varianteditorfactory.cpp @@ -33,7 +33,6 @@ #include namespace Tiled { -namespace Internal { class ResetWidget : public QWidget { @@ -279,7 +278,6 @@ void VariantEditorFactory::slotEditorDestroyed(QObject *object) } } -} // namespace Internal } // namespace Tiled #include "varianteditorfactory.moc" diff --git a/src/tiled/varianteditorfactory.h b/src/tiled/varianteditorfactory.h index da89dd76d2..4d5f4b7d3e 100644 --- a/src/tiled/varianteditorfactory.h +++ b/src/tiled/varianteditorfactory.h @@ -24,7 +24,6 @@ #include namespace Tiled { -namespace Internal { class FileEdit; class TextPropertyEdit; @@ -78,5 +77,4 @@ private slots: QMap mTextPropertyEditToProperty; }; -} // namespace Internal } // namespace Tiled diff --git a/src/tiled/variantpropertymanager.cpp b/src/tiled/variantpropertymanager.cpp index 3c84ae4463..8ee47382d2 100644 --- a/src/tiled/variantpropertymanager.cpp +++ b/src/tiled/variantpropertymanager.cpp @@ -28,21 +28,18 @@ #include namespace Tiled { -namespace Internal { class TilesetParametersPropertyType {}; class AlignmentPropertyType {}; } // namespace Tiled -} // namespace Internal // Needs to be up here rather than at the bottom of the file to make a // static_assert in qMetaTypeId work (as of C++11) -Q_DECLARE_METATYPE(Tiled::Internal::TilesetParametersPropertyType) -Q_DECLARE_METATYPE(Tiled::Internal::AlignmentPropertyType) +Q_DECLARE_METATYPE(Tiled::TilesetParametersPropertyType) +Q_DECLARE_METATYPE(Tiled::AlignmentPropertyType) namespace Tiled { -namespace Internal { VariantPropertyManager::VariantPropertyManager(QObject *parent) : QtVariantPropertyManager(parent) @@ -435,5 +432,4 @@ QString VariantPropertyManager::indexVToString(int idx) const return tr("Center"); } -} // namespace Internal } // namespace Tiled diff --git a/src/tiled/variantpropertymanager.h b/src/tiled/variantpropertymanager.h index 10fdaeef6c..9effc680ad 100644 --- a/src/tiled/variantpropertymanager.h +++ b/src/tiled/variantpropertymanager.h @@ -26,7 +26,6 @@ #include namespace Tiled { -namespace Internal { /** * Extension of the QtVariantPropertyManager that adds support for a filePath @@ -99,5 +98,4 @@ private slots: QFileIconProvider mIconProvider; }; -} // namespace Internal } // namespace Tiled diff --git a/src/tiled/wangbrush.cpp b/src/tiled/wangbrush.cpp index f475fc3ee2..f1ee1f5dc4 100644 --- a/src/tiled/wangbrush.cpp +++ b/src/tiled/wangbrush.cpp @@ -35,7 +35,6 @@ #include using namespace Tiled; -using namespace Internal; //value between 0 and 0.5 to control the dead zone with edge mode. static const double MIDDLE_DEAD_ZONE = 0.25; diff --git a/src/tiled/wangbrush.h b/src/tiled/wangbrush.h index d414ad9d7f..bc3854cdb2 100644 --- a/src/tiled/wangbrush.h +++ b/src/tiled/wangbrush.h @@ -24,7 +24,6 @@ #include "wangset.h" namespace Tiled { -namespace Internal { class WangBrush : public AbstractTileTool { @@ -96,5 +95,4 @@ public slots: BrushBehavior mBrushBehavior; }; -} // namespace Internal } // namespace Tiled diff --git a/src/tiled/wangcolormodel.cpp b/src/tiled/wangcolormodel.cpp index 458692231f..47a4eb57e2 100644 --- a/src/tiled/wangcolormodel.cpp +++ b/src/tiled/wangcolormodel.cpp @@ -30,7 +30,6 @@ #include using namespace Tiled; -using namespace Internal; WangColorModel::WangColorModel(TilesetDocument *tilesetDocument, WangSet *wangSet, diff --git a/src/tiled/wangcolormodel.h b/src/tiled/wangcolormodel.h index b81e33463b..1008c7e30f 100644 --- a/src/tiled/wangcolormodel.h +++ b/src/tiled/wangcolormodel.h @@ -28,8 +28,6 @@ namespace Tiled { class Tileset; -namespace Internal { - class TilesetDocument; class WangColorModel : public QAbstractItemModel @@ -92,5 +90,4 @@ class WangColorModel : public QAbstractItemModel WangSet *mWangSet; }; -} // namespace Internal } // namespace Tiled diff --git a/src/tiled/wangcolorview.cpp b/src/tiled/wangcolorview.cpp index 4fb799bcb0..42aee48ebd 100644 --- a/src/tiled/wangcolorview.cpp +++ b/src/tiled/wangcolorview.cpp @@ -31,7 +31,6 @@ #include using namespace Tiled; -using namespace Internal; namespace { diff --git a/src/tiled/wangcolorview.h b/src/tiled/wangcolorview.h index ae09ac8454..81a5cfb381 100644 --- a/src/tiled/wangcolorview.h +++ b/src/tiled/wangcolorview.h @@ -26,8 +26,6 @@ namespace Tiled { class WangColor; -namespace Internal { - class WangColorView : public QTreeView { Q_OBJECT @@ -50,5 +48,4 @@ private slots: QSharedPointer mClickedWangColor; }; -} // namespace Internal } // namespace Tiled diff --git a/src/tiled/wangdock.cpp b/src/tiled/wangdock.cpp index 454b4b6bf7..f656483cb3 100644 --- a/src/tiled/wangdock.cpp +++ b/src/tiled/wangdock.cpp @@ -48,10 +48,8 @@ #include using namespace Tiled; -using namespace Tiled::Internal; namespace Tiled { -namespace Internal { static WangSet *firstWangSet(MapDocument *MapDocument) { @@ -98,7 +96,6 @@ class HasChildrenFilterModel : public QSortFilterProxyModel bool mEnabled; }; -} // namespace Internal } // namespace Tiled WangDock::WangDock(QWidget *parent) diff --git a/src/tiled/wangdock.h b/src/tiled/wangdock.h index 8ac90e9065..2e6cc3b747 100644 --- a/src/tiled/wangdock.h +++ b/src/tiled/wangdock.h @@ -32,7 +32,6 @@ class QToolBar; class QTreeView; namespace Tiled { -namespace Internal { class Document; class HasChildrenFilterModel; @@ -133,5 +132,4 @@ private slots: bool mInitializing; }; -} // namespace Internal } // namespace Tiled diff --git a/src/tiled/wangfiller.cpp b/src/tiled/wangfiller.cpp index 6e94a91ef0..7303a640b9 100644 --- a/src/tiled/wangfiller.cpp +++ b/src/tiled/wangfiller.cpp @@ -26,7 +26,6 @@ #include "wangset.h" using namespace Tiled; -using namespace Internal; static const QPoint aroundTilePoints[] = { QPoint( 0, -1), diff --git a/src/tiled/wangfiller.h b/src/tiled/wangfiller.h index c9912509db..149c13796a 100644 --- a/src/tiled/wangfiller.h +++ b/src/tiled/wangfiller.h @@ -33,8 +33,6 @@ namespace Tiled { class StaggeredRenderer; -namespace Internal { - /** * WangFiller provides functions for choosing cells based on a surrounding map * and a wangSet. @@ -108,5 +106,4 @@ class WangFiller Map::StaggerAxis mStaggerAxis; }; -} // namespace Internal } // namespace Tiled diff --git a/src/tiled/wangsetmodel.cpp b/src/tiled/wangsetmodel.cpp index 7bd98c0053..d9f78f5611 100644 --- a/src/tiled/wangsetmodel.cpp +++ b/src/tiled/wangsetmodel.cpp @@ -36,7 +36,6 @@ #include using namespace Tiled; -using namespace Tiled::Internal; WangSetModel::WangSetModel(QAbstractItemModel *tilesetDocumentModel, QObject *parent): diff --git a/src/tiled/wangsetmodel.h b/src/tiled/wangsetmodel.h index 7946c7c35c..3265549e5f 100644 --- a/src/tiled/wangsetmodel.h +++ b/src/tiled/wangsetmodel.h @@ -28,8 +28,6 @@ namespace Tiled { class Tileset; class WangSet; -namespace Internal { - class TilesetDocument; class WangSetModel : public QAbstractItemModel @@ -81,5 +79,4 @@ private slots: QList mTilesetDocuments; }; -} // namespace Internal } // namespace Tiled diff --git a/src/tiled/wangsetview.cpp b/src/tiled/wangsetview.cpp index f692b0566a..e184e3311e 100644 --- a/src/tiled/wangsetview.cpp +++ b/src/tiled/wangsetview.cpp @@ -36,7 +36,6 @@ #include using namespace Tiled; -using namespace Tiled::Internal; WangSetView::WangSetView(QWidget *parent) : QTreeView(parent) diff --git a/src/tiled/wangsetview.h b/src/tiled/wangsetview.h index 9db2b046f3..be7d093f85 100644 --- a/src/tiled/wangsetview.h +++ b/src/tiled/wangsetview.h @@ -23,7 +23,6 @@ #include namespace Tiled { -namespace Internal { class TilesetDocument; class Zoomable; @@ -56,7 +55,6 @@ private slots: TilesetDocument *mTilesetDocument; }; -} // namespace Internal } // namespace Tiled -Q_DECLARE_METATYPE(Tiled::Internal::WangSetView *) +Q_DECLARE_METATYPE(Tiled::WangSetView *) diff --git a/src/tiled/wangtemplatemodel.cpp b/src/tiled/wangtemplatemodel.cpp index 91c5bffc88..ed43678aa2 100644 --- a/src/tiled/wangtemplatemodel.cpp +++ b/src/tiled/wangtemplatemodel.cpp @@ -23,7 +23,6 @@ #include using namespace Tiled; -using namespace Internal; WangTemplateModel::WangTemplateModel(WangSet *wangSet, QObject *parent) : QAbstractListModel(parent) diff --git a/src/tiled/wangtemplatemodel.h b/src/tiled/wangtemplatemodel.h index 096f976832..8ace65b962 100644 --- a/src/tiled/wangtemplatemodel.h +++ b/src/tiled/wangtemplatemodel.h @@ -26,7 +26,6 @@ namespace Tiled { -namespace Internal { /** * A model for getting the info for a wang set template of a given WangSet @@ -62,5 +61,4 @@ public slots: WangSet *mWangSet; }; -} // namespace Internal } // namespace Tiled diff --git a/src/tiled/wangtemplateview.cpp b/src/tiled/wangtemplateview.cpp index bb97e17fae..aa0cfa0fbb 100644 --- a/src/tiled/wangtemplateview.cpp +++ b/src/tiled/wangtemplateview.cpp @@ -36,7 +36,6 @@ #include using namespace Tiled; -using namespace Internal; namespace { /* The delegate for drawing the wang tile templates diff --git a/src/tiled/wangtemplateview.h b/src/tiled/wangtemplateview.h index 6c7bde37ce..e0885bf9b5 100644 --- a/src/tiled/wangtemplateview.h +++ b/src/tiled/wangtemplateview.h @@ -29,8 +29,6 @@ namespace Tiled { class WangSet; class WangId; -namespace Internal { - class Zoomable; class WangTemplateView : public QListView @@ -65,5 +63,4 @@ private slots: Zoomable *mZoomable; }; -} -} +} // namespace Tiled diff --git a/src/tiled/winsparkleautoupdater.cpp b/src/tiled/winsparkleautoupdater.cpp index db571ae1a2..d6442b0ab4 100644 --- a/src/tiled/winsparkleautoupdater.cpp +++ b/src/tiled/winsparkleautoupdater.cpp @@ -25,7 +25,6 @@ #include namespace Tiled { -namespace Internal { #ifdef TILED_SNAPSHOT @@ -85,5 +84,4 @@ QDateTime WinSparkleAutoUpdater::lastUpdateCheckDate() #endif } -} // namespace Internal } // namespace Tiled diff --git a/src/tiled/winsparkleautoupdater.h b/src/tiled/winsparkleautoupdater.h index 9c96469659..d49db91d5b 100644 --- a/src/tiled/winsparkleautoupdater.h +++ b/src/tiled/winsparkleautoupdater.h @@ -23,7 +23,6 @@ #include "autoupdater.h" namespace Tiled { -namespace Internal { class WinSparkleAutoUpdater : public AutoUpdater { @@ -37,5 +36,4 @@ class WinSparkleAutoUpdater : public AutoUpdater QDateTime lastUpdateCheckDate() override; }; -} // namespace Internal } // namespace Tiled diff --git a/src/tiled/zoomable.cpp b/src/tiled/zoomable.cpp index f357561b72..84435cecef 100644 --- a/src/tiled/zoomable.cpp +++ b/src/tiled/zoomable.cpp @@ -27,7 +27,9 @@ #include -using namespace Tiled::Internal; +#include "qtcompat_p.h" + +using namespace Tiled; static QString scaleToString(qreal scale) { @@ -126,7 +128,7 @@ void Zoomable::handlePinchGesture(QPinchGesture *pinch) break; case Qt::GestureStarted: mGestureStartScale = mScale; - // fall through + Q_FALLTHROUGH(); case Qt::GestureUpdated: { qreal factor = pinch->totalScaleFactor(); qreal scale = qBound(mZoomFactors.first(), diff --git a/src/tiled/zoomable.h b/src/tiled/zoomable.h index 0b96bf984c..d589f586ac 100644 --- a/src/tiled/zoomable.h +++ b/src/tiled/zoomable.h @@ -29,7 +29,6 @@ class QPinchGesture; class QRegExpValidator; namespace Tiled { -namespace Internal { /** * This class represents something zoomable. Is has a zoom factor and methods @@ -100,5 +99,4 @@ private slots: QRegExpValidator *mComboValidator; }; -} // namespace Internal } // namespace Tiled