author | simon <simon> | 2002-04-30 06:26:17 (UTC) |
---|---|---|
committer | simon <simon> | 2002-04-30 06:26:17 (UTC) |
commit | f521dd69afdd07f46e41299846880289b727514b (patch) (unidiff) | |
tree | 1e9fe07ead05cf0ddfbf34438f4e2d85c1e87380 | |
parent | 702c4b745d42d9ad5fdcede0a40d85ea1b0577a6 (diff) | |
download | opie-f521dd69afdd07f46e41299846880289b727514b.zip opie-f521dd69afdd07f46e41299846880289b727514b.tar.gz opie-f521dd69afdd07f46e41299846880289b727514b.tar.bz2 |
- no default arguments in method implementations
- don't return void in non-void functions
-rw-r--r-- | core/pim/addressbook/contacteditor.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/core/pim/addressbook/contacteditor.cpp b/core/pim/addressbook/contacteditor.cpp index adea1a1..e74da87 100644 --- a/core/pim/addressbook/contacteditor.cpp +++ b/core/pim/addressbook/contacteditor.cpp | |||
@@ -23,67 +23,67 @@ | |||
23 | 23 | ||
24 | #include <qpe/categoryselect.h> | 24 | #include <qpe/categoryselect.h> |
25 | #include <qpe/qpeapplication.h> | 25 | #include <qpe/qpeapplication.h> |
26 | #include <qpe/qpedialog.h> | 26 | #include <qpe/qpedialog.h> |
27 | 27 | ||
28 | #include <qcombobox.h> | 28 | #include <qcombobox.h> |
29 | #include <qlabel.h> | 29 | #include <qlabel.h> |
30 | #include <qtabwidget.h> | 30 | #include <qtabwidget.h> |
31 | #include <qlayout.h> | 31 | #include <qlayout.h> |
32 | #include <qlineedit.h> | 32 | #include <qlineedit.h> |
33 | #include <qmultilineedit.h> | 33 | #include <qmultilineedit.h> |
34 | #include <qscrollview.h> | 34 | #include <qscrollview.h> |
35 | #include <qtoolbutton.h> | 35 | #include <qtoolbutton.h> |
36 | #include <qpushbutton.h> | 36 | #include <qpushbutton.h> |
37 | #include <qmainwindow.h> | 37 | #include <qmainwindow.h> |
38 | #include <qvaluelist.h> | 38 | #include <qvaluelist.h> |
39 | 39 | ||
40 | static inline bool containsAlphaNum( const QString &str ); | 40 | static inline bool containsAlphaNum( const QString &str ); |
41 | static inline bool constainsWhiteSpace( const QString &str ); | 41 | static inline bool constainsWhiteSpace( const QString &str ); |
42 | 42 | ||
43 | // helper functions, convert our comma delimited list to proper | 43 | // helper functions, convert our comma delimited list to proper |
44 | // file format... | 44 | // file format... |
45 | void parseEmailFrom( const QString &txt, QString &strDefaultEmail, | 45 | void parseEmailFrom( const QString &txt, QString &strDefaultEmail, |
46 | QString &strAll ); | 46 | QString &strAll ); |
47 | 47 | ||
48 | // helper convert from file format to comma delimited... | 48 | // helper convert from file format to comma delimited... |
49 | void parseEmailTo( const QString &strDefaultEmail, | 49 | void parseEmailTo( const QString &strDefaultEmail, |
50 | const QString &strOtherEmail, QString &strBack ); | 50 | const QString &strOtherEmail, QString &strBack ); |
51 | 51 | ||
52 | ContactEditor::ContactEditor(const Contact &entry, | 52 | ContactEditor::ContactEditor(const Contact &entry, |
53 | const QValueList<int> *newOrderedValues, | 53 | const QValueList<int> *newOrderedValues, |
54 | QStringList *slNewOrdered, | 54 | QStringList *slNewOrdered, |
55 | QWidget *parent = 0, | 55 | QWidget *parent, |
56 | const char *name = 0, | 56 | const char *name, |
57 | WFlags fl = 0 ) | 57 | WFlags fl ) |
58 | : QDialog( parent, name, TRUE, fl ), | 58 | : QDialog( parent, name, TRUE, fl ), |
59 | orderedValues( newOrderedValues ), | 59 | orderedValues( newOrderedValues ), |
60 | slOrdered( slNewOrdered ) | 60 | slOrdered( slNewOrdered ) |
61 | { | 61 | { |
62 | 62 | ||
63 | init(); | 63 | init(); |
64 | initMap(); | 64 | initMap(); |
65 | setEntry( entry ); | 65 | setEntry( entry ); |
66 | qDebug("finish"); | 66 | qDebug("finish"); |
67 | } | 67 | } |
68 | 68 | ||
69 | ContactEditor::~ContactEditor() { | 69 | ContactEditor::~ContactEditor() { |
70 | } | 70 | } |
71 | 71 | ||
72 | void ContactEditor::init() { | 72 | void ContactEditor::init() { |
73 | 73 | ||
74 | useFullName = TRUE; | 74 | useFullName = TRUE; |
75 | 75 | ||
76 | int i = 0; | 76 | int i = 0; |
77 | 77 | ||
78 | slHomeAddress = new QStringList; | 78 | slHomeAddress = new QStringList; |
79 | slBusinessAddress = new QStringList; | 79 | slBusinessAddress = new QStringList; |
80 | slChooserNames = new QStringList; | 80 | slChooserNames = new QStringList; |
81 | slChooserValues = new QStringList; | 81 | slChooserValues = new QStringList; |
82 | 82 | ||
83 | slDynamicEntries = new QStringList; | 83 | slDynamicEntries = new QStringList; |
84 | 84 | ||
85 | //*slDynamicEntries = *slOrdered; | 85 | //*slDynamicEntries = *slOrdered; |
86 | 86 | ||
87 | for (i = 0; i <= 6; i++) { | 87 | for (i = 0; i <= 6; i++) { |
88 | slHomeAddress->append( "" ); | 88 | slHomeAddress->append( "" ); |
89 | slBusinessAddress->append( "" ); | 89 | slBusinessAddress->append( "" ); |
@@ -1096,64 +1096,65 @@ QString ContactEditor::parseName( const QString fullName, int type ) { | |||
1096 | strMiddleName = simplifiedName.mid( spPos + 1, (spPos2 - 1) - spPos ); | 1096 | strMiddleName = simplifiedName.mid( spPos + 1, (spPos2 - 1) - spPos ); |
1097 | strSuffix = simplifiedName.mid( spPos2 + 1 ); | 1097 | strSuffix = simplifiedName.mid( spPos2 + 1 ); |
1098 | break; | 1098 | break; |
1099 | } | 1099 | } |
1100 | } | 1100 | } |
1101 | 1101 | ||
1102 | switch (type) { | 1102 | switch (type) { |
1103 | case NAME_FL: | 1103 | case NAME_FL: |
1104 | return strFirstName + " " + strLastName; | 1104 | return strFirstName + " " + strLastName; |
1105 | 1105 | ||
1106 | case NAME_LF: | 1106 | case NAME_LF: |
1107 | return strLastName + ", " + strFirstName; | 1107 | return strLastName + ", " + strFirstName; |
1108 | 1108 | ||
1109 | case NAME_LFM: | 1109 | case NAME_LFM: |
1110 | return strLastName + ", " + strFirstName + " " + strMiddleName; | 1110 | return strLastName + ", " + strFirstName + " " + strMiddleName; |
1111 | 1111 | ||
1112 | case NAME_FMLS: | 1112 | case NAME_FMLS: |
1113 | return strFirstName + " " + strMiddleName + " " + strLastName + " " + strSuffix; | 1113 | return strFirstName + " " + strMiddleName + " " + strLastName + " " + strSuffix; |
1114 | 1114 | ||
1115 | case NAME_F: | 1115 | case NAME_F: |
1116 | return strFirstName; | 1116 | return strFirstName; |
1117 | 1117 | ||
1118 | case NAME_M: | 1118 | case NAME_M: |
1119 | return strMiddleName; | 1119 | return strMiddleName; |
1120 | 1120 | ||
1121 | case NAME_L: | 1121 | case NAME_L: |
1122 | return strLastName; | 1122 | return strLastName; |
1123 | 1123 | ||
1124 | case NAME_S: | 1124 | case NAME_S: |
1125 | return strSuffix; | 1125 | return strSuffix; |
1126 | 1126 | ||
1127 | } | 1127 | } |
1128 | return QString::null; | ||
1128 | } | 1129 | } |
1129 | 1130 | ||
1130 | void ContactEditor::cleanupFields() { | 1131 | void ContactEditor::cleanupFields() { |
1131 | 1132 | ||
1132 | QStringList::Iterator it = slChooserValues->begin(); | 1133 | QStringList::Iterator it = slChooserValues->begin(); |
1133 | for ( int i = 0; it != slChooserValues->end(); i++, ++it ) { | 1134 | for ( int i = 0; it != slChooserValues->end(); i++, ++it ) { |
1134 | (*it) = ""; | 1135 | (*it) = ""; |
1135 | } | 1136 | } |
1136 | 1137 | ||
1137 | for ( int i = 0; i < 7; i++ ) { | 1138 | for ( int i = 0; i < 7; i++ ) { |
1138 | (*slHomeAddress)[i] = ""; | 1139 | (*slHomeAddress)[i] = ""; |
1139 | (*slBusinessAddress)[i] = ""; | 1140 | (*slBusinessAddress)[i] = ""; |
1140 | } | 1141 | } |
1141 | 1142 | ||
1142 | QStringList::ConstIterator cit; | 1143 | QStringList::ConstIterator cit; |
1143 | QListIterator<QLineEdit> itLE( listValue ); | 1144 | QListIterator<QLineEdit> itLE( listValue ); |
1144 | for ( cit = slDynamicEntries->begin(); cit != slDynamicEntries->end(); ++cit, ++itLE) { | 1145 | for ( cit = slDynamicEntries->begin(); cit != slDynamicEntries->end(); ++cit, ++itLE) { |
1145 | (*itLE)->setText( "" ); | 1146 | (*itLE)->setText( "" ); |
1146 | } | 1147 | } |
1147 | 1148 | ||
1148 | txtFirstName->setText(""); | 1149 | txtFirstName->setText(""); |
1149 | txtMiddleName->setText(""); | 1150 | txtMiddleName->setText(""); |
1150 | txtLastName->setText(""); | 1151 | txtLastName->setText(""); |
1151 | txtSuffix->setText(""); | 1152 | txtSuffix->setText(""); |
1152 | txtNote->setText(""); | 1153 | txtNote->setText(""); |
1153 | txtFullName->setText(""); | 1154 | txtFullName->setText(""); |
1154 | txtJobTitle->setText(""); | 1155 | txtJobTitle->setText(""); |
1155 | txtOrganization->setText(""); | 1156 | txtOrganization->setText(""); |
1156 | txtChooserField1->setText(""); | 1157 | txtChooserField1->setText(""); |
1157 | txtChooserField2->setText(""); | 1158 | txtChooserField2->setText(""); |
1158 | txtChooserField3->setText(""); | 1159 | txtChooserField3->setText(""); |
1159 | txtAddress->setText(""); | 1160 | txtAddress->setText(""); |