[SCM] ktp-text-ui packaging branch, master, updated. debian/16.04.2-1-19-g596d17d

Maximiliano Curia maxy at moszumanska.debian.org
Sat Sep 10 17:05:18 UTC 2016


Gitweb-URL: http://git.debian.org/?p=pkg-kde/applications/ktp-text-ui.git;a=commitdiff;h=d435216

The following commit has been merged in the master branch:
commit d43521677f86afda9037b2c0dfa1f9e2db9334d8
Author: David Faure <faure at kde.org>
Date:   Sun Jun 19 12:59:57 2016 +0200

    add_definitions(-DQT_NO_URL_CAST_FROM_STRING) + fix compilation, should fix 4 or 5 bugs.
---
 CMakeLists.txt                                            | 1 +
 adiumxtra-protocol-handler/adiumxtra-protocol-handler.cpp | 2 +-
 app/chat-window.cpp                                       | 4 ++--
 image-sharer/imagebinsharer.cpp                           | 2 +-
 image-sharer/imgursharer.cpp                              | 2 +-
 image-sharer/simplestimagehostingsharer.cpp               | 4 ++--
 lib/chat-widget.cpp                                       | 4 ++--
 logviewer/entity-view.cpp                                 | 2 +-
 logviewer/message-view.cpp                                | 2 +-
 9 files changed, 12 insertions(+), 11 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 11bd17b..5d9bdce 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -39,6 +39,7 @@ set_package_properties(KF5People PROPERTIES DESCRIPTION "KDE Contacts aggregatio
 if (KF5People_FOUND)
     add_definitions(-DHAVE_KPEOPLE)
 endif ()
+add_definitions(-DQT_NO_URL_CAST_FROM_STRING)
 
 add_subdirectory(image-sharer)
 add_subdirectory(lib)
diff --git a/adiumxtra-protocol-handler/adiumxtra-protocol-handler.cpp b/adiumxtra-protocol-handler/adiumxtra-protocol-handler.cpp
index 758227b..1ea0acd 100644
--- a/adiumxtra-protocol-handler/adiumxtra-protocol-handler.cpp
+++ b/adiumxtra-protocol-handler/adiumxtra-protocol-handler.cpp
@@ -63,7 +63,7 @@ void AdiumxtraProtocolHandler::install()
 
     QTemporaryFile *tmpFile = new QTemporaryFile();
     if (tmpFile->open()) {
-        KIO::Job* getJob = KIO::file_copy(url.toDisplayString(), QUrl(tmpFile->fileName()), -1,
+        KIO::Job* getJob = KIO::file_copy(url, QUrl::fromLocalFile(tmpFile->fileName()), -1,
                                           KIO::Overwrite | KIO::HideProgressInfo);
         if (getJob->exec()) {
             qWarning() << "Download failed";
diff --git a/app/chat-window.cpp b/app/chat-window.cpp
index 0c65007..babcb57 100644
--- a/app/chat-window.cpp
+++ b/app/chat-window.cpp
@@ -1205,7 +1205,7 @@ void ChatWindow::startFileTransfer(const Tp::AccountPtr& account, const Tp::Cont
 
 void ChatWindow::offerDocumentToContact(const Tp::AccountPtr& account, const Tp::ContactPtr& targetContact)
 {
-    const QUrl url = QFileDialog::getOpenFileName();
+    const QUrl url = QUrl::fromLocalFile(QFileDialog::getOpenFileName());
     if ( ! url.isEmpty() ) {
         KTp::Actions::startCollaborativeEditing(account, targetContact, QList<QUrl>() << url, true);
     }
@@ -1213,7 +1213,7 @@ void ChatWindow::offerDocumentToContact(const Tp::AccountPtr& account, const Tp:
 
 void ChatWindow::offerDocumentToChatroom(const Tp::AccountPtr& account, const QString& roomName)
 {
-   const QUrl url = QFileDialog::getOpenFileName();
+    const QUrl url = QUrl::fromLocalFile(QFileDialog::getOpenFileName());
     if ( ! url.isEmpty() ) {
         KTp::Actions::startCollaborativeEditing(account, roomName, QList<QUrl>() << url, true);
     }
diff --git a/image-sharer/imagebinsharer.cpp b/image-sharer/imagebinsharer.cpp
index e899e69..955eb8d 100644
--- a/image-sharer/imagebinsharer.cpp
+++ b/image-sharer/imagebinsharer.cpp
@@ -48,7 +48,7 @@ void ImageBinSharer::parseResponse(const QByteArray& responseData)
 
 QByteArray ImageBinSharer::postBody(const QByteArray& imageData)
 {
-    m_form.addFile(QLatin1String("file"), m_contentPath, imageData);
+    m_form.addFile(QLatin1String("file"), QUrl::fromLocalFile(m_contentPath), imageData);
     m_form.finish();
     return m_form.formData();
 }
diff --git a/image-sharer/imgursharer.cpp b/image-sharer/imgursharer.cpp
index 670af3f..e318b5b 100644
--- a/image-sharer/imgursharer.cpp
+++ b/image-sharer/imgursharer.cpp
@@ -46,7 +46,7 @@ QUrl ImgurSharer::url() const
 QByteArray ImgurSharer::postBody(const QByteArray &imageData)
 {
     // Create the request body
-    m_form.addFile(QLatin1String("image"), m_contentPath, imageData);
+    m_form.addFile(QLatin1String("image"), QUrl::fromLocalFile(m_contentPath), imageData);
     m_form.finish();
     return m_form.formData();
 }
diff --git a/image-sharer/simplestimagehostingsharer.cpp b/image-sharer/simplestimagehostingsharer.cpp
index a1b34d6..f323553 100644
--- a/image-sharer/simplestimagehostingsharer.cpp
+++ b/image-sharer/simplestimagehostingsharer.cpp
@@ -36,7 +36,7 @@ void SimplestImageHostingSharer::parseResponse(const QByteArray& responseData)
     QString responseString = QLatin1String(responseData);
     QRegExp exp(QLatin1String("800
(http://.+)
"));
     if ( exp.indexIn(responseString) != -1) {
-        m_imageUrl = responseString.replace(QLatin1String("800"), QLatin1String("")).replace(QLatin1String("
"), QLatin1String(""));
+        m_imageUrl = QUrl(responseString.remove(QLatin1String("800")).remove(QLatin1String("
")));
     } else {
         m_hasError = true;
         m_errorMessage = responseString;
@@ -45,7 +45,7 @@ void SimplestImageHostingSharer::parseResponse(const QByteArray& responseData)
 
 QByteArray SimplestImageHostingSharer::postBody(const QByteArray& imageData)
 {
-    m_form.addFile(QLatin1String("fileName"), m_contentPath, imageData);
+    m_form.addFile(QLatin1String("fileName"), QUrl::fromLocalFile(m_contentPath), imageData);
     m_form.finish();
 
     return m_form.formData();
diff --git a/lib/chat-widget.cpp b/lib/chat-widget.cpp
index 7975057..fdc9c1e 100644
--- a/lib/chat-widget.cpp
+++ b/lib/chat-widget.cpp
@@ -1417,14 +1417,14 @@ void ChatWidget::initChatArea()
         info.setDestinationDisplayName(otherContact->alias());
         info.setDestinationName(otherContact->id());
         info.setChatName(otherContact->alias());
-        info.setIncomingIconPath(otherContact->avatarData().fileName);
+        info.setIncomingIconPath(QUrl::fromLocalFile(otherContact->avatarData().fileName));
         d->ui.contactsView->hide();
     }
 
     info.setSourceName(d->channel->textChannel()->connection()->protocolName());
 
     //set up anything related to 'self'
-    info.setOutgoingIconPath(d->channel->textChannel()->groupSelfContact()->avatarData().fileName);
+    info.setOutgoingIconPath(QUrl::fromLocalFile(d->channel->textChannel()->groupSelfContact()->avatarData().fileName));
 
     //set the message time
     if (!d->channel->messageQueue().isEmpty()) {
diff --git a/logviewer/entity-view.cpp b/logviewer/entity-view.cpp
index 7efc8dd..1e97547 100644
--- a/logviewer/entity-view.cpp
+++ b/logviewer/entity-view.cpp
@@ -61,7 +61,7 @@ void EntityView::rowsInserted(const QModelIndex &parent, int start, int end)
         const QString selectedPersonaId = QCoreApplication::arguments().at(0);
         for (int i = start; i <= end; i++) {
             const QModelIndex index = model()->index(i, 0, parent);
-            if (index.data(KTp::PersonIdRole).toUrl() == selectedPersonaId) {
+            if (index.data(KTp::PersonIdRole).toUrl().toString() == selectedPersonaId) {
                 selectedIndex = index;
                 break;
             }
diff --git a/logviewer/message-view.cpp b/logviewer/message-view.cpp
index eafc53e..1b3bbe4 100644
--- a/logviewer/message-view.cpp
+++ b/logviewer/message-view.cpp
@@ -126,7 +126,7 @@ void MessageView::onEventsLoaded(KTp::PendingLoggerOperation *po)
     headerInfo.setChatName(m_contact.isNull() ? m_entity.alias() : m_contact->alias());
     headerInfo.setGroupChat(m_entity.entityType() == Tp::HandleTypeRoom);
     headerInfo.setSourceName(m_account->displayName());
-    headerInfo.setIncomingIconPath(m_contact.isNull() ? QString() : m_contact->avatarData().fileName);
+    headerInfo.setIncomingIconPath(m_contact.isNull() ? QUrl() : QUrl::fromLocalFile(m_contact->avatarData().fileName));
     headerInfo.setService(m_account->serviceName());
     // check iconPath docs for minus sign in -KIconLoader::SizeMedium
     headerInfo.setServiceIconPath(KIconLoader::global()->iconPath(m_account->iconName(), -KIconLoader::SizeMedium));

-- 
ktp-text-ui packaging



More information about the pkg-kde-commits mailing list