diff options
| author | isanae <14251494+isanae@users.noreply.github.com> | 2020-04-18 04:53:14 -0400 |
|---|---|---|
| committer | isanae <14251494+isanae@users.noreply.github.com> | 2020-04-18 04:53:14 -0400 |
| commit | b91dbba734f45f1cc1a42f86d9141bb272de0564 (patch) | |
| tree | ec752efd717330e7c8a4e28a32eebc1feef927ba /src/overwriteinfodialog.cpp | |
| parent | c47ab23f9593d384a1b5106f79d41228fc8c8f59 (diff) | |
fixed warnings about Q_OBJECT and thousand separators
had to move some classes to header files
Diffstat (limited to 'src/overwriteinfodialog.cpp')
| -rw-r--r-- | src/overwriteinfodialog.cpp | 44 |
1 files changed, 1 insertions, 43 deletions
diff --git a/src/overwriteinfodialog.cpp b/src/overwriteinfodialog.cpp index ab726fb3..32aae07a 100644 --- a/src/overwriteinfodialog.cpp +++ b/src/overwriteinfodialog.cpp @@ -27,50 +27,8 @@ along with Mod Organizer. If not, see <http://www.gnu.org/licenses/>. #include <QShortcut>
#include <Shlwapi.h>
-
using namespace MOBase;
-
-class MyFileSystemModel : public QFileSystemModel {
-public:
- MyFileSystemModel(QObject *parent)
- : QFileSystemModel(parent), m_RegularColumnCount(0) {}
-
- virtual int columnCount(const QModelIndex &parent) const {
- m_RegularColumnCount = QFileSystemModel::columnCount(parent);
- return m_RegularColumnCount;
- }
-
- virtual QVariant headerData(int section, Qt::Orientation orientation, int role) const {
- if ((orientation == Qt::Horizontal) &&
- (section >= m_RegularColumnCount)) {
- if (role == Qt::DisplayRole) {
- return tr("Overwrites");
- } else {
- return QVariant();
- }
- } else {
- return QFileSystemModel::headerData(section, orientation, role);
- }
- }
-
- virtual QVariant data(const QModelIndex &index, int role) const {
- if (index.column() == m_RegularColumnCount + 0) {
- if (role == Qt::DisplayRole) {
- return tr("not implemented");
- } else {
- return QVariant();
- }
- } else {
- return QFileSystemModel::data(index, role);
- }
- }
-
-private:
- mutable int m_RegularColumnCount;
-};
-
-
OverwriteInfoDialog::OverwriteInfoDialog(ModInfo::Ptr modInfo, QWidget *parent)
: QDialog(parent), ui(new Ui::OverwriteInfoDialog), m_FileSystemModel(nullptr),
m_DeleteAction(nullptr), m_RenameAction(nullptr), m_OpenAction(nullptr)
@@ -79,7 +37,7 @@ OverwriteInfoDialog::OverwriteInfoDialog(ModInfo::Ptr modInfo, QWidget *parent) this->setWindowModality(Qt::NonModal);
- m_FileSystemModel = new MyFileSystemModel(this);
+ m_FileSystemModel = new OverwriteFileSystemModel(this);
m_FileSystemModel->setReadOnly(false);
setModInfo(modInfo);
ui->filesView->setModel(m_FileSystemModel);
|
