diff options
| author | 2008-12-29 16:15:51 +0000 | |
|---|---|---|
| committer | 2008-12-29 16:15:51 +0000 | |
| commit | cf47fa46d9614d8bc2d5b4b9e5a99ecd55edf418 (patch) | |
| tree | fac3c1ee84a39d0bfd70846737bf2f1974b962b5 /src/modules/spaste/controller.cpp | |
| parent | input editor: don't change font at every paintEvent (diff) | |
| download | KVIrc-cf47fa46d9614d8bc2d5b4b9e5a99ecd55edf418.tar.gz KVIrc-cf47fa46d9614d8bc2d5b4b9e5a99ecd55edf418.tar.bz2 KVIrc-cf47fa46d9614d8bc2d5b4b9e5a99ecd55edf418.zip | |
implemented #323
git-svn-id: https://svn.kvirc.de/svn/trunk/kvirc@2958 17fca916-40b9-46aa-a4ea-0a15b648b75c
Diffstat (limited to 'src/modules/spaste/controller.cpp')
| -rw-r--r-- | src/modules/spaste/controller.cpp | 21 |
1 files changed, 16 insertions, 5 deletions
diff --git a/src/modules/spaste/controller.cpp b/src/modules/spaste/controller.cpp index 80d354ec0..db2e0a711 100644 --- a/src/modules/spaste/controller.cpp +++ b/src/modules/spaste/controller.cpp @@ -1,10 +1,10 @@ //============================================================================= // // File : controller.h -// Creation date : Thu Apr 30 2002 17:13:12 GMT by Juanjo Álvarez +// Creation date : Thu Apr 30 2002 17:13:12 GMT by Juanjo Alvarez // // This file is part of the KVirc irc client distribution -// Copyright (C) 2002 Juanjo Álvarez (juanjux@yahoo.es) +// Copyright (C) 2002 Juanjo Alvarez (juanjux@yahoo.es) // Copyright (C) 2002-2008 Szymon Stefanek (kvirc@tin.it) // // This program is FREE software. You can redistribute it and/or @@ -100,6 +100,8 @@ void SPasteController::pasteFile(void) if(line.isEmpty()) line = QChar(KVI_TEXT_RESET); + line.replace('\t',QString(KVI_OPTION_UINT(KviOption_uintSpacesToExpandTabulationInput),' ')); //expand tabs to spaces + if(!g_pApp->windowExists(m_pWindow)) { m_pFile->close(); @@ -118,10 +120,19 @@ void SPasteController::pasteClipboard(void) if(m_clipBuffIterator != m_pClipBuff->end()) { if(!g_pApp->windowExists(m_pWindow)) + { delete this; - else { - if((*m_clipBuffIterator).isEmpty())(*m_clipBuffIterator) = QChar(KVI_TEXT_RESET); - m_pWindow->ownMessage((*m_clipBuffIterator).toAscii()); // <-- not good :/ + } else { + QString line; + if((*m_clipBuffIterator).isEmpty()) + { + line = QChar(KVI_TEXT_RESET); + } else { + line = *m_clipBuffIterator; + } + + line.replace('\t',QString(KVI_OPTION_UINT(KviOption_uintSpacesToExpandTabulationInput),' ')); //expand tabs to spaces + m_pWindow->ownMessage(line); ++m_clipBuffIterator; } } else delete this;//Clipboard finished |
