[Libufo-commits] ufo-0.5/src/widgets ubutton.cpp,1.24,1.25 ucombobox.cpp,1.9,1.10 udesktoppane.cpp,1
Status: Beta
Brought to you by:
schmidtjf
|
From: Johannes S. <sch...@us...> - 2005-09-30 12:37:30
|
Update of /cvsroot/libufo/ufo-0.5/src/widgets In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4188/src/widgets Modified Files: ubutton.cpp ucombobox.cpp udesktoppane.cpp uinternalframe.cpp ulineedit.cpp ulistbox.cpp umenuitem.cpp urootpane.cpp uscrollbar.cpp uscrollpane.cpp uslider.cpp uspinbox.cpp utextedit.cpp utextwidget.cpp uviewport.cpp Log Message: Fixed warnings about comparison of signed vs. unsigned values. Fixed warnings about unhandled switch values. Fixed warnings about unused variables. Index: utextedit.cpp =================================================================== RCS file: /cvsroot/libufo/ufo-0.5/src/widgets/utextedit.cpp,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** utextedit.cpp 15 Sep 2005 16:33:18 -0000 1.17 --- utextedit.cpp 30 Sep 2005 12:37:20 -0000 1.18 *************** *** 304,307 **** --- 304,309 ---- } break; + default: + break; } UWidget::processMouseEvent(e); Index: ulineedit.cpp =================================================================== RCS file: /cvsroot/libufo/ufo-0.5/src/widgets/ulineedit.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** ulineedit.cpp 5 Jul 2005 11:21:48 -0000 1.4 --- ulineedit.cpp 30 Sep 2005 12:37:20 -0000 1.5 *************** *** 126,130 **** } UDocument * doc = getDocument(); - UTextLayout * textLayout = getTextLayout(); char keyChar[1]; --- 126,129 ---- Index: ulistbox.cpp =================================================================== RCS file: /cvsroot/libufo/ufo-0.5/src/widgets/ulistbox.cpp,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** ulistbox.cpp 15 Sep 2005 10:13:21 -0000 1.22 --- ulistbox.cpp 30 Sep 2005 12:37:20 -0000 1.23 *************** *** 145,154 **** //UWidget::paintWidget(g); ! UInsets insets = getInsets(); // painting cells int x = insets.left; int y = insets.top; const UColor & background = getBackgroundColor(); const UColor & foreground = getForegroundColor(); const std::vector<UItem*> & items = getItems(); const UStyleHints * hints = getStyleHints(); --- 145,156 ---- //UWidget::paintWidget(g); ! //UInsets insets = getInsets(); // painting cells + /* int x = insets.left; int y = insets.top; const UColor & background = getBackgroundColor(); const UColor & foreground = getForegroundColor(); + */ const std::vector<UItem*> & items = getItems(); const UStyleHints * hints = getStyleHints(); *************** *** 206,212 **** case UEvent::MousePressed: e->consume(); ! ! int index = locationToIndex(e->getLocation()); ! setSelectedIndex(index); break; } --- 208,214 ---- case UEvent::MousePressed: e->consume(); ! setSelectedIndex(locationToIndex(e->getLocation())); ! break; ! default: break; } *************** *** 235,238 **** --- 237,242 ---- } break; + default: + break; } } Index: uscrollpane.cpp =================================================================== RCS file: /cvsroot/libufo/ufo-0.5/src/widgets/uscrollpane.cpp,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** uscrollpane.cpp 12 Jul 2005 13:32:55 -0000 1.17 --- uscrollpane.cpp 30 Sep 2005 12:37:20 -0000 1.18 *************** *** 144,147 **** --- 144,149 ---- installScrollable(); break; + default: + break; } UWidget::processWidgetEvent(e); Index: uslider.cpp =================================================================== RCS file: /cvsroot/libufo/ufo-0.5/src/widgets/uslider.cpp,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** uslider.cpp 21 May 2005 15:20:44 -0000 1.5 --- uslider.cpp 30 Sep 2005 12:37:20 -0000 1.6 *************** *** 41,46 **** USlider::USlider() : UAbstractSlider() - , m_mousePress() , m_isDragging(false) { // init sub controls for style --- 41,46 ---- USlider::USlider() : UAbstractSlider() , m_isDragging(false) + , m_mousePress() { // init sub controls for style *************** *** 54,59 **** USlider::USlider(Orientation orientation) : UAbstractSlider() - , m_mousePress() , m_isDragging(false) { setOrientation(orientation); --- 54,59 ---- USlider::USlider(Orientation orientation) : UAbstractSlider() , m_isDragging(false) + , m_mousePress() { setOrientation(orientation); *************** *** 68,73 **** USlider::USlider(int min, int max, int value) : UAbstractSlider() - , m_mousePress() , m_isDragging(false) { setRange(min, max); --- 68,73 ---- USlider::USlider(int min, int max, int value) : UAbstractSlider() , m_isDragging(false) + , m_mousePress() { setRange(min, max); *************** *** 83,88 **** USlider::USlider(Orientation orientation, int min, int max, int value) : UAbstractSlider() - , m_mousePress() , m_isDragging(false) { setOrientation(orientation); --- 83,88 ---- USlider::USlider(Orientation orientation, int min, int max, int value) : UAbstractSlider() , m_isDragging(false) + , m_mousePress() { setOrientation(orientation); *************** *** 180,183 **** --- 180,185 ---- } break; + default: + break; } Index: uspinbox.cpp =================================================================== RCS file: /cvsroot/libufo/ufo-0.5/src/widgets/uspinbox.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** uspinbox.cpp 4 Sep 2005 14:59:41 -0000 1.2 --- uspinbox.cpp 30 Sep 2005 12:37:20 -0000 1.3 *************** *** 145,149 **** case UEvent::MousePressed: { e->consume(); - UPoint pos = e->getLocation(); UStyle::SubControls subctrl = getStyle()->getSubControlAt( UStyle::CE_SpinBox, getSize(), getStyleHints(), --- 145,148 ---- *************** *** 160,163 **** --- 159,164 ---- repaint(); break; + default: + break; } } *************** *** 168,171 **** --- 169,174 ---- repaint(); break; + default: + break; } UWidget::processMouseEvent(e); Index: udesktoppane.cpp =================================================================== RCS file: /cvsroot/libufo/ufo-0.5/src/widgets/udesktoppane.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** udesktoppane.cpp 16 Jul 2005 13:42:31 -0000 1.3 --- udesktoppane.cpp 30 Sep 2005 12:37:20 -0000 1.4 *************** *** 113,116 **** --- 113,120 ---- w->setOrientation(Vertical); break; + case AllDockWidgetAreas: + // FIXME: what does this mean? + // seems to be non-sense here + break; } } *************** *** 180,184 **** // check for stays on top // FIXME: checks only for the top most ! int first = getLayerBegin(getLayer(frame)); if (first >= 0 && first < getWidgetCount()) { if (UInternalFrame * tempFrame = dynamic_cast<UInternalFrame*>(getWidget(first))) { --- 184,188 ---- // check for stays on top // FIXME: checks only for the top most ! unsigned int first = getLayerBegin(getLayer(frame)); if (first >= 0 && first < getWidgetCount()) { if (UInternalFrame * tempFrame = dynamic_cast<UInternalFrame*>(getWidget(first))) { *************** *** 288,291 **** --- 292,297 ---- ); break; + default: + break; } } *************** *** 316,319 **** --- 322,327 ---- } break; + default: + break; } } Index: umenuitem.cpp =================================================================== RCS file: /cvsroot/libufo/ufo-0.5/src/widgets/umenuitem.cpp,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** umenuitem.cpp 21 Jun 2005 09:27:42 -0000 1.12 --- umenuitem.cpp 30 Sep 2005 12:37:20 -0000 1.13 *************** *** 153,156 **** --- 153,158 ---- } break; + default: + break; } UWidget::processMouseEvent(e); Index: ubutton.cpp =================================================================== RCS file: /cvsroot/libufo/ufo-0.5/src/widgets/ubutton.cpp,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -d -r1.24 -r1.25 *** ubutton.cpp 2 Sep 2005 13:25:48 -0000 1.24 --- ubutton.cpp 30 Sep 2005 12:37:20 -0000 1.25 *************** *** 356,359 **** --- 356,361 ---- } break; + default: + break; } UWidget::processMouseEvent(e); *************** *** 421,439 **** // grab new mnemonic std::string text(getText()); // try lower case first ! m_acceleratorIndex = text.find(char(/*std::*/tolower(stroke.getKeyCode() + 32))); ! if (m_acceleratorIndex < text.length()) { ! getCompoundModel()->acceleratorIndex = m_acceleratorIndex; ! } else { // now normal ! m_acceleratorIndex = text.find(char(stroke.getKeyCode())); ! if (m_acceleratorIndex < text.length()) { ! getCompoundModel()->acceleratorIndex = m_acceleratorIndex; ! } else { //FIXME: oops, nothing ! m_acceleratorIndex = -1; } } updateMnemonic(); } else { --- 423,441 ---- // grab new mnemonic std::string text(getText()); + std::string::size_type index; // try lower case first ! index = text.find(char(/*std::*/tolower(stroke.getKeyCode() + 32))); ! if (index >= text.length()) { // now normal ! index = text.find(char(stroke.getKeyCode())); ! if (index >= text.length()) { //FIXME: oops, nothing ! getCompoundModel()->acceleratorIndex = -1; ! updateMnemonic(); ! return; } } + getCompoundModel()->acceleratorIndex = int(index); updateMnemonic(); } else { *************** *** 450,453 **** int UButton::getAcceleratorIndex() const { ! return m_acceleratorIndex; } --- 452,455 ---- int UButton::getAcceleratorIndex() const { ! return getCompoundModel()->acceleratorIndex; } Index: uviewport.cpp =================================================================== RCS file: /cvsroot/libufo/ufo-0.5/src/widgets/uviewport.cpp,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** uviewport.cpp 12 Jul 2005 13:32:55 -0000 1.10 --- uviewport.cpp 30 Sep 2005 12:37:20 -0000 1.11 *************** *** 154,158 **** } ! const UPoint & p = m_view->getLocation(); // x vlaue --- 154,158 ---- } ! //const UPoint & p = m_view->getLocation(); // x vlaue Index: ucombobox.cpp =================================================================== RCS file: /cvsroot/libufo/ufo-0.5/src/widgets/ucombobox.cpp,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** ucombobox.cpp 5 Jul 2005 11:23:02 -0000 1.9 --- ucombobox.cpp 30 Sep 2005 12:37:20 -0000 1.10 *************** *** 261,264 **** --- 261,266 ---- popup(); break; + default: + break; } UWidget::processMouseEvent(e); *************** *** 312,315 **** --- 314,319 ---- break; */ + default: + break; } } Index: uscrollbar.cpp =================================================================== RCS file: /cvsroot/libufo/ufo-0.5/src/widgets/uscrollbar.cpp,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** uscrollbar.cpp 21 May 2005 15:20:25 -0000 1.13 --- uscrollbar.cpp 30 Sep 2005 12:37:20 -0000 1.14 *************** *** 41,47 **** int minA, int maxA) : UAbstractSlider() - , m_visAmount(visAmountA) - , m_mousePress() , m_isDragging(false) { if (orientation != Horizontal) { --- 41,47 ---- int minA, int maxA) : UAbstractSlider() , m_isDragging(false) + , m_mousePress() + , m_visAmount(visAmountA) { if (orientation != Horizontal) { *************** *** 92,96 **** case UEvent::MousePressed: { e->consume(); - UPoint pos = e->getLocation(); UStyle::SubControls subctrl = getStyle()->getSubControlAt( UStyle::CE_ScrollBar, getSize(), getStyleHints(), --- 92,95 ---- *************** *** 121,124 **** --- 120,125 ---- setValue(getValue() + getBlockIncrement()); break; + default: + break; } } *************** *** 156,159 **** --- 157,162 ---- } break; + default: + break; } Index: utextwidget.cpp =================================================================== RCS file: /cvsroot/libufo/ufo-0.5/src/widgets/utextwidget.cpp,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** utextwidget.cpp 15 Sep 2005 16:33:18 -0000 1.5 --- utextwidget.cpp 30 Sep 2005 12:37:20 -0000 1.6 *************** *** 60,66 **** : UScrollableWidget() //, std::streambuf() - , m_type() , m_doc(NULL) , m_textLayout(new UTextLayout()) , m_columns(0) , m_rows(0) --- 60,66 ---- : UScrollableWidget() //, std::streambuf() , m_doc(NULL) , m_textLayout(new UTextLayout()) + , m_type() , m_columns(0) , m_rows(0) *************** *** 82,88 **** : UScrollableWidget() //, std::streambuf() - , m_type() , m_doc(NULL) , m_textLayout(new UTextLayout()) , m_columns(0) , m_rows(0) --- 82,88 ---- : UScrollableWidget() //, std::streambuf() , m_doc(NULL) , m_textLayout(new UTextLayout()) + , m_type() , m_columns(0) , m_rows(0) *************** *** 339,342 **** --- 339,344 ---- } break; + default: + break; } UWidget::processMouseEvent(e); Index: urootpane.cpp =================================================================== RCS file: /cvsroot/libufo/ufo-0.5/src/widgets/urootpane.cpp,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** urootpane.cpp 16 Jul 2005 13:42:31 -0000 1.14 --- urootpane.cpp 30 Sep 2005 12:37:20 -0000 1.15 *************** *** 255,259 **** URootLayout::layoutContainer(const UWidget * parent) { URectangle rect = parent->getInnerBounds(); ! int top = 0; m_rootPane->m_desktopPane->setBounds(rect); --- 255,259 ---- URootLayout::layoutContainer(const UWidget * parent) { URectangle rect = parent->getInnerBounds(); ! //int top = 0; m_rootPane->m_desktopPane->setBounds(rect); Index: uinternalframe.cpp =================================================================== RCS file: /cvsroot/libufo/ufo-0.5/src/widgets/uinternalframe.cpp,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** uinternalframe.cpp 20 Jul 2005 09:53:32 -0000 1.17 --- uinternalframe.cpp 30 Sep 2005 12:37:20 -0000 1.18 *************** *** 301,304 **** --- 301,306 ---- vertical = 0; break; + default: + break; } UWidget::processMouseEvent(e); *************** *** 322,325 **** --- 324,329 ---- m_desktop = NULL; break; + default: + break; } UWidget::processWidgetEvent(e); *************** *** 425,428 **** --- 429,434 ---- } break; + default: + break; } repaint(); *************** *** 441,444 **** --- 447,452 ---- } break; + default: + break; } UWidget::processMouseEvent(e); |