Changeset View
Changeset View
Standalone View
Standalone View
src/view/kateviewhelpers.cpp
Show First 20 Lines • Show All 3074 Lines • ▼ Show 20 Line(s) | 3071 | { | |||
---|---|---|---|---|---|
3075 | * insert complete paste history | 3075 | * insert complete paste history | ||
3076 | */ | 3076 | */ | ||
3077 | int i = 0; | 3077 | int i = 0; | ||
3078 | Q_FOREACH (const QString &text, KTextEditor::EditorPrivate::self()->clipboardHistory()) { | 3078 | Q_FOREACH (const QString &text, KTextEditor::EditorPrivate::self()->clipboardHistory()) { | ||
3079 | /** | 3079 | /** | ||
3080 | * get text for the menu ;) | 3080 | * get text for the menu ;) | ||
3081 | */ | 3081 | */ | ||
3082 | QString leftPart = (text.size() > 48) ? (text.left(48) + QLatin1String("...")) : text; | 3082 | QString leftPart = (text.size() > 48) ? (text.left(48) + QLatin1String("...")) : text; | ||
3083 | QAction *a = menu()->addAction(leftPart.replace(QLatin1String("\n"), QLatin1String(" ")), this, SLOT(paste())); | 3083 | QAction *a = menu()->addAction(leftPart.replace(QLatin1Char('\n'), QLatin1Char(' ')), this, SLOT(paste())); | ||
3084 | a->setData(i++); | 3084 | a->setData(i++); | ||
3085 | } | 3085 | } | ||
3086 | } | 3086 | } | ||
3087 | 3087 | | |||
3088 | void KatePasteMenu::paste() | 3088 | void KatePasteMenu::paste() | ||
3089 | { | 3089 | { | ||
3090 | if (!sender()) { | 3090 | if (!sender()) { | ||
3091 | return; | 3091 | return; | ||
Show All 16 Lines |