Branch 'kolab/integration/4.13.0' - 3 commits - kabc/vcardtool.cpp mailtransport/servertest.cpp mailtransport/socket.cpp mailtransport/socket.h
Christian Mollekopf
mollekopf at kolabsys.com
Sat Jan 24 20:33:18 CET 2015
kabc/vcardtool.cpp | 10 +++-------
mailtransport/servertest.cpp | 25 +++++++++++++++----------
mailtransport/socket.cpp | 5 +++++
mailtransport/socket.h | 2 ++
4 files changed, 25 insertions(+), 17 deletions(-)
New commits:
commit 9ed503711e7be8a00f4cb035497e5528ce4d2760
Author: Sandro Knauà <knauss at kolabsys.com>
Date: Sat Jan 10 14:43:29 2015 +0100
delete custom ports, if the protocoll is changed
Tsting multiple protocols and set custom ports for some protocols. Than
you want to have the default ports, if you cange to another protocol.
diff --git a/mailtransport/servertest.cpp b/mailtransport/servertest.cpp
index 9f4f83d..666d99f 100644
--- a/mailtransport/servertest.cpp
+++ b/mailtransport/servertest.cpp
@@ -563,6 +563,7 @@ void ServerTest::setProgressBar( QProgressBar *pb )
void ServerTest::setProtocol( const QString &protocol )
{
d->testProtocol = protocol;
+ d->customPorts.clear();
}
QString ServerTest::protocol()
commit 27e6eb4a39551fe15d62d78226fef8733c4925e8
Author: Sandro Knauà <knauss at kolabsys.com>
Date: Sat Jan 10 14:28:54 2015 +0100
Make mailtransport be aware of protocols without SSL
Submission 587 has no SSL port, so the secure part must be deactivated.
KOLAB: 1862
diff --git a/mailtransport/servertest.cpp b/mailtransport/servertest.cpp
index a498645..9f4f83d 100644
--- a/mailtransport/servertest.cpp
+++ b/mailtransport/servertest.cpp
@@ -517,16 +517,20 @@ void ServerTest::start()
d->normalSocket->reconnect();
d->normalSocketTimer->start( 10000 );
- d->secureSocket->setObjectName( QLatin1String( "secure" ) );
- d->secureSocket->setServer( d->server );
- d->secureSocket->setProtocol( d->testProtocol + QLatin1Char( 's' ) );
- d->secureSocket->setSecure( true );
- connect( d->secureSocket, SIGNAL(connected()), SLOT(slotSslPossible()) );
- connect( d->secureSocket, SIGNAL(failed()), SLOT(slotSslNotPossible()) );
- connect( d->secureSocket, SIGNAL(data(QString)),
- SLOT(slotReadSecure(QString)) );
- d->secureSocket->reconnect();
- d->secureSocketTimer->start( 10000 );
+ if (d->secureSocket->port() > 0) {
+ d->secureSocket->setObjectName( QLatin1String( "secure" ) );
+ d->secureSocket->setServer( d->server );
+ d->secureSocket->setProtocol( d->testProtocol + QLatin1Char( 's' ) );
+ d->secureSocket->setSecure( true );
+ connect( d->secureSocket, SIGNAL(connected()), SLOT(slotSslPossible()) );
+ connect( d->secureSocket, SIGNAL(failed()), SLOT(slotSslNotPossible()) );
+ connect( d->secureSocket, SIGNAL(data(QString)),
+ SLOT(slotReadSecure(QString)) );
+ d->secureSocket->reconnect();
+ d->secureSocketTimer->start( 10000 );
+ } else {
+ d->slotSslNotPossible();
+ }
}
void ServerTest::setFakeHostname( const QString &fakeHostname )
diff --git a/mailtransport/socket.cpp b/mailtransport/socket.cpp
index 79923db..eb3df68 100644
--- a/mailtransport/socket.cpp
+++ b/mailtransport/socket.cpp
@@ -220,6 +220,11 @@ void Socket::setPort( int port )
d->port = port;
}
+int Socket::port()
+{
+ return d->port;
+}
+
void Socket::setSecure( bool what )
{
d->secure = what;
diff --git a/mailtransport/socket.h b/mailtransport/socket.h
index 36be9b7..529cebf 100644
--- a/mailtransport/socket.h
+++ b/mailtransport/socket.h
@@ -84,6 +84,8 @@ class MAILTRANSPORT_EXPORT Socket : public QObject
*/
void setPort( int port );
+ int port();
+
/**
* this will be a secure connection
*/
commit ddfb403477e0a0bb9cfff4bbcfea1d18235e205d
Author: Sandro Knauà <knauss at kolabsys.com>
Date: Tue Jan 13 12:02:58 2015 +0100
Create only valid QDateTime.
With a invalid QTime aka QTime() the QDateTime is also invalid. This
hack was used to have something like QDateTime with a dateonly feature.
libkolab at the other side do not parse any invalid QDateTime.
This also needs a fix to support dateonly Bday at the export.
KOLAB: 3935
diff --git a/kabc/vcardtool.cpp b/kabc/vcardtool.cpp
index e99bd9f..92d74a5 100644
--- a/kabc/vcardtool.cpp
+++ b/kabc/vcardtool.cpp
@@ -797,13 +797,9 @@ QDateTime VCardTool::parseDateTime( const QString &str ) const
QDateTime dateTime( date );
- // explicitly set the time, which might be invalid, to keep the information
- // that the time is invalid. In createDateTime() the time/invalid flag is
- // checked which omits then to print the timestamp
- // This is needed to reproduce the given string in input
- // e.g. BDAY:2008-12-30
- // without time shall also result in a string without a time
- dateTime.setTime( time );
+ if (time.isValid()) {
+ dateTime.setTime( time );
+ }
dateTime.setTimeSpec( spec );
return dateTime;
More information about the commits
mailing list