aboutsummaryrefslogtreecommitdiffhomepage
path: root/qt/ScintillaEditBase/ScintillaQt.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'qt/ScintillaEditBase/ScintillaQt.cpp')
-rw-r--r--qt/ScintillaEditBase/ScintillaQt.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/qt/ScintillaEditBase/ScintillaQt.cpp b/qt/ScintillaEditBase/ScintillaQt.cpp
index 8c6e89e60..4d0d62082 100644
--- a/qt/ScintillaEditBase/ScintillaQt.cpp
+++ b/qt/ScintillaEditBase/ScintillaQt.cpp
@@ -171,11 +171,11 @@ bool ScintillaQt::DragThreshold(Point ptStart, Point ptNow)
static QString StringFromSelectedText(const SelectionText &selectedText)
{
if (selectedText.codePage == SC_CP_UTF8) {
- return QString::fromUtf8(selectedText.s, selectedText.len-1);
+ return QString::fromUtf8(selectedText.Data(), selectedText.Length());
} else {
QTextCodec *codec = QTextCodec::codecForName(
CharacterSetID(selectedText.characterSet));
- return codec->toUnicode(selectedText.s, selectedText.len-1);
+ return codec->toUnicode(selectedText.Data(), selectedText.Length());
}
}
@@ -341,7 +341,7 @@ void ScintillaQt::PasteFromMode(QClipboard::Mode clipboardMode_)
int len = utext.length();
std::string dest = Document::TransformLineEnds(utext, len, pdoc->eolMode);
SelectionText selText;
- selText.Copy(dest.c_str(), dest.length(), pdoc->dbcsCodePage, CharacterSetOfDocument(), isRectangular, false);
+ selText.Copy(dest, pdoc->dbcsCodePage, CharacterSetOfDocument(), isRectangular, false);
UndoGroup ug(pdoc);
ClearSelection(multiPasteMode == SC_MULTIPASTE_EACH);
@@ -349,9 +349,9 @@ void ScintillaQt::PasteFromMode(QClipboard::Mode clipboardMode_)
sel.Rectangular().Start() :
sel.Range(sel.Main()).Start();
if (selText.rectangular) {
- PasteRectangular(selStart, selText.s, selText.len);
+ PasteRectangular(selStart, selText.Data(), selText.Length());
} else {
- InsertPaste(selStart, selText.s, selText.len);
+ InsertPaste(selStart, selText.Data(), selText.Length());
}
EnsureCaretVisible();
}
@@ -613,7 +613,7 @@ void ScintillaQt::StartDrag()
{
inDragDrop = ddDragging;
dropWentOutside = true;
- if (drag.len) {
+ if (drag.Length()) {
QMimeData *mimeData = new QMimeData;
QString sText = StringFromSelectedText(drag);
mimeData->setText(sText);
@@ -768,5 +768,5 @@ void ScintillaQt::Drop(const Point &point, const QMimeData *data, bool move)
SelectionPosition movePos = SPositionFromLocation(point,
false, false, UserVirtualSpace());
- DropAt(movePos, dest.c_str(), move, rectangular);
+ DropAt(movePos, dest.c_str(), dest.length(), move, rectangular);
}