From kde-commits Tue Jun 22 13:57:24 2004 From: =?utf-8?q?Tobias=20Gl=C3=A4=C3=9Fer?= Date: Tue, 22 Jun 2004 13:57:24 +0000 To: kde-commits Subject: kdevelop/parts/outputviews Message-Id: <20040622135724.71DA74C4 () office ! kde ! org> X-MARC-Message: https://marc.info/?l=kde-commits&m=108791266125212 CVS commit by tobgle: - fixed copying of "short" and "very short" output - removed unneccessary #defines M +22 -14 makewidget.cpp 1.107 --- kdevelop/parts/outputviews/makewidget.cpp #1.106:1.107 @@ -316,14 +316,26 @@ void MakeWidget::copy() selection += text(i) + "\n"; + + if(m_compilerOutputLevel == eShort || + m_compilerOutputLevel == eVeryShort ) + { + QRegExp regexp("<.*>"); + regexp.setMinimal(true); + selection.remove(regexp); + } + else + { //FIXME: Selections should be precise in the eShort and eVeryShort modes, too. selection.remove(0, indexfrom); int removeend = text(parato).length() - indexto; selection.remove((selection.length()-1) - removeend, removeend); + } + + selection.replace("<","<"); + selection.replace(">",">"); + selection.replace(""","\""); + selection.replace("&","&"); -#if QT_VERSION >= 0x030100 kapp->clipboard()->setText(selection, QClipboard::Clipboard); -#else - kapp->clipboard()->setText(selection); -#endif } @@ -799,9 +811,5 @@ bool MakeWidget::scanErrorForward( int p { for ( int it = parag + 1; -#if QT_VERSION >= 0x030100 it < (int)m_items.count(); -#else - it < m_items.size(); -#endif ++it ) {