diff options
| author | 2020-01-30 11:40:11 +0100 | |
|---|---|---|
| committer | 2020-04-20 12:13:29 +0200 | |
| commit | 5ca7d22e8a8c56e21e74f01f8012c94532cab30b (patch) | |
| tree | 687ffb8ef80b3e10a4a197e7a5a43a0177b6c93b /dicealias.cpp | |
| parent | d16f44e338a5dadd4b170d484fa023f0e9b8496f (diff) | |
| download | OneRoll-5ca7d22e8a8c56e21e74f01f8012c94532cab30b.tar.gz OneRoll-5ca7d22e8a8c56e21e74f01f8012c94532cab30b.zip | |
Add copy constructor for alias
Diffstat (limited to 'dicealias.cpp')
| -rw-r--r-- | dicealias.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/dicealias.cpp b/dicealias.cpp index 24c3fee..e6ee180 100644 --- a/dicealias.cpp +++ b/dicealias.cpp @@ -142,6 +142,15 @@ DiceAlias::DiceAlias(QString cmd, QString key, bool isReplace, bool isEnable) DiceAlias::~DiceAlias() {} +DiceAlias::DiceAlias(const DiceAlias& alias) +{ + m_command= alias.getCommand(); + m_comment= alias.getComment(); + m_value= alias.getValue(); + m_isEnable= alias.isEnable(); + m_type= alias.isReplace() ? REPLACE : REGEXP; +} + bool DiceAlias::resolved(QString& str) { if(!m_isEnable) |