Compare commits
7 Commits
6.0_alpha3
...
6.0_alpha5
| Author | SHA1 | Date | |
|---|---|---|---|
| 9fd7e99274 | |||
| bf567146d8 | |||
| 3bade98d2f | |||
| bd03359d79 | |||
| 89b4218853 | |||
| f9f479588f | |||
| 40e81af6c6 |
+1
-1
@@ -55,7 +55,7 @@ else()
|
||||
set(KMESS_DISABLE_LIKEBACK 0)
|
||||
endif()
|
||||
|
||||
set(KMESS_VERSION "6.0_alpha3")
|
||||
set(KMESS_VERSION "6.0_alpha5")
|
||||
set(KMESS_ENABLE_DEBUG_OUTPUT 0)
|
||||
set(KMESS_BUILT_DEBUGFULL FALSE)
|
||||
set(HAVE_LIBISFQT 1)
|
||||
|
||||
@@ -352,7 +352,7 @@ QString ChatMessageStyle::createFallbackMessage(const ChatMessage &message)
|
||||
if( ! message.hasHtmlBody() )
|
||||
{
|
||||
// Escape HTML, replace all emoticons, links and formatting
|
||||
RichTextParser::parseMsnString( body, useEmoticons_, false, true, useFormatting_, allowEmoticonLinks_, handle, pendingEmoticonTags_ );
|
||||
RichTextParser::parseMsnString( body, useEmoticons_, false, true, useFormatting_, allowEmoticonLinks_, handle, &pendingEmoticonTags_ );
|
||||
|
||||
// Replace font special effects, like *bold*
|
||||
if( useFontEffects_ )
|
||||
@@ -489,7 +489,7 @@ QString ChatMessageStyle::convertMessageToXml( const ChatMessage &message, bool
|
||||
!isPresence,
|
||||
(isPresence ? false : useFormatting_),
|
||||
(isPresence ? false : allowEmoticonLinks_),
|
||||
(isPresence ? QString() : handle), pendingEmoticonTags_ );
|
||||
(isPresence ? QString() : handle), &pendingEmoticonTags_ );
|
||||
|
||||
if( useFontEffects_ )
|
||||
{
|
||||
|
||||
+33
-14
@@ -192,10 +192,6 @@ ChatWindow::ChatWindow( QWidget *parent )
|
||||
connect( inkPenSize_, SIGNAL( valueChanged(int) ),
|
||||
inkCanvas_, SLOT ( setPenSize(int) ) );
|
||||
|
||||
// Connect the message edit so that if its displayed color changes,
|
||||
// it's checked to match the user's chosen color.
|
||||
connect( messageEdit_, SIGNAL( currentColorChanged(const QColor&) ),
|
||||
this, SLOT ( editorColorChanged(const QColor&) ) );
|
||||
// Connect the docks signals
|
||||
connect( standardEmoticonsDock_, SIGNAL( visibilityChanged(bool) ),
|
||||
this, SLOT ( slotEmoticonDocksToggled() ) );
|
||||
@@ -501,13 +497,6 @@ void ChatWindow::createMenus()
|
||||
nextTabAction_->setText ( i18n("Ne&xt Tab") );
|
||||
nextTabAction_->setIconText( i18n("Ne&xt Tab") );
|
||||
|
||||
// Enable some default action shortcuts (preserve the original ones where needed)
|
||||
nudgeAction_->setShortcut( QKeySequence( "Alt+Z" ) );
|
||||
closeAction->setShortcuts( QList<QKeySequence>() << QKeySequence( "Ctrl+W" ) << closeAction->shortcut() );
|
||||
closeAllAction_->setShortcuts( QList<QKeySequence>() << QKeySequence( "Ctrl+Q" ) << closeAllAction_->shortcut() );
|
||||
prevTabAction_->setShortcuts( QList<QKeySequence>() << QKeySequence( QKeySequence::PreviousChild ) << prevTabAction_->shortcut() );
|
||||
nextTabAction_->setShortcuts( QList<QKeySequence>() << QKeySequence( QKeySequence::NextChild ) << nextTabAction_->shortcut() );
|
||||
|
||||
// Set up the dock actions
|
||||
contactsDockAction = contactsDock_ ->toggleViewAction();
|
||||
standardEmoticonsDockAction = standardEmoticonsDock_->toggleViewAction();
|
||||
@@ -517,19 +506,16 @@ void ChatWindow::createMenus()
|
||||
contactsDockAction->setToolTip( i18n("Enable or disable the contacts panel") );
|
||||
contactsDockAction->setText( i18nc("Toolbar button","Contacts") );
|
||||
contactsDockAction->setIconText( i18nc("Toolbar button","Contacts") );
|
||||
contactsDockAction->setShortcut( QKeySequence( "Ctrl+D" ) );
|
||||
|
||||
standardEmoticonsDockAction->setIcon( QIcon::fromTheme( "face-smile" ) );
|
||||
standardEmoticonsDockAction->setToolTip( i18n("Enable or disable the standard emoticons panel") );
|
||||
standardEmoticonsDockAction->setText( i18nc("Toolbar button","Emoticons") );
|
||||
standardEmoticonsDockAction->setIconText( i18nc("Toolbar button","Emoticons") );
|
||||
standardEmoticonsDockAction->setShortcut( QKeySequence( "Ctrl+E" ) );
|
||||
|
||||
customEmoticonsDockAction->setIcon( QIcon::fromTheme( "face-smile-gearhead-female" ) );
|
||||
customEmoticonsDockAction->setToolTip( i18n("Enable or disable the custom emoticons panel") );
|
||||
customEmoticonsDockAction->setText( i18nc("Toolbar button","My Emoticons") );
|
||||
customEmoticonsDockAction->setIconText( i18nc("Toolbar button","My Emoticons") );
|
||||
customEmoticonsDockAction->setShortcut( QKeySequence( "Ctrl+Y" ) );
|
||||
|
||||
// Add the dock toggling actions to the Panels menu
|
||||
panelsMenuAction_->addAction( contactsDockAction );
|
||||
@@ -601,6 +587,16 @@ void ChatWindow::createMenus()
|
||||
|
||||
// Add actions to actionCollection for "Settings" menu
|
||||
actionCollection_->addAction( "spellCheck", spellCheckAction_ );
|
||||
|
||||
// Enable some default action shortcuts (preserve the original ones where needed)
|
||||
actionCollection_->setDefaultShortcut( nudgeAction_, QKeySequence( "Alt+Z" ) );
|
||||
actionCollection_->setDefaultShortcuts( closeAction, QList<QKeySequence>() << QKeySequence( "Ctrl+W" ) << closeAction->shortcut() );
|
||||
actionCollection_->setDefaultShortcuts( closeAllAction_, QList<QKeySequence>() << QKeySequence( "Ctrl+Q" ) << closeAllAction_->shortcut() );
|
||||
actionCollection_->setDefaultShortcuts( prevTabAction_, QList<QKeySequence>() << QKeySequence( QKeySequence::PreviousChild ) << prevTabAction_->shortcut() );
|
||||
actionCollection_->setDefaultShortcuts( nextTabAction_, QList<QKeySequence>() << QKeySequence( QKeySequence::NextChild ) << nextTabAction_->shortcut() );
|
||||
actionCollection_->setDefaultShortcut( contactsDockAction, QKeySequence( "Ctrl+D" ) );
|
||||
actionCollection_->setDefaultShortcut( standardEmoticonsDockAction, QKeySequence( "Ctrl+E" ) );
|
||||
actionCollection_->setDefaultShortcut( customEmoticonsDockAction, QKeySequence( "Ctrl+Y" ) );
|
||||
}
|
||||
|
||||
|
||||
@@ -1436,6 +1432,15 @@ bool ChatWindow::queryExit()
|
||||
|
||||
|
||||
|
||||
// Restore the window properties (called by KMainWindow)
|
||||
void ChatWindow::readProperties()
|
||||
{
|
||||
const KConfigGroup config( KMessConfig::instance()->getAccountConfig( currentAccount_->getHandle(), "ChatWindow" ) );
|
||||
readProperties( config );
|
||||
}
|
||||
|
||||
|
||||
|
||||
// Restore the window properties (called by KMainWindow)
|
||||
void ChatWindow::readProperties(const KConfigGroup &config )
|
||||
{
|
||||
@@ -1501,6 +1506,15 @@ void ChatWindow::saveChat()
|
||||
|
||||
|
||||
|
||||
// Save the window properties (called by KMainWindow)
|
||||
void ChatWindow::saveProperties()
|
||||
{
|
||||
KConfigGroup config( KMessConfig::instance()->getAccountConfig( currentAccount_->getHandle(), "ChatWindow" ) );
|
||||
saveProperties( config );
|
||||
}
|
||||
|
||||
|
||||
|
||||
// Save the window properties (called by KMainWindow)
|
||||
void ChatWindow::saveProperties( KConfigGroup &config )
|
||||
{
|
||||
@@ -1642,6 +1656,7 @@ void ChatWindow::sendMessage()
|
||||
// Don't send empty messages
|
||||
if( text.trimmed().isEmpty() )
|
||||
{
|
||||
doSendTypingMessages_ = true;
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1664,6 +1679,8 @@ void ChatWindow::sendMessage()
|
||||
// Handle command. If 'false' is returned, send it anyway.
|
||||
if ( handleCommand( command ) )
|
||||
{
|
||||
doSendTypingMessages_ = true;
|
||||
slotMessageChanged();
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -1729,6 +1746,8 @@ void ChatWindow::sendMessage()
|
||||
quickRetypeList.append( message.getBody() );
|
||||
lastSentence_ = QString();
|
||||
|
||||
slotMessageChanged();
|
||||
|
||||
// Reset the last sentence counter.
|
||||
// showMessage() updates chatMessages_
|
||||
indexSentences_ = quickRetypeList.size();
|
||||
|
||||
@@ -109,9 +109,11 @@ class ChatWindow : public KXmlGuiWindow, private Ui::ChatWindow
|
||||
// Create the menus.
|
||||
void createMenus();
|
||||
// Restore the window properties (called by KMainWindow)
|
||||
void readProperties( const KConfigGroup &config = *((const KConfigGroup *)0) ) override;
|
||||
void readProperties();
|
||||
void readProperties( const KConfigGroup &config ) override;
|
||||
// Save the window properties (called by KMainWindow)
|
||||
void saveProperties( KConfigGroup &config = *((KConfigGroup *)0) ) override;
|
||||
void saveProperties();
|
||||
void saveProperties( KConfigGroup &config ) override;
|
||||
// Enable or disable the parts of the window which allow user interaction
|
||||
void setEnabled( bool isEnabled );
|
||||
// Set the window icon for this chat window
|
||||
|
||||
@@ -421,7 +421,7 @@ ContactFrame* ContactsWidget::createContactFrame()
|
||||
this, SIGNAL( contactBlocked( QString, bool ) ) );
|
||||
|
||||
// Add it to the viewBox so it appears in the widget
|
||||
layout_->insertWidget( children().count() - 2, contactFrame );
|
||||
layout_->insertWidget( layout_->count(), contactFrame );
|
||||
|
||||
// put it in the list of frames so we can find it again.
|
||||
contactFrames_.append( contactFrame );
|
||||
|
||||
+31
-1
@@ -1693,6 +1693,15 @@ void KMess::saveGlobalProperties( KConfig *sessionConfig )
|
||||
|
||||
|
||||
|
||||
// Read in account and other properties
|
||||
void KMess::readProperties()
|
||||
{
|
||||
KConfigGroup config( KMessConfig::instance()->getGlobalConfig( "MainWindow" ) );
|
||||
readProperties( config );
|
||||
}
|
||||
|
||||
|
||||
|
||||
// Read in account and other properties
|
||||
void KMess::readProperties( const KConfigGroup &config )
|
||||
{
|
||||
@@ -1705,6 +1714,15 @@ void KMess::readProperties( const KConfigGroup &config )
|
||||
|
||||
|
||||
|
||||
// Save account and other properties
|
||||
void KMess::saveProperties()
|
||||
{
|
||||
KConfigGroup config( KMessConfig::instance()->getGlobalConfig( "MainWindow" ) );
|
||||
saveProperties( config );
|
||||
}
|
||||
|
||||
|
||||
|
||||
// Save account and other properties
|
||||
void KMess::saveProperties( KConfigGroup &config )
|
||||
{
|
||||
@@ -1802,7 +1820,19 @@ void KMess::showUserProfile()
|
||||
}
|
||||
|
||||
const QString url( currentAccount_->getUrlInformation().value( "PROFILE" ) );
|
||||
KMessShared::openBrowser( QUrl::fromUserInput( url, QString(), QUrl::AssumeLocalFile ) );
|
||||
QUrl profileUrl;
|
||||
|
||||
if( url.isEmpty() )
|
||||
{
|
||||
kmWarning() << "No profile URL received from the server; opening the NINA account portal instead.";
|
||||
profileUrl = QUrl( "https://account.nina.chat/login/" );
|
||||
}
|
||||
else
|
||||
{
|
||||
profileUrl = QUrl::fromUserInput( url, QString(), QUrl::AssumeLocalFile );
|
||||
}
|
||||
|
||||
KMessShared::openBrowser( profileUrl );
|
||||
}
|
||||
|
||||
|
||||
|
||||
+4
-2
@@ -89,11 +89,13 @@ class KMess : public KMessInterface
|
||||
// Load the application's global state
|
||||
void readGlobalProperties( KConfig *sessionConfig ) override;
|
||||
// Read in account and other properties
|
||||
void readProperties( const KConfigGroup &config = *((const KConfigGroup *)0) ) override;
|
||||
void readProperties();
|
||||
void readProperties( const KConfigGroup &config ) override;
|
||||
// Save the application's global state
|
||||
void saveGlobalProperties( KConfig *sessionConfig ) override;
|
||||
// Save account and other properties
|
||||
void saveProperties( KConfigGroup &config = *((KConfigGroup *)0) ) override;
|
||||
void saveProperties();
|
||||
void saveProperties( KConfigGroup &config ) override;
|
||||
|
||||
private: // Private methods
|
||||
// The application is closing, after queryClose() was approved
|
||||
|
||||
@@ -72,9 +72,9 @@ class KMessInterface : public KXmlGuiWindow
|
||||
virtual bool initialize();
|
||||
|
||||
// Restore the window properties (called by KMainWindow)
|
||||
virtual void readProperties( const KConfigGroup &config = *((const KConfigGroup *)0) ) override;
|
||||
virtual void readProperties( const KConfigGroup &config ) override;
|
||||
// Save the window properties (called by KMainWindow)
|
||||
virtual void saveProperties( KConfigGroup &config = *((KConfigGroup *)0) ) override;
|
||||
virtual void saveProperties( KConfigGroup &config ) override;
|
||||
|
||||
protected slots: // Protected slots
|
||||
// "Add a new contact" was selected from the menu.
|
||||
|
||||
+1
-1
@@ -774,7 +774,7 @@ void KMessTest::testMsnPlusInteractive()
|
||||
|
||||
// New parser
|
||||
text = input->document()->toPlainText();
|
||||
RichTextParser::parseMsnString( text, true, true, true, true, true, "contact1@kmess.org", pending );
|
||||
RichTextParser::parseMsnString( text, true, true, true, true, true, "contact1@kmess.org", &pending );
|
||||
cleaned = parsed = text;
|
||||
|
||||
RichTextParser::getCleanString( cleaned );
|
||||
|
||||
@@ -498,7 +498,7 @@ void MsnNotificationConnection::changePersonalProperties( const QString& cid, in
|
||||
{
|
||||
// Send BLP command for privacy settings, please refer to:
|
||||
// http://msnpiki.msnfanatic.com/index.php/Command:BLP
|
||||
const QString blpToSend( ( blp == 0 ) ? "BL" : "AL" );
|
||||
const QString blpToSend( ( blp == 2 ) ? "BL" : "AL" );
|
||||
sendCommand( "BLP", blpToSend );
|
||||
|
||||
if( legacyMsnAuthentication_ )
|
||||
@@ -2752,7 +2752,7 @@ void MsnNotificationConnection::removeContact(QString handle, bool block)
|
||||
|
||||
// Remove the contact from AB
|
||||
AddressBookService *addressBook = createAddressBookService();;
|
||||
addressBook->deleteContact( contactId );
|
||||
addressBook->deleteContact( contactId, handle );
|
||||
|
||||
// if not blocking, make sure we re-add to the Allow list.
|
||||
// ABContactDelete removes them from the Allow list for some reason. This was what
|
||||
|
||||
@@ -1733,7 +1733,7 @@ void MsnSwitchboardConnection::sendInk( InkFormat format, const QByteArray& ink
|
||||
bool capable = true;
|
||||
ContactBase *contact;
|
||||
|
||||
int inkCapabilityFlag;
|
||||
ContactBase::MsnClientCapabilities inkCapabilityFlag;
|
||||
switch( format )
|
||||
{
|
||||
case FORMAT_ISF:
|
||||
@@ -1742,6 +1742,9 @@ void MsnSwitchboardConnection::sendInk( InkFormat format, const QByteArray& ink
|
||||
case FORMAT_GIF:
|
||||
inkCapabilityFlag = ContactBase::MSN_CAP_INK_GIF;
|
||||
break;
|
||||
default:
|
||||
kmWarning() << "Refusing to send unsupported ink format:" << format;
|
||||
return;
|
||||
}
|
||||
|
||||
// Verify whether all contacts are capable to view this Ink message or not
|
||||
@@ -1750,14 +1753,14 @@ void MsnSwitchboardConnection::sendInk( InkFormat format, const QByteArray& ink
|
||||
{
|
||||
contact = currentAccount_->getContactByHandle( handle );
|
||||
if( ! contact->hasCapability( ContactBase::MSN_CAP_MULTI_PACKET )
|
||||
|| ! contact->hasCapability( (ContactBase::MsnClientCapabilities)inkCapabilityFlag ) )
|
||||
|| ! contact->hasCapability( inkCapabilityFlag ) )
|
||||
{
|
||||
unsupportingContact = contact;
|
||||
capable = false;
|
||||
#ifdef KMESSDEBUG_SWITCHBOARD_GENERAL
|
||||
kmDebug() << "Contact" << handle << "does not support our wink. "
|
||||
<< "Has multipacket?" << contact->hasCapability( ContactBase::MSN_CAP_MULTI_PACKET )
|
||||
<< "Has this ink type support?" << contact->hasCapability( (ContactBase::MsnClientCapabilities)inkCapabilityFlag );
|
||||
<< "Has this ink type support?" << contact->hasCapability( inkCapabilityFlag );
|
||||
#endif
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -131,7 +131,7 @@ void AddressBookService::addContactToGroup( const QString &contactId, const QStr
|
||||
|
||||
MessageData data;
|
||||
data.type = "ContactAddToGroup";
|
||||
data.value = groupId;
|
||||
data.value = QStringList() << contactId << groupId;
|
||||
|
||||
sendSecureRequest( new SoapMessage( SERVICE_URL_ADDRESSBOOK,
|
||||
"http://www.msn.com/webservices/AddressBook/ABGroupContactAdd",
|
||||
@@ -299,7 +299,7 @@ void AddressBookService::contactUpdate( ContactProperty property, const QString
|
||||
|
||||
|
||||
|
||||
void AddressBookService::deleteContact( const QString &contactId )
|
||||
void AddressBookService::deleteContact( const QString &contactId, const QString &handle )
|
||||
{
|
||||
QString body( "<ABContactDelete xmlns=\"http://www.msn.com/webservices/AddressBook\">\n"
|
||||
" <abId>00000000-0000-0000-0000-000000000000</abId>\n"
|
||||
@@ -312,7 +312,7 @@ void AddressBookService::deleteContact( const QString &contactId )
|
||||
|
||||
MessageData data;
|
||||
data.type = "ContactDelete";
|
||||
data.value = contactId;
|
||||
data.value = QStringList() << contactId << handle;
|
||||
|
||||
sendSecureRequest( new SoapMessage( SERVICE_URL_ADDRESSBOOK,
|
||||
"http://www.msn.com/webservices/AddressBook/ABContactDelete",
|
||||
@@ -950,12 +950,18 @@ void AddressBookService::parseSecureResult( SoapMessage *message )
|
||||
emit contactAdded( handle, contactId, groupsId );
|
||||
emit addressBookChanged( handle, ContactAdded );
|
||||
}
|
||||
else if( ! handle.isEmpty() )
|
||||
{
|
||||
kmWarning() << "Contact add response did not include a contact id; refreshing address book.";
|
||||
retrieveAddressBook();
|
||||
}
|
||||
}
|
||||
else if( data.type == "ContactDelete" )
|
||||
{
|
||||
// A contact was deleted from the AB
|
||||
const QString contactId( data.value.toString() );
|
||||
const QString handle (data.value.toString() );
|
||||
const QStringList info ( data.value.toStringList() );
|
||||
const QString contactId( info.value( 0 ) );
|
||||
const QString handle ( info.value( 1 ) );
|
||||
|
||||
if( ! contactId.isEmpty() )
|
||||
{
|
||||
@@ -986,8 +992,14 @@ void AddressBookService::parseSecureResult( SoapMessage *message )
|
||||
{
|
||||
// A contact was added to a group
|
||||
|
||||
const QString groupId ( data.value.toString() );
|
||||
const QString contactId( body.elementsByTagName( "guid" ).item(0).toElement().text() );
|
||||
const QStringList info( data.value.toStringList() );
|
||||
QString contactId( body.elementsByTagName( "guid" ).item(0).toElement().text() );
|
||||
const QString groupId( info.value( 1 ) );
|
||||
|
||||
if( contactId.isEmpty() )
|
||||
{
|
||||
contactId = info.value( 0 );
|
||||
}
|
||||
|
||||
if( ! contactId.isEmpty() && ! groupId.isEmpty() )
|
||||
{
|
||||
@@ -1020,6 +1032,11 @@ void AddressBookService::parseSecureResult( SoapMessage *message )
|
||||
emit groupAdded( groupId, name );
|
||||
emit addressBookChanged( groupId, GroupAdded );
|
||||
}
|
||||
else if( ! name.isEmpty() )
|
||||
{
|
||||
kmWarning() << "Group add response did not include a group id; refreshing address book.";
|
||||
retrieveAddressBook();
|
||||
}
|
||||
}
|
||||
else if( data.type == "GroupDelete" )
|
||||
{
|
||||
@@ -1030,7 +1047,7 @@ void AddressBookService::parseSecureResult( SoapMessage *message )
|
||||
if( ! groupId.isEmpty() )
|
||||
{
|
||||
emit groupDeleted( groupId, name );
|
||||
emit addressBookChanged( name, GroupDeleted );
|
||||
emit addressBookChanged( groupId, GroupDeleted );
|
||||
}
|
||||
}
|
||||
else if( data.type == "GroupRename" )
|
||||
@@ -1043,7 +1060,7 @@ void AddressBookService::parseSecureResult( SoapMessage *message )
|
||||
if( ! groupId.isEmpty() && ! name.isEmpty() )
|
||||
{
|
||||
emit groupRenamed( groupId, name );
|
||||
emit addressBookChanged( name, GroupRenamed );
|
||||
emit addressBookChanged( groupId, GroupRenamed );
|
||||
}
|
||||
}
|
||||
else
|
||||
|
||||
@@ -73,7 +73,7 @@ class AddressBookService : public PassportLoginService
|
||||
// Put the Soap action to update the information about contact
|
||||
void contactUpdate( ContactProperty property, const QString &newValue );
|
||||
// Delete contact
|
||||
void deleteContact( const QString &contactId );
|
||||
void deleteContact( const QString &contactId, const QString &handle );
|
||||
// Delete contact from group
|
||||
void deleteContactFromGroup( const QString &contactId, const QString &groupId );
|
||||
// Delete group
|
||||
|
||||
@@ -335,7 +335,6 @@ void HttpSoapConnection::sendNextRequest()
|
||||
request.setHeader ( QNetworkRequest::ContentLengthHeader, contents.size() );
|
||||
request.setRawHeader( "Accept", "*/*" );
|
||||
request.setRawHeader( "User-Agent", "KMess/" KMESS_VERSION );
|
||||
request.setRawHeader( "Connection", "Keep-Alive" );
|
||||
request.setRawHeader( "Cache-Control", "no-cache" );
|
||||
|
||||
#ifdef KMESSTEST
|
||||
@@ -459,6 +458,24 @@ void HttpSoapConnection::slotRequestFinished( QNetworkReply *reply )
|
||||
const QString error ( reply->attribute( QNetworkRequest::HttpReasonPhraseAttribute ).toString() );
|
||||
QUrl redirectUrl = reply->attribute( QNetworkRequest::RedirectionTargetAttribute ).toUrl();
|
||||
|
||||
if( statusCode == 404
|
||||
&& currentRequest_->getEndPoint().contains( "storageservice/SchematizedStore.asmx", Qt::CaseInsensitive )
|
||||
&& currentRequest_->getAction().endsWith( "/GetProfile" )
|
||||
&& replyContents.isEmpty() )
|
||||
{
|
||||
kmWarning() << "Storage profile not available on the server; continuing without roaming profile data.";
|
||||
|
||||
reply->abort();
|
||||
reply->deleteLater();
|
||||
|
||||
delete currentRequest_;
|
||||
currentRequest_ = 0;
|
||||
isSending_ = false;
|
||||
|
||||
QTimer::singleShot( 250, this, SLOT(sendNextRequest()) );
|
||||
return;
|
||||
}
|
||||
|
||||
#ifdef KMESSDEBUG_HTTPSOAPCONNECTION_GENERAL
|
||||
bool requestSuccess = false;
|
||||
const QUrl replyUrl( reply->url() );
|
||||
@@ -582,6 +599,7 @@ void HttpSoapConnection::slotRequestFinished( QNetworkReply *reply )
|
||||
kmWarning() << "Request endpoint:" << currentRequest_->getEndPoint()
|
||||
<< "SOAPAction:" << currentRequest_->getAction()
|
||||
<< "request-size:" << currentRequest_->getMessage().size()
|
||||
<< "reply-url:" << reply->url()
|
||||
<< "redirect:" << redirectUrl
|
||||
<< "content-type:" << reply->header( QNetworkRequest::ContentTypeHeader ).toString();
|
||||
kmWarning() << "Reply contents:";
|
||||
|
||||
@@ -828,6 +828,10 @@ void PassportLoginService::sendSecureRequest( SoapMessage *message, const QStrin
|
||||
kmDebug() << "Token is valid, adding it to the request.";
|
||||
#endif
|
||||
|
||||
const QString requestTokenValue( requiredTokenName == "Storage" && tokenValue.startsWith( "t=" )
|
||||
? tokenValue.left( 22 )
|
||||
: tokenValue );
|
||||
|
||||
// Insert the token value within the SOAP message header
|
||||
QDomNodeList list;
|
||||
QDomElement header( message->getHeader().toElement() );
|
||||
@@ -863,11 +867,11 @@ void PassportLoginService::sendSecureRequest( SoapMessage *message, const QStrin
|
||||
// If there is a child text node, simply replace its text
|
||||
if( item.firstChild().nodeType() == QDomNode::TextNode )
|
||||
{
|
||||
item.firstChild().toText().setNodeValue( tokenValue );
|
||||
item.firstChild().toText().setNodeValue( requestTokenValue );
|
||||
}
|
||||
else
|
||||
{
|
||||
QDomText text( item.ownerDocument().createTextNode( tokenValue ) );
|
||||
QDomText text( item.ownerDocument().createTextNode( requestTokenValue ) );
|
||||
item.appendChild( text );
|
||||
}
|
||||
break;
|
||||
@@ -879,7 +883,7 @@ void PassportLoginService::sendSecureRequest( SoapMessage *message, const QStrin
|
||||
#ifdef KMESSDEBUG_PASSPORTLOGINSERVICE
|
||||
kmDebug() << "Ticket tag found!";
|
||||
#endif
|
||||
item.setAttribute( "passport", tokenValue );
|
||||
item.setAttribute( "passport", requestTokenValue );
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
/**
|
||||
* @brief URL of the Storage Service
|
||||
*/
|
||||
#define SERVICE_URL_STORAGE_SERVICE "https://m1.escargot.log1p.xyz/storageservice/SchematizedStore.asmx"
|
||||
#define SERVICE_URL_STORAGE_SERVICE "https://ds.escargot.nina.chat/storageservice/SchematizedStore.asmx"
|
||||
|
||||
static QDateTime parseServerIsoDate( const QString &value )
|
||||
{
|
||||
|
||||
@@ -785,6 +785,12 @@ QString KMessShared::htmlUnescape( const QString &string )
|
||||
*/
|
||||
void KMessShared::openBrowser( const QUrl &url )
|
||||
{
|
||||
if( url.isEmpty() || ! url.isValid() )
|
||||
{
|
||||
kmWarning() << "Refusing to open invalid URL:" << url;
|
||||
return;
|
||||
}
|
||||
|
||||
// Open the options
|
||||
KConfigGroup group = KMessConfig::instance()->getGlobalConfig( "General" );
|
||||
|
||||
@@ -842,7 +848,10 @@ void KMessShared::openBrowser( const QUrl &url )
|
||||
#ifdef KMESSDEBUG_SHARED_OPENEXTERNAL
|
||||
kmDebug() << "KDE default browser selected.";
|
||||
#endif
|
||||
QDesktopServices::openUrl( url );
|
||||
if( ! QDesktopServices::openUrl( url ) )
|
||||
{
|
||||
kmWarning() << "Unable to open URL with the desktop services:" << url;
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -496,10 +496,10 @@ void RichTextParser::parseMsnPlusString( QString &text )
|
||||
* @param showFormatting Whether to show or strip away MSN+ formatting tags
|
||||
* @param allowEmoticonLinks If false, the parser will never add links for adding an emoticon (such as for the chat history dialog)
|
||||
* @param handle If not null or empty, custom emoticons of this contact will be parsed
|
||||
* @param pendingEmoticonTags If the handle is specified, this must be too: this is a list of pending
|
||||
* @param pendingEmoticonTags If the handle is specified, this can be set too: this is a list of pending
|
||||
* custom emoticons which the contact specified by <code>handle</code> has sent to us.
|
||||
*/
|
||||
void RichTextParser::parseMsnString( QString &text, bool showEmoticons, bool showSmallEmoticons, bool showLinks, bool showFormatting, bool allowEmoticonLinks, const QString &handle, QStringList &pendingEmoticonTags )
|
||||
void RichTextParser::parseMsnString( QString &text, bool showEmoticons, bool showSmallEmoticons, bool showLinks, bool showFormatting, bool allowEmoticonLinks, const QString &handle, QStringList *pendingEmoticonTags )
|
||||
{
|
||||
// Remove all HTML
|
||||
KMessShared::htmlEscape( text );
|
||||
@@ -833,7 +833,10 @@ void RichTextParser::parseMsnString( QString &text, bool showEmoticons, bool sho
|
||||
}
|
||||
|
||||
placeholderId = "ce" + QString::number( ++lastPendingEmoticonId_ );
|
||||
pendingEmoticonTags.append( placeholderId );
|
||||
if( pendingEmoticonTags != nullptr )
|
||||
{
|
||||
pendingEmoticonTags->append( placeholderId );
|
||||
}
|
||||
|
||||
// Insert placeholder
|
||||
matched = regexp->cap( 0 );
|
||||
|
||||
@@ -81,7 +81,7 @@ class RichTextParser
|
||||
// Initialize the class
|
||||
static void initialize();
|
||||
// Return the given string with links and emoticons translated to HTML
|
||||
static void parseMsnString( QString &text, bool showEmoticons = true, bool showSmallEmoticons = true, bool showLinks = true, bool showFormatting = false, bool allowEmoticonLinks = true, const QString &handle = *((QString*)0), QStringList &pendingEmoticonTags = *((QStringList*)0) );
|
||||
static void parseMsnString( QString &text, bool showEmoticons = true, bool showSmallEmoticons = true, bool showLinks = true, bool showFormatting = false, bool allowEmoticonLinks = true, const QString &handle = QString(), QStringList *pendingEmoticonTags = nullptr );
|
||||
|
||||
|
||||
private: // Private static methods
|
||||
|
||||
Reference in New Issue
Block a user