Mercurial > octave-nkf
comparison libgui/qterminal/libqterminal/win32/QWinTerminalImpl.cpp @ 19629:be7ac98fab43 gui-release
strip trailing whitespace from most source files
* NEWS, etc/NEWS.3, libgui/graphics/Backend.h,
libgui/graphics/ButtonControl.h, libgui/graphics/EditControl.cc,
libgui/graphics/Object.h, libgui/graphics/QtHandlesUtils.cc,
libgui/graphics/ToolBarButton.h, libgui/graphics/__init_qt__.cc,
libgui/graphics/gl-select.cc,
libgui/qterminal/libqterminal/unix/TerminalView.cpp,
libgui/qterminal/libqterminal/unix/TerminalView.h,
libgui/qterminal/libqterminal/win32/QWinTerminalImpl.cpp,
libgui/src/m-editor/file-editor-tab.cc,
libgui/src/m-editor/file-editor.cc, libgui/src/m-editor/file-editor.h,
libgui/src/m-editor/octave-qscintilla.cc,
libgui/src/settings-dialog.cc, libgui/src/shortcut-manager.cc,
libgui/src/workspace-view.cc, libinterp/corefcn/graphics.cc,
libinterp/corefcn/input.cc, libinterp/parse-tree/pt-unop.cc,
liboctave/array/dSparse.h, scripts/pkg/pkg.m,
scripts/polynomial/polyeig.m, test/io.tst: Strip trailing whitespace.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Tue, 20 Jan 2015 09:43:29 -0500 |
parents | fe689210525c |
children | bd1369a2a651 |
comparison
equal
deleted
inserted
replaced
19628:fe689210525c | 19629:be7ac98fab43 |
---|---|
686 } | 686 } |
687 | 687 |
688 void QConsolePrivate::selectAll() | 688 void QConsolePrivate::selectAll() |
689 { | 689 { |
690 m_beginSelection = QPoint (0,0); | 690 m_beginSelection = QPoint (0,0); |
691 m_endSelection = QPoint(m_bufferSize.width (), | 691 m_endSelection = QPoint(m_bufferSize.width (), |
692 m_cursorPos.y()); | 692 m_cursorPos.y()); |
693 updateSelection(); | 693 updateSelection(); |
694 } | 694 } |
695 | 695 |
696 void QConsolePrivate::selectWord (const QPoint & cellpos) | 696 void QConsolePrivate::selectWord (const QPoint & cellpos) |
712 | 712 |
713 // loog at current clicked on char to determinate ig getting space chunk or nonspace chunk | 713 // loog at current clicked on char to determinate ig getting space chunk or nonspace chunk |
714 if (QChar(m_buffer[begin.y ()*stride + begin.x ()].Char.UnicodeChar).isSpace () == false) | 714 if (QChar(m_buffer[begin.y ()*stride + begin.x ()].Char.UnicodeChar).isSpace () == false) |
715 { | 715 { |
716 // from current char, go back and fwd to find start and end of block | 716 // from current char, go back and fwd to find start and end of block |
717 while(begin.x () > 0 && | 717 while(begin.x () > 0 && |
718 QChar(m_buffer[begin.y ()*stride + begin.x () -1].Char.UnicodeChar).isSpace() == false) | 718 QChar(m_buffer[begin.y ()*stride + begin.x () -1].Char.UnicodeChar).isSpace() == false) |
719 { | 719 { |
720 begin.rx () --; | 720 begin.rx () --; |
721 } | 721 } |
722 | 722 |
723 while(end.x () < m_consoleRect.width () && | 723 while(end.x () < m_consoleRect.width () && |
724 QChar(m_buffer[end.y ()*stride + end.x () +1].Char.UnicodeChar).isSpace() == false) | 724 QChar(m_buffer[end.y ()*stride + end.x () +1].Char.UnicodeChar).isSpace() == false) |
725 { | 725 { |
726 end.rx () ++; | 726 end.rx () ++; |
727 } | 727 } |
728 } | 728 } |
729 else | 729 else |
730 { | 730 { |
731 while(begin.x () > 0 && | 731 while(begin.x () > 0 && |
732 QChar(m_buffer[begin.y ()*stride + begin.x () -1].Char.UnicodeChar).isSpace()) | 732 QChar(m_buffer[begin.y ()*stride + begin.x () -1].Char.UnicodeChar).isSpace()) |
733 { | 733 { |
734 begin.rx () --; | 734 begin.rx () --; |
735 } | 735 } |
736 | 736 |
737 while(end.x () < m_consoleRect.width () && | 737 while(end.x () < m_consoleRect.width () && |
738 QChar(m_buffer[end.y ()*stride + end.x () +1].Char.UnicodeChar).isSpace ()) | 738 QChar(m_buffer[end.y ()*stride + end.x () +1].Char.UnicodeChar).isSpace ()) |
739 { | 739 { |
740 end.rx () ++; | 740 end.rx () ++; |
741 } | 741 } |
742 } | 742 } |
1010 // using these values rather than querying the terminal so that the | 1010 // using these values rather than querying the terminal so that the |
1011 // buffer size can be larger than the size of the window that the | 1011 // buffer size can be larger than the size of the window that the |
1012 // command editor will actually use. | 1012 // command editor will actually use. |
1013 | 1013 |
1014 qputenv ("LINES", QByteArray::number (m_consoleRect.height ())); | 1014 qputenv ("LINES", QByteArray::number (m_consoleRect.height ())); |
1015 qputenv ("COLUMNS", QByteArray::number (m_consoleRect.width ())); | 1015 qputenv ("COLUMNS", QByteArray::number (m_consoleRect.width ())); |
1016 | 1016 |
1017 // Force the command line editor (usually readline) to notice the | 1017 // Force the command line editor (usually readline) to notice the |
1018 // change in screen size as soon as possible. | 1018 // change in screen size as soon as possible. |
1019 | 1019 |
1020 q->setSize (m_consoleRect.height (), m_consoleRect.width ()); | 1020 q->setSize (m_consoleRect.height (), m_consoleRect.width ()); |
1174 r.Top = m_consoleRect.top (); | 1174 r.Top = m_consoleRect.top (); |
1175 r.Right = value + m_consoleRect.width () - 1; | 1175 r.Right = value + m_consoleRect.width () - 1; |
1176 r.Bottom = m_consoleRect.bottom (); | 1176 r.Bottom = m_consoleRect.bottom (); |
1177 | 1177 |
1178 log ("Scrolling window horizontally: (%d, %d) -> (%d, %d) [%d x %d]\n", | 1178 log ("Scrolling window horizontally: (%d, %d) -> (%d, %d) [%d x %d]\n", |
1179 r.Left, r.Top, r.Right, r.Bottom, | 1179 r.Left, r.Top, r.Right, r.Bottom, |
1180 r.Right - r.Left + 1, r.Bottom - r.Top + 1); | 1180 r.Right - r.Left + 1, r.Bottom - r.Top + 1); |
1181 | 1181 |
1182 if (SetConsoleWindowInfo (hStdOut, TRUE, &r)) | 1182 if (SetConsoleWindowInfo (hStdOut, TRUE, &r)) |
1183 { | 1183 { |
1184 m_consoleRect.moveLeft (value); | 1184 m_consoleRect.moveLeft (value); |
1201 r.Top = value; | 1201 r.Top = value; |
1202 r.Right = m_consoleRect.right (); | 1202 r.Right = m_consoleRect.right (); |
1203 r.Bottom = value + m_consoleRect.height () - 1; | 1203 r.Bottom = value + m_consoleRect.height () - 1; |
1204 | 1204 |
1205 log ("Scrolling window vertically: (%d, %d) -> (%d, %d) [%d x %d]\n", | 1205 log ("Scrolling window vertically: (%d, %d) -> (%d, %d) [%d x %d]\n", |
1206 r.Left, r.Top, r.Right, r.Bottom, | 1206 r.Left, r.Top, r.Right, r.Bottom, |
1207 r.Right - r.Left + 1, r.Bottom - r.Top + 1); | 1207 r.Right - r.Left + 1, r.Bottom - r.Top + 1); |
1208 | 1208 |
1209 if (SetConsoleWindowInfo (hStdOut, TRUE, &r)) | 1209 if (SetConsoleWindowInfo (hStdOut, TRUE, &r)) |
1210 { | 1210 { |
1211 m_consoleRect.moveTop (value); | 1211 m_consoleRect.moveTop (value); |
1826 | 1826 |
1827 if (event->mimeData ()->hasUrls ()) | 1827 if (event->mimeData ()->hasUrls ()) |
1828 { | 1828 { |
1829 foreach (QUrl url, event->mimeData ()->urls ()) | 1829 foreach (QUrl url, event->mimeData ()->urls ()) |
1830 { | 1830 { |
1831 if(dropText.length () > 0) | 1831 if(dropText.length () > 0) |
1832 dropText += "\n"; | 1832 dropText += "\n"; |
1833 dropText += url.toLocalFile (); | 1833 dropText += url.toLocalFile (); |
1834 } | 1834 } |
1835 sendText (dropText); | 1835 sendText (dropText); |
1836 } | 1836 } |