summaryrefslogtreecommitdiff
path: root/noncore/apps/opie-reader/QTReader.cpp
authorerik <erik>2007-01-29 21:53:48 (UTC)
committer erik <erik>2007-01-29 21:53:48 (UTC)
commit02ef45be75a3024df11365956e1cce6392d9103c (patch) (unidiff)
tree42fd5c909d67a473f57a607e01d32e01b3dd2511 /noncore/apps/opie-reader/QTReader.cpp
parentb2c306a99b8dc82c981390f02db859149fac8cf0 (diff)
downloadopie-02ef45be75a3024df11365956e1cce6392d9103c.zip
opie-02ef45be75a3024df11365956e1cce6392d9103c.tar.gz
opie-02ef45be75a3024df11365956e1cce6392d9103c.tar.bz2
Each file in this commit has an issue where the initial value of a variable
is assumed to be something but no initial value is given. This commit changes that by either assigning an initial value or removing the assumption on an initial value (usually the former).
Diffstat (limited to 'noncore/apps/opie-reader/QTReader.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/opie-reader/QTReader.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/noncore/apps/opie-reader/QTReader.cpp b/noncore/apps/opie-reader/QTReader.cpp
index 0c56dd4..75da8ac 100644
--- a/noncore/apps/opie-reader/QTReader.cpp
+++ b/noncore/apps/opie-reader/QTReader.cpp
@@ -523,49 +523,49 @@ void QTReader::setDoubleBuffer(bool _b)
523 { 523 {
524 if (dbuff != NULL) 524 if (dbuff != NULL)
525 { 525 {
526 delete dbuff; 526 delete dbuff;
527 delete dbp; 527 delete dbp;
528 } 528 }
529 dbuff = NULL; 529 dbuff = NULL;
530 dbp = NULL; 530 dbp = NULL;
531 } 531 }
532} 532}
533 533
534void QTReader::setTwoTouch(bool _b) 534void QTReader::setTwoTouch(bool _b)
535{ 535{
536 setBackgroundColor( m_bg ); 536 setBackgroundColor( m_bg );
537 m_twotouch = m_touchone = _b; 537 m_twotouch = m_touchone = _b;
538} 538}
539 539
540void QTReader::setContinuous(bool _b) 540void QTReader::setContinuous(bool _b)
541{ 541{
542 buffdoc.setContinuous(m_continuousDocument = _b); 542 buffdoc.setContinuous(m_continuousDocument = _b);
543} 543}
544 544
545void QTReader::processmousewordevent(size_t startpos, size_t startoffset, QMouseEvent* _e, int lineno) 545void QTReader::processmousewordevent(size_t startpos, size_t startoffset, QMouseEvent* _e, int lineno)
546{ 546{
547 unsigned long wrdstart, wrdend; 547 unsigned long wrdstart = 0, wrdend = 0;
548 QString wrd; 548 QString wrd;
549 int availht = ((m_rotated) ? width() : height()) - m_topmargin - m_bottommargin; 549 int availht = ((m_rotated) ? width() : height()) - m_topmargin - m_bottommargin;
550 if (m_twotouch) 550 if (m_twotouch)
551 { 551 {
552 if (m_touchone) 552 if (m_touchone)
553 { 553 {
554 m_touchone = false; 554 m_touchone = false;
555 m_startpos = startpos; 555 m_startpos = startpos;
556 m_startoffset = startoffset; 556 m_startoffset = startoffset;
557 setBackgroundColor( lightGray ); 557 setBackgroundColor( lightGray );
558 } 558 }
559 else 559 else
560 { 560 {
561 m_touchone = true; 561 m_touchone = true;
562 setBackgroundColor( m_bg ); 562 setBackgroundColor( m_bg );
563 size_t endpos, endoffset; 563 size_t endpos, endoffset;
564 endpos = startpos; 564 endpos = startpos;
565 endoffset = startoffset; 565 endoffset = startoffset;
566 size_t currentpos = locate(); 566 size_t currentpos = locate();
567 if (endpos >= m_startpos) 567 if (endpos >= m_startpos)
568 { 568 {
569 jumpto(m_startpos); 569 jumpto(m_startpos);
570 for (int i = 0; i < m_startoffset; i++) 570 for (int i = 0; i < m_startoffset; i++)
571 { 571 {