diff --git a/src/gui/src/Screen.h b/src/gui/src/Screen.h index cfdd4d2a..e06056f7 100644 --- a/src/gui/src/Screen.h +++ b/src/gui/src/Screen.h @@ -101,8 +101,6 @@ class Screen : public BaseConfig bool m_Swapped; }; -typedef QList ScreenList; - QDataStream& operator<<(QDataStream& outStream, const Screen& screen); QDataStream& operator>>(QDataStream& inStream, Screen& screen); diff --git a/src/gui/src/ScreenSetupModel.cpp b/src/gui/src/ScreenSetupModel.cpp index b8ff3742..8bbf2fb0 100644 --- a/src/gui/src/ScreenSetupModel.cpp +++ b/src/gui/src/ScreenSetupModel.cpp @@ -24,7 +24,7 @@ const QString ScreenSetupModel::m_MimeType = "application/x-qbarrier-screen"; -ScreenSetupModel::ScreenSetupModel(ScreenList& screens, int numColumns, int numRows) : +ScreenSetupModel::ScreenSetupModel(std::vector& screens, int numColumns, int numRows) : QAbstractTableModel(NULL), m_Screens(screens), m_NumColumns(numColumns), diff --git a/src/gui/src/ScreenSetupModel.h b/src/gui/src/ScreenSetupModel.h index 89f83106..8a1a9820 100644 --- a/src/gui/src/ScreenSetupModel.h +++ b/src/gui/src/ScreenSetupModel.h @@ -38,7 +38,7 @@ class ScreenSetupModel : public QAbstractTableModel friend class ServerConfigDialog; public: - ScreenSetupModel(ScreenList& screens, int numColumns, int numRows); + ScreenSetupModel(std::vector& screens, int numColumns, int numRows); public: static const QString& mimeType() { return m_MimeType; } @@ -60,7 +60,7 @@ class ScreenSetupModel : public QAbstractTableModel Screen& screen(int column, int row) { return m_Screens[row * m_NumColumns + column]; } private: - ScreenList& m_Screens; + std::vector& m_Screens; const int m_NumColumns; const int m_NumRows; diff --git a/src/gui/src/ServerConfig.h b/src/gui/src/ServerConfig.h index 02d99fb4..161b00d7 100644 --- a/src/gui/src/ServerConfig.h +++ b/src/gui/src/ServerConfig.h @@ -44,7 +44,7 @@ class ServerConfig : public BaseConfig ~ServerConfig(); public: - const ScreenList& screens() const { return m_Screens; } + const std::vector& screens() const { return m_Screens; } int numColumns() const { return m_NumColumns; } int numRows() const { return m_NumRows; } bool hasHeartbeat() const { return m_HasHeartbeat; } @@ -73,9 +73,9 @@ class ServerConfig : public BaseConfig protected: QSettings& settings() { return *m_pSettings; } - ScreenList& screens() { return m_Screens; } - void setScreens(const ScreenList& screens) { m_Screens = screens; } - void addScreen(const Screen& screen) { m_Screens.append(screen); } + std::vector& screens() { return m_Screens; } + void setScreens(const std::vector& screens) { m_Screens = screens; } + void addScreen(const Screen& screen) { m_Screens.push_back(screen); } void setNumColumns(int n) { m_NumColumns = n; } void setNumRows(int n) { m_NumRows = n; } void haveHeartbeat(bool on) { m_HasHeartbeat = on; } @@ -106,7 +106,7 @@ class ServerConfig : public BaseConfig private: QSettings* m_pSettings; - ScreenList m_Screens; + std::vector m_Screens; int m_NumColumns; int m_NumRows; bool m_HasHeartbeat;