diff --git a/model/entrymodel.cpp b/model/entrymodel.cpp index c54237f..bb102c4 100644 --- a/model/entrymodel.cpp +++ b/model/entrymodel.cpp @@ -461,6 +461,9 @@ bool EntryModel::moveRows(const QModelIndex &sourceParent, int sourceRow, int co // determine the source parent entry and dest parent entry as node entries auto *const srcParentEntry = static_cast(sourceParent.internalPointer()); auto *const destParentEntry = static_cast(destinationParent.internalPointer()); +#if DEBUG_BUILD + cout << "destinationChild: " << destinationChild << endl; +#endif // source rows must be within the valid range if (static_cast(sourceRow + count) > srcParentEntry->children().size() // if source and destination parent are the same the destination child mustn't be in the source range diff --git a/quickgui/controller.cpp b/quickgui/controller.cpp index 359c3fd..490d2d1 100644 --- a/quickgui/controller.cpp +++ b/quickgui/controller.cpp @@ -13,6 +13,9 @@ #ifndef QT_NO_CLIPBOARD #include #endif +#if DEBUG_BUILD +#include +#endif #include #include #include @@ -20,8 +23,6 @@ #include #include -#include - #include using namespace std; @@ -178,7 +179,7 @@ void Controller::save() m_file.close(); // open new file descriptor to replace existing file and allow writing - qDebug() << "opening new fd for saving, native url: " << m_nativeUrl; + IF_DEBUG_BUILD(qDebug() << "Opening new fd for saving, native url: " << m_nativeUrl;) const auto newFileDescriptor = openFileDescriptorFromAndroidContentUrl(m_nativeUrl, QStringLiteral("wt")); if (newFileDescriptor < 0) { emit fileError(tr("Unable to open file descriptor for saving the file.")); @@ -186,13 +187,10 @@ void Controller::save() } m_file.fileStream().openFromFileDescriptor(newFileDescriptor, ios_base::out | ios_base::trunc | ios_base::binary); - qDebug() << "file re-opened for saving"; - m_file.write(useEncryption); } else { #endif // let libpasswordfile handle everything - qDebug() << "let libpasswordfile handle saving"; m_file.save(useEncryption); #if defined(Q_OS_ANDROID) && defined(CPP_UTILITIES_USE_NATIVE_FILE_BUFFER) }