Krita Source Code Documentation
Loading...
Searching...
No Matches
kundo2magicstring.cpp
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2014 Dmitry Kazakov <dimula73@gmail.com>
3 * SPDX-FileCopyrightText: 2014 Alexander Potashev <aspotashev@gmail.com>
4 *
5 * SPDX-License-Identifier: LGPL-2.0-or-later
6 */
7
8#include "kundo2magicstring.h"
9
10
14
16 : m_text(text)
17{
18}
19
21{
22 int cdpos = m_text.indexOf(QLatin1Char('\n'));
23 return cdpos > 0 ? m_text.left(cdpos) : m_text;
24}
25
27{
28 int cdpos = m_text.indexOf(QLatin1Char('\n'));
29 return cdpos > 0 ? m_text.mid(cdpos + 1) : m_text;
30}
31
33{
34 return m_text.isEmpty();
35}
36
38{
39 return m_text == rhs.m_text;
40}
QString toSecondaryString() const
bool operator==(const KUndo2MagicString &rhs) const
QString toString() const