[kde-doc-english] [skrooge/kf5] /: Merge branch 'master' of kde:skrooge into kf5

Stephane Mankowski stephane at mankowski.fr
Sun Apr 5 20:48:12 UTC 2015


Git commit e4c7dc270218160e2d57cb4330d36d6c0c4ff0c7 by Stephane Mankowski.
Committed on 02/04/2015 at 21:06.
Pushed by smankowski into branch 'kf5'.

Merge branch 'master' of kde:skrooge into kf5

Conflicts:
	skgbasegui/skgcalculatoredit.cpp
	skgbasemodeler/skgservices.cpp

M  +5    -0    CHANGELOG
M  +22   -5    doc/index.docbook
M  +5    -2    plugins/skrooge/skrooge_operation/skgoperationpluginwidget.cpp
M  +37   -6    skgbankmodeler/skgdocumentbank.cpp
M  +6    -7    skgbasegui/skgcalculatoredit.cpp
M  +1    -2    skgbasegui/skgcalculatoredit.h
M  +3    -0    skgbasegui/skgsortfilterproxymodel.h
M  +11   -0    skgbasegui/skgtreeview.cpp
M  +1    -0    skgbasegui/skgtreeview.h
M  +4    -21   skgbasemodeler/skgservices.cpp
M  +24   -7    tests/skgbaseguitest/skgtestcalculatoredit.cpp

http://commits.kde.org/skrooge/e4c7dc270218160e2d57cb4330d36d6c0c4ff0c7

diff --cc skgbasegui/skgcalculatoredit.cpp
index 30b6001,09254e7..fcf6e60
--- a/skgbasegui/skgcalculatoredit.cpp
+++ b/skgbasegui/skgcalculatoredit.cpp
@@@ -33,7 -33,7 +33,7 @@@
  #include "skgtraces.h"
  
  SKGCalculatorEdit::SKGCalculatorEdit(QWidget* iParent)
-     : QLineEdit(iParent), m_lastValue(0), m_lastOperator(0), m_currentMode(CALCULATOR), m_valid(true)
 -    : KLineEdit(iParent), m_lastValue(0), m_lastOperator(0), m_currentMode(CALCULATOR)
++    : QLineEdit(iParent), m_lastValue(0), m_lastOperator(0), m_currentMode(CALCULATOR)
  {
      setMode(CALCULATOR);
      m_fontColor = palette().color(QPalette::Text);
@@@ -88,10 -88,9 +88,9 @@@ void SKGCalculatorEdit::setText(const Q
      QPalette field_palette = palette();
      field_palette.setColor(QPalette::Text, m_fontColor);
      setPalette(field_palette);
-     m_valid = true;
  
      // Set text (to be sure than keyPressEvent is able to get it)
 -    KLineEdit::setText(iText);
 +    QLineEdit::setText(iText);
  
      // Simulate a validation
      if (mode() == EXPRESSION) {
@@@ -101,8 -100,8 +100,8 @@@
      }
  
      // Set text (to display the input value)
-     if (m_valid) {
+     if (valid()) {
 -        KLineEdit::setText(iText);
 +        QLineEdit::setText(iText);
      }
  }
  
@@@ -197,8 -194,7 +198,7 @@@ void SKGCalculatorEdit::keyPressEvent(i
              double v = getEvaluatedValue(test);
              if (test) {
                  QString t = text();
 -                KLineEdit::setText((!t.isEmpty() && t[0] == '+' && v > 0 ? "+" : "") % SKGServices::doubleToString(v));
 +                QLineEdit::setText((!t.isEmpty() && t[0] == '+' && v > 0 ? "+" : "") % SKGServices::doubleToString(v));
-                 m_valid = true;
              } else {
                  QPalette field_palette = palette();
                  field_palette.setColor(QPalette::Text, KColorScheme(QPalette::Normal).foreground(KColorScheme::NegativeText).color());
diff --cc skgbasemodeler/skgservices.cpp
index 405fa3f,ade344f..e9c4568
--- a/skgbasemodeler/skgservices.cpp
+++ b/skgbasemodeler/skgservices.cpp
@@@ -55,27 -53,9 +55,10 @@@ QList< SKGServices::SKGSearchCriteria 
  {
      QList< SKGServices::SKGSearchCriteria > output;
  
-     QStringList words = SKGServices::splitCSVLine(iString, ' ', false);
-     
-     // Treatment for quote support "abc def"
-     bool inQuote=false;
-     for (int i = 0; i < words.count(); ++i) {
- 	QString v=words[i];
- 	if(inQuote) {
- 	  if(v.endsWith(QLatin1Literal('"'))) {
- 	    words[i-1] += v;
- 	    words.removeAt(i);
- 	    --i;
- 	    inQuote = false;
- 	  }
- 	} else {
- 	  if(v.count('"')%2 ==1) {
- 	    inQuote = true;
- 	  }
- 	}
-     }
+     QStringList words = SKGServices::splitCSVLine(iString, ' ', true);
+ 
+     int nbwords = words.count();
 +
-     int nbwords = words.count();    
      SKGServices::SKGSearchCriteria criteria;
      criteria.mode = '+';
      bool atLeastOnePlus = false;



More information about the kde-doc-english mailing list