Skip to content

Commit

Permalink
Squashed 'qmf/' changes from bcc4578..75ccc57
Browse files Browse the repository at this point in the history
75ccc57 Remove deprecated qMetaTypeId warning.
654abba Correctly start messageserver5 binary.
167c78a OS X: Don't build messageserver binary as a bundle.
6243c57 Comment out a use of QMailThreadSortKey::deserialize.
e431c08 Inherit tst_QCop from QCopAdaptor, as it uses some protected API.
8b0d7d8 Export QMailThreadPrivate, as it uses QPrivatelyImplemented.
f0999f3 Make imap compress with zlib enabled on Mac.
1183b51 Detection of libraries built as framework or dylib on Mac
67cb170 Introduce one step AUTH PLAIN for SMTP.

git-subtree-dir: qmf
git-subtree-split: 75ccc57575295070f01f76e2c21273b6abba89e9
  • Loading branch information
Valerio Valerio committed Jan 21, 2014
1 parent ee4e897 commit f45c603
Show file tree
Hide file tree
Showing 20 changed files with 158 additions and 38 deletions.
14 changes: 12 additions & 2 deletions examples/messagingaccounts/messagingaccounts.pro
Expand Up @@ -4,12 +4,22 @@ CONFIG += qmfclient qmfmessageserver

equals(QT_MAJOR_VERSION, 4){
TARGET = messagingaccounts
LIBS += -lqmfmessageserver -lqmfclient

macx:contains(QT_CONFIG, qt_framework) {
LIBS += -framework qmfmessageserver -framework qmfclient
} else {
LIBS += -lqmfmessageserver -lqmfclient
}
}
equals(QT_MAJOR_VERSION, 5){
TARGET = messagingaccounts5
QT += widgets
LIBS += -lqmfmessageserver5 -lqmfclient5

macx:contains(QT_CONFIG, qt_framework) {
LIBS += -framework qmfmessageserver5 -framework qmfclient5
} else {
LIBS += -lqmfmessageserver5 -lqmfclient5
}
}

DEPENDPATH += .
Expand Down
13 changes: 11 additions & 2 deletions examples/qtmail/app/app.pro
Expand Up @@ -2,12 +2,21 @@ TEMPLATE = app

equals(QT_MAJOR_VERSION, 4){
TARGET = qtmail
LIBS += -lqmfmessageserver -lqmfclient -lqmfutil
macx:contains(QT_CONFIG, qt_framework) {
LIBS += -framework qmfmessageserver -framework qmfclient -framework qmfutil
} else {
LIBS += -lqmfmessageserver -lqmfclient -lqmfutil
}
}
equals(QT_MAJOR_VERSION, 5){
TARGET = qtmail5
QT += widgets
LIBS += -lqmfmessageserver5 -lqmfclient5 -lqmfutil5

macx:contains(QT_CONFIG, qt_framework) {
LIBS += -framework qmfmessageserver5 -framework qmfclient5 -framework qmfutil5
} else {
LIBS += -lqmfmessageserver5 -lqmfclient5 -lqmfutil5
}
}

CONFIG += qmfutil qmfclient qmfmessageserver
Expand Down
4 changes: 2 additions & 2 deletions examples/qtmail/app/emailclient.cpp
Expand Up @@ -583,9 +583,9 @@ bool EmailClient::startMessageServer()
this,SLOT(messageServerProcessError(QProcess::ProcessError)));

#ifdef Q_OS_WIN
static const QString binary(QString("/messageserver%1.exe").arg(debugSuffix));
static const QString binary(QString("/messageserver5%1.exe").arg(debugSuffix));
#else
static const QString binary(QString("/messageserver%1").arg(debugSuffix));
static const QString binary(QString("/messageserver5%1").arg(debugSuffix));
#endif

m_messageServerProcess->start(QMail::messageServerPath() + binary);
Expand Down
12 changes: 10 additions & 2 deletions examples/qtmail/libs/qmfutil/qmfutil.pro
Expand Up @@ -3,12 +3,20 @@ CONFIG += warn_on
CONFIG += qmfclient
equals(QT_MAJOR_VERSION, 4) {
TARGET = qmfutil
LIBS += -lqmfclient
macx:contains(QT_CONFIG, qt_framework) {
LIBS += -framework qmfclient
} else {
LIBS += -lqmfclient
}
}
equals(QT_MAJOR_VERSION, 5){
TARGET = qmfutil5
QT += widgets
LIBS += -lqmfclient5
macx:contains(QT_CONFIG, qt_framework) {
LIBS += -framework qmfclient5
} else {
LIBS += -lqmfclient5
}
}
target.path += $$QMF_INSTALL_ROOT/lib

Expand Down
12 changes: 10 additions & 2 deletions examples/qtmail/plugins/composers/email/email.pro
Expand Up @@ -4,12 +4,20 @@ CONFIG += qmfclient qmfutil plugin

equals(QT_MAJOR_VERSION, 4) {
target.path += $$QMF_INSTALL_ROOT/lib/qmf/plugins/composers
LIBS += -lqmfclient -lqmfutil
macx:contains(QT_CONFIG, qt_framework) {
LIBS += -framework qmfclient -framework qmfutil
} else {
LIBS += -lqmfclient -lqmfutil
}
}
equals(QT_MAJOR_VERSION, 5) {
target.path += $$QMF_INSTALL_ROOT/lib/qmf/plugins5/composers
QT += widgets
LIBS += -lqmfclient5 -lqmfutil5
macx:contains(QT_CONFIG, qt_framework) {
LIBS += -framework qmfclient5 -framework qmfutil5
} else {
LIBS += -lqmfclient5 -lqmfutil5
}
}

DEFINES += PLUGIN_INTERNAL
Expand Down
12 changes: 10 additions & 2 deletions examples/qtmail/plugins/viewers/generic/generic.pro
Expand Up @@ -4,12 +4,20 @@ CONFIG += qmfclient qmfutil plugin

equals(QT_MAJOR_VERSION, 4) {
target.path += $$QMF_INSTALL_ROOT/lib/qmf/plugins/viewers
LIBS += -lqmfclient -lqmfutil
macx:contains(QT_CONFIG, qt_framework) {
LIBS += -framework qmfclient -framework qmfutil
} else {
LIBS += -lqmfclient -lqmfutil
}
}
equals(QT_MAJOR_VERSION, 5) {
target.path += $$QMF_INSTALL_ROOT/lib/qmf/plugins5/viewers
QT += widgets
LIBS += -lqmfclient5 -lqmfutil5
macx:contains(QT_CONFIG, qt_framework) {
LIBS += -framework qmfclient5 -framework qmfutil5
} else {
LIBS += -lqmfclient5 -lqmfutil5
}
}

# Use webkit to render mail if available
Expand Down
12 changes: 10 additions & 2 deletions examples/serverobserver/serverobserver.pro
Expand Up @@ -2,12 +2,20 @@ TEMPLATE = app

equals(QT_MAJOR_VERSION, 4){
TARGET = serverobserver
LIBS += -lqmfmessageserver -lqmfclient
macx:contains(QT_CONFIG, qt_framework) {
LIBS += -framework qmfmessageserver -framework qmfclient
} else {
LIBS += -lqmfmessageserver -lqmfclient
}
}
equals(QT_MAJOR_VERSION, 5){
TARGET = serverobserver5
QT += widgets
LIBS += -lqmfmessageserver5 -lqmfclient5
macx:contains(QT_CONFIG, qt_framework) {
LIBS += -framework qmfmessageserver5 -framework qmfclient5
} else {
LIBS += -lqmfmessageserver5 -lqmfclient5
}
}

target.path += $$QMF_INSTALL_ROOT/bin
Expand Down
2 changes: 1 addition & 1 deletion src/libraries/qmfclient/qmailthread_p.h
Expand Up @@ -45,7 +45,7 @@
#include "qmailthread.h"


class QMailThreadPrivate : public QPrivateImplementationBase
class QMF_EXPORT QMailThreadPrivate : public QPrivateImplementationBase
{
public:
QMailThreadPrivate()
Expand Down
2 changes: 1 addition & 1 deletion src/libraries/qmfclient/support/qmailipc.h
Expand Up @@ -68,7 +68,7 @@ struct QMetaTypeRegister
static int registerType() \
{ \
_QATOMIC_ONCE(); \
int id = qMetaTypeId( reinterpret_cast<TYPE *>(0) ); \
int id = qMetaTypeId<TYPE>(); \
if ( id >= static_cast<int>(QMetaType::User) ) \
qRegisterMetaTypeStreamOperators< TYPE >( #TYPE ); \
return 1; \
Expand Down
12 changes: 10 additions & 2 deletions src/libraries/qmfmessageserver/qmfmessageserver.pro
Expand Up @@ -4,11 +4,19 @@ CONFIG += qmfclient

equals(QT_MAJOR_VERSION, 4){
TARGET = qmfmessageserver
LIBS += -lqmfclient
macx:contains(QT_CONFIG, qt_framework) {
LIBS += -framework qmfclient
} else {
LIBS += -lqmfclient
}
}
equals(QT_MAJOR_VERSION, 5){
TARGET = qmfmessageserver5
LIBS += -lqmfclient5
macx:contains(QT_CONFIG, qt_framework) {
LIBS += -framework qmfclient5
} else {
LIBS += -lqmfclient5
}
}
target.path += $$QMF_INSTALL_ROOT/lib

Expand Down
Expand Up @@ -5,11 +5,19 @@ QT = core

equals(QT_MAJOR_VERSION, 4) {
target.path += $$QMF_INSTALL_ROOT/lib/qmf/plugins/contentmanagers
LIBS += -lqmfclient
macx:contains(QT_CONFIG, qt_framework) {
LIBS += -framework qmfclient
} else {
LIBS += -lqmfclient
}
}
equals(QT_MAJOR_VERSION, 5) {
target.path += $$QMF_INSTALL_ROOT/lib/qmf/plugins5/contentmanagers
LIBS += -lqmfclient5
macx:contains(QT_CONFIG, qt_framework) {
LIBS += -framework qmfclient5
} else {
LIBS += -lqmfclient5
}
}

DEFINES += PLUGIN_INTERNAL
Expand Down
15 changes: 13 additions & 2 deletions src/plugins/messageservices/imap/imap.pro
Expand Up @@ -4,11 +4,19 @@ CONFIG += qmfmessageserver qmfclient plugin

equals(QT_MAJOR_VERSION, 4) {
target.path += $$QMF_INSTALL_ROOT/lib/qmf/plugins/messageservices
LIBS += -lqmfmessageserver -lqmfclient
macx:contains(QT_CONFIG, qt_framework) {
LIBS += -framework qmfmessageserver -framework qmfclient
} else {
LIBS += -lqmfmessageserver -lqmfclient
}
}
equals(QT_MAJOR_VERSION, 5) {
target.path += $$QMF_INSTALL_ROOT/lib/qmf/plugins5/messageservices
LIBS += -lqmfmessageserver5 -lqmfclient5
macx:contains(QT_CONFIG, qt_framework) {
LIBS += -framework qmfmessageserver5 -framework qmfclient5
} else {
LIBS += -lqmfmessageserver5 -lqmfclient5
}
}

QT = core network
Expand Down Expand Up @@ -93,6 +101,9 @@ packagesExist(zlib) {
CONFIG += link_pkgconfig
PKGCONFIG += zlib
DEFINES += QT_QMF_HAVE_ZLIB
} macx:exists( "/usr/include/zlib.h") {
LIBS += -lz
DEFINES += QT_QMF_HAVE_ZLIB
} else {
warning("IMAP COMPRESS capability requires zlib")
}
Expand Down
12 changes: 10 additions & 2 deletions src/plugins/messageservices/pop/pop.pro
Expand Up @@ -4,11 +4,19 @@ CONFIG += qmfclient qmfmessageserver plugin

equals(QT_MAJOR_VERSION, 4) {
target.path = $$QMF_INSTALL_ROOT/lib/qmf/plugins/messageservices
LIBS += -lqmfmessageserver -lqmfclient
macx:contains(QT_CONFIG, qt_framework) {
LIBS += -framework qmfmessageserver -framework qmfclient
} else {
LIBS += -lqmfmessageserver -lqmfclient
}
}
equals(QT_MAJOR_VERSION, 5) {
target.path = $$QMF_INSTALL_ROOT/lib/qmf/plugins5/messageservices
LIBS += -lqmfmessageserver5 -lqmfclient5
macx:contains(QT_CONFIG, qt_framework) {
LIBS += -framework qmfmessageserver5 -framework qmfclient5
} else {
LIBS += -lqmfmessageserver5 -lqmfclient5
}
}

QT = core network
Expand Down
12 changes: 10 additions & 2 deletions src/plugins/messageservices/qmfsettings/qmfsettings.pro
Expand Up @@ -4,11 +4,19 @@ CONFIG += qmfclient qmfmessageserver plugin

equals(QT_MAJOR_VERSION, 4) {
target.path += $$QMF_INSTALL_ROOT/lib/qmf/plugins/messageservices
LIBS += -lqmfclient -lqmfmessageserver
macx:contains(QT_CONFIG, qt_framework) {
LIBS += -framework qmfclient -framework qmfmessageserver
} else {
LIBS += -lqmfclient -lqmfmessageserver
}
}
equals(QT_MAJOR_VERSION, 5) {
target.path += $$QMF_INSTALL_ROOT/lib/qmf/plugins5/messageservices
LIBS += -lqmfclient5 -lqmfmessageserver5
macx:contains(QT_CONFIG, qt_framework) {
LIBS += -framework qmfclient5 -framework qmfmessageserver5
} else {
LIBS += -lqmfclient5 -lqmfmessageserver5
}
}

QT = core network
Expand Down
12 changes: 10 additions & 2 deletions src/plugins/messageservices/smtp/smtp.pro
Expand Up @@ -4,11 +4,19 @@ TARGET = smtp
CONFIG += qmfclient qmfmessageserver plugin
equals(QT_MAJOR_VERSION, 4) {
target.path += $$QMF_INSTALL_ROOT/lib/qmf/plugins/messageservices
LIBS += -lqmfmessageserver -lqmfclient
macx:contains(QT_CONFIG, qt_framework) {
LIBS += -framework qmfmessageserver -framework qmfclient
} else {
LIBS += -lqmfmessageserver -lqmfclient
}
}
equals(QT_MAJOR_VERSION, 5) {
target.path += $$QMF_INSTALL_ROOT/lib/qmf/plugins5/messageservices
LIBS += -lqmfmessageserver5 -lqmfclient5
macx:contains(QT_CONFIG, qt_framework) {
LIBS += -framework qmfmessageserver5 -framework qmfclient5
} else {
LIBS += -lqmfmessageserver5 -lqmfclient5
}
}

QT = core network
Expand Down
6 changes: 3 additions & 3 deletions src/plugins/messageservices/smtp/smtpauthenticator.cpp
Expand Up @@ -62,14 +62,14 @@ QByteArray SmtpAuthenticator::getAuthentication(const QMailAccountConfiguration:
SmtpConfiguration smtpCfg(svcCfg);
if (smtpCfg.smtpAuthentication() != SmtpConfiguration::Auth_NONE) {
QMailAccountId id(smtpCfg.id());
QByteArray username(smtpCfg.smtpUsername().toLatin1());
QByteArray password(smtpCfg.smtpPassword().toLatin1());
QByteArray username(smtpCfg.smtpUsername().toUtf8());
QByteArray password(smtpCfg.smtpPassword().toUtf8());

if (smtpCfg.smtpAuthentication() == SmtpConfiguration::Auth_LOGIN) {
result = QByteArray("LOGIN");
gResponses[id] = (QList<QByteArray>() << username << password);
} else if (smtpCfg.smtpAuthentication() == SmtpConfiguration::Auth_PLAIN) {
result = QByteArray("PLAIN");
result = QByteArray("PLAIN ") + QByteArray(username + '\0' + username + '\0' + password).toBase64();
gResponses[id] = (QList<QByteArray>() << QByteArray(username + '\0' + username + '\0' + password));
}
}
Expand Down
13 changes: 11 additions & 2 deletions src/tools/messageserver/messageserver.pro
Expand Up @@ -8,11 +8,19 @@ SERVER_AS_DLL: {

equals(QT_MAJOR_VERSION, 4){
TARGET = messageserver
LIBS += -lqmfmessageserver -lqmfclient
macx:contains(QT_CONFIG, qt_framework) {
LIBS += -framework qmfmessageserver -framework qmfclient
} else {
LIBS += -lqmfmessageserver -lqmfclient
}
}
equals(QT_MAJOR_VERSION, 5){
TARGET = messageserver5
LIBS += -lqmfmessageserver5 -lqmfclient5
macx:contains(QT_CONFIG, qt_framework) {
LIBS += -framework qmfmessageserver5 -framework qmfclient5
} else {
LIBS += -lqmfmessageserver5 -lqmfclient5
}
}

CONFIG += qmfmessageserver qmfclient
Expand All @@ -23,6 +31,7 @@ QT = core
equals(QT_MAJOR_VERSION, 5): QT += widgets
}

CONFIG -= app_bundle
target.path += $$QMF_INSTALL_ROOT/bin

DEPENDPATH += .
Expand Down
12 changes: 10 additions & 2 deletions tests/tests.pri
Expand Up @@ -7,11 +7,19 @@ macx {
}

equals(QT_MAJOR_VERSION, 4){
LIBS += -lqmfclient
macx:contains(QT_CONFIG, qt_framework) {
LIBS += -framework qmfclient
} else {
LIBS += -lqmfclient
}
target.path += $$QMF_INSTALL_ROOT/tests
}
equals(QT_MAJOR_VERSION, 5){
LIBS += -lqmfclient5
macx:contains(QT_CONFIG, qt_framework) {
LIBS += -framework qmfclient5
} else {
LIBS += -lqmfclient5
}
target.path += $$QMF_INSTALL_ROOT/tests5
}

Expand Down
5 changes: 3 additions & 2 deletions tests/tst_qcop/tst_qcop.cpp
Expand Up @@ -55,12 +55,13 @@
#include "qcopchannelmonitor.h"

class TestQCopServer;
class tst_QCop : public QObject
class tst_QCop : public QCopAdaptor
{
Q_OBJECT

public:
tst_QCop(): server(0) {}
tst_QCop() : QCopAdaptor(QString::fromLatin1("QMFTestcase")),
server(0) {}
virtual ~tst_QCop() {}

private slots:
Expand Down

0 comments on commit f45c603

Please sign in to comment.