/***************************************************************************
- * Copyright (C) 2005-2016 by the Quassel Project *
+ * Copyright (C) 2005-2018 by the Quassel Project *
* devel@quassel-irc.org *
* *
* This program is free software; you can redistribute it and/or modify *
if (!hasSelection())
return QVector<QTextLayout::FormatRange>();
- int start, end;
+ quint16 start, end;
if (_selectionMode == FullSelection) {
start = 0;
end = data(MessageModel::DisplayRole).toString().length();