diff options
Diffstat (limited to 'qt-models/messagehandlermodel.cpp')
-rw-r--r-- | qt-models/messagehandlermodel.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/qt-models/messagehandlermodel.cpp b/qt-models/messagehandlermodel.cpp index be077a1a3..78497f5bc 100644 --- a/qt-models/messagehandlermodel.cpp +++ b/qt-models/messagehandlermodel.cpp @@ -51,6 +51,15 @@ void MessageHandlerModel::addLog(QtMsgType type, const QString& message) #endif } +const QString MessageHandlerModel::logAsString() +{ + QString copyString; + + // Loop through m_data and build big string to be put on the clipboard + for(const MessageData &data: m_data) + copyString += data.message + "\n"; + return copyString; +} QVariant MessageHandlerModel::data(const QModelIndex& idx, int role) const { switch(role) { |