Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F117822827
D73.1775296706.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Authored By
Unknown
Size
8 KB
Referenced Files
None
Subscribers
None
D73.1775296706.diff
View Options
diff --git a/.arcconfig b/.arcconfig
new file mode 100644
--- /dev/null
+++ b/.arcconfig
@@ -0,0 +1,3 @@
+{
+ "phabricator.uri": "https://git.kolab.org"
+}
diff --git a/CMakeLists.txt b/CMakeLists.txt
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -43,11 +43,11 @@
# 0.2 (0.2 development version)
set (Libkolabxml_VERSION_MAJOR 1)
-set (Libkolabxml_VERSION_MINOR 2)
+set (Libkolabxml_VERSION_MINOR 1)
# Enable the full x.y.z version only for release versions
-#set (Libkolabxml_VERSION_PATCH 1)
-#set (Libkolabxml_VERSION "${Libkolabxml_VERSION_MAJOR}.${Libkolabxml_VERSION_MINOR}.${Libkolabxml_VERSION_PATCH}" )
-set (Libkolabxml_VERSION "${Libkolabxml_VERSION_MAJOR}.${Libkolabxml_VERSION_MINOR}" )
+set (Libkolabxml_VERSION_PATCH 2)
+set (Libkolabxml_VERSION "${Libkolabxml_VERSION_MAJOR}.${Libkolabxml_VERSION_MINOR}.${Libkolabxml_VERSION_PATCH}" )
+#set (Libkolabxml_VERSION "${Libkolabxml_VERSION_MAJOR}.${Libkolabxml_VERSION_MINOR}" )
set (Libkolabxml_VERSION_STRING ${CMAKE_PROJECT_NAME}-${Libkolabxml_VERSION})
set (KOLAB_FORMAT_VERSION "3.1.0")
diff --git a/src/utils.cpp b/src/utils.cpp
--- a/src/utils.cpp
+++ b/src/utils.cpp
@@ -174,17 +174,14 @@
{
switch (s) {
case NoError:
- std::cout << "Debug: " << m << std::endl;
break;
case Warning:
- std::cerr << "Warning: " << m << std::endl;
if (ThreadLocal::inst().errorBit < Warning) {
ThreadLocal::inst().errorBit = Warning;
ThreadLocal::inst().errorMessage = m;
}
break;
case Error:
- std::cerr << "Error: " << m << std::endl;
if (ThreadLocal::inst().errorBit < Error) {
ThreadLocal::inst().errorBit = Error;
ThreadLocal::inst().errorMessage = m;
@@ -192,7 +189,6 @@
break;
case Critical:
default:
- std::cerr << "Critical: " << m << std::endl;
if (ThreadLocal::inst().errorBit < Critical) {
ThreadLocal::inst().errorBit = Critical;
ThreadLocal::inst().errorMessage = m;
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
--- a/tests/CMakeLists.txt
+++ b/tests/CMakeLists.txt
@@ -7,7 +7,6 @@
find_package(Qt5Core REQUIRED)
find_package(Qt5Test REQUIRED)
- include("../cmake/modules/ECMQt4To5Porting.cmake")
include_directories(${QT_INCLUDES}) # TODO: Port away from this.
if(CMAKE_VERSION VERSION_LESS 2.8.9)
@@ -18,7 +17,8 @@
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
endif()
- set(QT_QTTEST_LIBRARIES Qt5::Test)
+ set(QT_QTCORE_LIBRARY Qt5::Core)
+ set(QT_QTTEST_LIBRARY Qt5::Test)
else()
set(QT_USE_IMPORTED_TARGETS TRUE) # Qt 4 only
set(QT_MIN_VERSION 4.6.2) # Qt 4 only
@@ -32,7 +32,7 @@
include_directories( ${CMAKE_CURRENT_SOURCE_DIR}/.. )
include_directories(${CMAKE_CURRENT_BINARY_DIR})
-include_directories(${QT_INCLUDES} ${QT_INCLUDE_DIR} QtCore)
+include_directories(${QT_INCLUDES} ${QT_INCLUDE_DIR})
if (NOT APPLE)
set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wl,--no-undefined" )
endif()
diff --git a/tests/kolabconversationtest.cpp b/tests/kolabconversationtest.cpp
--- a/tests/kolabconversationtest.cpp
+++ b/tests/kolabconversationtest.cpp
@@ -27,7 +27,7 @@
void KolabConversationTest::configurationDeserialationTest()
{
boost::shared_ptr <Kolab::Configuration> ptr = Kolab::KolabObjects::deserializeObject<Kolab::Configuration>(TEST_DATA_PATH "/testfiles/testConfiguration.xml", true);
- QVERIFY(ptr);
+ QVERIFY(static_cast<bool>(ptr));
QVERIFY(ptr->isValid());
QCOMPARE(ptr->type(), Kolab::Configuration::TypeRelation);
@@ -36,7 +36,7 @@
void KolabConversationTest::noteDeserialationTest()
{
boost::shared_ptr <Kolab::Note> ptr = Kolab::KolabObjects::deserializeObject<Kolab::Note>(TEST_DATA_PATH "/testfiles/testNote.xml", true);
- QVERIFY(ptr);
+ QVERIFY(static_cast<bool>(ptr));
QVERIFY(ptr->isValid());
QCOMPARE(ptr->summary(), std::string("summarytext"));
}
diff --git a/tests/serializers.h b/tests/serializers.h
--- a/tests/serializers.h
+++ b/tests/serializers.h
@@ -12,7 +12,7 @@
QByteArray ba = "Kolab::cDateTime(";
ba += QByteArray::number(dt.year()) + ", " + QByteArray::number(dt.month())+ ", " + QByteArray::number(dt.day()) + ", ";
ba += QByteArray::number(dt.hour()) + ", " + QByteArray::number(dt.minute()) + ", " + QByteArray::number(dt.second())+ ", ";
- ba += QString(dt.isUTC()?QString("UTC"):QString("TZ: "+QString::fromStdString(dt.timezone()))).toLatin1();
+ ba += dt.isUTC()?QByteArray("UTC"):QByteArray("TZ: "+QByteArray(dt.timezone().c_str()));
ba += ")";
return qstrdup(ba.data());
}
@@ -32,9 +32,9 @@
char *toString(const Kolab::Attendee &a)
{
QByteArray ba = "Kolab::Attendee(";
- ba += QString::fromStdString(a.contact().email()).toLatin1() + ", " + QString::fromStdString(a.contact().name()).toLatin1()+ ", " +
- QByteArray::number(a.partStat()) + ", " + QByteArray::number(a.role()) + ", " + QByteArray::number(a.rsvp()) + ", " +
- QString::fromStdString(a.contact().uid()).toLatin1();
+ ba += QByteArray(a.contact().email().c_str()) + ", " + QByteArray(a.contact().name().c_str())+ ", " +
+ QByteArray::number(a.partStat()) + ", " + QByteArray::number(a.role()) + ", " + QByteArray::number(a.rsvp()) + ", " +
+ QByteArray(a.contact().uid().c_str());
ba += ")";
return qstrdup(ba.data());
}
@@ -54,7 +54,7 @@
char *toString(const std::string &s)
{
QByteArray ba = "string(";
- ba += QString::fromStdString(s).toLatin1();
+ ba += QByteArray(s.c_str());
ba += ")";
return qstrdup(ba.data());
}
@@ -104,8 +104,8 @@
char *toString(const Kolab::Attachment &a)
{
QByteArray ba = "Kolab::Attachment(";
- ba += QString::fromStdString(a.uri()).toLatin1() + ", " + QString::fromStdString(a.mimetype()).toLatin1()+ ", " +
- QString::fromStdString(a.label()).toLatin1();
+ ba += QByteArray(a.uri().c_str()) + ", " + QByteArray(a.mimetype().c_str())+ ", " +
+ QByteArray(a.label().c_str());
ba += ")";
return qstrdup(ba.data());
}
@@ -125,9 +125,9 @@
char *toString(const Kolab::ContactReference &a)
{
QByteArray ba = "Kolab::ContactReference(";
- ba += QString::fromStdString(a.email()).toLatin1()+ ", ";
- ba += QString::fromStdString(a.name()).toLatin1()+ ", ";
- ba += QString::fromStdString(a.uid()).toLatin1();
+ ba += QByteArray(a.email().c_str())+ ", ";
+ ba += QByteArray(a.name().c_str())+ ", ";
+ ba += QByteArray(a.uid().c_str());
ba += ")";
return qstrdup(ba.data());
}
@@ -147,9 +147,9 @@
char *toString(const Kolab::Alarm &a)
{
QByteArray ba = "Kolab::Alarm(";
- ba += QByteArray::number(a.type()) + "\n " + QString::fromStdString(a.summary())+ "\n " +
- QString::fromStdString(a.text())+"\n " +toString(a.duration()) + "\n " + QByteArray::number(a.numrepeat())+ "\n " + toString(a.start()) + "\n " +
- toString(a.relativeStart()) + "\n " + QByteArray::number(a.relativeTo()) + "\n " + toString(a.audioFile()) + "\n " + toString(a.attendees()) + "\n ";
+ ba += QByteArray::number(a.type()) + "\n " + QByteArray(a.summary().c_str())+ "\n " +
+ QByteArray(a.text().c_str())+"\n " +QByteArray(toString(a.duration())) + "\n " + QByteArray::number(a.numrepeat())+ "\n " + QByteArray(toString(a.start())) + "\n " +
+ QByteArray(toString(a.relativeStart())) + "\n " + QByteArray::number(a.relativeTo()) + "\n " + QByteArray(toString(a.audioFile())) + "\n " + QByteArray(toString(a.attendees())) + "\n ";
ba += ")";
return qstrdup(ba.data());
}
@@ -169,8 +169,8 @@
char *toString(const Kolab::Related &a)
{
QByteArray ba = "Kolab::Related(";
- ba += QString::fromStdString(a.text()).toLatin1()+ "\n " +
- QString::fromStdString(a.uri()).toLatin1()+"\n " +
+ ba += QByteArray(a.text().c_str())+ "\n " +
+ QByteArray(a.uri().c_str())+"\n " +
QByteArray::number(a.relationTypes()) + "\n " +
QByteArray::number(a.type()) + "\n ";
ba += ")";
@@ -192,9 +192,9 @@
char *toString(const Kolab::Affiliation &a)
{
QByteArray ba = "Kolab::Affiliation(";
- ba += QString::fromStdString(a.organisation()).toLatin1()+ "\n " +
- QString::fromStdString(a.logo())+"\n " + "\n " + toString(a.roles())+ "\n " + toString(a.relateds()) + "\n " +
- toString(a.addresses()) + "\n ";
+ ba += QByteArray(a.organisation().c_str())+ "\n " +
+ QByteArray(a.logo().c_str()) + "\n " + "\n " + QByteArray(toString(a.roles())) + "\n " + QByteArray(toString(a.relateds())) + "\n " +
+ QByteArray(toString(a.addresses())) + "\n ";
ba += ")";
return qstrdup(ba.data());
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Apr 4, 9:58 AM (7 h, 55 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
18828906
Default Alt Text
D73.1775296706.diff (8 KB)
Attached To
Mode
D73: Suppress the use of stderr and stdout in Utils::logMessage() when compiled with -DNDEBUG (Ref. T934)
Attached
Detach File
Event Timeline