Make some member functions const
This commit is contained in:
committed by
Chih-Hsuan Yen
parent
4b43c8fa77
commit
4dd62f8a87
+1
-1
@@ -401,7 +401,7 @@ void HistoryScrollBuffer::setMaxNbLines(unsigned int lineCount)
|
||||
dynamic_cast<HistoryTypeBuffer*>(m_histType)->m_nbLines = lineCount;
|
||||
}
|
||||
|
||||
int HistoryScrollBuffer::bufferIndex(int lineNumber)
|
||||
int HistoryScrollBuffer::bufferIndex(int lineNumber) const
|
||||
{
|
||||
Q_ASSERT( lineNumber >= 0 );
|
||||
Q_ASSERT( lineNumber < _maxLineCount );
|
||||
|
||||
+1
-1
@@ -184,7 +184,7 @@ public:
|
||||
|
||||
|
||||
private:
|
||||
int bufferIndex(int lineNumber);
|
||||
int bufferIndex(int lineNumber) const;
|
||||
|
||||
HistoryLine* _historyBuffer;
|
||||
QBitArray _wrappedLine;
|
||||
|
||||
@@ -475,7 +475,7 @@ QString KeyboardTranslatorReader::description() const
|
||||
{
|
||||
return _description;
|
||||
}
|
||||
bool KeyboardTranslatorReader::hasNextEntry()
|
||||
bool KeyboardTranslatorReader::hasNextEntry() const
|
||||
{
|
||||
return _hasNext;
|
||||
}
|
||||
|
||||
@@ -369,7 +369,7 @@ public:
|
||||
QString description() const;
|
||||
|
||||
/** Returns true if there is another entry in the source stream */
|
||||
bool hasNextEntry();
|
||||
bool hasNextEntry() const;
|
||||
/** Returns the next entry found in the source stream */
|
||||
KeyboardTranslator::Entry nextEntry();
|
||||
|
||||
|
||||
+3
-3
@@ -143,7 +143,7 @@ bool Session::isRunning() const
|
||||
return _shellProcess->state() == QProcess::Running;
|
||||
}
|
||||
|
||||
void Session::setCodec(QTextCodec * codec)
|
||||
void Session::setCodec(QTextCodec * codec) const
|
||||
{
|
||||
emulation()->setCodec(codec);
|
||||
}
|
||||
@@ -1034,7 +1034,7 @@ void SessionGroup::setMasterStatus(Session * session, bool master)
|
||||
}
|
||||
}
|
||||
|
||||
void SessionGroup::connectPair(Session * master , Session * other)
|
||||
void SessionGroup::connectPair(Session * master , Session * other) const
|
||||
{
|
||||
// qDebug() << k_funcinfo;
|
||||
|
||||
@@ -1045,7 +1045,7 @@ void SessionGroup::connectPair(Session * master , Session * other)
|
||||
SLOT(sendString(const char *,int)) );
|
||||
}
|
||||
}
|
||||
void SessionGroup::disconnectPair(Session * master , Session * other)
|
||||
void SessionGroup::disconnectPair(Session * master , Session * other) const
|
||||
{
|
||||
// qDebug() << k_funcinfo;
|
||||
|
||||
|
||||
+3
-3
@@ -340,7 +340,7 @@ public:
|
||||
void setSize(const QSize & size);
|
||||
|
||||
/** Sets the text codec used by this session's terminal emulation. */
|
||||
void setCodec(QTextCodec * codec);
|
||||
void setCodec(QTextCodec * codec) const;
|
||||
|
||||
/**
|
||||
* Sets whether the session has a dark background or not. The session
|
||||
@@ -633,8 +633,8 @@ public:
|
||||
int masterMode() const;
|
||||
|
||||
private:
|
||||
void connectPair(Session * master , Session * other);
|
||||
void disconnectPair(Session * master , Session * other);
|
||||
void connectPair(Session * master , Session * other) const;
|
||||
void disconnectPair(Session * master , Session * other) const;
|
||||
void connectAll(bool connect);
|
||||
QList<Session *> masters() const;
|
||||
|
||||
|
||||
@@ -649,7 +649,7 @@ static void drawOtherChar(QPainter& paint, int x, int y, int w, int h, uchar cod
|
||||
}
|
||||
|
||||
void TerminalDisplay::drawLineCharString( QPainter& painter, int x, int y, const std::wstring& str,
|
||||
const Character* attributes)
|
||||
const Character* attributes) const
|
||||
{
|
||||
const QPen& currentPen = painter.pen();
|
||||
|
||||
@@ -2791,7 +2791,7 @@ void TerminalDisplay::emitSelection(bool useXselection,bool appendReturn)
|
||||
}
|
||||
}
|
||||
|
||||
void TerminalDisplay::bracketText(QString& text)
|
||||
void TerminalDisplay::bracketText(QString& text) const
|
||||
{
|
||||
if (bracketedPasteMode() && !_disabledBracketedPasteMode)
|
||||
{
|
||||
|
||||
@@ -206,7 +206,7 @@ public:
|
||||
void emitSelection(bool useXselection,bool appendReturn);
|
||||
|
||||
/** change and wrap text corresponding to paste mode **/
|
||||
void bracketText(QString& text);
|
||||
void bracketText(QString& text) const;
|
||||
|
||||
/**
|
||||
* Sets the shape of the keyboard cursor. This is the cursor drawn
|
||||
@@ -672,7 +672,7 @@ private:
|
||||
const Character* style, bool invertCharacterColor);
|
||||
// draws a string of line graphics
|
||||
void drawLineCharString(QPainter& painter, int x, int y,
|
||||
const std::wstring& str, const Character* attributes);
|
||||
const std::wstring& str, const Character* attributes) const;
|
||||
|
||||
// draws the preedit string for input methods
|
||||
void drawInputMethodPreeditString(QPainter& painter , const QRect& rect);
|
||||
|
||||
Reference in New Issue
Block a user