summaryrefslogtreecommitdiffstats
path: root/src/Authoring/Studio/DragAndDrop/BasicObjectDropSource.cpp
diff options
context:
space:
mode:
authorTomi Korpipaa <tomi.korpipaa@qt.io>2017-11-06 09:54:50 +0200
committerTomi Korpipää <tomi.korpipaa@qt.io>2017-11-06 11:10:15 +0000
commit461394d2d80a6bfcfb815606b6064abcc21a6aef (patch)
treec97a5ea0e3e1a3fb734c8feb7dc896adf346e20e /src/Authoring/Studio/DragAndDrop/BasicObjectDropSource.cpp
parent73e6514ba9ac8efbdfa768371c1f0ccb7928ab63 (diff)
CFilePath is refactored to inherit from QFileInfo
The CFilePath class in NDD was the primary means of abstracting file path handling and manipulation in the authoring tool. The implementation is heavily windows idiosyncratic. This change completely refactors the class to rely upon Qt's file path handling abstractions: QFileInfo and QDir. The goal is to continue to shrink this class until it can be removed entirely and all call sites can use QFileInfo and friends directly. Task-number: QT3DS-221 Change-Id: I0e31c96982a3f3a9411346f6c1dd82a6d1fa00ca Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Diffstat (limited to 'src/Authoring/Studio/DragAndDrop/BasicObjectDropSource.cpp')
-rw-r--r--src/Authoring/Studio/DragAndDrop/BasicObjectDropSource.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Authoring/Studio/DragAndDrop/BasicObjectDropSource.cpp b/src/Authoring/Studio/DragAndDrop/BasicObjectDropSource.cpp
index 8e8a2932..a29fb89f 100644
--- a/src/Authoring/Studio/DragAndDrop/BasicObjectDropSource.cpp
+++ b/src/Authoring/Studio/DragAndDrop/BasicObjectDropSource.cpp
@@ -212,7 +212,7 @@ CCmd *CBasicObjectDropSource::GenerateAssetCommand(qt3dsdm::Qt3DSDMInstanceHandl
}
}
- if (theFontFile == L"") {
+ if (theFontFile.filePath().isEmpty()) {
// If user doesn't have any font file, copy the default font file from Studio's res
// folder
@@ -228,7 +228,7 @@ CCmd *CBasicObjectDropSource::GenerateAssetCommand(qt3dsdm::Qt3DSDMInstanceHandl
}
}
- if (theResFontFile == L"") {
+ if (theResFontFile.filePath().isEmpty()) {
QT3DS_ASSERT(false);
std::shared_ptr<IImportFailedHandler> theHandler(
theDoc->GetImportFailedHandler());