forked from qt-creator/qt-creator
CodePaster: Allow for editing snippets.
Introduce separate plain text mode parallel to diff-chunk mode using a stacked widget with a QPlainTextEdit. Task-number: QTCREATORBUG-3859
This commit is contained in:
@@ -217,16 +217,18 @@ static inline void fixSpecialCharacters(QString &data)
|
||||
void CodepasterPlugin::post(QString data, const QString &mimeType)
|
||||
{
|
||||
fixSpecialCharacters(data);
|
||||
FileDataList lst = splitDiffToFiles(data.toLatin1());
|
||||
QString username = m_settings->username;
|
||||
QString description;
|
||||
QString comment;
|
||||
QString protocolName;
|
||||
|
||||
const QString username = m_settings->username;
|
||||
|
||||
PasteView view(m_protocols, mimeType, 0);
|
||||
view.setProtocol(m_settings->protocol);
|
||||
|
||||
view.show(username, description, comment, lst);
|
||||
const FileDataList diffChunks = splitDiffToFiles(data.toLatin1());
|
||||
if (diffChunks.isEmpty()) {
|
||||
view.show(username, QString(), QString(), data);
|
||||
} else {
|
||||
view.show(username, QString(), QString(), diffChunks);
|
||||
}
|
||||
}
|
||||
|
||||
void CodepasterPlugin::fetch()
|
||||
|
||||
Reference in New Issue
Block a user