File 4_7_BRANCH.diff of Package kdelibs4.1362
--- a/BRANCH_STATUS
+++ b/BRANCH_STATUS
@@ -0,0 +1,2 @@
+current HEAD: 6606337b9bdf98111276d0fd3d803a644462cb28
+git diff v4.7.2..origin/KDE/4.7
diff --git a/includes/CMakeLists.txt b/includes/CMakeLists.txt
index a967a92..1c6907e 100644
--- a/includes/CMakeLists.txt
+++ b/includes/CMakeLists.txt
@@ -103,6 +103,7 @@ install( FILES
KCharMacroExpander
KCharSelect
KCharsets
+ KCheckableProxyModel
KCmdLineArgs
KCmdLineOptions
KCodecs
@@ -433,6 +434,7 @@ install( FILES
KUser
KUserGroup
KVBox
+ KViewStateMaintainer
KWindowInfo
KWindowSystem
KWordMacroExpander
@@ -830,7 +832,6 @@ DESTINATION ${INCLUDE_INSTALL_DIR}/KDE/KSettings COMPONENT Devel)
install( FILES
KTextEditor/Attribute
- KTextEditor/ContainerInterface
KTextEditor/CodeCompletionInterface
KTextEditor/CodeCompletionModel
KTextEditor/CodeCompletionModelControllerInterface
@@ -847,15 +848,15 @@ install( FILES
KTextEditor/Factory
KTextEditor/HighlightInterface
KTextEditor/MarkInterface
+ KTextEditor/ModificationInterface
KTextEditor/MovingCursor
KTextEditor/MovingInterface
KTextEditor/MovingRange
- KTextEditor/ModificationInterface
+ KTextEditor/ParameterizedSessionConfigInterface
KTextEditor/Plugin
KTextEditor/Range
KTextEditor/SearchInterface
KTextEditor/SessionConfigInterface
- KTextEditor/ParameterizedSessionConfigInterface
KTextEditor/SmartCursor
KTextEditor/SmartCursorNotifier
KTextEditor/SmartCursorWatcher
@@ -896,8 +897,9 @@ install( FILES
Solid/DeviceNotifier
Solid/DvbInterface
Solid/GenericInterface
- Solid/Networking
Solid/NetworkInterface
+ Solid/NetworkShare
+ Solid/Networking
Solid/OpticalDisc
Solid/OpticalDrive
Solid/PortableMediaPlayer
@@ -907,7 +909,6 @@ install( FILES
Solid/StorageAccess
Solid/StorageDrive
Solid/StorageVolume
- Solid/NetworkShare
DESTINATION ${INCLUDE_INSTALL_DIR}/KDE/Solid COMPONENT Devel)
@@ -952,17 +953,17 @@ DESTINATION ${INCLUDE_INSTALL_DIR}/KDE/khtml COMPONENT Devel)
install(FILES
- Nepomuk/Service
+ Nepomuk/File
+ Nepomuk/KRatingPainter
+ Nepomuk/KRatingWidget
+ Nepomuk/MassUpdateJob
Nepomuk/Resource
Nepomuk/ResourceManager
+ Nepomuk/Service
Nepomuk/Tag
- Nepomuk/Variant
- Nepomuk/Thing
- Nepomuk/File
- Nepomuk/KRatingWidget
- Nepomuk/KRatingPainter
Nepomuk/TagWidget
- Nepomuk/MassUpdateJob
+ Nepomuk/Thing
+ Nepomuk/Variant
DESTINATION ${INCLUDE_INSTALL_DIR}/KDE/Nepomuk COMPONENT Devel)
@@ -977,48 +978,48 @@ DESTINATION ${INCLUDE_INSTALL_DIR}/KDE/Nepomuk/Types COMPONENT Devel)
install(FILES
Nepomuk/Query/AndTerm
Nepomuk/Query/ComparisonTerm
+ Nepomuk/Query/FileQuery
Nepomuk/Query/GroupTerm
Nepomuk/Query/LiteralTerm
Nepomuk/Query/NegationTerm
+ Nepomuk/Query/OptionalTerm
Nepomuk/Query/OrTerm
Nepomuk/Query/Query
- Nepomuk/Query/FileQuery
Nepomuk/Query/QueryParser
Nepomuk/Query/QueryServiceClient
Nepomuk/Query/ResourceTerm
Nepomuk/Query/ResourceTypeTerm
Nepomuk/Query/Result
Nepomuk/Query/SimpleTerm
- Nepomuk/Query/Term
- Nepomuk/Query/OptionalTerm
Nepomuk/Query/StandardQuery
+ Nepomuk/Query/Term
DESTINATION ${INCLUDE_INSTALL_DIR}/KDE/Nepomuk/Query COMPONENT Devel)
install(FILES
+ Nepomuk/Utils/DynamicResourceFacet
+ Nepomuk/Utils/Facet
Nepomuk/Utils/FacetWidget
- Nepomuk/Utils/SearchWidget
+ Nepomuk/Utils/ProxyFacet
Nepomuk/Utils/ResourceModel
- Nepomuk/Utils/SimpleResourceModel
- Nepomuk/Utils/Facet
+ Nepomuk/Utils/SearchWidget
Nepomuk/Utils/SimpleFacet
- Nepomuk/Utils/DynamicResourceFacet
- Nepomuk/Utils/ProxyFacet
+ Nepomuk/Utils/SimpleResourceModel
DESTINATION ${INCLUDE_INSTALL_DIR}/KDE/Nepomuk/Utils COMPONENT Devel)
install(FILES
- Nepomuk/Vocabulary/NIE
- Nepomuk/Vocabulary/NFO
Nepomuk/Vocabulary/NCAL
Nepomuk/Vocabulary/NCO
- Nepomuk/Vocabulary/NMO
+ Nepomuk/Vocabulary/NDO
+ Nepomuk/Vocabulary/NEXIF
+ Nepomuk/Vocabulary/NFO
+ Nepomuk/Vocabulary/NIE
Nepomuk/Vocabulary/NMM
+ Nepomuk/Vocabulary/NMO
+ Nepomuk/Vocabulary/NUAO
Nepomuk/Vocabulary/PIMO
Nepomuk/Vocabulary/TMO
- Nepomuk/Vocabulary/NEXIF
- Nepomuk/Vocabulary/NUAO
- Nepomuk/Vocabulary/NDO
DESTINATION ${INCLUDE_INSTALL_DIR}/KDE/Nepomuk/Vocabulary COMPONENT Devel)
@@ -1035,6 +1036,7 @@ install(FILES
Plasma/AuthorizationInterface
Plasma/AuthorizationManager
Plasma/AuthorizationRule
+ Plasma/BusyWidget
Plasma/CheckBox
Plasma/ClientPinRequest
Plasma/ComboBox
@@ -1079,30 +1081,29 @@ install(FILES
Plasma/ScriptEngine
Plasma/ScrollBar
Plasma/ScrollWidget
+ Plasma/Separator
Plasma/Service
Plasma/ServiceJob
- Plasma/Separator
Plasma/SignalPlotter
Plasma/Slider
Plasma/SpinBox
- Plasma/BusyWidget
Plasma/Svg
Plasma/SvgWidget
Plasma/TabBar
- Plasma/TextEdit
Plasma/TextBrowser
+ Plasma/TextEdit
+ Plasma/Theme
Plasma/ToolButton
Plasma/ToolTipContent
Plasma/ToolTipManager
- Plasma/Theme
Plasma/TreeView
- Plasma/View
Plasma/Version
+ Plasma/VideoWidget
+ Plasma/View
Plasma/Wallpaper
Plasma/WallpaperScript
Plasma/WebView
Plasma/WindowEffects
- Plasma/VideoWidget
DESTINATION ${INCLUDE_INSTALL_DIR}/KDE/Plasma COMPONENT Devel)
if(QT_QTOPENGL_FOUND)
@@ -1120,7 +1121,7 @@ endif(NOT KDE_NO_DEPRECATED)
install(FILES
KUnitConversion/Converter
- KUnitConversion/Value
KUnitConversion/Unit
KUnitConversion/UnitCategory
+ KUnitConversion/Value
DESTINATION ${INCLUDE_INSTALL_DIR}/KDE/KUnitConversion COMPONENT Devel)
diff --git a/includes/KCheckableProxyModel b/includes/KCheckableProxyModel
new file mode 100644
index 0000000..bda9cb5
--- /dev/null
+++ b/includes/KCheckableProxyModel
@@ -0,0 +1 @@
+#include "../kcheckableproxymodel.h"
diff --git a/includes/KViewStateMaintainer b/includes/KViewStateMaintainer
new file mode 100644
index 0000000..1376c81
--- /dev/null
+++ b/includes/KViewStateMaintainer
@@ -0,0 +1 @@
+#include "../kviewstatemaintainer.h"
diff --git a/kdecore/io/kdebug.cpp b/kdecore/io/kdebug.cpp
index da45cb9..129ab87 100644
--- a/kdecore/io/kdebug.cpp
+++ b/kdecore/io/kdebug.cpp
@@ -872,12 +872,20 @@ int KDebug::registerArea(const QByteArray& areaName, bool enabled)
#ifndef KDE_NO_DEBUG_OUTPUT
+class KDebug::Block::Private
+{
+public:
+ QByteArray m_label;
+};
+
KDebug::Block::Block(const char* label, int area)
- : m_label(label), m_area(area), d(0)
+ : m_label(0), m_area(area), d(0)
{
if (hasNullOutputQtDebugMsg(area)) {
- m_label = 0; // remember, for the dtor
+ d = 0; // remember, for the dtor
} else {
+ d = new Private;
+ d->m_label = label;
m_startTime.start();
kDebug(area) << "BEGIN:" << label;
@@ -892,7 +900,7 @@ KDebug::Block::Block(const char* label, int area)
KDebug::Block::~Block()
{
- if (m_label) {
+ if (d) {
const double duration = m_startTime.elapsed() / 1000.0;
QThreadStorage<QString*> & indentString = kDebug_data->m_indentString;
indentString.localData()->chop(2);
@@ -901,14 +909,15 @@ KDebug::Block::~Block()
if (duration < 5.0) {
kDebug(m_area)
<< "END__:"
- << m_label
+ << d->m_label.constData()
<< qPrintable(QString::fromLatin1("[Took: %3s]").arg(QString::number(duration, 'g', 2)));
} else {
kDebug(m_area)
<< "END__:"
- << m_label
+ << d->m_label.constData()
<< qPrintable(QString::fromLatin1("[DELAY Took (quite long) %3s]").arg(QString::number(duration, 'g', 2)));
}
+ delete d;
}
}
diff --git a/kdecore/io/kdebug.h b/kdecore/io/kdebug.h
index 072bcc8..ccb3a2a 100644
--- a/kdecore/io/kdebug.h
+++ b/kdecore/io/kdebug.h
@@ -359,11 +359,11 @@ public:
private:
QElapsedTimer m_startTime;
- const char *m_label;
+ const char *m_label; // KDE5 TODO: REMOVE
int m_area;
int m_color;
class Private;
- Private* const d;
+ Private* d;
};
/**
diff --git a/kdecore/network/kssld/kssld.cpp b/kdecore/network/kssld/kssld.cpp
index 4b8d72e..abbba6a 100644
--- a/kdecore/network/kssld/kssld.cpp
+++ b/kdecore/network/kssld/kssld.cpp
@@ -170,8 +170,9 @@ static QString normalizeSubdomains(const QString &hostName, int *namePartsCount)
QString ret;
int partsCount = 0;
bool wasPrevDot = true; // -> allow no dot at the beginning and count first name part
- for (int i = 0; i < hostName.length(); i++) {
- QChar c = hostName.at(i);
+ const int length = hostName.length();
+ for (int i = 0; i < length; i++) {
+ const QChar c = hostName.at(i);
if (c == QLatin1Char('.')) {
if (wasPrevDot || (i + 1 == hostName.length())) {
// consecutive dots or a dot at the end are forbidden
@@ -207,10 +208,10 @@ KSslCertificateRule KSSLD::rule(const QSslCertificate &cert, const QString &host
// Find a rule for the hostname, either...
if (group.hasKey(needle)) {
- // directly (site.tld, a.site.tld etc)
- if (needlePartsCount >= 2) {
- foundHostName = true;
- }
+ // directly (host, site.tld, a.site.tld etc)
+ if (needlePartsCount >= 1) {
+ foundHostName = true;
+ }
} else {
// or with wildcards
// "tld" <- "*." and "site.tld" <- "*.tld" are not valid matches,
diff --git a/kdecore/network/kssld/kssld.desktop b/kdecore/network/kssld/kssld.desktop
index 104d503..5c83782 100644
--- a/kdecore/network/kssld/kssld.desktop
+++ b/kdecore/network/kssld/kssld.desktop
@@ -34,7 +34,7 @@ Name[km]=គោលនយោបាយវិញ្ញាបនបត្រ SSL
Name[kn]=SSL ಪ್ರಮಾಣಪತ್ರ ನೀತಿ
Name[ko]=SSL 인증서 정책
Name[ku]=Polîçeya Bawernameya SSL
-Name[lt]=SSL sertifikatų politika
+Name[lt]=SSL liudijimų politika
Name[lv]=SSL sertifikātu politika
Name[ms]=Polisi Sijil SSL
Name[nb]=SSL-sertifikatpraksis
diff --git a/kdecore/services/kmimetyperepository.cpp b/kdecore/services/kmimetyperepository.cpp
index 6ff3d16..5d623b8 100644
--- a/kdecore/services/kmimetyperepository.cpp
+++ b/kdecore/services/kmimetyperepository.cpp
@@ -234,6 +234,14 @@ KMimeType::Ptr KMimeTypeRepository::findFromContent(QIODevice* device, int* accu
*accuracy = 100;
return findMimeTypeByName(QLatin1String("application/x-zerosize"));
}
+ if (beginning.isEmpty()) {
+ // check if we can really read the data; also provide enough data for most rules
+ const qint64 dataNeeded = qMin(deviceSize, (qint64) 16384);
+ beginning.resize(dataNeeded);
+ if (!device->seek(0) || device->read(beginning.data(), dataNeeded) == -1) {
+ return defaultMimeTypePtr(); // don't bother detecting unreadable file
+ }
+ }
m_mutex.lockForWrite();
if (!m_magicFilesParsed) {
diff --git a/kdecore/sycoca/ksycoca.cpp b/kdecore/sycoca/ksycoca.cpp
index 486f4c5..ace2b95 100644
--- a/kdecore/sycoca/ksycoca.cpp
+++ b/kdecore/sycoca/ksycoca.cpp
@@ -55,7 +55,7 @@
* If the existing file is outdated, it will not get read
* but instead we'll ask kded to regenerate a new one...
*/
-#define KSYCOCA_VERSION 203
+#define KSYCOCA_VERSION 204
/**
* Sycoca file name, used internally (by kbuildsycoca)
diff --git a/kdecore/sycoca/ksycocadict.cpp b/kdecore/sycoca/ksycocadict.cpp
index 4be935b..2f9a5b2 100644
--- a/kdecore/sycoca/ksycocadict.cpp
+++ b/kdecore/sycoca/ksycocadict.cpp
@@ -231,14 +231,16 @@ uint KSycocaDict::Private::hashKey( const QString &key) const
for(int i = 0; i < hashList.count(); i++)
{
int pos = hashList[i];
- if (pos < 0) {
- pos = -pos-1;
- if (pos < len)
- h = ((h * 13) + (key[len-pos].cell() % 29)) & 0x3ffffff;
+ if (pos == 0) {
+ continue;
+ } else if (pos < 0) {
+ pos = -pos;
+ if (pos < len)
+ h = ((h * 13) + (key[len-pos].cell() % 29)) & 0x3ffffff;
} else {
- pos = pos-1;
- if (pos < len)
- h = ((h * 13) + (key[pos].cell() % 29)) & 0x3ffffff;
+ pos = pos-1;
+ if (pos < len)
+ h = ((h * 13) + (key[pos].cell() % 29)) & 0x3ffffff;
}
}
return h;
@@ -270,12 +272,12 @@ calcDiversity(KSycocaDictStringList *stringlist, int inPos, uint sz)
//int numItem = 0;
if (inPos < 0) {
- pos = -inPos-1;
+ pos = -inPos;
for(KSycocaDictStringList::const_iterator it = stringlist->constBegin(), end = stringlist->constEnd(); it != end; ++it)
{
string_entry* entry = *it;
int len = entry->length;
- if (pos < len && pos != 0) {
+ if (pos < len) {
uint hash = ((entry->hash * 13) + (entry->key[len-pos].cell() % 29)) & 0x3ffffff;
matrix.setBit( hash % sz, true );
}
@@ -305,17 +307,17 @@ addDiversity(KSycocaDictStringList *stringlist, int pos)
{
if (pos == 0) return;
if (pos < 0) {
- pos = -pos-1;
- for(KSycocaDictStringList::const_iterator it = stringlist->constBegin(); it != stringlist->constEnd(); ++it)
+ pos = -pos;
+ for(KSycocaDictStringList::const_iterator it = stringlist->constBegin(), end = stringlist->constEnd(); it != end; ++it)
{
string_entry* entry = *it;
- register int l = entry->length;
- if (pos < l)
- entry->hash = ((entry->hash * 13) + (entry->key[l-pos].cell() % 29)) & 0x3fffffff;
+ int len = entry->length;
+ if (pos < len)
+ entry->hash = ((entry->hash * 13) + (entry->key[len-pos].cell() % 29)) & 0x3fffffff;
}
} else {
pos = pos - 1;
- for(KSycocaDictStringList::const_iterator it = stringlist->constBegin(); it != stringlist->constEnd(); ++it)
+ for(KSycocaDictStringList::const_iterator it = stringlist->constBegin(), end = stringlist->constEnd(); it != end; ++it)
{
string_entry* entry = *it;
if (pos < entry->length)
diff --git a/kdecore/tests/kdebugtest.cpp b/kdecore/tests/kdebugtest.cpp
index d3084ff..21efbc0 100644
--- a/kdecore/tests/kdebugtest.cpp
+++ b/kdecore/tests/kdebugtest.cpp
@@ -92,6 +92,13 @@ public:
deprecatedMethod();
}
+ void testCharStarBlock()
+ {
+ KDebug::Block myBlock(qPrintable(QString::fromLatin1("Block"))); // the char* goes out of scope
+ func_void();
+ deprecatedMethod();
+ }
+
void deprecatedMethod()
{
KWARNING_DEPRECATED
@@ -297,6 +304,7 @@ void testKDebug()
TestClass1 c1;
c1.testBlock();
+ c1.testCharStarBlock();
}
// Concurrency testing, based on code from bug 133026
diff --git a/kdeui/widgets/kdatecombobox.cpp b/kdeui/widgets/kdatecombobox.cpp
index b49085b..fc239bc 100644
--- a/kdeui/widgets/kdatecombobox.cpp
+++ b/kdeui/widgets/kdatecombobox.cpp
@@ -444,18 +444,19 @@ void KDateComboBox::keyPressEvent(QKeyEvent *keyEvent)
switch (keyEvent->key()) {
case Qt::Key_Down:
temp = d->m_date.addDays(-1).date();
- return;
+ break;
case Qt::Key_Up:
temp = d->m_date.addDays(1).date();
- return;
+ break;
case Qt::Key_PageDown:
temp = d->m_date.addMonths(-1).date();
- return;
+ break;
case Qt::Key_PageUp:
temp = d->m_date.addMonths(1).date();
- return;
+ break;
default:
KComboBox::keyPressEvent(keyEvent);
+ return;
}
if (temp.isValid() && temp >= d->m_minDate && temp <= d->m_maxDate) {
d->enterDate(temp);
diff --git a/kdeui/widgets/kmultitabbar.cpp b/kdeui/widgets/kmultitabbar.cpp
index abf02ad..8de08bc 100644
--- a/kdeui/widgets/kmultitabbar.cpp
+++ b/kdeui/widgets/kmultitabbar.cpp
@@ -299,7 +299,7 @@ QSize KMultiTabBarTab::computeSizeHint(bool withText) const
// Always include text height in computation, to avoid resizing the minor direction
// when expanding text..
- QSize textSize = fontMetrics().size(Qt::TextShowMnemonic, text());
+ QSize textSize = fontMetrics().size(0, text());
size.setHeight(qMax(size.height(), textSize.height()));
// Pick margins for major/minor direction, depending on orientation
diff --git a/kdewebkit/kwebwallet.cpp b/kdewebkit/kwebwallet.cpp
index 4e27ad1..ed19769 100644
--- a/kdewebkit/kwebwallet.cpp
+++ b/kdewebkit/kwebwallet.cpp
@@ -205,6 +205,11 @@ void KWebWallet::KWebWalletPrivate::fillDataFromCache(KWebWallet::WebFormList &f
void KWebWallet::KWebWalletPrivate::saveDataToCache(const QString &key)
{
+ // Make sure the specified keys exists before acting on it. See BR# 270209.
+ if (!pendingSaveRequests.contains(key)) {
+ return;
+ }
+
bool success = false;
const QUrl url = pendingSaveRequests.value(key).first().url;
diff --git a/kdoctools/CMakeLists.txt b/kdoctools/CMakeLists.txt
index af4e935..26a9231 100644
--- a/kdoctools/CMakeLists.txt
+++ b/kdoctools/CMakeLists.txt
@@ -142,7 +142,6 @@ endforeach( _kdeincludexslt ${_kdeincludexslt_ALL} )
########### install files ###############
install( FILES help.protocol ghelp.protocol DESTINATION ${SERVICES_INSTALL_DIR} )
-install( FILES kio_help.upd DESTINATION ${DATA_INSTALL_DIR}/kconf_update )
install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/checkXML DESTINATION ${BIN_INSTALL_DIR} )
diff --git a/kdoctools/customization/entities/contributor.entities b/kdoctools/customization/entities/contributor.entities
index 5b1574f..f7f40e4 100644
--- a/kdoctools/customization/entities/contributor.entities
+++ b/kdoctools/customization/entities/contributor.entities
@@ -178,6 +178,8 @@
<!ENTITY Duncan.Haldane.mail '<email>duncan_haldane@users.sourceforge.net</email>'>
<!ENTITY J.Hall '<personname><firstname>J</firstname><surname>Hall</surname></personname>'>
<!ENTITY J.Hall.mail '<email>jhall@kde.org</email>'>
+<!ENTITY Erlend.Hamberg '<personname><firstname>Erlend</firstname><surname>Hamberg</surname></personname>'>
+<!ENTITY Erlend.Hamberg.mail '<email>ehamberg@gmail.com</email>'>
<!ENTITY Steffen.Hansen '<personname><firstname>Steffen</firstname><surname>Hansen</surname></personname>'>
<!ENTITY Steffen.Hansen.mail '<email>steffen@klaralvdalens-datakonsult.se</email>'>
<!ENTITY Brad.Hards '<personname><firstname>Brad</firstname><surname>Hards</surname></personname>'>
@@ -202,6 +204,8 @@
<!ENTITY Hauke.Hildebrandt.mail '<email>hauke.hildebrandt@iup.uni-heidelberg.de</email>'>
<!ENTITY Jens.Hoefkens '<personname><firstname>Jens</firstname><surname>Hoefkens</surname></personname>'>
<!ENTITY Jens.Hoefkens.mail '<email>jens@hoefkens.com</email>'>
+<!ENTITY TC.Hollingsworth '<personname><firstname>T.C.</firstname><surname>Hollingsworth</surname></personname>'>
+<!ENTITY TC.Hollingsworth.mail '<email>tchollingsworth@gmail.com</email>'>
<!ENTITY Mark.Holloman '<personname><firstname>Mark</firstname><surname>Holloman</surname></personname>'>
<!ENTITY Mark.Holloman.mail '<email>mhh@mindspring.com</email>'>
<!ENTITY Greg.M.Holmes '<personname><firstname>Greg</firstname><othername>M.</othername><surname>Holmes</surname></personname>'>
diff --git a/kdoctools/customization/fr/user.entities b/kdoctools/customization/fr/user.entities
index 7f253cf..1f72653 100644
--- a/kdoctools/customization/fr/user.entities
+++ b/kdoctools/customization/fr/user.entities
@@ -1,4 +1,4 @@
-<!-- This file contains entities (only!) to make authoring/translating
+ <!-- This file contains entities (only!) to make authoring/translating
a document easier. They are necessarily language-specific.
In the case of name clashes, entities in this file always lose.
Keep the entities simple, but _always_ provide them with full markup.
@@ -56,8 +56,8 @@
<!ENTITY traducteurClementContet '<othercredit role="translator"> <firstname>Clément</firstname> <surname>Contet</surname> <affiliation><address><email>keelize@yahoo.fr</email></address></affiliation> <contrib>Traduction française </contrib></othercredit>'>
<!ENTITY relecteurClementContet '<othercredit role="reviewer"> <firstname>Clément</firstname> <surname>Contet</surname> <affiliation><address><email>keelize@yahoo.fr</email></address></affiliation> <contrib>Relecture de la documentation française </contrib></othercredit>'>
-<!ENTITY traducteurJoelleCornavin '<othercredit role="translator"> <firstname>Joëlle</firstname> <surname>Cornavin</surname> <affiliation><address><email>j.cornavin@sfr.fr</email></address></affiliation> <contrib>Traduction française </contrib></othercredit>'>
-<!ENTITY relecteurJoelleCornavin '<othercredit role="reviewer"> <firstname>Joëlle</firstname> <surname>Cornavin</surname> <affiliation><address><email>j.cornavin@sfr.fr</email></address></affiliation> <contrib>Relecture de la documentation française </contrib></othercredit>'>
+<!ENTITY traducteurJoelleCornavin '<othercredit role="translator"> <firstname>Joëlle</firstname> <surname>Cornavin</surname> <affiliation><address><email>jcorn@free.fr</email></address></affiliation> <contrib>Traduction française </contrib></othercredit>'>
+<!ENTITY relecteurJoelleCornavin '<othercredit role="reviewer"> <firstname>Joëlle</firstname> <surname>Cornavin</surname> <affiliation><address><email>jcorn@free.fr</email></address></affiliation> <contrib>Relecture de la documentation française </contrib></othercredit>'>
<!ENTITY traducteurBenoitCosandier '<othercredit role="translator"> <firstname>Benoit</firstname> <surname>Cosandier</surname> <affiliation><address><email>cosandier.benoit@bluewin.ch</email></address></affiliation> <contrib>Traduction française </contrib></othercredit>'>
<!ENTITY relecteurBenoitCosandier '<othercredit role="reviewer"> <firstname>Benoit</firstname> <surname>Cosandier</surname> <affiliation><address><email>cosandier.benoit@bluewin.ch</email></address></affiliation> <contrib>Relecture de la documentation française </contrib></othercredit>'>
@@ -288,7 +288,7 @@
<!ENTITY AlviseCavallari 'Alvise Cavallari <email>alvise.cavallari@kdemail.net</email>'>
<!ENTITY PatrickChavas 'Patrick Chavas <email>pachavas@sun.cpe.fr</email>'>
<!ENTITY ClementContet 'Clément Contet <email>keelize@yahoo.fr</email>'>
-<!ENTITY JoelleCornavin 'Joëlle Cornavin <email>j.cornavin@sfr.fr</email>'>
+<!ENTITY JoelleCornavin 'Joëlle Cornavin <email>jcorn@free.fr</email>'>
<!ENTITY BenoitCosandier 'Benoit Cosandier <email>cosandier.benoit@bluewin.ch</email>'>
<!ENTITY ThibautCousin 'Thibaut Cousin <email>cousin@in2p3.fr</email>'>
<!ENTITY GerardDelafond 'Gérard Delafond <email>gerard@delafond.org</email>'>
@@ -402,4 +402,4 @@
<!ENTITY krfb_fr "Partage de bureau"> <!--English: &krfb; -->
<!ENTITY Lequipe.rekonq "L'équipe rekonq">
-<!ENTITY Lequipe.rekonq.mail "(rekonq@kde.org)">
\ No newline at end of file
+<!ENTITY Lequipe.rekonq.mail "(rekonq@kde.org)">
diff --git a/kdoctools/customization/nl/user.entities b/kdoctools/customization/nl/user.entities
index e682227..55136fa 100644
--- a/kdoctools/customization/nl/user.entities
+++ b/kdoctools/customization/nl/user.entities
@@ -42,6 +42,7 @@
<!ENTITY Freek.de.Kruijf '<othercredit role="translator"><firstname>Freek</firstname><surname>de Kruijf</surname><affiliation><address><email>freekdekruijf@kde.nl</email></address></affiliation><contrib>Vertaler/Nalezer</contrib></othercredit>'>
<!ENTITY Hannie.Lafeber-Dumoleyn '<othercredit role="translator"><firstname>Hannie</firstname><surname>Lafeber-Dumoleyn</surname><affiliation><address><email>hannie@kde.nl</email></address></affiliation><contrib>Vertaler/Nalezer</contrib></othercredit>'>
<!ENTITY Ruben.Van.Laerhoven '<othercredit role="translator"><firstname>Ruben</firstname><surname>Van Laerhoven</surname><affiliation><address><email>rubentje1991@gmail.com</email></address></affiliation><contrib>Vertaler/Nalezer</contrib></othercredit>'>
+<!ENTITY Thom.Castermans '<othercredit role="translator"><firstname>Thom</firstname><surname>Castermans</surname><affiliation><address><email>thomcastermans@kde.nl</email></address></affiliation><contrib>Vertaler/Nalezer</contrib></othercredit>'>
<!ENTITY kde.nl.groep "<email>i18n@kde.nl</email>">
<!-- Tekstschema's -->
@@ -82,6 +83,7 @@
<!ENTITY vertaling.freek "<para>Dit document is vertaald in het Nederlands door &Freek.de.Kruijf;.</para>">
<!ENTITY vertaling.hannie "<para>Dit document is vertaald in het Nederlands door &Hannie.Lafeber-Dumoleyn;.</para>">
<!ENTITY vertaling.ruben "<para>Dit document is vertaald in het Nederlands door &Ruben.Van.Laerhoven;.</para>">
+<!ENTITY vertaling.thom "<para>Dit document is vertaald in het Nederlands door &Thom.Castermans;.</para>">
<!-- Gebruiken als template voor nieuwe vertalers/nalezers
@@ -123,6 +125,7 @@
<!ENTITY nagelezen.freek "<para>De vertaling werd nagelezen door &Freek.de.Kruijf;.</para>">
<!ENTITY nagelezen.hannie "<para>De vertaling werd nagelezen door &Hannie.Lafeber-Dumoleyn;.</para>">
<!ENTITY nagelezen.ruben "<para>De vertaling werd nagelezen door &Ruben.Van.Laerhoven;.</para>">
+<!ENTITY nagelezen.thom "<para>De vertaling werd nagelezen door &Thom.Castermans;.</para>">
<!-- Algemene afkortingen -->
<!ENTITY Alt "<keycap>Alt</keycap>">
diff --git a/kfile/kfileplacessharedbookmarks.cpp b/kfile/kfileplacessharedbookmarks.cpp
index d9efe89..9cbdcf4 100644
--- a/kfile/kfileplacessharedbookmarks.cpp
+++ b/kfile/kfileplacessharedbookmarks.cpp
@@ -113,7 +113,9 @@ KFilePlacesSharedBookmarks::KFilePlacesSharedBookmarks(KBookmarkManager * mgr)
{
m_placesBookmarkManager = mgr;
- const QString file = KStandardDirs().localxdgdatadir() + "/user-places.xbel";
+ // we check later if the directory exists
+ KStandardDirs::makeDir(KStandardDirs().localxdgdatadir());
+ const QString file = KStandardDirs().localxdgdatadir() + "user-places.xbel";
m_sharedBookmarkManager = KBookmarkManager::managerForExternalFile(file);
connect(m_sharedBookmarkManager, SIGNAL(changed(const QString&, const QString&)),
diff --git a/kfile/kfilepreviewgenerator.cpp b/kfile/kfilepreviewgenerator.cpp
index 3659ac1..9c71ff8 100644
--- a/kfile/kfilepreviewgenerator.cpp
+++ b/kfile/kfilepreviewgenerator.cpp
@@ -1236,11 +1236,15 @@ void KFilePreviewGenerator::setPreviewShown(bool show)
KFileItemList itemList;
d->addItemsToList(QModelIndex(), itemList);
- KFilePreviewGenerator::Private::DataChangeObtainer obt (d);
+ const bool blocked = dirModel->signalsBlocked();
+ dirModel->blockSignals(true);
+
foreach (const KFileItem& item, itemList) {
const QModelIndex index = dirModel->indexForItem(item);
dirModel->setData(index, QIcon(), Qt::DecorationRole);
}
+
+ dirModel->blockSignals(blocked);
}
updateIcons();
}
diff --git a/khtml/css/css_valueimpl.cpp b/khtml/css/css_valueimpl.cpp
index 3fb2898..dfd9e3e 100644
--- a/khtml/css/css_valueimpl.cpp
+++ b/khtml/css/css_valueimpl.cpp
@@ -1376,11 +1376,12 @@ CSSImageValueImpl::CSSImageValueImpl(const DOMString &url, StyleBaseImpl* style)
root = root->parent();
if (root->isCSSStyleSheet())
docLoader = static_cast<const CSSStyleSheetImpl*>(root)->docLoader();
-
+ if (docLoader) {
KUrl fullURL( style->baseURL(), khtml::parseURL(url).string() );
m_image = docLoader->requestImage( fullURL.url() );
if(m_image) m_image->ref(this);
}
+}
CSSImageValueImpl::CSSImageValueImpl()
: CSSPrimitiveValueImpl(CSS_VAL_NONE)
diff --git a/khtml/ecma/kjs_window.cpp b/khtml/ecma/kjs_window.cpp
index 0e7394b..92f3fcd 100644
--- a/khtml/ecma/kjs_window.cpp
+++ b/khtml/ecma/kjs_window.cpp
@@ -2849,12 +2849,11 @@ JSValue *ExternalFunc::callAsFunction(ExecState *exec, JSObject *thisObj, const
if (!part)
return jsUndefined();
- KHTMLView *widget = part->view();
-
switch (id) {
case External::AddFavorite:
{
#ifndef KONQ_EMBEDDED
+ KHTMLView *widget = part->view();
if (!widget->dialogsAllowed())
return jsUndefined();
part->xmlDocImpl()->updateRendering();
diff --git a/khtml/html/htmltokenizer.cpp b/khtml/html/htmltokenizer.cpp
index b64e83d..2c4761d 100644
--- a/khtml/html/htmltokenizer.cpp
+++ b/khtml/html/htmltokenizer.cpp
@@ -1741,8 +1741,6 @@ void HTMLTokenizer::write( const TokenizerString &str, bool appendData )
tquote = NoQuote;
parseProcessingInstruction(src);
continue;
-
- break;
}
case '%':
if (!brokenServer) {
diff --git a/khtml/java/kjavaappletserver.cpp b/khtml/java/kjavaappletserver.cpp
index 234c6f3..aa6dab9 100644
--- a/khtml/java/kjavaappletserver.cpp
+++ b/khtml/java/kjavaappletserver.cpp
@@ -479,7 +479,7 @@ void KJavaAppletServer::slotJavaRequest( const QByteArray& qb )
//get contextID
QString contextID;
- while( qb[index] != 0 && index < qb_size )
+ while( index < qb_size && qb[index] != 0 )
{
contextID += qb[ index++ ];
}
diff --git a/khtml/khtml_part.cpp b/khtml/khtml_part.cpp
index 53929fa..9a02248 100644
--- a/khtml/khtml_part.cpp
+++ b/khtml/khtml_part.cpp
@@ -6544,8 +6544,8 @@ void KHTMLPart::khtmlMouseReleaseEvent( khtml::MouseReleaseEvent *event )
// the mouse is pressed again.
d->m_bMousePressed = false;
- QMouseEvent *_mouse = event->qmouseEvent();
#ifndef QT_NO_CLIPBOARD
+ QMouseEvent *_mouse = event->qmouseEvent();
if ((d->m_guiProfile == BrowserViewGUI) && (_mouse->button() == Qt::MidButton) && (event->url().isNull())) {
kDebug( 6050 ) << "MMB shouldOpen=" << d->m_bOpenMiddleClick;
diff --git a/khtml/khtmlimage.cpp b/khtml/khtmlimage.cpp
index c6e6366..7823f0e 100644
--- a/khtml/khtmlimage.cpp
+++ b/khtml/khtmlimage.cpp
@@ -197,15 +197,15 @@ void KHTMLImage::notifyFinished( khtml::CachedObject *o )
if ( !m_mimeType.isEmpty() )
mimeType = KMimeType::mimeType(m_mimeType, KMimeType::ResolveAliases);
- if ( mimeType ) {
- if (m_image && !m_image->suggestedTitle().isEmpty()) {
+ if ( mimeType && m_image ) {
+ if ( !m_image->suggestedTitle().isEmpty() ) {
caption = i18n( "%1 (%2 - %3x%4 Pixels)", m_image->suggestedTitle(), mimeType->comment(), m_image->pixmap_size().width(), m_image->pixmap_size().height() );
} else {
caption = i18n( "%1 - %2x%3 Pixels" , mimeType->comment() ,
m_image->pixmap_size().width() , m_image->pixmap_size().height() );
}
} else {
- if (m_image && !m_image->suggestedTitle().isEmpty()) {
+ if ( !m_image->suggestedTitle().isEmpty() ) {
caption = i18n( "%1 (%2x%3 Pixels)" , m_image->suggestedTitle(), m_image->pixmap_size().width() , m_image->pixmap_size().height() );
} else {
caption = i18n( "Image - %1x%2 Pixels" , m_image->pixmap_size().width() , m_image->pixmap_size().height() );
diff --git a/khtml/khtmlview.cpp b/khtml/khtmlview.cpp
index 28dbac3..c15578d 100644
--- a/khtml/khtmlview.cpp
+++ b/khtml/khtmlview.cpp
@@ -3123,9 +3123,9 @@ void KHTMLView::print(bool quick)
pageHeight -= headerHeight;
+#ifndef QT_NO_TRANSFORMATIONS
bool scalePage = false;
double scale = 0.0;
-#ifndef QT_NO_TRANSFORMATIONS
if(root->docWidth() > printer.width()) {
scalePage = true;
scale = ((double) printer.width())/((double) root->docWidth());
diff --git a/khtml/rendering/render_form.cpp b/khtml/rendering/render_form.cpp
index c15247a..aa59d3d 100644
--- a/khtml/rendering/render_form.cpp
+++ b/khtml/rendering/render_form.cpp
@@ -137,9 +137,8 @@ using namespace DOM;
const QComboBox* cb = qobject_cast<const QComboBox*>(widget);
const QStyleOptionComboBox* cbOpt = qstyleoption_cast<const QStyleOptionComboBox*>(opt);
- QFontMetrics fm = cb->fontMetrics();
-
if (cb && cbOpt) {
+ QFontMetrics fm = cb->fontMetrics();
// Compute content width; Qt uses the usual +4 magic number for icon/text margin
int maxW = 0;
for (int c = 0; c < cb->count(); ++c) {
diff --git a/khtml/rendering/render_table.cpp b/khtml/rendering/render_table.cpp
index 5b07714..1f030a9 100644
--- a/khtml/rendering/render_table.cpp
+++ b/khtml/rendering/render_table.cpp
@@ -2014,7 +2014,6 @@ bool RenderTableSection::canClear(RenderObject * /*child*/, PageBreakLevel level
void RenderTableSection::addSpaceAt(int pos, int dy)
{
- const int nEffCols = table()->numEffCols();
const int totalRows = numRows();
for ( int r = 0; r < totalRows; r++ ) {
if (rowPos[r] > pos) {
diff --git a/khtml/xpath/util.cpp b/khtml/xpath/util.cpp
index 079008d..116744b 100644
--- a/khtml/xpath/util.cpp
+++ b/khtml/xpath/util.cpp
@@ -111,34 +111,42 @@ bool isValidContextNode( NodeImpl *node )
DOM::NodeImpl *xpathParentNode( DOM::NodeImpl *node )
{
- if ( node && node->nodeType() == Node::ATTRIBUTE_NODE )
- return static_cast<DOM::AttrImpl*>(node)->ownerElement();
+ DOM::NodeImpl *res = 0;
+ if ( node ) {
+ if ( node->nodeType() == Node::ATTRIBUTE_NODE )
+ res = static_cast<DOM::AttrImpl*>(node)->ownerElement();
else
- return node->parentNode();
+ res = node->parentNode();
+ }
+ return res;
}
DOM::NodeImpl *xpathFirstChild( DOM::NodeImpl *node )
{
- if ( node && node->nodeType() == Node::ATTRIBUTE_NODE )
- return 0;
- else
- return node->firstChild();
+ DOM::NodeImpl *res = 0;
+ if ( node && node->nodeType() != Node::ATTRIBUTE_NODE )
+ res = node->firstChild();
+ return res;
}
DOM::NodeImpl *xpathLastChild( DOM::NodeImpl *node )
{
- if ( node && node->nodeType() == Node::ATTRIBUTE_NODE )
- return 0;
- else
- return node->lastChild();
+ DOM::NodeImpl *res = 0;
+ if ( node && node->nodeType() != Node::ATTRIBUTE_NODE )
+ res = node->lastChild();
+ return res;
}
DOM::NodeImpl *nextSiblingForFollowing( DOM::NodeImpl *node )
{
- if ( node && node->nodeType() == Node::ATTRIBUTE_NODE )
- return static_cast<DOM::AttrImpl*>(node)->ownerElement()->firstChild();
+ DOM::NodeImpl *res = 0;
+ if ( node ) {
+ if ( node->nodeType() == Node::ATTRIBUTE_NODE )
+ res = static_cast<DOM::AttrImpl*>(node)->ownerElement()->firstChild();
else
- return node->nextSibling();
+ res = node->nextSibling();
+ }
+ return res;
}
} // namespace khtml
diff --git a/kio/CMakeLists.txt b/kio/CMakeLists.txt
index b517621..e8d5769 100644
--- a/kio/CMakeLists.txt
+++ b/kio/CMakeLists.txt
@@ -42,7 +42,6 @@ include_directories(
${CMAKE_CURRENT_SOURCE_DIR} # for including kio/kio_export.h
${CMAKE_CURRENT_BINARY_DIR}/kio
${CMAKE_CURRENT_BINARY_DIR}/kssl
- ${CMAKE_CURRENT_BINARY_DIR}/kfile
${CMAKE_CURRENT_BINARY_DIR} # e.g. for observer_stub.h
${KDE4_KDEUI_INCLUDES}
${KDE4_KDECORE_INCLUDES}/
diff --git a/kio/kcmodule.desktop b/kio/kcmodule.desktop
index 1c9d881..2c85565 100644
--- a/kio/kcmodule.desktop
+++ b/kio/kcmodule.desktop
@@ -26,7 +26,7 @@ Name[es]=Módulo de configuración de KDE
Name[et]=KDE seadistamismoodul
Name[eu]=KDE konfigurazio modulua
Name[fa]=پیمانه پیکربندی KDE
-Name[fi]=KDE:n asetusmoduuli
+Name[fi]=KDE:n asetusosio
Name[fr]=Module de configuration de KDE
Name[fy]=KDE konfiguraasjemodule
Name[ga]=Modúl Cumraíochta KDE
diff --git a/kio/kio/directorysizejob.cpp b/kio/kio/directorysizejob.cpp
index e705fa4..3ca8599 100644
--- a/kio/kio/directorysizejob.cpp
+++ b/kio/kio/directorysizejob.cpp
@@ -49,6 +49,7 @@ namespace KIO
KIO::filesize_t m_totalSubdirs;
KFileItemList m_lstItems;
int m_currentItem;
+ QHash<long, QSet<long> > m_visitedInodes; // device -> set of inodes
void startNextJob( const KUrl & url );
void slotEntries( KIO::Job * , const KIO::UDSEntryList &);
@@ -138,6 +139,7 @@ void DirectorySizeJobPrivate::startNextJob( const KUrl & url )
Q_Q(DirectorySizeJob);
//kDebug(7007) << url;
KIO::ListJob * listJob = KIO::listRecursive( url, KIO::HideProgressInfo );
+ listJob->addMetaData("details", "3");
q->connect( listJob, SIGNAL(entries( KIO::Job *, const KIO::UDSEntryList& )),
SLOT( slotEntries( KIO::Job*, const KIO::UDSEntryList& )));
q->addSubjob( listJob );
@@ -150,6 +152,16 @@ void DirectorySizeJobPrivate::slotEntries( KIO::Job*, const KIO::UDSEntryList &
for (; it != end; ++it) {
const KIO::UDSEntry& entry = *it;
+ const long device = entry.numberValue(KIO::UDSEntry::UDS_DEVICE_ID, 0);
+ if (device) {
+ // Hard-link detection (#67939)
+ const long inode = entry.numberValue(KIO::UDSEntry::UDS_INODE, 0);
+ QSet<long> & visitedInodes = m_visitedInodes[device]; // find or insert
+ if (visitedInodes.contains(inode)) {
+ continue;
+ }
+ visitedInodes.insert(inode);
+ }
const KIO::filesize_t size = entry.numberValue(KIO::UDSEntry::UDS_SIZE, 0);
const QString name = entry.stringValue( KIO::UDSEntry::UDS_NAME );
if (name == ".") {
diff --git a/kio/kio/kprotocolmanager.cpp b/kio/kio/kprotocolmanager.cpp
index baed1b9..00888f4 100644
--- a/kio/kio/kprotocolmanager.cpp
+++ b/kio/kio/kprotocolmanager.cpp
@@ -32,6 +32,7 @@
#include <QtNetwork/QHostAddress>
#include <QtNetwork/QHostInfo>
#include <QtDBus/QtDBus>
+#include <QtCore/QCache>
#if !defined(QT_NO_NETWORKPROXY) && (defined (Q_OS_WIN32) || defined(Q_OS_MAC))
#include <QtNetwork/QNetworkProxyFactory>
@@ -101,6 +102,22 @@ static bool revmatch(const char *host, const char *nplist)
return false;
}
+class KProxyData : public QObject
+{
+public:
+ KProxyData(const QString& slaveProtocol, const QStringList& proxyAddresses)
+ :protocol(slaveProtocol)
+ ,proxyList(proxyAddresses) {
+ }
+
+ void removeAddress(const QString& address) {
+ proxyList.removeAll(address);
+ }
+
+ QString protocol;
+ QStringList proxyList;
+};
+
class KProtocolManagerPrivate
{
public:
@@ -110,13 +127,11 @@ public:
KSharedConfig::Ptr config;
KSharedConfig::Ptr http_config;
- KUrl url;
- QString protocol;
- QStringList proxyList;
QString modifiers;
QString useragent;
QString noProxyFor;
QList<SubnetPair> noProxySubnets;
+ QCache<QString, KProxyData> cachedProxyData;
QMap<QString /*mimetype*/, QString /*protocol*/> protocolForArchiveMimetypes;
};
@@ -127,6 +142,7 @@ KProtocolManagerPrivate::KProtocolManagerPrivate()
{
// post routine since KConfig::sync() breaks if called too late
qAddPostRoutine(kProtocolManagerPrivate.destroy);
+ cachedProxyData.setMaxCost(200); // double the max cost.
}
KProtocolManagerPrivate::~KProtocolManagerPrivate()
@@ -142,10 +158,10 @@ bool KProtocolManagerPrivate::shouldIgnoreProxyFor(const KUrl& url)
bool isMatch = false;
const KProtocolManager::ProxyType type = KProtocolManager::proxyType();
const bool useRevProxy = ((type == KProtocolManager::ManualProxy) && KProtocolManager::useReverseProxy());
- const bool hasNoProxyList = (type == KProtocolManager::ManualProxy || type == KProtocolManager::EnvVarProxy);
+ const bool useNoProxyList = (type == KProtocolManager::ManualProxy || type == KProtocolManager::EnvVarProxy);
// No proxy only applies to ManualProxy and EnvVarProxy types...
- if (hasNoProxyList && !noProxyFor.isEmpty()) {
+ if (useNoProxyList && noProxyFor.isEmpty()) {
QStringList noProxyForList (KProtocolManager::noProxyFor().split(QL1C(',')));
QMutableStringListIterator it (noProxyForList);
while (it.hasNext()) {
@@ -182,11 +198,18 @@ bool KProtocolManagerPrivate::shouldIgnoreProxyFor(const KUrl& url)
}
}
- if (!noProxySubnets.isEmpty()) {
- QHostAddress address (url.host());
+ const QString host (url.host());
+
+ if (!noProxySubnets.isEmpty() && !host.isEmpty()) {
+ QHostAddress address (host);
+ // If request url is not IP address, do a DNS lookup of the hostname.
+ // TODO: Perhaps we should make configurable ?
if (address.isNull()) {
- QHostInfo info = KIO::HostInfo::lookupHost(url.host(), 2000);
- address = info.addresses().first();
+ kDebug() << "Performing DNS lookup for" << host;
+ QHostInfo info = KIO::HostInfo::lookupHost(host, 2000);
+ const QList<QHostAddress> addresses = info.addresses();
+ if (!addresses.isEmpty())
+ address = addresses.first();
}
if (!address.isNull()) {
@@ -215,15 +238,13 @@ void KProtocolManager::reparseConfiguration()
if (d->config) {
d->config->reparseConfiguration();
}
- d->protocol.clear();
- d->proxyList.clear();
+ d->cachedProxyData.clear();
d->noProxyFor.clear();
d->modifiers.clear();
d->useragent.clear();
- d->url.clear();
// Force the slave config to re-read its config...
- KIO::SlaveConfig::self()->reset ();
+ KIO::SlaveConfig::self()->reset();
}
KSharedConfig::Ptr KProtocolManager::config()
@@ -414,12 +435,21 @@ static QStringList getSystemProxyFor( const KUrl& url )
QString proxyVar (KProtocolManager::proxyFor(url.protocol()));
// Check for SOCKS proxy, if not proxy is found for given url.
if (!proxyVar.isEmpty()) {
- QString proxy (QString::fromLocal8Bit(qgetenv(proxyVar.toLocal8Bit())).trimmed());
- if (proxy.isEmpty()) {
- proxyVar = KProtocolManager::proxyFor(QL1S("socks"));
- proxy = QString::fromLocal8Bit(qgetenv(proxyVar.toLocal8Bit())).trimmed();
- }
+ const QString proxy (QString::fromLocal8Bit(qgetenv(proxyVar.toLocal8Bit())).trimmed());
+ if (!proxy.isEmpty()) {
+ proxies << proxy;
+ }
+ }
+ // Add the socks proxy as an alternate proxy if it exists,
+ proxyVar = KProtocolManager::proxyFor(QL1S("socks"));
+ if (!proxyVar.isEmpty()) {
+ QString proxy = QString::fromLocal8Bit(qgetenv(proxyVar.toLocal8Bit())).trimmed();
+ // Make sure the scheme of SOCKS proxy is always set to "socks://".
+ const int index = proxy.indexOf(QL1S("://"));
+ proxy = QL1S("socks://") + (index == -1 ? proxy : proxy.mid(index+3));
+ if (!proxy.isEmpty()) {
proxies << proxy;
+ }
}
#endif
return proxies;
@@ -440,11 +470,10 @@ QStringList KProtocolManager::proxiesForUrl( const KUrl &url )
const QString protocol = adjustProtocol(u.protocol());
u.setProtocol(protocol);
- if (KProtocolInfo::protocolClass(protocol) != QL1S(":local"))
- {
+ if (KProtocolInfo::protocolClass(protocol) != QL1S(":local")) {
QDBusReply<QStringList> reply = QDBusInterface(QL1S("org.kde.kded"),
- QL1S("/modules/proxyscout"),
- QL1S("org.kde.KPAC.ProxyScout"))
+ QL1S("/modules/proxyscout"),
+ QL1S("org.kde.KPAC.ProxyScout"))
.call(QL1S("proxiesForUrl"), u.url());
proxyList = reply;
}
@@ -456,16 +485,16 @@ QStringList KProtocolManager::proxiesForUrl( const KUrl &url )
case ManualProxy:
{
QString proxy (proxyFor(url.protocol()));
- // Check for SOCKS proxy, if not proxy is found for given url.
- if (proxy.isEmpty()) {
- proxy = proxyFor(QL1S("socks"));
+ if (!proxy.isEmpty())
+ proxyList << proxy;
+ // Add the socks proxy as an alternate proxy if it exists,
+ proxy = proxyFor(QL1S("socks"));
+ if (!proxy.isEmpty()) {
// Make sure the scheme of SOCKS proxy is always set to "socks://".
- if (!proxy.isEmpty()) {
- const int index = proxy.indexOf(QL1S("://"));
- proxy = QL1S("socks://") + (index == -1 ? proxy : proxy.mid(index+3));
- }
+ const int index = proxy.indexOf(QL1S("://"));
+ proxy = QL1S("socks://") + (index == -1 ? proxy : proxy.mid(index+3));
+ proxyList << proxy;
}
- proxyList << proxy;
}
break;
case NoProxy:
@@ -485,15 +514,12 @@ void KProtocolManager::badProxy( const QString &proxy )
{
QDBusInterface( QL1S("org.kde.kded"), QL1S("/modules/proxyscout"))
.asyncCall(QL1S("blackListProxy"), proxy);
-}
-// For proxy address comparisons, we only need to compare
-// protocol, host and port number. Nothing else.
-static bool compareProxyUrls(const KUrl& u1, const KUrl& u2)
-{
- return ((u1.protocol() == u2.protocol()) &&
- (u1.host() == u2.host()) &&
- (u1.port() == u2.port()));
+ PRIVATE_DATA;
+ const QStringList keys (d->cachedProxyData.keys());
+ Q_FOREACH(const QString& key, keys) {
+ d->cachedProxyData[key]->removeAddress(proxy);
+ }
}
QString KProtocolManager::slaveProtocol(const KUrl &url, QString &proxy)
@@ -506,69 +532,80 @@ QString KProtocolManager::slaveProtocol(const KUrl &url, QString &proxy)
return protocol;
}
+// Generates proxy cache key from request given url.
+static void extractProxyCacheKeyFromUrl(const KUrl& u, QString* key)
+{
+ if (!key)
+ return;
+
+ *key = u.protocol();
+ *key += u.host();
+
+ if (u.port() > 0)
+ *key += QString::number(u.port());
+}
+
QString KProtocolManager::slaveProtocol(const KUrl &url, QStringList &proxyList)
{
- if (url.hasSubUrl()) // We don't want the suburl's protocol
- {
- const KUrl::List list = KUrl::split(url);
- return slaveProtocol(list.last(), proxyList);
+ if (url.hasSubUrl()) { // We don't want the suburl's protocol
+ const KUrl::List list = KUrl::split(url);
+ return slaveProtocol(list.last(), proxyList);
}
- PRIVATE_DATA;
- if (compareProxyUrls(d->url, url))
- {
- proxyList = d->proxyList;
- return d->protocol;
- }
+ proxyList.clear();
// Do not perform a proxy lookup for any url classified as a ":local" url or
- // one that does not have a host name.
- const QString scheme = url.protocol();
- if (KProtocolInfo::protocolClass(scheme) == QL1S(":local") || !url.hasHost())
- {
- return scheme;
+ // one that does not have a host component or if proxy is disabled.
+ QString protocol (url.protocol());
+ if (!url.hasHost()
+ || KProtocolInfo::protocolClass(protocol) == QL1S(":local")
+ || KProtocolManager::proxyType() == KProtocolManager::NoProxy) {
+ return protocol;
}
- d->url = url;
- d->protocol = scheme;
- d->proxyList.clear();
- proxyList.clear();
+ QString proxyCacheKey;
+ extractProxyCacheKeyFromUrl(url, &proxyCacheKey);
+
+ PRIVATE_DATA;
+ // Look for cached proxy information to avoid more work.
+ if (d->cachedProxyData.contains(proxyCacheKey)) {
+ KProxyData* data = d->cachedProxyData.object(proxyCacheKey);
+ proxyList = data->proxyList;
+ return data->protocol;
+ }
const QStringList proxies = proxiesForUrl(url);
const int count = proxies.count();
- if (count > 0 && !(count == 1 && proxies.first() == QL1S("DIRECT")))
- {
- // The idea behind slave protocols is not applicable to http
- // and webdav protocols as well as protocols unknown to KDE.
- const bool useRequestScheme = (scheme.startsWith(QL1S("http")) ||
- scheme.startsWith(QL1S("webdav")) ||
- !KProtocolInfo::isKnownProtocol(scheme));
- Q_FOREACH(const QString& proxy, proxies)
- {
- if (proxy == QL1S("DIRECT"))
- {
- proxyList << proxy;
- }
- else
- {
- KUrl u (proxy);
- if (!u.isEmpty() && u.isValid() && !u.protocol().isEmpty())
- {
- d->protocol = (useRequestScheme ? scheme : u.protocol());
- proxyList << proxy;
- // kDebug () << "Slave protocol:" << d->protocol;
- }
+ if (count > 0 && !(count == 1 && proxies.first() == QL1S("DIRECT"))) {
+ Q_FOREACH(const QString& proxy, proxies) {
+ if (proxy == QL1S("DIRECT")) {
+ proxyList << proxy;
+ } else {
+ KUrl u (proxy);
+ if (!u.isEmpty() && u.isValid() && !u.protocol().isEmpty()) {
+ proxyList << proxy;
+ // kDebug () << "Slave protocol:" << d->protocol;
+ }
+ }
}
- }
}
- if (!proxyList.isEmpty())
- {
- d->proxyList = proxyList;
+ // The idea behind slave protocols is not applicable to http
+ // and webdav protocols as well as protocols unknown to KDE.
+ if (!proxyList.isEmpty()
+ && !protocol.startsWith(QL1S("http"))
+ && !protocol.startsWith(QL1S("webdav"))
+ && KProtocolInfo::isKnownProtocol(protocol)) {
+ KUrl u (proxyList.first());
+ if (u.isValid()) {
+ protocol = u.protocol();
+ }
}
- return d->protocol;
+ // cache the proxy information...
+ d->cachedProxyData.insert(proxyCacheKey, new KProxyData(protocol, proxyList));
+ return protocol;
}
/*================================= USER-AGENT SETTINGS =====================*/
diff --git a/kio/kio/krun.cpp b/kio/kio/krun.cpp
index 0141a7c..c978576 100644
--- a/kio/kio/krun.cpp
+++ b/kio/kio/krun.cpp
@@ -135,7 +135,7 @@ bool KRun::runUrl(const KUrl& u, const QString& _mimetype, QWidget* window, bool
else if (isExecutableFile(u, _mimetype)) {
if (u.isLocalFile() && runExecutables) {
if (KAuthorized::authorize("shell_access")) {
- return (KRun::runCommand(KShell::quoteArg(u.toLocalFile()), QString(), QString(), window, asn)); // just execute the url as a command
+ return (KRun::runCommand(KShell::quoteArg(u.toLocalFile()), QString(), QString(), window, asn, u.directory())); // just execute the url as a command
// ## TODO implement deleting the file if tempFile==true
}
else {
diff --git a/kio/kio/kurlcompletion.cpp b/kio/kio/kurlcompletion.cpp
index d1b3e81..8b8c8a7 100644
--- a/kio/kio/kurlcompletion.cpp
+++ b/kio/kio/kurlcompletion.cpp
@@ -974,10 +974,6 @@ bool KUrlCompletionPrivate::urlCompletion(const KUrlCompletionPrivate::MyURL& ur
if (!url_dir.isValid())
return false;
- // url handler doesn't support listing
- if (!KProtocolManager::supportsListing(url_dir))
- return false;
-
// non local urls
if (!isLocalProtocol(url.protocol())) {
// url does not specify host
@@ -993,6 +989,10 @@ bool KUrlCompletionPrivate::urlCompletion(const KUrlCompletionPrivate::MyURL& ur
return false;
}
+ // url handler doesn't support listing
+ if (!KProtocolManager::supportsListing(url_dir))
+ return false;
+
url_dir.setFileName(QString()); // not really nesseccary, but clear the filename anyway...
// Remove escapes
diff --git a/kio/kio/udsentry.h b/kio/kio/udsentry.h
index 04c5f49..e1c8b05 100644
--- a/kio/kio/udsentry.h
+++ b/kio/kio/udsentry.h
@@ -253,6 +253,13 @@ namespace KIO
/// @since 4.6
UDS_COMMENT = 28 | UDS_STRING,
+ /// Device number for this file, used to detect hardlinks
+ /// @since 4.7.3
+ UDS_DEVICE_ID = 29 | UDS_NUMBER,
+ /// Inode number for this file, used to detect hardlinks
+ /// @since 4.7.3
+ UDS_INODE = 30 | UDS_NUMBER,
+
/// Extra data (used only if you specified Columns/ColumnsTypes)
/// KDE 4.0 change: you cannot repeat this entry anymore, use UDS_EXTRA + i
/// until UDS_EXTRA_END.
diff --git a/kio/kssl/kcm/kcm_ssl.desktop b/kio/kssl/kcm/kcm_ssl.desktop
index 6a1a90e..7923f5c 100644
--- a/kio/kssl/kcm/kcm_ssl.desktop
+++ b/kio/kssl/kcm/kcm_ssl.desktop
@@ -82,7 +82,7 @@ Comment[it]=Versioni SSL e certificati
Comment[kk]=SSL нұсқалары мен куәліктері
Comment[km]=វិញ្ញាបនបត្រ និងកំណែរបស់ SSL
Comment[ko]=SSL 버전과 인증서
-Comment[lt]=SSL versijos ir sertifikatai
+Comment[lt]=SSL versijos ir liudijimai
Comment[lv]=SSL versijas un sertifikāti
Comment[nb]=SSL-versjoner og sertifikater
Comment[nds]=SSL-Verschonen un Zertifikaten
diff --git a/kio/misc/kpac/proxyscout.cpp b/kio/misc/kpac/proxyscout.cpp
index 50ab1f2..94be7aa 100644
--- a/kio/misc/kpac/proxyscout.cpp
+++ b/kio/misc/kpac/proxyscout.cpp
@@ -305,7 +305,7 @@ namespace KPAC
if (type == Proxy || type == Socks) {
const int index = address.indexOf(QLatin1Char(':'));
if (index == -1 || !KProtocolInfo::isKnownProtocol(address.left(index))) {
- const QString protocol ((type == Proxy ? QLatin1String("https://") : QLatin1String("socks://")));
+ const QString protocol ((type == Proxy ? QLatin1String("http://") : QLatin1String("socks://")));
const KUrl url (protocol + address);
if (url.isValid()) {
address = url.url();
diff --git a/kioslave/file/file.cpp b/kioslave/file/file.cpp
index f884acb..b807f88 100644
--- a/kioslave/file/file.cpp
+++ b/kioslave/file/file.cpp
@@ -848,6 +848,10 @@ bool FileProtocol::createUDSEntry( const QString & filename, const QByteArray &
entry.insert( KIO::UDSEntry::UDS_GROUP, getGroupName( buff.st_gid ) );
entry.insert( KIO::UDSEntry::UDS_ACCESS_TIME, buff.st_atime );
}
+ if (details > 2) {
+ entry.insert( KIO::UDSEntry::UDS_DEVICE_ID, buff.st_dev );
+ entry.insert( KIO::UDSEntry::UDS_INODE, buff.st_ino );
+ }
// Note: buff.st_ctime isn't the creation time !
// We made that mistake for KDE 2.0, but it's in fact the
diff --git a/kioslave/http/http.cpp b/kioslave/http/http.cpp
index ca84f86..affd923 100644
--- a/kioslave/http/http.cpp
+++ b/kioslave/http/http.cpp
@@ -1329,20 +1329,18 @@ void HTTPProtocol::put( const KUrl &url, int, KIO::JobFlags flags )
m_request.url.setQuery(QString());
m_request.cacheTag.policy = CC_Reload;
- proceedUntilResponseHeader();
-
- kDebug(7113) << "error =" << m_isError;
- if (m_isError)
- return;
+ if (!(proceedUntilResponseHeader() && readBody(false))) {
+ return;
+ }
- kDebug(7113) << "responseCode =" << m_request.responseCode;
+ httpClose(m_request.isKeepAlive);
- httpClose(false); // Always close connection.
+ kDebug(7113) << "responseCode=" << m_request.responseCode;
if ( (m_request.responseCode >= 200) && (m_request.responseCode < 300) )
finished();
else
- httpPutError();
+ sendHttpPutError();
}
void HTTPProtocol::copy( const KUrl& src, const KUrl& dest, int, KIO::JobFlags flags )
@@ -1765,24 +1763,15 @@ QString HTTPProtocol::davError( int code /* = -1 */, const QString &_url )
return errorString;
}
-void HTTPProtocol::httpPutError()
+void HTTPProtocol::sendHttpPutError()
{
- QString action, errorString;
-
- switch ( m_request.method ) {
- case HTTP_PUT:
- action = i18nc("request type", "upload %1", m_request.url.prettyUrl());
- break;
- default:
- // this should not happen, this function is for http errors only
- // ### WTF, what about HTTP_GET?
- Q_ASSERT(0);
+ // Only applies to HTTP PUT!
+ if (m_request.method != HTTP_PUT) {
+ return;
}
- // default error message if the following code fails
- errorString = i18nc("%1: response code, %2: request type",
- "An unexpected error (%1) occurred while attempting to %2.",
- m_request.responseCode, action);
+ QString errorString;
+ const QString action (i18nc("request type", "upload %1", m_request.url.prettyUrl()));
switch ( m_request.responseCode )
{
@@ -1819,11 +1808,14 @@ void HTTPProtocol::httpPutError()
"to record the state of the resource after the execution "
"of this method.");
break;
+ default:
+ // default error message
+ errorString = i18nc("%1: response code, %2: request type",
+ "An unexpected error (%1) occurred while attempting to %2.",
+ m_request.responseCode, action);
+ break;
}
- // if ( kError != ERR_SLAVE_DEFINED )
- //errorString += " (" + url + ')';
-
error( ERR_SLAVE_DEFINED, errorString );
}
@@ -3112,11 +3104,16 @@ endParsing:
tIt = tokenizer.iterator("keep-alive");
while (tIt.hasNext()) {
- if (tIt.next().startsWith("timeout=")) { // krazy:exclude=strings
- m_request.keepAliveTimeout = tIt.current().mid(qstrlen("timeout=")).trimmed().toInt();
+ QByteArray ka = tIt.next().trimmed().toLower();
+ if (ka.startsWith("timeout=")) { // krazy:exclude=strings
+ int ka_timeout = ka.mid(qstrlen("timeout=")).trimmed().toInt();
+ if (ka_timeout > 0)
+ m_request.keepAliveTimeout = ka_timeout;
if (httpRev == HTTP_10) {
m_request.isKeepAlive = true;
}
+
+ break; // we want to fetch ka timeout only
}
}
@@ -3643,7 +3640,7 @@ endParsing:
prevLinePos = nextLinePos;
}
- // IMPORTNAT: Do not remove this line because forwardHttpResponseHeader
+ // IMPORTANT: Do not remove this line because forwardHttpResponseHeader
// is called below. This line is here to ensure the response headers are
// available to the client before it receives mimetype information.
// The support for putting ioslaves on hold in the KIO-QNAM integration
diff --git a/kioslave/http/http.h b/kioslave/http/http.h
index b337e96..4c62841 100644
--- a/kioslave/http/http.h
+++ b/kioslave/http/http.h
@@ -291,7 +291,7 @@ public:
/**
* Generate error message based on response code
*/
- void httpPutError();
+ void sendHttpPutError();
/**
* Call SlaveBase::errorPage() and remember that we've called it
*/
diff --git a/kioslave/http/parsinghelpers.cpp b/kioslave/http/parsinghelpers.cpp
index 9d8c3ee..d030a1f 100644
--- a/kioslave/http/parsinghelpers.cpp
+++ b/kioslave/http/parsinghelpers.cpp
@@ -18,6 +18,8 @@
Boston, MA 02110-1301, USA.
*/
+#include <ctype.h>
+
#include <QDir>
#include <QMap>
#include <QTextCodec>
@@ -64,6 +66,27 @@ static bool nextLine(const char input[], int *pos, int end)
return idx < end && rCount < 2 && nCount < 2;
}
+// QByteArray::fromPercentEncoding() does not notify us about encoding errors so we need
+// to check here if this is valid at all.
+static bool isValidPercentEncoding(const QByteArray &data)
+{
+ int i = 0;
+ const int last = data.length() - 1;
+ const char *d = data.constData();
+
+ while ( (i = data.indexOf('%', i)) != -1) {
+ if ( i >= last - 2 )
+ return false;
+ if ( ! isxdigit(d[i + 1]) )
+ return false;
+ if ( ! isxdigit(d[i + 2]) )
+ return false;
+ i++;
+ }
+
+ return true;
+}
+
QByteArray TokenIterator::next()
{
QPair<int, int> token = m_tokens[m_currentToken++];
@@ -117,7 +140,7 @@ HeaderTokenizer::HeaderTokenizer(char *buffer)
{"dav", true}, //RFC 2518
{"etag", false},
{"expires", false},
- {"keep-alive", false}, //RFC 2068
+ {"keep-alive", true}, //RFC 2068
{"last-modified", false},
{"link", false}, //RFC 2068, multi-valued with ";" separator
{"location", false},
@@ -526,7 +549,12 @@ static QMap<QString, QString> contentDispositionParserInternal(const QString &di
const QString charset = val.left(spos);
const QString lang = val.mid(spos + 1, npos - spos - 1);
- const QByteArray rawval = QByteArray::fromPercentEncoding(val.mid(npos + 1).toAscii());
+ const QByteArray encodedVal = val.mid(npos + 1).toAscii();
+
+ if ( ! isValidPercentEncoding(encodedVal) )
+ continue;
+
+ const QByteArray rawval = QByteArray::fromPercentEncoding(encodedVal);
if (charset.isEmpty() || (charset == QLatin1String("us-ascii"))) {
bool valid = true;
diff --git a/kioslave/http/tests/httpheaderdispositiontest.cpp b/kioslave/http/tests/httpheaderdispositiontest.cpp
index f8152c6..d024835 100644
--- a/kioslave/http/tests/httpheaderdispositiontest.cpp
+++ b/kioslave/http/tests/httpheaderdispositiontest.cpp
@@ -317,6 +317,18 @@ void HeaderDispositionTest::runAllTests_data()
QTest::newRow("duplicate_with_continuation") << "attachment; filename=\"bar\"; filename*0=\"foo.\"; filename*1=\"html\"" <<
QByteArray("type\tattachment");
+// percent encoding, invalid first character
+ QTest::newRow("percent-first-char-invalid") << "attachment; filename*=UTF-8''foo-%o5.html" <<
+ QByteArray("type\tattachment");
+// percent encoding, invalid second character
+ QTest::newRow("percent-second-char-invalid") << "attachment; filename*=UTF-8''foo-%5o.html" <<
+ QByteArray("type\tattachment");
+// percent encoding, both characters invalid
+ QTest::newRow("greenbytes-attwithfn2231nbadpct2") << "attachment; filename*=UTF-8''foo-%oo.html" <<
+ QByteArray("type\tattachment");
+// percent encoding, invalid second character
+ QTest::newRow("percent-second-char-missing") << "attachment; filename*=UTF-8''foo-%f.html" <<
+ QByteArray("type\tattachment");
}
#if 0
diff --git a/knewstuff/knewstuff3/CMakeLists.txt b/knewstuff/knewstuff3/CMakeLists.txt
index cb9b0a9..062658d 100644
--- a/knewstuff/knewstuff3/CMakeLists.txt
+++ b/knewstuff/knewstuff3/CMakeLists.txt
@@ -68,6 +68,3 @@ install(FILES
knewstuffbutton.h
DESTINATION ${INCLUDE_INSTALL_DIR}/knewstuff3 COMPONENT Devel
)
-
-install(FILES uploaddialog.h DESTINATION ${INCLUDE_INSTALL_DIR}/knewstuff3 COMPONENT Devel)
-
diff --git a/kparts/statusbarextension.cpp b/kparts/statusbarextension.cpp
index 11fdf40..7689360 100644
--- a/kparts/statusbarextension.cpp
+++ b/kparts/statusbarextension.cpp
@@ -96,6 +96,16 @@ StatusBarExtension::StatusBarExtension(KParts::ReadOnlyPart *parent)
StatusBarExtension::~StatusBarExtension()
{
+ KStatusBar * sb = statusBar();
+ for ( int i = d->m_statusBarItems.count () - 1; i >= 0 ; --i ) {
+ if ( d->m_statusBarItems[i].widget() ) {
+ if ( sb ) {
+ d->m_statusBarItems[i].ensureItemHidden( sb );
+ }
+ d->m_statusBarItems[i].widget()->deleteLater();
+ }
+ }
+
delete d;
}
diff --git a/kparts/statusbarextension.h b/kparts/statusbarextension.h
index 69691d7..9239696 100644
--- a/kparts/statusbarextension.h
+++ b/kparts/statusbarextension.h
@@ -75,6 +75,10 @@ namespace KParts
* the part is unactivated. This simply controls where temporary messages
* hide the @p widget, and whether it's added to the left or to the right side.
*
+ * @Note that the widget does not technically become a child of the
+ * StatusBarExtension in a QObject sense. However, it @em will be deleted
+ * when the StatusBarExtension is deleted.
+ *
* IMPORTANT: do NOT add any items immediately after constructing the extension.
* Give the application time to set the statusbar in the extension if necessary.
*/
diff --git a/kutils/kemoticons/providers/adium/emoticonstheme_adium.desktop b/kutils/kemoticons/providers/adium/emoticonstheme_adium.desktop
index 74a79f6..898ac5f 100644
--- a/kutils/kemoticons/providers/adium/emoticonstheme_adium.desktop
+++ b/kutils/kemoticons/providers/adium/emoticonstheme_adium.desktop
@@ -70,7 +70,7 @@ Name[ta]=ஏடியம் உணர்வுருக்களுக்கா
Name[tg]=Мавзӯъи Adium Emoticons
Name[th]=ภาพไอคอนสื่ออารมณ์ของ Adium
Name[tr]=Adium Duygu Simgesi Teması
-Name[ug]=Adium چىراي ئىپادە تېمىسى
+Name[ug]=Adium چىراي ئىپادە ئۆرنىكى
Name[uk]=Тема емоційок Adium
Name[wa]=Tinme di xhinêyes Adium
Name[x-test]=xxAdium Emoticons Themexx
@@ -146,7 +146,7 @@ Comment[ta]=ஏடியம் உணர்வுரு தோற்றத்த
Comment[tg]=Китобхонаи мавзӯъи Adium emoticons
Comment[th]=ไลบรารีที่ใช้ภาพไอคอนสื่ออารมณ์ของ Adium
Comment[tr]=Adium Duygu Simgesi Temasını kullanmak için kitaplık
-Comment[ug]=Adium چىراي ئىپادە تېمىسىنى ئىشلىتىدىغان ئامبار
+Comment[ug]=Adium چىراي ئىپادە ئۆرنىكىنى ئىشلىتىدىغان ئامبار
Comment[uk]=Бібліотека для використання теми емоційок Adium
Comment[wa]=Livreye pos eployî l' tinme di xhinêyes Adium
Comment[x-test]=xxLibrary to use Adium emoticons themexx
diff --git a/kutils/kemoticons/providers/kde/emoticonstheme_kde.desktop b/kutils/kemoticons/providers/kde/emoticonstheme_kde.desktop
index ef7c73f..7c0b5d6 100644
--- a/kutils/kemoticons/providers/kde/emoticonstheme_kde.desktop
+++ b/kutils/kemoticons/providers/kde/emoticonstheme_kde.desktop
@@ -52,7 +52,7 @@ Name[sv]=KDE smilistema
Name[ta]=கேடியீ உணர்வுருக்கள் தோற்றம்
Name[th]=ภาพไอคอนสื่ออารมณ์ของ KDE
Name[tr]=Kde Duygu Simgesi Teması
-Name[ug]=KDE چىراي ئىپادە تېمىسى
+Name[ug]=KDE چىراي ئىپادە ئۆرنىكى
Name[uk]=Тема емоційок KDE
Name[wa]=Tinme di xhinêyes KDE
Name[x-test]=xxKDE Emoticons Themexx
@@ -129,7 +129,7 @@ Comment[ta]=நிரலகம் கேடியி உணர்வுரு
Comment[tg]=Китобхонаи мавзӯъи KDE emoticons
Comment[th]=ไลบรารีที่ใช้ภาพไอคอนสื่ออารมณ์ของ KDE
Comment[tr]=Kde Duygu Simgesi Temasını kullanmak için kitaplık
-Comment[ug]=KDE چىراي ئىپادە تېمىسىنى ئىشلىتىدىغان ئامبار
+Comment[ug]=KDE چىراي ئىپادە ئۆرنىكىنى ئىشلىتىدىغان ئامبار
Comment[uk]=Бібліотека для використання теми емоційок KDE
Comment[wa]=Livreye pos eployî l' tinme di xhinêyes KDE
Comment[x-test]=xxLibrary to use KDE emoticons themexx
diff --git a/kutils/kemoticons/providers/pidgin/emoticonstheme_pidgin.desktop b/kutils/kemoticons/providers/pidgin/emoticonstheme_pidgin.desktop
index 9e78708..b10d53b 100644
--- a/kutils/kemoticons/providers/pidgin/emoticonstheme_pidgin.desktop
+++ b/kutils/kemoticons/providers/pidgin/emoticonstheme_pidgin.desktop
@@ -71,7 +71,7 @@ Name[ta]=பிட்கின் உணர்வுருக்கள் தோ
Name[tg]=Мавзӯъи Pidgin Emoticons
Name[th]=ภาพไอคอนสื่ออารมณ์ของ Pidgin
Name[tr]=Pidgin Duygu Simgesi Teması
-Name[ug]=Pidgin چىراي ئىپادە تېمىسى
+Name[ug]=Pidgin چىراي ئىپادە ئۆرنىكى
Name[uk]=Тема емоційок Pidgin
Name[wa]=Tinme di xhinêyes Pidgin
Name[x-test]=xxPidgin Emoticons Themexx
@@ -148,7 +148,7 @@ Comment[ta]=நிரலகம் பிட்கின் உணர்வுர
Comment[tg]=Китобхонаи мавзӯъи Pidgin emoticons
Comment[th]=ไลบรารีที่ใช้ภาพไอคอนสื่ออารมณ์ของ Pidgin
Comment[tr]=Pidgin Duygu Simgesi Temasını kullanmak için kitaplık
-Comment[ug]=Pidgin چىراي ئىپادە تېمىسىنى ئىشلىتىدىغان ئامبار
+Comment[ug]=Pidgin چىراي ئىپادە ئۆرنىكىنى ئىشلىتىدىغان ئامبار
Comment[uk]=Бібліотека для використання теми емоційок Pidgin
Comment[wa]=Livreye pos eployî l' tinme di xhinêyes Pidgin
Comment[x-test]=xxLibrary to use Pidgin emoticons themexx
diff --git a/kutils/kemoticons/providers/xmpp/emoticonstheme_xmpp.desktop b/kutils/kemoticons/providers/xmpp/emoticonstheme_xmpp.desktop
index f3ae1ac..0800002 100644
--- a/kutils/kemoticons/providers/xmpp/emoticonstheme_xmpp.desktop
+++ b/kutils/kemoticons/providers/xmpp/emoticonstheme_xmpp.desktop
@@ -71,7 +71,7 @@ Name[ta]=XMPP உணர்வுருக்கள் தோற்றம்
Name[tg]=Мавзӯъи XMPP Emoticons
Name[th]=ภาพไอคอนสื่ออารมณ์ของ XMPP
Name[tr]=XMPP Duygu Simgesi Teması
-Name[ug]=XMPP چىراي ئىپادە تېمىسى
+Name[ug]=XMPP چىراي ئىپادە ئۆرنىكى
Name[uk]=Тема емоційок XMPP
Name[wa]=Tinme di xhinêyes XMPP
Name[x-test]=xxXMPP Emoticons Themexx
@@ -148,7 +148,7 @@ Comment[ta]=நிரலகம் XMPP உணர்வுரு தோற்ற
Comment[tg]=Китобхонаи мавзӯъи XMPP emoticons
Comment[th]=ไลบรารีที่ใช้ภาพไอคอนสื่ออารมณ์ของ XMPP
Comment[tr]=XMPP Duygu Simgesi Temasını kullanmak için kitaplık
-Comment[ug]=XMPP چىراي ئىپادە تېمىسىنى ئىشلىتىدىغان ئامبار
+Comment[ug]=XMPP چىراي ئىپادە ئۆرنىكىنى ئىشلىتىدىغان ئامبار
Comment[uk]=Бібліотека для використання теми емоційок XMPP
Comment[wa]=Livreye pos eployî l' tinme di xhinêyes XMPP
Comment[x-test]=xxLibrary to use XMPP emoticons themexx
diff --git a/nepomuk/query/CMakeLists.txt b/nepomuk/query/CMakeLists.txt
index 1a701d8..5591b4a 100644
--- a/nepomuk/query/CMakeLists.txt
+++ b/nepomuk/query/CMakeLists.txt
@@ -66,24 +66,23 @@ target_link_libraries(nepomukquery
install(TARGETS nepomukquery EXPORT kdelibsLibraryTargets ${INSTALL_TARGETS_DEFAULT_ARGS})
install(FILES
- term.h
- negationterm.h
- orterm.h
andterm.h
comparisonterm.h
- simpleterm.h
+ filequery.h
groupterm.h
- resourceterm.h
literalterm.h
- resourcetypeterm.h
+ negationterm.h
+ nepomukquery_export.h
optionalterm.h
+ orterm.h
query.h
- filequery.h
- result.h
- queryserviceclient.h
queryparser.h
+ queryserviceclient.h
+ resourceterm.h
+ resourcetypeterm.h
+ result.h
+ simpleterm.h
standardqueries.h
- nepomukquery_export.h
- standardqueries.h
+ term.h
DESTINATION ${INCLUDE_INSTALL_DIR}/nepomuk COMPONENT Devel
)
diff --git a/nepomuk/query/querybuilderdata_p.h b/nepomuk/query/querybuilderdata_p.h
index 055482e..3880e13 100644
--- a/nepomuk/query/querybuilderdata_p.h
+++ b/nepomuk/query/querybuilderdata_p.h
@@ -32,6 +32,28 @@
#include "query_p.h"
#include "groupterm_p.h"
+namespace {
+/// A hack to avoid passing extended chars to the bif:search_excerpts method which cannot handle
+/// utf8 chars which use more than one char, ie. wide chars.
+/// Thus, we simply truncate each term at the first wide char.
+QStringList stripExtendedCharsHack(const QStringList& terms) {
+ QStringList newTerms;
+ foreach(const QString& term, terms) {
+ int i = 0;
+ while(i < term.length()) {
+ if(term[i].unicode() > 0x7f) {
+ break;
+ }
+ ++i;
+ }
+ if(i > 0) {
+ newTerms.append(term.left(i));
+ }
+ }
+ return newTerms;
+}
+}
+
namespace Nepomuk {
namespace Query {
class QueryBuilderData
@@ -246,16 +268,23 @@ namespace Nepomuk {
for( QHash<QString, QStringList>::const_iterator it = m_fullTextSearchTerms.constBegin();
it != m_fullTextSearchTerms.constEnd(); ++it ) {
const QString& varName = it.key();
- const QStringList& terms = it.value();
- // bif:search_excerpt wants a vector of all search terms
- excerptParts
- << QString::fromLatin1("bif:search_excerpt(bif:vector(bif:charset_recode('%1', '_WIDE_', 'UTF-8')), %2)")
- .arg( terms.join(QLatin1String("','")),
- varName );
+ const QStringList terms = stripExtendedCharsHack(it.value());
+ if(terms.count()) {
+ // bif:search_excerpt wants a vector of all search terms
+ excerptParts
+ << QString::fromLatin1("bif:search_excerpt(bif:vector('%1'), %2)")
+ .arg( terms.join(QLatin1String("','")),
+ varName );
+ }
}
- return QString::fromLatin1("(bif:concat(%1)) as ?_n_f_t_m_ex_")
- .arg(excerptParts.join(QLatin1String(",")));
+ if(excerptParts.count()) {
+ return QString::fromLatin1("(bif:concat(%1)) as ?_n_f_t_m_ex_")
+ .arg(excerptParts.join(QLatin1String(",")));
+ }
+ else {
+ return QString();
+ }
}
else {
return QString();
diff --git a/plasma/dataengine.cpp b/plasma/dataengine.cpp
index 5993942..c33b103 100644
--- a/plasma/dataengine.cpp
+++ b/plasma/dataengine.cpp
@@ -330,10 +330,10 @@ void DataEngine::removeAllSources()
QMutableHashIterator<QString, Plasma::DataContainer*> it(d->sources);
while (it.hasNext()) {
it.next();
- const QString source = it.key();
Plasma::DataContainer *s = it.value();
+ emit sourceRemoved(it.key());
it.remove();
- emit sourceRemoved(source);
+ s->disconnect(this);
delete s;
}
}
diff --git a/plasma/private/style.cpp b/plasma/private/style.cpp
index 1e01302..9fff60d 100644
--- a/plasma/private/style.cpp
+++ b/plasma/private/style.cpp
@@ -314,6 +314,16 @@ QRect Style::subControlRect(ComplexControl control, const QStyleOptionComplex *o
}
}
+int Style::styleHint(StyleHint hint, const QStyleOption *option, const QWidget *widget, QStyleHintReturn *returnData) const
+{
+ switch (hint) {
+ case SH_RequestSoftwareInputPanel:
+ return RSIP_OnMouseClick;
+ default:
+ return QCommonStyle::styleHint(hint, option, widget, returnData);
+ }
+}
+
int Style::pixelMetric(PixelMetric metric, const QStyleOption *option, const QWidget *widget) const
{
if (Theme::defaultTheme()->useNativeWidgetStyle()) {
diff --git a/plasma/private/style_p.h b/plasma/private/style_p.h
index 7f88ec8..787cf8d 100644
--- a/plasma/private/style_p.h
+++ b/plasma/private/style_p.h
@@ -45,6 +45,7 @@ public:
~Style();
void drawPrimitive(PrimitiveElement element, const QStyleOption *option, QPainter *painter, const QWidget *widget = 0) const;
+ int styleHint(StyleHint hint, const QStyleOption *option=0, const QWidget *widget=0, QStyleHintReturn *returnData=0) const;
protected:
void drawComplexControl(ComplexControl control,
diff --git a/plasma/tests/testcontainmentactionsplugin/plasma-containmentactions-test.desktop b/plasma/tests/testcontainmentactionsplugin/plasma-containmentactions-test.desktop
index b5ca8e0..87582b8 100644
--- a/plasma/tests/testcontainmentactionsplugin/plasma-containmentactions-test.desktop
+++ b/plasma/tests/testcontainmentactionsplugin/plasma-containmentactions-test.desktop
@@ -47,7 +47,7 @@ Name[sr@latin]=Proba
Name[sv]=Test
Name[th]=ทดสอบ
Name[tr]=Deneme
-Name[ug]=سىنا
+Name[ug]=سىناق
Name[uk]=Тест
Name[wa]=Sayî
Name[x-test]=xxTestxx
diff --git a/security/crypto/crypto.desktop b/security/crypto/crypto.desktop
index 3b73caa..68f3b29 100644
--- a/security/crypto/crypto.desktop
+++ b/security/crypto/crypto.desktop
@@ -137,7 +137,7 @@ Comment[km]=កំណត់រចនាសម្ព័ន្ធ SSL, គ
Comment[kn]=SSL ಅನ್ನು ಸಂರಚಿಸು, ಪ್ರಮಾಣಪತ್ರಗಳನ್ನು ನಿಭಾಯಿಸು, ಮತ್ತು ಇತರ ಗೂಢಲಿಪಿಶಾಸ್ತ್ರ (ಕ್ರಿಪ್ಟೋಗ್ರಫಿ) ಸಂಯೋಜನೆಗಳು
Comment[ko]=SSL과 같은 암호화를 설정하고, 인증서를 관리합니다
Comment[ku]=SSL, rêveberê belge kirinê, û mîhengên din yê bişîfre kirinê veava bike
-Comment[lt]=Derina SSL, tvarko sertifikatus ir kitus šifravimo parametrus
+Comment[lt]=Derina SSL, tvarko liudijimus ir kitus šifravimo parametrus
Comment[lv]=Konfigurēt SSL, pārvaldīt sertifikātus un citus kriptogrāfijas iestatījumus
Comment[mai]=एसएसएल बिन्यस्त करू, प्रमाणपत्र आओर आन क्रिप्टोग्राफिक सेटिंगक प्रबंधित करू
Comment[mk]=Конфигурација на SSL, менаџмент на сертификати\nи други криптографски поставувања
diff --git a/security/kcert/kcertpart.desktop b/security/kcert/kcertpart.desktop
index fa0ad41..f7295ae 100644
--- a/security/kcert/kcertpart.desktop
+++ b/security/kcert/kcertpart.desktop
@@ -48,7 +48,7 @@ Comment[kn]=ಹುದುಗಿಸಬಹುದಾದ (ಎಂಬೆಡಬಲ್)
Comment[ko]=첨부할 수 있는 개인 인증서 관리자
Comment[ku]=Rêveberê Belge Kirina Şexsî yê Dibe Jixwe Heyî
Comment[lb]=Abettbare perséinlechen Zertifikatsmanager
-Comment[lt]=Įdedama asmeninių sertifikatų tvarkyklė
+Comment[lt]=Įdedama asmeninių liudijimų tvarkyklė
Comment[lv]=Iegulstams personīgo sertifikātu pārvaldnieks
Comment[mai]=अंतर्निर्मित व्यक्तिगत प्रमाणपत्र प्रबंधक
Comment[mk]=Вгнездлив менаџер на лични сертификати
diff --git a/solid/solid/backends/udisks/udisksdevice.cpp b/solid/solid/backends/udisks/udisksdevice.cpp
index c76eebc..638531e 100644
--- a/solid/solid/backends/udisks/udisksdevice.cpp
+++ b/solid/solid/backends/udisks/udisksdevice.cpp
@@ -156,7 +156,8 @@ bool UDisksDevice::queryDeviceInterface(const Solid::DeviceInterface::Type& type
return m_udi.endsWith(":media");
} else {
return prop("DeviceIsPartition").toBool()
- || prop("IdUsage").toString()=="filesystem";
+ || prop("IdUsage").toString()=="filesystem"
+ || prop("IdUsage").toString()=="crypto";
}
case Solid::DeviceInterface::StorageAccess:
@@ -339,7 +340,17 @@ QString UDisksDevice::storageDescription() const
if (model.isEmpty())
vendormodel_str = vendor_str;
else
- vendormodel_str = QObject::tr("%1 %2", "%1 is the vendor, %2 is the model of the device").arg(vendor_str).arg(model);
+ {
+ if (model.startsWith(vendor_str))
+ {
+ // e.g. vendor is "Nokia" and model is "Nokia N950" we do not want "Nokia Nokia N950" as description
+ vendormodel_str = model;
+ }
+ else
+ {
+ vendormodel_str = QObject::tr("%1 %2", "%1 is the vendor, %2 is the model of the device").arg(vendor_str).arg(model);
+ }
+ }
}
if (vendormodel_str.isEmpty())
@@ -715,10 +726,10 @@ void UDisksDevice::slotChanged()
bool UDisksDevice::isDeviceBlacklisted() const
{
- return prop("DevicePresentationHide").toBool() || prop("DevicePresentationNopolicy").toBool() ||
+ return prop("DevicePresentationHide").toBool() ||
prop("DeviceMountPaths").toStringList().contains("/boot") ||
prop("IdLabel").toString() == "System Reserved" ||
- ( prop("IdUsage").toString().isEmpty() && !prop("OpticalDiscIsBlank").toBool());
+ ( prop("IdUsage").toString().isEmpty() && !(prop("OpticalDiscIsBlank").toBool() || (prop("OpticalDiscNumAudioTracks").toInt() > 0) ));
}
QString UDisksDevice::errorToString(const QString & error) const
diff --git a/solid/solid/backends/udisks/udisksopticaldisc.cpp b/solid/solid/backends/udisks/udisksopticaldisc.cpp
index 378195c..4fbf641 100644
--- a/solid/solid/backends/udisks/udisksopticaldisc.cpp
+++ b/solid/solid/backends/udisks/udisksopticaldisc.cpp
@@ -235,7 +235,8 @@ Solid::OpticalDisc::ContentTypes OpticalDisc::availableContent() const
if (m_needsReprobe) {
m_cachedContent = Solid::OpticalDisc::NoContent;
- bool hasData = m_device->prop("OpticalDiscNumTracks").toInt() > 0;
+ bool hasData = m_device->prop("OpticalDiscNumTracks").toInt() > 0 &&
+ m_device->prop("OpticalDiscNumTracks").toInt() > m_device->prop("OpticalDiscNumAudioTracks").toInt();
bool hasAudio = m_device->prop("OpticalDiscNumAudioTracks").toInt() > 0;
if ( hasData )
diff --git a/solid/solid/backends/udisks/udisksstorageaccess.cpp b/solid/solid/backends/udisks/udisksstorageaccess.cpp
index 4cb0f7c..f16b277 100644
--- a/solid/solid/backends/udisks/udisksstorageaccess.cpp
+++ b/solid/solid/backends/udisks/udisksstorageaccess.cpp
@@ -161,8 +161,12 @@ void UDisksStorageAccess::slotDBusReply( const QDBusMessage & reply )
{
QString clearTextPath = m_device->prop("LuksHolder").value<QDBusObjectPath>().path();
if (isLuksDevice() && clearTextPath != "/") // unlocked device, lock it
+ {
callCryptoTeardown();
-
+ }
+ else if (m_device->prop("DeviceIsLuksCleartext").toBool()) {
+ callCryptoTeardown(true); // Lock crypted parent
+ }
else
{
m_teardownInProgress = false;
@@ -294,7 +298,8 @@ bool UDisksStorageAccess::unmount()
return c.callWithCallback(msg, this,
SLOT(slotDBusReply(const QDBusMessage &)),
- SLOT(slotDBusError(const QDBusError &)));
+ SLOT(slotDBusError(const QDBusError &)),
+ s_unmountTimeout);
}
QString UDisksStorageAccess::generateReturnObjectPath()
@@ -358,10 +363,12 @@ void UDisksStorageAccess::callCryptoSetup( const QString & passphrase )
SLOT(slotDBusError(const QDBusError &)));
}
-bool UDisksStorageAccess::callCryptoTeardown()
+bool UDisksStorageAccess::callCryptoTeardown(bool actOnParent)
{
QDBusConnection c = QDBusConnection::systemBus();
- QDBusMessage msg = QDBusMessage::createMethodCall(UD_DBUS_SERVICE, m_device->udi(), UD_DBUS_INTERFACE_DISKS_DEVICE, "LuksLock");
+ QDBusMessage msg = QDBusMessage::createMethodCall(UD_DBUS_SERVICE,
+ actOnParent?(m_device->prop("LuksCleartextSlave").value<QDBusObjectPath>().path()):m_device->udi(),
+ UD_DBUS_INTERFACE_DISKS_DEVICE, "LuksLock");
msg << QStringList(); // options, unused now
return c.callWithCallback(msg, this,
diff --git a/solid/solid/backends/udisks/udisksstorageaccess.h b/solid/solid/backends/udisks/udisksstorageaccess.h
index 6bf729c..c639200 100644
--- a/solid/solid/backends/udisks/udisksstorageaccess.h
+++ b/solid/solid/backends/udisks/udisksstorageaccess.h
@@ -82,7 +82,7 @@ private:
bool requestPassphrase();
void callCryptoSetup( const QString & passphrase );
- bool callCryptoTeardown();
+ bool callCryptoTeardown( bool actOnParent=false );
QString generateReturnObjectPath();
@@ -92,6 +92,8 @@ private:
bool m_teardownInProgress;
bool m_passphraseRequested;
QString m_lastReturnObject;
+
+ static const int s_unmountTimeout = 0x7fffffff;
};
}
}
/space/work/OBS/kdf/kdelibs4