summaryrefslogtreecommitdiffstats
path: root/src/gui/text/qtextdocument_p.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Update license headers to release version.Jason McDonald2010-10-181-13/+13
|
* Remove qMemCopy() usage from all .cpp files of Qt itself.Robin Burchell2010-07-181-1/+1
| | | | | | | | This is (supposedly) more efficient as the compiler can optimise it to a builtin, per Thiago. Merge-request: 2430 Reviewed-by: Andreas Kling <andreas.kling@nokia.com>
* Fix crashmae2010-07-081-1/+4
| | | | | | Got introduced with change f62f6effab8d1551d8e5e5843dc478addee96de1 Reviewed-by: Roberto Raggi
* Fix exponential behavior of QTextCursor::removeSelectedTextmae2010-07-081-3/+15
| | | | This is an improved version of 62db6c18c7f1f60819783ed5e1340e9fc09e072e
* Revert "Fix exponential behavior of QTextCursor::removeSelectedText"Michael Brasser2010-07-071-7/+0
| | | | | This reverts commit 62db6c18c7f1f60819783ed5e1340e9fc09e072e, which introduced a regression in tst_qtextpiecetable::checkDocumentChanged
* Fix performance of QTextDocumentPrivate::adjustDocumentChangesAndCursorsChristian Kamm2010-07-061-17/+17
| | | | | | | | | | As the changedCursors list grew large, the function used to spend an extraordinate amount of time in QList::contains. The fix removes the changedCursors list outright and replaces it with a flag in QTextCursorPrivate. Done-with: mae
* Fix exponential behavior of QTextCursor::removeSelectedTextmae2010-07-021-0/+7
| | | | | | | | | | removeSelectedText adjusts all other cursors for every fragment and block which gets removed. This becomes (for reasons yet to be understood) exponential with loads of cursors (something creator has for the semantic highlighting). Done-with: Roberto Raggi Reviewed-by: Simon Hausmann
* Cursor positioning in QTextDocument after undo()mae2010-06-081-0/+19
| | | | | | | | | | | | | | | | | | | | | | | QTextDocument had no way of storing the cursor position from which a document change was initiated in the undo stack. That means that any undo operation would reposition the text cursor to the text position where the actual change happened. This works in many cases, but not always. In Qt Creator we have standard IDE shortcuts like e.g. Ctrl+Return for InsertLineBelowCurrentLine, which insert a newline at the end of the current line, not at the cursor position. Using undo there resulted in a surprisingly wrong cursor position. The problem becomes worse with more advanced refactoring and productivity tools (like snippets). The patch creates a synthetic CursorMoved undo item with the position which was current at the time of calling QTextCursor::beginEditBlock(), but only if necesary, i.e. only in those cases where the cursor would be positioned wrongly. Reviewed-by: Roberto Raggi
* Fix QTextDocument::undo() cursor positioningmae2010-04-071-7/+25
| | | | | | | | | | | When doing block undo operations, QTextDocument used the change position of the last undo command for positioning the cursor. This is incorrect if the last commands are of type QTextUndoCommand::Removed but split because of the text fragments. The bug is highly noticable in creator when inserting snippets and doing undo afterwards. The change adds an auto test.
* Compile Qt in C++0x mode.Thiago Macieira2010-03-201-1/+1
| | | | | | | | | | | | | This is not valid in C++0x: char str[] = { 128, 0 }; Because 128 cannot be represented in a char. The same applies to conversion from int to qreal: it's a narrowing conversion, with possible data loss. More info: http://www2.research.att.com/~bs/C++0xFAQ.html#narrowing Reviewed-by: Trust Me
* Fixed cleaning of both undo- and redo-stacks.Erik Verbruggen2010-02-111-3/+2
|
* Fixed regression.Erik Verbruggen2010-02-101-4/+4
|
* Added method to clear the undo/redo stacks.Erik Verbruggen2010-02-091-21/+41
| | | | Reviewed-by: mae
* Update copyright year to 2010Jason McDonald2010-01-061-1/+1
| | | | Reviewed-by: Trust Me
* Fix cursor positiong after block undo and redomae2009-12-041-2/+10
| | | | | | | | | | | Block changes in different selections happens quite frequently with Qt Creator, e.g. when renaming local variables. The desired behaviour which the tst_QTextCursor::cursorPositionWIthBLockUndoAndRedo() tests, is like this: after an undo, the cursor should be where it was when the block operation started. After a redo, the cursor should be where it was after the block operation ended. Reviewed-by: Simon Hausmann
* Fix regression in emitting of QTextDocument::undoCommandAdded()Thomas Zander2009-11-161-1/+3
| | | | | | | | | | The test I wrote was not testing if calling undo/redo had any effect on emitting undoCommandAdded(), added these test cases and fixed the QTextDocumentPrivate::endEditBlock so we now again emit only when an undo command is added, not also on calling undo or redo. Reviewed-by: mae Reviewed-by: Samuel Rødal
* Fix QTextDocument::revision()mae2009-09-241-19/+14
| | | | | | | | | The revision was bound to the current depth of the undo stack. This had the negative side effect, that equal revisions could point to different documents, and sometimes changes would not even increase the revision (in the case of undo command merging). Reviewed-by: Roberto Raggi
* QTextDocument::contentsChanged() was emitted twice for a singlemae2009-09-101-1/+1
| | | | | | | | insertion. This was caught by the QSyntaxHighlighter autotest. Reviewed-by: Paul
* Update license headers again.Jason McDonald2009-09-091-4/+4
| | | | Reviewed-by: Trust Me
* Merge branch '4.5' into 4.6Thiago Macieira2009-08-311-13/+13
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: demos/boxes/glshaders.cpp demos/boxes/vector.h demos/embedded/fluidlauncher/pictureflow.cpp demos/embedded/fluidlauncher/pictureflow.h doc/src/desktop-integration.qdoc doc/src/distributingqt.qdoc doc/src/examples-overview.qdoc doc/src/examples.qdoc doc/src/frameworks-technologies/dbus-adaptors.qdoc doc/src/geometry.qdoc doc/src/groups.qdoc doc/src/objecttrees.qdoc doc/src/platform-notes.qdoc doc/src/plugins-howto.qdoc doc/src/qt3support.qdoc doc/src/qtdbus.qdoc doc/src/qtdesigner.qdoc doc/src/qtgui.qdoc doc/src/qtmain.qdoc doc/src/qtopengl.qdoc doc/src/qtsvg.qdoc doc/src/qtuiloader.qdoc doc/src/qundo.qdoc doc/src/richtext.qdoc doc/src/topics.qdoc src/corelib/tools/qdumper.cpp src/gui/embedded/qkbdpc101_qws.cpp src/gui/embedded/qkbdsl5000_qws.cpp src/gui/embedded/qkbdusb_qws.cpp src/gui/embedded/qkbdvr41xx_qws.cpp src/gui/embedded/qkbdyopy_qws.cpp src/gui/embedded/qmousebus_qws.cpp src/gui/embedded/qmousevr41xx_qws.cpp src/gui/embedded/qmouseyopy_qws.cpp src/gui/painting/qpaintengine_d3d.cpp src/gui/painting/qwindowsurface_d3d.cpp src/opengl/gl2paintengineex/glgc_shader_source.h src/opengl/gl2paintengineex/qglpexshadermanager.cpp src/opengl/gl2paintengineex/qglpexshadermanager_p.h src/opengl/gl2paintengineex/qglshader.cpp src/opengl/gl2paintengineex/qglshader_p.h src/opengl/util/fragmentprograms_p.h src/plugins/kbddrivers/linuxis/linuxiskbdhandler.cpp src/plugins/mousedrivers/linuxis/linuxismousehandler.cpp src/script/parser/qscript.g src/script/qscriptarray_p.h src/script/qscriptasm_p.h src/script/qscriptbuffer_p.h src/script/qscriptclass.cpp src/script/qscriptclassdata_p.h src/script/qscriptcompiler.cpp src/script/qscriptcompiler_p.h src/script/qscriptcontext.cpp src/script/qscriptcontext_p.cpp src/script/qscriptcontext_p.h src/script/qscriptcontextfwd_p.h src/script/qscriptecmaarray.cpp src/script/qscriptecmaarray_p.h src/script/qscriptecmaboolean.cpp src/script/qscriptecmacore.cpp src/script/qscriptecmadate.cpp src/script/qscriptecmadate_p.h src/script/qscriptecmaerror.cpp src/script/qscriptecmaerror_p.h src/script/qscriptecmafunction.cpp src/script/qscriptecmafunction_p.h src/script/qscriptecmaglobal.cpp src/script/qscriptecmaglobal_p.h src/script/qscriptecmamath.cpp src/script/qscriptecmamath_p.h src/script/qscriptecmanumber.cpp src/script/qscriptecmanumber_p.h src/script/qscriptecmaobject.cpp src/script/qscriptecmaobject_p.h src/script/qscriptecmaregexp.cpp src/script/qscriptecmaregexp_p.h src/script/qscriptecmastring.cpp src/script/qscriptecmastring_p.h src/script/qscriptengine.cpp src/script/qscriptengine_p.cpp src/script/qscriptengine_p.h src/script/qscriptenginefwd_p.h src/script/qscriptextenumeration.cpp src/script/qscriptextenumeration_p.h src/script/qscriptextqobject.cpp src/script/qscriptextqobject_p.h src/script/qscriptextvariant.cpp src/script/qscriptfunction.cpp src/script/qscriptfunction_p.h src/script/qscriptgc_p.h src/script/qscriptmember_p.h src/script/qscriptobject_p.h src/script/qscriptprettypretty.cpp src/script/qscriptprettypretty_p.h src/script/qscriptvalue.cpp src/script/qscriptvalueimpl.cpp src/script/qscriptvalueimpl_p.h src/script/qscriptvalueimplfwd_p.h src/script/qscriptvalueiteratorimpl.cpp src/script/qscriptxmlgenerator.cpp src/script/qscriptxmlgenerator_p.h tests/auto/linguist/lupdate/testdata/recursivescan/project.ui tests/auto/linguist/lupdate/testdata/recursivescan/sub/finddialog.cpp tests/auto/qkeyevent/tst_qkeyevent.cpp tools/linguist/shared/cpp.cpp
| * Update tech preview license header.Jason McDonald2009-08-311-13/+13
| | | | | | | | Reviewed-by: Trust Me
| * Update license headers.Jason McDonald2009-08-111-1/+1
| | | | | | | | Reviewed-by: Trust Me
* | Fixed an MSVC 9.0 /2008 warningAlessandro Portale2009-08-211-5/+5
| | | | | | | | Reviewed-By: Harald Fernengel
* | Merge commit 'qt/master'Jason Barron2009-08-211-18/+24
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: configure.exe examples/examples.pro qmake/Makefile.unix qmake/Makefile.win32 qmake/Makefile.win32-g++ qmake/Makefile.win32-g++-sh qmake/qmake.pro src/script/api/qscriptable.h src/script/api/qscriptclasspropertyiterator.h src/script/api/qscriptcontext.h src/script/api/qscriptengineagent.cpp src/script/api/qscriptstring.cpp src/script/api/qscriptstring.h src/script/api/qscriptvalueiterator.cpp src/script/api/qscriptvalueiterator.h src/script/qscriptclass.cpp src/script/qscriptcontext.cpp src/script/qscriptengine.cpp src/script/qscriptengine_p.cpp src/script/qscriptvalue.cpp src/script/qscriptvalue_p.h src/script/qscriptvalueimplfwd_p.h src/script/script.pro src/src.pro tests/auto/auto.pro tests/auto/qscriptv8testsuite/tst_qscriptv8testsuite.cpp tools/configure/configureapp.cpp
| * | Fix undo/redo of single-command edit blocksmae2009-08-201-18/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (with QTextCursor::beginEditBlock() and QTextCursor::endEditBlock()) Previously QTextDocument would treat single command blocks as if there was no block, i.e. command compression would occur, causing tst_QTextDocument::testUndoBlocks() to fail. The patch completes the insufficient block-flag of QTextUndoCommand with an addition flag block_end. The block-flag itself is renamed to block_part. Reviewed-by: con
* | | Merge commit 'qt/master'Jason Barron2009-08-131-1/+1
|\ \ \ | |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: examples/opengl/samplebuffers/glwidget.cpp src/corelib/io/qfsfileengine_unix.cpp src/corelib/kernel/qobject.cpp src/corelib/tools/qsharedpointer.cpp src/gui/gui.pro tests/auto/qhttp/tst_qhttp.cpp tests/auto/qkeyevent/tst_qkeyevent.cpp
| * | Update contact URL in license headers.Jason McDonald2009-08-121-1/+1
| | | | | | | | | | | | Reviewed-by: Trust Me
* | | Merge commit 'origin/master'Jason Barron2009-08-041-35/+41
|\ \ \ | |/ / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/global/qglobal.h src/corelib/kernel/qmetatype.cpp src/corelib/kernel/qobject.cpp src/corelib/thread/qthread_unix.cpp src/gui/graphicsview/qgraphicssceneevent.h src/gui/itemviews/qheaderview.h src/gui/kernel/qapplication_qws.cpp src/gui/kernel/qgesture.h src/gui/kernel/qgesturerecognizer.h src/gui/painting/qpaintengine_raster.cpp src/network/access/qhttpnetworkreply.cpp src/network/access/qnetworkcookie.h src/network/socket/qnativesocketengine_unix.cpp
| * | Squashed commit of the topic/exceptions branch.Harald Fernengel2009-08-031-35/+41
| | | | | | | | | | | | | | | Contains some smaller fixes and renaming of macros. Looks big, but isn't scary at all ;)
* | | Port of Qt to VxWorksRobert Griebl2009-07-291-18/+27
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This makes Qt work on VxWorks 6.6+ in native (kernel) mode. * compiles with the WindRiver GNU toolchain (Linux only) * works with QWS (tested with the VNC driver only) * tested on PPC hardware and the x86 VxWorks simulator * no q3support, no phonon, no webkit * no QSharedMemory, no QSystemSemaphore, no QProcess * only one QApplication instance (flat address space) * filesystem support depends heavily on the quality of the native driver * QLibrary is just a dummy to make plugins work at all * qmake transparently creates VxWorks munching rules for static ctors * made auto-test cope with missing OS features A special note regarding the Q_FOREACH patch for dcc: when calling foreach(a,c) with c being a function returning a container, the compiler would generate 5 references to some labels (.LXXXX), which are not there (so the linker complains in the end). Seems like dcc doesn't really like the 'true ? 0 : <function call to get type>' statement Reviewed-By: Harald Fernengel
* | Merge license header changes from 4.5Volker Hilsheimer2009-06-161-2/+2
|\ \ | |/
| * Update license headers as requested by the marketing department.Jason McDonald2009-06-161-2/+2
| | | | | | | | Reviewed-by: Trust Me
* | Revert signal emission order in QTextDocument to 4.5 behaviourmae2009-06-081-1/+7
| | | | | | | | | | | | | | This is covered by the autotest tst_QTextDocument::receiveCursorPositionChangedAfterContentsChange() Reviewed-by: con
* | Fixed unwanted merging of undo commands from different edit blocksmae2009-05-081-13/+26
|/ | | | | | | | | With this patch, commands no longer merge across block bounderies. In order to have merging still work for the normal insertion and deletion case, the unnecessary beginEditBlock()/endEditBlock() calls where cleaned up. Reviewed-by: Simon Hausmann
* Fix crash when accessing newly constructed QTextObjects.Benjamin Poulain2009-03-261-1/+0
| | | | | | | | | The pieceTable member was only initialized by QTextDocumentPrivate _after_ the call to createObject. This patch initializes it at construction time. Task-number: 246138 Reviewed-by: Simon Hausmann
* Long live Qt 4.5!Lars Knoll2009-03-231-0/+1600