diff --git a/core/handlers/messagehandler.cpp b/core/handlers/messagehandler.cpp index 559bee3..0555873 100644 --- a/core/handlers/messagehandler.cpp +++ b/core/handlers/messagehandler.cpp @@ -233,7 +233,11 @@ std::tuple Core::MessageHandler::getOriginalPendingMessa std::map::const_iterator itrC = pendingCorrectionMessages.find(id); if (itrC != pendingCorrectionMessages.end()) { - std::get<1>(result) = itrC->second; + if (itrC->second.size() > 0) { + std::get<1>(result) = itrC->second; + } else { + std::get<1>(result) = itr->first; + } pendingCorrectionMessages.erase(itrC); } else { std::get<1>(result) = itr->first; diff --git a/core/networkaccess.cpp b/core/networkaccess.cpp index 7c55e19..22bb7a2 100644 --- a/core/networkaccess.cpp +++ b/core/networkaccess.cpp @@ -443,7 +443,7 @@ QString Core::NetworkAccess::getFileRemoteUrl(const QString& path) try { p = storage.getUrl(p); } catch (const Archive::NotFound& err) { - + p = ""; } catch (...) { throw; } diff --git a/core/passwordStorageEngines/wrappers/kwallet.cpp b/core/passwordStorageEngines/wrappers/kwallet.cpp index f5e7cb5..d899985 100644 --- a/core/passwordStorageEngines/wrappers/kwallet.cpp +++ b/core/passwordStorageEngines/wrappers/kwallet.cpp @@ -1,3 +1,21 @@ +/* + * Squawk messenger. + * Copyright (C) 2019 Yury Gubich + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + #include extern "C" KWallet::Wallet* openWallet(const QString &name, WId w, KWallet::Wallet::OpenType ot = KWallet::Wallet::Synchronous) { diff --git a/plugins/colorschemetools.cpp b/plugins/colorschemetools.cpp index 0288b28..ea2c23e 100644 --- a/plugins/colorschemetools.cpp +++ b/plugins/colorschemetools.cpp @@ -1,3 +1,21 @@ +/* + * Squawk messenger. + * Copyright (C) 2019 Yury Gubich + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + #include #include #include diff --git a/plugins/openfilemanagerwindowjob.cpp b/plugins/openfilemanagerwindowjob.cpp index 904fbcf..4335410 100644 --- a/plugins/openfilemanagerwindowjob.cpp +++ b/plugins/openfilemanagerwindowjob.cpp @@ -1,3 +1,21 @@ +/* + * Squawk messenger. + * Copyright (C) 2019 Yury Gubich + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + #include #include #include diff --git a/shared/exception.cpp b/shared/exception.cpp index 342593c..3dee9b3 100644 --- a/shared/exception.cpp +++ b/shared/exception.cpp @@ -28,5 +28,6 @@ Utils::Exception::~Exception() const char* Utils::Exception::what() const noexcept( true ) { - return getMessage().c_str(); + std::string* msg = new std::string(getMessage()); + return msg->c_str(); } diff --git a/shared/pathcheck.cpp b/shared/pathcheck.cpp index 1929387..c32f96c 100644 --- a/shared/pathcheck.cpp +++ b/shared/pathcheck.cpp @@ -1,3 +1,21 @@ +/* + * Squawk messenger. + * Copyright (C) 2019 Yury Gubich + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + #include "pathcheck.h" QRegularExpression squawk("^squawk:\\/\\/"); diff --git a/shared/pathcheck.h b/shared/pathcheck.h index 62dcaeb..3ca612b 100644 --- a/shared/pathcheck.h +++ b/shared/pathcheck.h @@ -1,3 +1,21 @@ +/* + * Squawk messenger. + * Copyright (C) 2019 Yury Gubich + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + #ifndef PATHCHECK_H #define PATHCHECK_H diff --git a/ui/widgets/conversation.cpp b/ui/widgets/conversation.cpp index da3d187..ab5f0c5 100644 --- a/ui/widgets/conversation.cpp +++ b/ui/widgets/conversation.cpp @@ -513,7 +513,8 @@ void Conversation::onFeedContext(const QPoint& pos) }); } - if (item->getOutgoing()) { + //the only mandatory condition - is for the message to be outgoing, the rest is just a good intention on the server + if (item->getOutgoing() && index.row() < 100 && item->getTime().daysTo(QDateTime::currentDateTimeUtc()) < 20) { showMenu = true; QAction* edit = contextMenu->addAction(Shared::icon("edit-rename"), tr("Edit")); connect(edit, &QAction::triggered, this, std::bind(&Conversation::onMessageEditRequested, this, id)); diff --git a/ui/widgets/settings/pageappearance.cpp b/ui/widgets/settings/pageappearance.cpp index f2bf53e..64d6de4 100644 --- a/ui/widgets/settings/pageappearance.cpp +++ b/ui/widgets/settings/pageappearance.cpp @@ -1,3 +1,21 @@ +/* + * Squawk messenger. + * Copyright (C) 2019 Yury Gubich + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + #include "pageappearance.h" #include "ui_pageappearance.h" diff --git a/ui/widgets/settings/pageappearance.h b/ui/widgets/settings/pageappearance.h index 80efd85..c182ea2 100644 --- a/ui/widgets/settings/pageappearance.h +++ b/ui/widgets/settings/pageappearance.h @@ -1,3 +1,21 @@ +/* + * Squawk messenger. + * Copyright (C) 2019 Yury Gubich + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + #ifndef PAGEAPPEARANCE_H #define PAGEAPPEARANCE_H diff --git a/ui/widgets/settings/pagegeneral.cpp b/ui/widgets/settings/pagegeneral.cpp index a546bd0..9ed46a2 100644 --- a/ui/widgets/settings/pagegeneral.cpp +++ b/ui/widgets/settings/pagegeneral.cpp @@ -1,3 +1,21 @@ +/* + * Squawk messenger. + * Copyright (C) 2019 Yury Gubich + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + #include "pagegeneral.h" #include "ui_pagegeneral.h" diff --git a/ui/widgets/settings/pagegeneral.h b/ui/widgets/settings/pagegeneral.h index ec00bba..7f58d71 100644 --- a/ui/widgets/settings/pagegeneral.h +++ b/ui/widgets/settings/pagegeneral.h @@ -1,3 +1,21 @@ +/* + * Squawk messenger. + * Copyright (C) 2019 Yury Gubich + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + #ifndef PAGEGENERAL_H #define PAGEGENERAL_H diff --git a/ui/widgets/settings/settings.cpp b/ui/widgets/settings/settings.cpp index 27401bb..cf5e905 100644 --- a/ui/widgets/settings/settings.cpp +++ b/ui/widgets/settings/settings.cpp @@ -1,3 +1,21 @@ +/* + * Squawk messenger. + * Copyright (C) 2019 Yury Gubich + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + #include "settings.h" #include "ui_settings.h" diff --git a/ui/widgets/settings/settings.h b/ui/widgets/settings/settings.h index 5a6b37c..689e0ce 100644 --- a/ui/widgets/settings/settings.h +++ b/ui/widgets/settings/settings.h @@ -1,3 +1,21 @@ +/* + * Squawk messenger. + * Copyright (C) 2019 Yury Gubich + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + #ifndef SETTINGS_H #define SETTINGS_H diff --git a/ui/widgets/settings/settingslist.cpp b/ui/widgets/settings/settingslist.cpp index 3a5e2cb..ee2e3ed 100644 --- a/ui/widgets/settings/settingslist.cpp +++ b/ui/widgets/settings/settingslist.cpp @@ -1,3 +1,21 @@ +/* + * Squawk messenger. + * Copyright (C) 2019 Yury Gubich + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + #include "settingslist.h" SettingsList::SettingsList(QWidget* parent): diff --git a/ui/widgets/settings/settingslist.h b/ui/widgets/settings/settingslist.h index a51fc3a..64c9d57 100644 --- a/ui/widgets/settings/settingslist.h +++ b/ui/widgets/settings/settingslist.h @@ -1,3 +1,21 @@ +/* + * Squawk messenger. + * Copyright (C) 2019 Yury Gubich + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + #ifndef UI_SETTINGSLIST_H #define UI_SETTINGSLIST_H