summaryrefslogtreecommitdiff
path: root/core/pim/addressbook/contacteditor.cpp
authoreilers <eilers>2003-05-11 12:36:30 (UTC)
committer eilers <eilers>2003-05-11 12:36:30 (UTC)
commit37084d3961026893840ef9891132bdf193a312b3 (patch) (side-by-side diff)
tree342792abd777eb11a378cc5e06e0436ab48f6d89 /core/pim/addressbook/contacteditor.cpp
parentb068a42c89af19f5642b68060c1d085afa78e7b1 (diff)
downloadopie-37084d3961026893840ef9891132bdf193a312b3.zip
opie-37084d3961026893840ef9891132bdf193a312b3.tar.gz
opie-37084d3961026893840ef9891132bdf193a312b3.tar.bz2
Some improvements in handling of organizations:
- If you enter a organization name and no Fullname is entered, the organization name will be used. Thus, the organization is shown correctly in the listview.. - The letterpicker now searches for the SaveAs Entry (configurable) instead for lastname. Ths guarantees that the organization is found as expected.. This addresses bugreport #590 and #895..
Diffstat (limited to 'core/pim/addressbook/contacteditor.cpp') (more/less context) (show whitespace changes)
-rw-r--r--core/pim/addressbook/contacteditor.cpp20
1 files changed, 16 insertions, 4 deletions
diff --git a/core/pim/addressbook/contacteditor.cpp b/core/pim/addressbook/contacteditor.cpp
index f33ee0a..ce14f98 100644
--- a/core/pim/addressbook/contacteditor.cpp
+++ b/core/pim/addressbook/contacteditor.cpp
@@ -658,6 +658,8 @@ void ContactEditor::init() {
- connect( txtFullName, SIGNAL(textChanged(const QString &)), this, SLOT(slotFullNameChange(const QString &)) );
-
- connect( txtSuffix, SIGNAL(textChanged(const QString &)), this, SLOT(slotSuffixChange(const QString &)) );
-
+ connect( txtFullName, SIGNAL(textChanged(const QString &)),
+ this, SLOT(slotFullNameChange(const QString &)) );
+ connect( txtSuffix, SIGNAL(textChanged(const QString &)),
+ this, SLOT(slotSuffixChange(const QString &)) );
+ connect( txtOrganization, SIGNAL(textChanged(const QString &)),
+ this, SLOT(slotOrganizationChange(const QString &)) );
connect( txtChooserField1, SIGNAL(textChanged(const QString &)),
@@ -1059,2 +1061,12 @@ void ContactEditor::slotSuffixChange( const QString& ) {
+void ContactEditor::slotOrganizationChange( const QString &textChanged ){
+ qWarning( "ContactEditor::slotOrganizationChange( %s )", textChanged.latin1() );
+ // Special handling for storing Companies:
+ // If no Fullname is given, we store the Company-Name as lastname
+ // to handle it like a person..
+ if ( txtFullName->text() == txtOrganization->text().left( txtFullName->text().length() ) )
+ txtFullName->setText( textChanged );
+
+}
+
void ContactEditor::accept() {