Hello community, here is the log from the commit of package kdepimlibs4 for openSUSE:Factory checked in at 2014-10-16 18:11:22 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/kdepimlibs4 (Old) and /work/SRC/openSUSE:Factory/.kdepimlibs4.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "kdepimlibs4" Changes: -------- --- /work/SRC/openSUSE:Factory/kdepimlibs4/kdepimlibs4.changes 2014-09-18 07:57:35.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.kdepimlibs4.new/kdepimlibs4.changes 2014-10-16 18:11:27.000000000 +0200 @@ -1,0 +2,7 @@ +Sun Oct 12 11:59:13 UTC 2014 - tittiatc...@gmail.com + +- Update to 4.14.2 + * KDE 4.14.2 SC Bugfix Release + * See http://www.kde.org/announcements/announce-4.14.2.php + +------------------------------------------------------------------- Old: ---- kdepimlibs-4.14.1.tar.xz New: ---- kdepimlibs-4.14.2.tar.xz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ kdepimlibs4.spec ++++++ --- /var/tmp/diff_new_pack.U3TZZs/_old 2014-10-16 18:11:28.000000000 +0200 +++ /var/tmp/diff_new_pack.U3TZZs/_new 2014-10-16 18:11:28.000000000 +0200 @@ -17,7 +17,7 @@ Name: kdepimlibs4 -Version: 4.14.1 +Version: 4.14.2 Release: 0 Summary: KDE PIM Libraries License: LGPL-2.1+ ++++++ kdepimlibs-4.14.1.tar.xz -> kdepimlibs-4.14.2.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kdepimlibs-4.14.1/CMakeLists.txt new/kdepimlibs-4.14.2/CMakeLists.txt --- old/kdepimlibs-4.14.1/CMakeLists.txt 2014-09-10 22:48:29.000000000 +0200 +++ new/kdepimlibs-4.14.2/CMakeLists.txt 2014-10-09 22:09:43.000000000 +0200 @@ -7,7 +7,7 @@ ############### The kdepimlibs version (used e.g. in KdepimLibsConfig.cmake) ############### set(KDEPIMLIBS_VERSION_MAJOR 4) set(KDEPIMLIBS_VERSION_MINOR 14) -set(KDEPIMLIBS_VERSION_PATCH 1) +set(KDEPIMLIBS_VERSION_PATCH 2) set(KDEPIMLIBS_VERSION ${KDEPIMLIBS_VERSION_MAJOR}.${KDEPIMLIBS_VERSION_MINOR}.${KDEPIMLIBS_VERSION_PATCH}) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kdepimlibs-4.14.1/akonadi/agentfilterproxymodel.cpp new/kdepimlibs-4.14.2/akonadi/agentfilterproxymodel.cpp --- old/kdepimlibs-4.14.1/akonadi/agentfilterproxymodel.cpp 2014-09-10 22:48:29.000000000 +0200 +++ new/kdepimlibs-4.14.2/akonadi/agentfilterproxymodel.cpp 2014-10-09 22:09:43.000000000 +0200 @@ -44,6 +44,7 @@ QStringList mimeTypes; QStringList capabilities; QStringList excludeCapabilities; + bool filterAcceptRegExp(const QModelIndex &index, const QRegExp &filterRegExpStr); }; AgentFilterProxyModel::AgentFilterProxyModel(QObject *parent) @@ -84,20 +85,24 @@ invalidateFilter(); } -bool AgentFilterProxyModel::filterAcceptsRow(int row, const QModelIndex &) const +bool AgentFilterProxyModel::Private::filterAcceptRegExp(const QModelIndex &index, const QRegExp &filterRegExpStr) { - const QModelIndex index = sourceModel()->index(row, 0); - // First see if the name matches a set regexp filter. - if (!filterRegExp().isEmpty()) { - if (index.data(AgentTypeModel::IdentifierRole).toString().contains(filterRegExp())) { + if (!filterRegExpStr.isEmpty()) { + if (index.data(AgentTypeModel::IdentifierRole).toString().contains(filterRegExpStr)) { return true; - } else if (index.data().toString().contains(filterRegExp())) { + } else if (index.data().toString().contains(filterRegExpStr)) { return true; } else { return false; } } + return true; +} + +bool AgentFilterProxyModel::filterAcceptsRow(int row, const QModelIndex &) const +{ + const QModelIndex index = sourceModel()->index(row, 0); if (!d->mimeTypes.isEmpty()) { bool found = false; @@ -117,6 +122,7 @@ } if (found) { + found = d->filterAcceptRegExp(index, filterRegExp()); break; } } @@ -124,6 +130,8 @@ if (!found) { return false; } + } else { + return d->filterAcceptRegExp(index, filterRegExp()); } if (!d->capabilities.isEmpty()) { @@ -149,6 +157,8 @@ if (!found) { return false; + } else { + return d->filterAcceptRegExp(index, filterRegExp()); } } } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kdepimlibs-4.14.1/akonadi/calendar/freebusymanager.cpp new/kdepimlibs-4.14.2/akonadi/calendar/freebusymanager.cpp --- old/kdepimlibs-4.14.1/akonadi/calendar/freebusymanager.cpp 2014-09-10 22:48:29.000000000 +0200 +++ new/kdepimlibs-4.14.2/akonadi/calendar/freebusymanager.cpp 2014-10-09 22:09:43.000000000 +0200 @@ -888,7 +888,8 @@ job->ui()->setWindow(parentWidget); - connect(job, SIGNAL(result(KJob*)), SLOT(slotUploadFreeBusyResult(KJob*))); + //FIXME slot doesn't exist + //connect(job, SIGNAL(result(KJob*)), SLOT(slotUploadFreeBusyResult(KJob*))); } } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kdepimlibs-4.14.1/akonadi/calendar/publishdialog_base.ui new/kdepimlibs-4.14.2/akonadi/calendar/publishdialog_base.ui --- old/kdepimlibs-4.14.1/akonadi/calendar/publishdialog_base.ui 2014-09-10 22:48:29.000000000 +0200 +++ new/kdepimlibs-4.14.2/akonadi/calendar/publishdialog_base.ui 2014-10-09 22:09:43.000000000 +0200 @@ -10,7 +10,7 @@ <height>326</height> </rect> </property> - <layout class="QGridLayout" name="gridLayout"> + <layout class="QGridLayout" name="gridLayout_2"> <item row="0" column="0"> <widget class="QListWidget" name="mListWidget"> <property name="minimumSize"> @@ -27,7 +27,7 @@ </property> </widget> </item> - <item row="0" column="1" rowspan="3"> + <item row="0" column="1" rowspan="2"> <layout class="QVBoxLayout" name="verticalLayout_2"> <item> <layout class="QVBoxLayout" name="verticalLayout"> @@ -91,8 +91,8 @@ </layout> </item> <item row="1" column="0"> - <layout class="QHBoxLayout" name="horizontalLayout"> - <item> + <layout class="QGridLayout" name="gridLayout"> + <item row="0" column="0"> <widget class="QLabel" name="TextLabel1"> <property name="text"> <string comment="recipient name">Name:</string> @@ -102,7 +102,7 @@ </property> </widget> </item> - <item> + <item row="0" column="1"> <widget class="KLineEdit" name="mNameLineEdit"> <property name="toolTip"> <string>The recipient's name</string> @@ -118,11 +118,7 @@ </property> </widget> </item> - </layout> - </item> - <item row="2" column="0"> - <layout class="QHBoxLayout" name="horizontalLayout_2"> - <item> + <item row="1" column="0"> <widget class="QLabel" name="TextLabel2"> <property name="text"> <string comment="recipient email">Email:</string> @@ -132,7 +128,7 @@ </property> </widget> </item> - <item> + <item row="1" column="1"> <widget class="KLineEdit" name="mEmailLineEdit"> <property name="toolTip"> <string>The recipient's email address</string> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kdepimlibs-4.14.1/akonadi/tests/testsearchplugin/akonaditestsearchplugin.desktop new/kdepimlibs-4.14.2/akonadi/tests/testsearchplugin/akonaditestsearchplugin.desktop --- old/kdepimlibs-4.14.1/akonadi/tests/testsearchplugin/akonaditestsearchplugin.desktop 2014-09-10 22:48:29.000000000 +0200 +++ new/kdepimlibs-4.14.2/akonadi/tests/testsearchplugin/akonaditestsearchplugin.desktop 2014-10-09 22:09:43.000000000 +0200 @@ -16,6 +16,7 @@ Name[hu]=Akonadi teszt keresés bővítmény Name[ia]=Plug-in de Cerca de Test de Akonadi Name[it]=Estensione di test per la ricerca di Akonadi +Name[ja]=Akonadi テスト検索プラグイン Name[ko]=Akonadi 테스트 검색 플러그인 Name[nb]=Akonadi test-tillegg for søk Name[nds]=Akonadi-Testsöökmoduul diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kdepimlibs-4.14.1/kabc/plugins/dir/dir.desktop new/kdepimlibs-4.14.2/kabc/plugins/dir/dir.desktop --- old/kdepimlibs-4.14.1/kabc/plugins/dir/dir.desktop 2014-09-10 22:48:29.000000000 +0200 +++ new/kdepimlibs-4.14.2/kabc/plugins/dir/dir.desktop 2014-10-09 22:09:43.000000000 +0200 @@ -68,6 +68,7 @@ Comment[hu]=Névjegyek elérését biztosítja. Minden névjegy külön fájlban található, egy adott mappában. Támogatja a szabványos vCard fájlt és az elérhető bővítményektől függően más formátumokat. Comment[ia]=Il provide accessos a contactos, cata un immagazinate in un singule file, in un date dossier. Il supporta file de standard VCard e altere formatos dependente ab le disponibilitate de plugins. Comment[it]=Fornisce accesso a contatti, ciascuno dei quali memorizzato in un singolo file in una cartella data. Gestisce file in standard vCard e altri formati in base alle estensioni disponibili. +Comment[ja]=それぞれが単一のファイルに保存されている任意のフォルダ内の連絡先へのアクセスを提供します。標準の VCard ファイルと、利用可能なプラグインに応じたフォーマットをサポートします。 Comment[kk]=Көрсетілген қапшықта, әрбірі бөлек файлда сақталған контакттарға қатынау мүмкіндігін береді. Плагині бар-жоғына қарай, vCard және басқа да пішімдерді тани алады. Comment[ko]=주어진 폴더에 있는 개별 파일로 저장된 연락처에 접근할 수 있도록 합니다. 표준 vCard 파일 및 플러그인에 의한 추가 형식 지원이 가능합니다. Comment[nb]=Gir tilgang til kontakter, lagret hver for seg i en enkelt fil, i en gitt mappe. Støtter standard vCard og andre formater avhengig av tilgjengelige programtillegg. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kdepimlibs-4.14.1/kabc/plugins/file/file.desktop new/kdepimlibs-4.14.2/kabc/plugins/file/file.desktop --- old/kdepimlibs-4.14.1/kabc/plugins/file/file.desktop 2014-09-10 22:48:29.000000000 +0200 +++ new/kdepimlibs-4.14.2/kabc/plugins/file/file.desktop 2014-10-09 22:09:43.000000000 +0200 @@ -73,6 +73,7 @@ Comment[hu]=Névjegyek elérését biztosítja. Minden névjegy egy közös helyi fájlban található. Támogatja a szabványos vCard fájlt és az elérhető bővítményektől függően más formátumokat. Comment[ia]=Il provide accessos a contactos immagazinate in un singule file local. Il supporta files de standard VCard e altere formatos in dependentia de plugins disponibile. Comment[it]=Fornisce accesso a contatti memorizzati in un singolo file locale. Gestisce file in standard vCard e altri formati in base alle estensioni disponibili. +Comment[ja]=単一のローカルファイルに保存されている連絡先へのアクセスを提供します。標準の VCard ファイルと、利用可能なプラグインに応じたフォーマットをサポートします。 Comment[kk]=Бір файлда сақталған контакттарға қатынау мүмкіндігін береді. Плагині бар-жоғына қарай, vCard және басқа да пішімдерді тани алады. Comment[ko]=단일 로컬 파일로 저장된 연락처에 접근할 수 있도록 합니다 표준 vCard 파일 및 플러그인에 의한 추가 형식 지원이 가능합니다. Comment[nb]=Gir tilgang til kontakter, lagret i en enkelt lokal fil. Støtter standard vCard og andre formater avhengig av tilgjengelige programtillegg. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kdepimlibs-4.14.1/kabc/plugins/net/net.desktop new/kdepimlibs-4.14.2/kabc/plugins/net/net.desktop --- old/kdepimlibs-4.14.1/kabc/plugins/net/net.desktop 2014-09-10 22:48:29.000000000 +0200 +++ new/kdepimlibs-4.14.2/kabc/plugins/net/net.desktop 2014-10-09 22:09:43.000000000 +0200 @@ -73,6 +73,7 @@ Comment[hu]=Távoli fájlokban található névjegyek elérését biztosítja a KDE KIO hálózati keretrendszeren keresztül. Támogatja a szabványos vCard fájlt és az elérhető bővítményektől függően más formátumokat. Comment[ia]=Il provide accesso a contactos in files remote usante le schema de rete de KDE KIO. Il suppporta files de standard VCard e altere formatos in dependentia de plugins disponibile. Comment[it]=Fornisce accesso a contatti su file remoti usando KIO, l'infrastruttura di rete di KDE. Gestisce file in standard vCard e altri formati in base alle estensioni disponibili. +Comment[ja]=KDE のネットワークフレームワーク KIO を使って、リモートファイルに保存されている連絡先へのアクセスを提供します。標準の VCard ファイルと、利用可能なプラグインに応じたフォーマットをサポートします。 Comment[kk]=KDE-нің KIO желі құрылымы арқылы қашықтағы файлдарда сақталған контакттарға қатынау мүмкіндігін береді. Плагині бар-жоғына қарай, vCard және басқа да пішімдерді тани алады. Comment[ko]=KDE 네트워크 프레임워크 KIO를 통하여 원격 파일에 저장된 연락처에 접근할 수 있도록 합니다. 표준 vCard 파일 및 플러그인에 의한 추가 형식 지원이 가능합니다. Comment[nb]=Gir tilgang til kontakter i nettverksfiler, ved bruk av KDEs rammeverk KIO for nettverk. Støtter standard vCard og andre formater avhengig av tilgjengelige programtillegg. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kdepimlibs-4.14.1/kalarmcal/alarmtext.cpp new/kdepimlibs-4.14.2/kalarmcal/alarmtext.cpp --- old/kdepimlibs-4.14.1/kalarmcal/alarmtext.cpp 2014-09-10 22:48:29.000000000 +0200 +++ new/kdepimlibs-4.14.2/kalarmcal/alarmtext.cpp 2014-10-09 22:09:43.000000000 +0200 @@ -32,6 +32,14 @@ #include <kglobal.h> #include <QStringList> +namespace +{ +const int MAIL_FROM_LINE = 0; // line number containing From in email text +const int MAIL_TO_LINE = 1; // line number containing To in email text +const int MAIL_CC_LINE = 2; // line number containing CC in email text +const int MAIL_MIN_LINES = 4; // allow for From, To, no CC, Date, Subject +} + namespace KAlarmCal { @@ -416,12 +424,12 @@ Private::initialise(); const QStringList lines = text.split(QLatin1Char('\n'), QString::SkipEmptyParts); const int maxn = lines.count(); - if (maxn >= 4 - && lines[0].startsWith(Private::mFromPrefixEn) - && lines[1].startsWith(Private::mToPrefixEn)) + if (maxn >= MAIL_MIN_LINES + && lines[MAIL_FROM_LINE].startsWith(Private::mFromPrefixEn) + && lines[MAIL_TO_LINE].startsWith(Private::mToPrefixEn)) { - int n = 2; - if (lines[2].startsWith(Private::mCcPrefixEn)) + int n = MAIL_CC_LINE; + if (lines[MAIL_CC_LINE].startsWith(Private::mCcPrefixEn)) ++n; if (maxn > n + 1 && lines[n].startsWith(Private::mDatePrefixEn) @@ -429,10 +437,10 @@ { Private::setUpTranslations(); QString dispText; - dispText = Private::mFromPrefix + lines[0].mid(Private::mFromPrefixEn.length()) + QLatin1Char('\n'); - dispText += Private::mToPrefix + lines[1].mid(Private::mToPrefixEn.length()) + QLatin1Char('\n'); - if (n == 3) - dispText += Private::mCcPrefix + lines[2].mid(Private::mCcPrefixEn.length()) + QLatin1Char('\n'); + dispText = Private::mFromPrefix + lines[MAIL_FROM_LINE].mid(Private::mFromPrefixEn.length()) + QLatin1Char('\n'); + dispText += Private::mToPrefix + lines[MAIL_TO_LINE].mid(Private::mToPrefixEn.length()) + QLatin1Char('\n'); + if (n > MAIL_CC_LINE) + dispText += Private::mCcPrefix + lines[MAIL_CC_LINE].mid(Private::mCcPrefixEn.length()) + QLatin1Char('\n'); dispText += Private::mDatePrefix + lines[n].mid(Private::mDatePrefixEn.length()) + QLatin1Char('\n'); dispText += Private::mSubjectPrefix + lines[n+1].mid(Private::mSubjectPrefixEn.length()); int i = text.indexOf(Private::mSubjectPrefixEn); @@ -456,12 +464,12 @@ Private::setUpTranslations(); const QStringList lines = text.split(QLatin1Char('\n'), QString::SkipEmptyParts); const int maxn = lines.count(); - if (maxn >= 4 - && lines[0].startsWith(Private::mFromPrefix) - && lines[1].startsWith(Private::mToPrefix)) + if (maxn >= MAIL_MIN_LINES + && lines[MAIL_FROM_LINE].startsWith(Private::mFromPrefix) + && lines[MAIL_TO_LINE].startsWith(Private::mToPrefix)) { - int n = 2; - if (lines[2].startsWith(Private::mCcPrefix)) + int n = MAIL_CC_LINE; + if (lines[MAIL_CC_LINE].startsWith(Private::mCcPrefix)) ++n; if (maxn > n + 1 && lines[n].startsWith(Private::mDatePrefix) @@ -469,10 +477,10 @@ { // Format the email into a text alarm QString calText; - calText = Private::mFromPrefixEn + lines[0].mid(Private::mFromPrefix.length()) + QLatin1Char('\n'); - calText += Private::mToPrefixEn + lines[1].mid(Private::mToPrefix.length()) + QLatin1Char('\n'); - if (n == 3) - calText += Private::mCcPrefixEn + lines[2].mid(Private::mCcPrefix.length()) + QLatin1Char('\n'); + calText = Private::mFromPrefixEn + lines[MAIL_FROM_LINE].mid(Private::mFromPrefix.length()) + QLatin1Char('\n'); + calText += Private::mToPrefixEn + lines[MAIL_TO_LINE].mid(Private::mToPrefix.length()) + QLatin1Char('\n'); + if (n > MAIL_CC_LINE) + calText += Private::mCcPrefixEn + lines[MAIL_CC_LINE].mid(Private::mCcPrefix.length()) + QLatin1Char('\n'); calText += Private::mDatePrefixEn + lines[n].mid(Private::mDatePrefix.length()) + QLatin1Char('\n'); calText += Private::mSubjectPrefixEn + lines[n+1].mid(Private::mSubjectPrefix.length()); int i = text.indexOf(Private::mSubjectPrefix); @@ -525,12 +533,12 @@ { setUpTranslations(); const int maxn = lines.count(); - if (maxn >= 4 - && lines[0].startsWith(mFromPrefix) - && lines[1].startsWith(mToPrefix)) + if (maxn >= MAIL_MIN_LINES + && lines[MAIL_FROM_LINE].startsWith(mFromPrefix) + && lines[MAIL_TO_LINE].startsWith(mToPrefix)) { - int n = 2; - if (lines[2].startsWith(mCcPrefix)) + int n = MAIL_CC_LINE; + if (lines[MAIL_CC_LINE].startsWith(mCcPrefix)) ++n; if (maxn > n + 1 && lines[n].startsWith(mDatePrefix) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kdepimlibs-4.14.1/kalarmcal/kaevent.cpp new/kdepimlibs-4.14.2/kalarmcal/kaevent.cpp --- old/kdepimlibs-4.14.1/kalarmcal/kaevent.cpp 2014-09-10 22:48:29.000000000 +0200 +++ new/kdepimlibs-4.14.2/kalarmcal/kaevent.cpp 2014-10-09 22:09:43.000000000 +0200 @@ -158,7 +158,6 @@ const Alarm* alarm; #endif QString cleanText; // text or audio file name - uint emailFromId; QFont font; QColor bgColour, fgColour; float soundVolume; @@ -166,11 +165,12 @@ int fadeSeconds; int repeatSoundPause; int nextRepeat; - bool speak; + uint emailFromId; KAEventPrivate::AlarmType type; KAAlarm::Action action; int displayingFlags; KAEvent::ExtraActionOptions extraActionOptions; + bool speak; bool defaultFont; bool isEmailText; bool commandScript; @@ -261,13 +261,13 @@ static bool convertRepetition(const KCalCore::Event::Ptr&); static bool convertStartOfDay(const KCalCore::Event::Ptr&); static DateTime readDateTime(const KCalCore::Event::Ptr&, bool dateOnly, DateTime& start); - static void readAlarms(const KCalCore::Event::Ptr&, void* alarmMap, bool cmdDisplay = false); + static void readAlarms(const KCalCore::Event::Ptr&, AlarmMap*, bool cmdDisplay = false); static void readAlarm(const KCalCore::Alarm::Ptr&, AlarmData&, bool audioMain, bool cmdDisplay = false); #else static bool convertRepetition(KCal::Event*); static bool convertStartOfDay(KCal::Event*); static DateTime readDateTime(const KCal::Event*, bool dateOnly, DateTime& start); - static void readAlarms(const KCal::Event*, void* alarmMap, bool cmdDisplay = false); + static void readAlarms(const KCal::Event*, AlarmMap*, bool cmdDisplay = false); static void readAlarm(const KCal::Alarm*, AlarmData&, bool audioMain, bool cmdDisplay = false); #endif @@ -1123,7 +1123,7 @@ // alarm in the event (if it has expired and then been deferred) if (!set) { - mActionSubType = (KAEvent::SubAction)data.action; + mActionSubType = static_cast<KAEvent::SubAction>(data.action); mText = (mActionSubType == KAEvent::COMMAND) ? data.cleanText.trimmed() : data.cleanText; switch (data.action) { @@ -1249,7 +1249,7 @@ case KAEvent::COMMAND: case KAEvent::EMAIL: case KAEvent::AUDIO: - mActionSubType = (KAEvent::SubAction)action; + mActionSubType = static_cast<KAEvent::SubAction>(action); break; default: mActionSubType = KAEvent::MESSAGE; @@ -3801,7 +3801,7 @@ KAAlarm::Private* const al_d = al.d; if (mAlarmCount) { - al_d->mActionType = (KAAlarm::Action)mActionSubType; + al_d->mActionType = static_cast<KAAlarm::Action>(mActionSubType); al_d->mRepeatAtLogin = false; al_d->mDeferred = false; switch (type) @@ -4191,18 +4191,31 @@ start.setDateOnly(true); } DateTime next = start; + const int SZ_YEAR = 4; // number of digits in year value + const int SZ_MONTH = 2; // number of digits in month value + const int SZ_DAY = 2; // number of digits in day value + const int SZ_DATE = SZ_YEAR + SZ_MONTH + SZ_DAY; // total size of date value + const int IX_TIME = SZ_DATE + 1; // offset to time value + const int SZ_HOUR = 2; // number of digits in hour value + const int SZ_MIN = 2; // number of digits in minute value + const int SZ_SEC = 2; // number of digits in second value + const int SZ_TIME = SZ_HOUR + SZ_MIN + SZ_SEC; // total size of time value const QString prop = event->customProperty(KACalendar::APPNAME, KAEventPrivate::NEXT_RECUR_PROPERTY); - if (prop.length() >= 8) + if (prop.length() >= SZ_DATE) { // The next due recurrence time is specified - const QDate d(prop.left(4).toInt(), prop.mid(4,2).toInt(), prop.mid(6,2).toInt()); + const QDate d(prop.left(SZ_YEAR).toInt(), + prop.mid(SZ_YEAR, SZ_MONTH).toInt(), + prop.mid(SZ_YEAR + SZ_MONTH, SZ_DAY).toInt()); if (d.isValid()) { - if (dateOnly && prop.length() == 8) + if (dateOnly && prop.length() == SZ_DATE) next.setDate(d); - else if (!dateOnly && prop.length() == 15 && prop[8] == QLatin1Char('T')) + else if (!dateOnly && prop.length() == IX_TIME + SZ_TIME && prop[SZ_DATE] == QLatin1Char('T')) { - const QTime t(prop.mid(9,2).toInt(), prop.mid(11,2).toInt(), prop.mid(13,2).toInt()); + const QTime t(prop.mid(IX_TIME, SZ_HOUR).toInt(), + prop.mid(IX_TIME + SZ_HOUR, SZ_MIN).toInt(), + prop.mid(IX_TIME + SZ_HOUR + SZ_MIN, SZ_SEC).toInt()); if (t.isValid()) { next.setDate(d); @@ -4221,12 +4234,11 @@ * Reply = map of alarm data, indexed by KAAlarm::Type */ #ifndef KALARMCAL_USE_KRESOURCES -void KAEventPrivate::readAlarms(const Event::Ptr& event, void* almap, bool cmdDisplay) +void KAEventPrivate::readAlarms(const Event::Ptr& event, AlarmMap* alarmMap, bool cmdDisplay) #else -void KAEventPrivate::readAlarms(const Event* event, void* almap, bool cmdDisplay) +void KAEventPrivate::readAlarms(const Event* event, AlarmMap* alarmMap, bool cmdDisplay) #endif { - AlarmMap* alarmMap = (AlarmMap*)almap; const Alarm::List alarms = event->alarms(); // Check if it's an audio event with no display alarm diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kdepimlibs-4.14.1/kcalcore/icalformat_p.cpp new/kdepimlibs-4.14.2/kcalcore/icalformat_p.cpp --- old/kdepimlibs-4.14.1/kcalcore/icalformat_p.cpp 2014-09-10 22:48:29.000000000 +0200 +++ new/kdepimlibs-4.14.2/kcalcore/icalformat_p.cpp 2014-10-09 22:09:43.000000000 +0200 @@ -1196,11 +1196,14 @@ break; case ICAL_X_PROPERTY: { - const KDateTime dateTime = readICalDateTimeProperty(p, tzlist); - if (dateTime.isValid()) { - todo->setDtRecurrence(dateTime); - } else { - kDebug() << "Invalid dateTime"; + const char *name = icalproperty_get_x_name( p ); + if (QLatin1String(name) == QLatin1String("X-KDE-LIBKCAL-DTRECURRENCE")) { + const KDateTime dateTime = readICalDateTimeProperty(p, tzlist); + if (dateTime.isValid()) { + todo->setDtRecurrence(dateTime); + } else { + kDebug() << "Invalid dateTime"; + } } } break; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kdepimlibs-4.14.1/kpimidentities/signature.cpp new/kdepimlibs-4.14.2/kpimidentities/signature.cpp --- old/kdepimlibs-4.14.1/kpimidentities/signature.cpp 2014-09-10 22:48:29.000000000 +0200 +++ new/kdepimlibs-4.14.2/kpimidentities/signature.cpp 2014-10-09 22:09:43.000000000 +0200 @@ -452,44 +452,45 @@ } // Insert the signature and newlines depending on where it was inserted. - bool hackForCursorsAtEnd = false; - int oldCursorPos = -1; + int newCursorPos = -1; + QString headSep; + QString tailSep; if ( placement == Signature::End ) { - + // There is one special case when re-setting the old cursor: The cursor + // was at the end. In this case, QTextEdit has no way to know + // if the signature was added before or after the cursor, and just + // decides that it was added before (and the cursor moves to the end, + // but it should not when appending a signature). See bug 167961 if ( oldCursor.position() == textEdit->toPlainText().length() ) { - hackForCursorsAtEnd = true; - oldCursorPos = oldCursor.position(); + newCursorPos = oldCursor.position(); } - if ( isHtml ) { - textEdit->insertHtml( lineSep + signature ); - } else { - textEdit->insertPlainText( lineSep + signature ); + headSep = lineSep; + } else if ( placement == Signature::Start ) { + // When prepending signatures, add a couple of new lines before + // the signature, and move the cursor to the beginning of the QTextEdit. + // People tends to insert new text there. + newCursorPos = 0; + headSep = lineSep + lineSep; + if ( !isCursorAtEndOfLine( cursor ) ) { + tailSep = lineSep; } - } else if ( placement == Signature::Start || placement == Signature::AtCursor ) { - if ( isHtml ) { - if ( isCursorAtEndOfLine( cursor ) ) { - textEdit->insertHtml( signature ); - } else { - textEdit->insertHtml( signature + lineSep ); - } - } else { - if ( isCursorAtEndOfLine( cursor ) ) { - textEdit->insertPlainText( signature ); - } else { - textEdit->insertPlainText( signature + lineSep ); - } + } else if ( placement == Signature::AtCursor ) { + if ( !isCursorAtEndOfLine( cursor ) ) { + tailSep = lineSep; } } + const QString full_signature = headSep + signature + tailSep; + if ( isHtml ) { + textEdit->insertHtml( full_signature ); + } else { + textEdit->insertPlainText( full_signature ); + } + cursor.endEditBlock(); - // There is one special case when re-setting the old cursor: The cursor - // was at the end. In this case, QTextEdit has no way to know - // if the signature was added before or after the cursor, and just decides - // that it was added before (and the cursor moves to the end, but it should - // not when appending a signature). See bug 167961 - if ( hackForCursorsAtEnd ) { - oldCursor.setPosition( oldCursorPos ); + if ( newCursorPos != -1 ) { + oldCursor.setPosition( newCursorPos ); } textEdit->setTextCursor( oldCursor ); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kdepimlibs-4.14.1/kpimidentities/signature.h new/kdepimlibs-4.14.2/kpimidentities/signature.h --- old/kdepimlibs-4.14.1/kpimidentities/signature.h 2014-09-10 22:48:29.000000000 +0200 +++ new/kdepimlibs-4.14.2/kpimidentities/signature.h 2014-10-09 22:09:43.000000000 +0200 @@ -232,7 +232,9 @@ typedef QFlags<AddedTextFlag> AddedText; /** Inserts this signature into the given text edit. - * The cursor position is preserved. + * If the signature is inserted at the beginning, a couple of new + * lines will be inserted before it, and the cursor is moved to + * the beginning. Otherwise, the cursor position is preserved. * For undo/redo, this is treated as one operation. * * Rich text mode of the text edit will be enabled if the signature is in @@ -261,7 +263,9 @@ /** * Inserts this given signature into the given text edit. - * The cursor position is preserved. + * If the signature is inserted at the beginning, a couple of new + * lines will be inserted before it, and the cursor is moved to + * the beginning. Otherwise, the cursor position is preserved. * A leading or trailing newline is also added automatically, depending on * the placement. * For undo/redo, this is treated as one operation. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kdepimlibs-4.14.1/kpimidentities/tests/signaturetest.cpp new/kdepimlibs-4.14.2/kpimidentities/tests/signaturetest.cpp --- old/kdepimlibs-4.14.1/kpimidentities/tests/signaturetest.cpp 2014-09-10 22:48:29.000000000 +0200 +++ new/kdepimlibs-4.14.2/kpimidentities/tests/signaturetest.cpp 2014-10-09 22:09:43.000000000 +0200 @@ -90,12 +90,13 @@ sig.setEnabledSignature( true ); sig.setText( QLatin1String("Hello World") ); - // Test inserting signature at start, with seperators + // Test inserting signature at start, with seperators. Make sure two new + // lines are inserted before the signature edit.setPlainText( QLatin1String("Bla Bla") ); sig.insertIntoTextEdit( Signature::Start, Signature::AddSeparator | Signature::AddNewLines, &edit ); QVERIFY( edit.textMode() == KRichTextEdit::Plain ); - QCOMPARE( edit.toPlainText(), QLatin1String( "-- \nHello World\nBla Bla" ) ); + QCOMPARE( edit.toPlainText(), QLatin1String( "\n\n-- \nHello World\nBla Bla" ) ); // Test inserting signature at end. make sure cursor position is preserved edit.clear(); @@ -157,10 +158,10 @@ sig.insertIntoTextEdit( Signature::End, Signature::AddSeparator | Signature::AddNewLines, &edit ); QCOMPARE( edit.textCursor().position(), 0 ); - // OTOH, when prepending a sig, the cursor should be at the end + // When prepending a sig, the cursor should also be at the start, see bug 211634 edit.clear(); sig.insertIntoTextEdit( Signature::Start, Signature::AddSeparator | Signature::AddNewLines, &edit ); - QCOMPARE( edit.textCursor().position(), 7 ); // "-- \nBLA" + QCOMPARE( edit.textCursor().position(), 0 ); } // Make writeConfig() public, we need it -- To unsubscribe, e-mail: opensuse-commit+unsubscr...@opensuse.org For additional commands, e-mail: opensuse-commit+h...@opensuse.org