openSUSE Commits
Threads by month
- ----- 2025 -----
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2008 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2007 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2006 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
April 2014
- 1 participants
- 1084 discussions
Hello community,
here is the log from the commit of package kitemmodels for openSUSE:Factory checked in at 2014-04-02 17:22:10
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/kitemmodels (Old)
and /work/SRC/openSUSE:Factory/.kitemmodels.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "kitemmodels"
Changes:
--------
--- /work/SRC/openSUSE:Factory/kitemmodels/kitemmodels.changes …
[View More]2014-03-10 12:17:19.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.kitemmodels.new/kitemmodels.changes 2014-04-02 17:22:22.000000000 +0200
@@ -1,0 +2,9 @@
+Sat Mar 29 19:47:43 UTC 2014 - hrvoje.senjan(a)gmail.com
+
+- Update to 4.98.0
+ * API improvements and cleanups
+ * Buildsystem fixes
+ * For more details please see:
+ http://www.kde.org/announcements/announce-frameworks5-beta1.php
+
+-------------------------------------------------------------------
Old:
----
kitemmodels-4.97.0.tar.xz
New:
----
kitemmodels-4.98.0.tar.xz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ kitemmodels.spec ++++++
--- /var/tmp/diff_new_pack.IsrBoR/_old 2014-04-02 17:22:22.000000000 +0200
+++ /var/tmp/diff_new_pack.IsrBoR/_new 2014-04-02 17:22:22.000000000 +0200
@@ -18,10 +18,10 @@
%define lname libKF5ItemModels5
Name: kitemmodels
-Version: 4.97.0
+Version: 4.98.0
Release: 0
BuildRequires: cmake >= 2.8.12
-BuildRequires: extra-cmake-modules >= 0.0.11
+BuildRequires: extra-cmake-modules >= 0.0.12
BuildRequires: fdupes
BuildRequires: kf5-filesystem
BuildRequires: pkgconfig(Qt5Core) >= 5.2.0
++++++ kitemmodels-4.97.0.tar.xz -> kitemmodels-4.98.0.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kitemmodels-4.97.0/CMakeLists.txt new/kitemmodels-4.98.0/CMakeLists.txt
--- old/kitemmodels-4.97.0/CMakeLists.txt 2014-03-01 12:51:06.000000000 +0100
+++ new/kitemmodels-4.98.0/CMakeLists.txt 2014-03-28 19:35:13.000000000 +0100
@@ -2,7 +2,7 @@
project(KItemModels)
-find_package(ECM 0.0.11 REQUIRED NO_MODULE)
+find_package(ECM 0.0.12 REQUIRED NO_MODULE)
set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH} ${ECM_KDE_MODULE_DIR})
@@ -19,7 +19,7 @@
include(ECMSetupVersion)
include(ECMGenerateHeaders)
-set(KF5_VERSION "4.97.0")
+set(KF5_VERSION "4.98.0")
ecm_setup_version(${KF5_VERSION} VARIABLE_PREFIX KITEMMODELS
VERSION_HEADER "${CMAKE_CURRENT_BINARY_DIR}/kitemmodels_version.h"
@@ -28,8 +28,9 @@
add_subdirectory(src)
-# TODO re-enable, after grantlee is ported to Qt5
-#add_subdirectory(autotests)
+if (BUILD_TESTING)
+ add_subdirectory(autotests)
+endif()
# create a Config.cmake and a ConfigVersion.cmake file and install them
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kitemmodels-4.97.0/autotests/CMakeLists.txt new/kitemmodels-4.98.0/autotests/CMakeLists.txt
--- old/kitemmodels-4.97.0/autotests/CMakeLists.txt 2014-03-01 12:51:06.000000000 +0100
+++ new/kitemmodels-4.98.0/autotests/CMakeLists.txt 2014-03-28 19:35:13.000000000 +0100
@@ -27,7 +27,11 @@
kitemmodels_proxymodel_tests(
kdescendantsproxymodeltest
klinkitemselectionmodeltest
- kselectionproxymodeltest
+ # TODO fix this test - or the code that it tests!
+ # FAIL! : SelectionProxyModelTest::testMoveFromRoot(move01) 'signalList.isEmpty()' returned FALSE. ()
+ # Loc: [/srv/jenkins/workspace/kitemmodels_master_qt5/autotests/proxymodeltestsuite/proxymodeltest.cpp(569)]
+ # QFATAL : SelectionProxyModelTest::testMoveFromRoot(move02) ASSERT: "m_unchangedIndexes.isEmpty()" in file proxymodeltestsuite/modelspy.cpp, line 253
+ #kselectionproxymodeltest
testmodelqueuedconnections
)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kitemmodels-4.97.0/autotests/bihash/CMakeLists.txt new/kitemmodels-4.98.0/autotests/bihash/CMakeLists.txt
--- old/kitemmodels-4.97.0/autotests/bihash/CMakeLists.txt 2014-03-01 12:51:06.000000000 +0100
+++ new/kitemmodels-4.98.0/autotests/bihash/CMakeLists.txt 2014-03-28 19:35:13.000000000 +0100
@@ -2,10 +2,6 @@
cmake_minimum_required(VERSION 2.8.12)
-find_package(Qt4)
-
-include(${QT_USE_FILE})
-
set(functionalitytest_srcs
functionalitytest.cpp
)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kitemmodels-4.97.0/autotests/klinkitemselectionmodeltest.cpp new/kitemmodels-4.98.0/autotests/klinkitemselectionmodeltest.cpp
--- old/kitemmodels-4.97.0/autotests/klinkitemselectionmodeltest.cpp 2014-03-01 12:51:06.000000000 +0100
+++ new/kitemmodels-4.98.0/autotests/klinkitemselectionmodeltest.cpp 2014-03-28 19:35:13.000000000 +0100
@@ -20,14 +20,13 @@
#include "klinkitemselectionmodeltest.h"
#include <klinkitemselectionmodel.h>
-#include <qtest_kde.h>
#include <QItemSelectionModel>
#include <QSortFilterProxyModel>
#include <QStandardItem>
#include <QStandardItemModel>
-QTEST_KDEMAIN(KLinkItemSelectionModelTest, GUI)
+#include <QTest>
void KLinkItemSelectionModelTest::init()
{
@@ -106,3 +105,5 @@
QCOMPARE(mainIndex, m_mainModel->index(m_mainModel->rowCount() - 1, 0));
}
+QTEST_MAIN(KLinkItemSelectionModelTest)
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kitemmodels-4.97.0/autotests/kselectionproxymodeltestsuite.h new/kitemmodels-4.98.0/autotests/kselectionproxymodeltestsuite.h
--- old/kitemmodels-4.97.0/autotests/kselectionproxymodeltestsuite.h 2014-03-01 12:51:06.000000000 +0100
+++ new/kitemmodels-4.98.0/autotests/kselectionproxymodeltestsuite.h 2014-03-28 19:35:13.000000000 +0100
@@ -54,7 +54,10 @@
m_modelSelector->setWatch(true);
m_proxyModel = new KSelectionProxyModel(m_selectionModel, this);
- m_proxyModel->setFilterBehavior(m_modelSelector->filterBehaviour());
+ QVariant filterBehaviour = m_modelSelector->property("filterBehaviour");
+ if (!filterBehaviour.isNull()) {
+ m_proxyModel->setFilterBehavior(static_cast<KSelectionProxyModel::FilterBehavior>(filterBehaviour.toInt()));
+ }
return m_proxyModel;
}
@@ -88,11 +91,7 @@
TestData(ProxyModelTest *proxyModelTest)
: SelectorStrategy(proxyModelTest)
{
- }
-
- /* reimp */ KSelectionProxyModel::FilterBehavior filterBehaviour()
- {
- return _filterBehaviour;
+ SelectorStrategy::setProperty("filterBehaviour", QVariant(int(_filterBehaviour)));
}
/* reimp */ void testInsertWhenEmptyData()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kitemmodels-4.97.0/autotests/proxymodeltestsuite/CMakeLists.txt new/kitemmodels-4.98.0/autotests/proxymodeltestsuite/CMakeLists.txt
--- old/kitemmodels-4.97.0/autotests/proxymodeltestsuite/CMakeLists.txt 2014-03-01 12:51:06.000000000 +0100
+++ new/kitemmodels-4.98.0/autotests/proxymodeltestsuite/CMakeLists.txt 2014-03-28 19:35:13.000000000 +0100
@@ -1,20 +1,3 @@
-project(proxymodeltestsuite)
-
-if("${CMAKE_SOURCE_DIR}" STREQUAL "${CMAKE_CURRENT_SOURCE_DIR}")
-
- # Building the test suite standalone
- set(proxymodeltestsuite_standalone TRUE)
-
- find_package(Qt4 REQUIRED)
- find_package(Automoc4 REQUIRED)
- cmake_minimum_required(VERSION 2.8.12)
-endif()
-
-include_directories(
- ${CMAKE_CURRENT_SOURCE_DIR}/../../src
- ${CMAKE_CURRENT_BINARY_DIR}/../../src
-)
-
set(proxymodeltestsuite_SRCS
dynamictreemodel.cpp
dynamictreewidget.cpp
@@ -37,17 +20,10 @@
${eventlogger_RCSS}
)
-if(proxymodeltestsuite_standalone)
- set(GRANTLEE_FIND_ARG REQUIRED)
-else ()
- set(GRANTLEE_FIND_ARG QUIET)
-endif()
-
-# Grantlee is used for generating compilable code by the ModelEventLogger.
-# If Grantlee is not found, the logger does nothing.
-find_package(Grantlee ${GRANTLEE_FIND_ARG} NO_MODULE)
-
-if(NOT proxymodeltestsuite_standalone)
+if(FALSE)
+ # Grantlee is used for generating compilable code by the ModelEventLogger.
+ # If Grantlee is not found, the logger does nothing.
+ #find_package(Grantlee QUIET NO_MODULE)
# TODO: Put this part in Grantlee
set_package_properties(Grantlee PROPERTIES
URL "http://www.grantlee.org"
@@ -84,32 +60,3 @@
${Grantlee_CORE_LIBRARIES}
)
-if(proxymodeltestsuite_standalone)
-
- set( LIB_SUFFIX "" CACHE STRING "Define suffix of library directory name (eg. '64')")
- set( INCLUDE_INSTALL_DIR ${CMAKE_INSTALL_PREFIX}/include )
-
- install(TARGETS proxymodeltestsuite
- RUNTIME DESTINATION bin
- LIBRARY DESTINATION lib${LIB_SUFFIX}
- ARCHIVE DESTINATION lib${LIB_SUFFIX}
- COMPONENT Devel
- )
-
- install(FILES
- dynamictreemodel.h
- dynamictreewidget.h
- modelcommander.h
- modelspy.h
- modelselector.h
- modeltest.h
- proxymodeltest.h
- ${CMAKE_CURRENT_BINARY_DIR}/proxymodeltestsuite_export.h
- modeldumper.h
- modeleventlogger.h
- eventloggerregister.h
- indexfinder.h
- DESTINATION ${INCLUDE_INSTALL_DIR}
- )
-endif()
-
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kitemmodels-4.97.0/autotests/proxymodeltestsuite/eventloggerregister.cpp new/kitemmodels-4.98.0/autotests/proxymodeltestsuite/eventloggerregister.cpp
--- old/kitemmodels-4.97.0/autotests/proxymodeltestsuite/eventloggerregister.cpp 2014-03-01 12:51:06.000000000 +0100
+++ new/kitemmodels-4.98.0/autotests/proxymodeltestsuite/eventloggerregister.cpp 2014-03-28 19:35:13.000000000 +0100
@@ -64,22 +64,21 @@
}
}
-void myMessageOutput(QtMsgType type, const char *msg)
+void myMessageOutput(QtMsgType type, const QMessageLogContext &context, const QString &msg)
{
+ QByteArray localMsg = msg.toLocal8Bit();
switch (type) {
case QtDebugMsg:
- fprintf(stderr, "Debug: %s\n", msg);
+ fprintf(stderr, "Debug: %s (%s:%u, %s)\n", localMsg.constData(), context.file, context.line, context.function);
break;
case QtWarningMsg:
- fprintf(stderr, "Warning: %s\n", msg);
+ fprintf(stderr, "Warning: %s (%s:%u, %s)\n", localMsg.constData(), context.file, context.line, context.function);
break;
case QtCriticalMsg:
- fprintf(stderr, "Critical: %s\n", msg);
+ fprintf(stderr, "Critical: %s (%s:%u, %s)\n", localMsg.constData(), context.file, context.line, context.function);
break;
case QtFatalMsg:
- EventLoggerRegister::instance()->writeLogs();
- fprintf(stderr, "Fatal: %s\n", msg);
-
+ fprintf(stderr, "Fatal: %s (%s:%u, %s)\n", localMsg.constData(), context.file, context.line, context.function);
abort();
}
}
@@ -87,6 +86,6 @@
EventLoggerRegister::EventLoggerRegister(Behaviour behaviour)
{
if (behaviour == InstallMsgHandler) {
- qInstallMsgHandler(myMessageOutput);
+ qInstallMessageHandler(myMessageOutput);
}
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kitemmodels-4.97.0/autotests/proxymodeltestsuite/modelselector.h new/kitemmodels-4.98.0/autotests/proxymodeltestsuite/modelselector.h
--- old/kitemmodels-4.97.0/autotests/proxymodeltestsuite/modelselector.h 2014-03-01 12:51:06.000000000 +0100
+++ new/kitemmodels-4.98.0/autotests/proxymodeltestsuite/modelselector.h 2014-03-28 19:35:13.000000000 +0100
@@ -22,7 +22,7 @@
#include <QItemSelectionModel>
-#include <kselectionproxymodel.h>
+//#include <kselectionproxymodel.h>
#include "proxymodeltest.h"
@@ -55,7 +55,7 @@
void setWatch(bool watch);
- virtual KSelectionProxyModel::FilterBehavior filterBehaviour() = 0;
+ //virtual KSelectionProxyModel::FilterBehavior filterBehaviour() = 0;
public Q_SLOTS:
void rowsInserted(const QModelIndex &parent, int start, int end);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kitemmodels-4.97.0/autotests/proxymodeltestsuite/modeltest.cpp new/kitemmodels-4.98.0/autotests/proxymodeltestsuite/modeltest.cpp
--- old/kitemmodels-4.97.0/autotests/proxymodeltestsuite/modeltest.cpp 2014-03-01 12:51:06.000000000 +0100
+++ new/kitemmodels-4.98.0/autotests/proxymodeltestsuite/modeltest.cpp 2014-03-28 19:35:13.000000000 +0100
@@ -1,121 +1,83 @@
/****************************************************************************
**
-** Copyright (C) 2007 Trolltech ASA. All rights reserved.
-** Copyright (C) 2010 Stephen Kelly <steveire(a)gmail.com>
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/legal
**
-** This file is part of the Qt Concurrent project on Trolltech Labs.
+** This file is part of the test suite of the Qt Toolkit.
**
-** This file may be used under the terms of the GNU General Public
-** License version 2.0 as published by the Free Software Foundation
-** and appearing in the file LICENSE.GPL included in the packaging of
-** this file. Please review the following information to ensure GNU
-** General Public Licensing requirements will be met:
-** http://www.trolltech.com/products/qt/opensource.html
-**
-** If you are unsure which license is appropriate for your use, please
-** review the following information:
-** http://www.trolltech.com/products/qt/licensing.html or contact the
-** sales department at sales(a)trolltech.com.
-**
-** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+** GNU Lesser General Public License Usage
+** This file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file COPYING.LIB included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
****************************************************************************/
-#include <QtCore/QAbstractEventDispatcher>
-#include <QtCore/QTimer>
-#include <QDebug>
-#include <QStringList>
-#include <QSize>
-
#include "modeltest.h"
+#include <QtCore/QtCore>
+#include <QtTest/QtTest>
+
/*!
Connect to all of the models signals. Whenever anything happens recheck everything.
*/
-ModelTest::ModelTest(QAbstractItemModel *_model, Mode testType, QObject *parent)
- : QObject(parent),
- model(_model),
- fetchingMore(false),
- pedantic(testType == Pedantic)
-{
- init();
- if (pedantic) {
- refreshStatus();
- // This is almost certainly not needed.
-// connect(QAbstractEventDispatcher::instance(), SIGNAL(awake()), SLOT(ensureSteady()));
- }
-}
-
-ModelTest::ModelTest(QAbstractItemModel *_model, QObject *parent)
- : QObject(parent),
- model(_model),
- fetchingMore(false),
- pedantic(false)
-{
- init();
-}
-
-void ModelTest::init()
+ModelTest::ModelTest ( QAbstractItemModel *_model, QObject *parent ) : QObject ( parent ), model ( _model ), fetchingMore ( false )
{
- Q_ASSERT(model);
+ if (!model)
+ qFatal("%s: model must not be null", Q_FUNC_INFO);
connect(model, SIGNAL(columnsAboutToBeInserted(QModelIndex,int,int)),
- this, SLOT(runAllTests()));
+ this, SLOT(runAllTests()) );
connect(model, SIGNAL(columnsAboutToBeRemoved(QModelIndex,int,int)),
- this, SLOT(runAllTests()));
+ this, SLOT(runAllTests()) );
connect(model, SIGNAL(columnsInserted(QModelIndex,int,int)),
- this, SLOT(runAllTests()));
+ this, SLOT(runAllTests()) );
connect(model, SIGNAL(columnsRemoved(QModelIndex,int,int)),
- this, SLOT(runAllTests()));
+ this, SLOT(runAllTests()) );
connect(model, SIGNAL(dataChanged(QModelIndex,QModelIndex)),
- this, SLOT(runAllTests()));
+ this, SLOT(runAllTests()) );
connect(model, SIGNAL(headerDataChanged(Qt::Orientation,int,int)),
- this, SLOT(runAllTests()));
- connect(model, SIGNAL(layoutAboutToBeChanged()), this, SLOT(runAllTests()));
- connect(model, SIGNAL(layoutChanged()), this, SLOT(runAllTests()));
- connect(model, SIGNAL(modelReset()), this, SLOT(runAllTests()));
- connect(model, SIGNAL(modelAboutToBeReset()), this, SLOT(modelAboutToBeReset()));
- connect(model, SIGNAL(modelReset()), this, SLOT(modelReset()));
+ this, SLOT(runAllTests()) );
+ connect(model, SIGNAL(layoutAboutToBeChanged()), this, SLOT(runAllTests()) );
+ connect(model, SIGNAL(layoutChanged()), this, SLOT(runAllTests()) );
+ connect(model, SIGNAL(modelReset()), this, SLOT(runAllTests()) );
connect(model, SIGNAL(rowsAboutToBeInserted(QModelIndex,int,int)),
- this, SLOT(runAllTests()));
+ this, SLOT(runAllTests()) );
connect(model, SIGNAL(rowsAboutToBeRemoved(QModelIndex,int,int)),
- this, SLOT(runAllTests()));
+ this, SLOT(runAllTests()) );
connect(model, SIGNAL(rowsInserted(QModelIndex,int,int)),
- this, SLOT(runAllTests()));
+ this, SLOT(runAllTests()) );
connect(model, SIGNAL(rowsRemoved(QModelIndex,int,int)),
- this, SLOT(runAllTests()));
+ this, SLOT(runAllTests()) );
- // Special checks for inserting/removing
+ // Special checks for changes
connect(model, SIGNAL(layoutAboutToBeChanged()),
- this, SLOT(layoutAboutToBeChanged()));
+ this, SLOT(layoutAboutToBeChanged()) );
connect(model, SIGNAL(layoutChanged()),
- this, SLOT(layoutChanged()));
+ this, SLOT(layoutChanged()) );
connect(model, SIGNAL(rowsAboutToBeInserted(QModelIndex,int,int)),
- this, SLOT(rowsAboutToBeInserted(QModelIndex,int,int)));
+ this, SLOT(rowsAboutToBeInserted(QModelIndex,int,int)) );
connect(model, SIGNAL(rowsAboutToBeRemoved(QModelIndex,int,int)),
- this, SLOT(rowsAboutToBeRemoved(QModelIndex,int,int)));
+ this, SLOT(rowsAboutToBeRemoved(QModelIndex,int,int)) );
connect(model, SIGNAL(rowsInserted(QModelIndex,int,int)),
- this, SLOT(rowsInserted(QModelIndex,int,int)));
+ this, SLOT(rowsInserted(QModelIndex,int,int)) );
connect(model, SIGNAL(rowsRemoved(QModelIndex,int,int)),
- this, SLOT(rowsRemoved(QModelIndex,int,int)));
-
- connect(model, SIGNAL(rowsAboutToBeMoved(QModelIndex,int,int,QModelIndex,int)),
- this, SLOT(rowsAboutToBeMoved(QModelIndex,int,int,QModelIndex,int)));
- connect(model, SIGNAL(rowsMoved(QModelIndex,int,int,QModelIndex,int)),
- this, SLOT(rowsMoved(QModelIndex,int,int,QModelIndex,int)));
+ this, SLOT(rowsRemoved(QModelIndex,int,int)) );
+ connect(model, SIGNAL(dataChanged(QModelIndex,QModelIndex)),
+ this, SLOT(dataChanged(QModelIndex,QModelIndex)) );
+ connect(model, SIGNAL(headerDataChanged(Qt::Orientation,int,int)),
+ this, SLOT(headerDataChanged(Qt::Orientation,int,int)) );
runAllTests();
}
void ModelTest::runAllTests()
{
-
-// qDebug() << "rats";
- if (fetchingMore) {
+ if ( fetchingMore )
return;
- }
nonDestructiveBasicTest();
rowCount();
columnCount();
@@ -131,32 +93,32 @@
*/
void ModelTest::nonDestructiveBasicTest()
{
- Q_ASSERT(model->buddy(QModelIndex()) == QModelIndex());
- model->canFetchMore(QModelIndex());
- Q_ASSERT(model->columnCount(QModelIndex()) >= 0);
- Q_ASSERT(model->data(QModelIndex()) == QVariant());
+ QVERIFY( model->buddy ( QModelIndex() ) == QModelIndex() );
+ model->canFetchMore ( QModelIndex() );
+ QVERIFY( model->columnCount ( QModelIndex() ) >= 0 );
+ QVERIFY( model->data ( QModelIndex() ) == QVariant() );
fetchingMore = true;
- model->fetchMore(QModelIndex());
+ model->fetchMore ( QModelIndex() );
fetchingMore = false;
- Qt::ItemFlags flags = model->flags(QModelIndex());
- Q_ASSERT(flags == Qt::ItemIsDropEnabled || flags == 0);
- model->hasChildren(QModelIndex());
- model->hasIndex(0, 0);
- model->headerData(0, Qt::Horizontal);
- model->index(0, 0);
- model->itemData(QModelIndex());
+ Qt::ItemFlags flags = model->flags ( QModelIndex() );
+ QVERIFY( flags == Qt::ItemIsDropEnabled || flags == 0 );
+ model->hasChildren ( QModelIndex() );
+ model->hasIndex ( 0, 0 );
+ model->headerData ( 0, Qt::Horizontal );
+ model->index ( 0, 0 );
+ model->itemData ( QModelIndex() );
QVariant cache;
- model->match(QModelIndex(), -1, cache);
+ model->match ( QModelIndex(), -1, cache );
model->mimeTypes();
- Q_ASSERT(model->parent(QModelIndex()) == QModelIndex());
- Q_ASSERT(model->rowCount() >= 0);
+ QVERIFY( model->parent ( QModelIndex() ) == QModelIndex() );
+ QVERIFY( model->rowCount() >= 0 );
QVariant variant;
- model->setData(QModelIndex(), variant, -1);
- model->setHeaderData(-1, Qt::Horizontal, QVariant());
- model->setHeaderData(999999, Qt::Horizontal, QVariant());
+ model->setData ( QModelIndex(), variant, -1 );
+ model->setHeaderData ( -1, Qt::Horizontal, QVariant() );
+ model->setHeaderData ( 999999, Qt::Horizontal, QVariant() );
QMap<int, QVariant> roles;
- model->sibling(0, 0, QModelIndex());
- model->span(QModelIndex());
+ model->sibling ( 0, 0, QModelIndex() );
+ model->span ( QModelIndex() );
model->supportedDropActions();
}
@@ -169,20 +131,19 @@
{
// qDebug() << "rc";
// check top row
- QModelIndex topIndex = model->index(0, 0, QModelIndex());
- int rows = model->rowCount(topIndex);
- Q_ASSERT(rows >= 0);
-
- Q_ASSERT(model->hasChildren(topIndex) == (rows > 0));
+ QModelIndex topIndex = model->index ( 0, 0, QModelIndex() );
+ int rows = model->rowCount ( topIndex );
+ QVERIFY( rows >= 0 );
+ if ( rows > 0 )
+ QVERIFY( model->hasChildren ( topIndex ) );
- QModelIndex secondLevelIndex = model->index(0, 0, topIndex);
- if (secondLevelIndex.isValid()) { // not the top level
+ QModelIndex secondLevelIndex = model->index ( 0, 0, topIndex );
+ if ( secondLevelIndex.isValid() ) { // not the top level
// check a row count where parent is valid
- rows = model->rowCount(secondLevelIndex);
- Q_ASSERT(rows >= 0);
- if (rows > 0) {
- Q_ASSERT(model->hasChildren(secondLevelIndex) == true);
- }
+ rows = model->rowCount ( secondLevelIndex );
+ QVERIFY( rows >= 0 );
+ if ( rows > 0 )
+ QVERIFY( model->hasChildren ( secondLevelIndex ) );
}
// The models rowCount() is tested more extensively in checkChildren(),
@@ -195,14 +156,13 @@
void ModelTest::columnCount()
{
// check top row
- QModelIndex topIndex = model->index(0, 0, QModelIndex());
- Q_ASSERT(model->columnCount(topIndex) >= 0);
+ QModelIndex topIndex = model->index ( 0, 0, QModelIndex() );
+ QVERIFY( model->columnCount ( topIndex ) >= 0 );
// check a column count where parent is valid
- QModelIndex childIndex = model->index(0, 0, topIndex);
- if (childIndex.isValid()) {
- Q_ASSERT(model->columnCount(childIndex) >= 0);
- }
+ QModelIndex childIndex = model->index ( 0, 0, topIndex );
+ if ( childIndex.isValid() )
+ QVERIFY( model->columnCount ( childIndex ) >= 0 );
// columnCount() is tested more extensively in checkChildren(),
// but this catches the big mistakes
@@ -215,18 +175,19 @@
{
// qDebug() << "hi";
// Make sure that invalid values returns an invalid index
- Q_ASSERT(model->hasIndex(-2, -2) == false);
- Q_ASSERT(model->hasIndex(-2, 0) == false);
- Q_ASSERT(model->hasIndex(0, -2) == false);
+ QVERIFY( !model->hasIndex ( -2, -2 ) );
+ QVERIFY( !model->hasIndex ( -2, 0 ) );
+ QVERIFY( !model->hasIndex ( 0, -2 ) );
int rows = model->rowCount();
int columns = model->columnCount();
// check out of bounds
- Q_ASSERT(model->hasIndex(rows, columns) == false);
- Q_ASSERT(model->hasIndex(rows + 1, columns + 1) == false);
+ QVERIFY( !model->hasIndex ( rows, columns ) );
+ QVERIFY( !model->hasIndex ( rows + 1, columns + 1 ) );
- Q_ASSERT(model->hasIndex(0, 0) == (rows > 0));
+ if ( rows > 0 )
+ QVERIFY( model->hasIndex ( 0, 0 ) );
// hasIndex() is tested more extensively in checkChildren(),
// but this catches the big mistakes
@@ -239,25 +200,24 @@
{
// qDebug() << "i";
// Make sure that invalid values returns an invalid index
- Q_ASSERT(model->index(-2, -2) == QModelIndex());
- Q_ASSERT(model->index(-2, 0) == QModelIndex());
- Q_ASSERT(model->index(0, -2) == QModelIndex());
+ QVERIFY( model->index ( -2, -2 ) == QModelIndex() );
+ QVERIFY( model->index ( -2, 0 ) == QModelIndex() );
+ QVERIFY( model->index ( 0, -2 ) == QModelIndex() );
int rows = model->rowCount();
int columns = model->columnCount();
- if (rows == 0) {
+ if ( rows == 0 )
return;
- }
// Catch off by one errors
- Q_ASSERT(model->index(rows, columns) == QModelIndex());
- Q_ASSERT(model->index(0, 0).isValid() == true);
+ QVERIFY( model->index ( rows, columns ) == QModelIndex() );
+ QVERIFY( model->index ( 0, 0 ).isValid() );
// Make sure that the same index is *always* returned
- QModelIndex a = model->index(0, 0);
- QModelIndex b = model->index(0, 0);
- Q_ASSERT(a == b);
+ QModelIndex a = model->index ( 0, 0 );
+ QModelIndex b = model->index ( 0, 0 );
+ QVERIFY( a == b );
// index() is tested more extensively in checkChildren(),
// but this catches the big mistakes
@@ -269,13 +229,12 @@
void ModelTest::parent()
{
// qDebug() << "p";
- // Make sure the model wont crash and will return an invalid QModelIndex
+ // Make sure the model won't crash and will return an invalid QModelIndex
// when asked for the parent of an invalid index.
- Q_ASSERT(model->parent(QModelIndex()) == QModelIndex());
+ QVERIFY( model->parent ( QModelIndex() ) == QModelIndex() );
- if (model->rowCount() == 0) {
+ if ( model->rowCount() == 0 )
return;
- }
// Column 0 | Column 1 |
// QModelIndex() | |
@@ -284,32 +243,29 @@
// Common error test #1, make sure that a top level index has a parent
// that is a invalid QModelIndex.
- QModelIndex topIndex = model->index(0, 0, QModelIndex());
- Q_ASSERT(model->parent(topIndex) == QModelIndex());
+ QModelIndex topIndex = model->index ( 0, 0, QModelIndex() );
+ QVERIFY( model->parent ( topIndex ) == QModelIndex() );
// Common error test #2, make sure that a second level index has a parent
// that is the first level index.
- if (model->rowCount(topIndex) > 0) {
- QModelIndex childIndex = model->index(0, 0, topIndex);
- if (model->parent(childIndex) != topIndex) {
- qDebug() << model->parent(childIndex) << topIndex << topIndex.data();
- }
- Q_ASSERT(model->parent(childIndex) == topIndex);
+ if ( model->rowCount ( topIndex ) > 0 ) {
+ QModelIndex childIndex = model->index ( 0, 0, topIndex );
+ QVERIFY( model->parent ( childIndex ) == topIndex );
}
// Common error test #3, the second column should NOT have the same children
// as the first column in a row.
// Usually the second column shouldn't have children.
- QModelIndex topIndex1 = model->index(0, 1, QModelIndex());
- if (model->rowCount(topIndex1) > 0) {
- QModelIndex childIndex = model->index(0, 0, topIndex);
- QModelIndex childIndex1 = model->index(0, 0, topIndex1);
- Q_ASSERT(childIndex != childIndex1);
+ QModelIndex topIndex1 = model->index ( 0, 1, QModelIndex() );
+ if ( model->rowCount ( topIndex1 ) > 0 ) {
+ QModelIndex childIndex = model->index ( 0, 0, topIndex );
+ QModelIndex childIndex1 = model->index ( 0, 0, topIndex1 );
+ QVERIFY( childIndex != childIndex1 );
}
// Full test, walk n levels deep through the model making sure that all
// parent's children correctly specify their parent.
- checkChildren(QModelIndex());
+ checkChildren ( QModelIndex() );
}
/*!
@@ -326,96 +282,101 @@
found the basic bugs because it is easier to figure out the problem in
those tests then this one.
*/
-void ModelTest::checkChildren(const QModelIndex &parent, int currentDepth)
+void ModelTest::checkChildren ( const QModelIndex &parent, int currentDepth )
{
// First just try walking back up the tree.
QModelIndex p = parent;
- while (p.isValid()) {
+ while ( p.isValid() )
p = p.parent();
- }
// For models that are dynamically populated
- if (model->canFetchMore(parent)) {
+ if ( model->canFetchMore ( parent ) ) {
fetchingMore = true;
- model->fetchMore(parent);
+ model->fetchMore ( parent );
fetchingMore = false;
}
- int rows = model->rowCount(parent);
- int columns = model->columnCount(parent);
+ int rows = model->rowCount ( parent );
+ int columns = model->columnCount ( parent );
+
+ if ( rows > 0 )
+ QVERIFY( model->hasChildren ( parent ) );
// Some further testing against rows(), columns(), and hasChildren()
- Q_ASSERT(rows >= 0);
- Q_ASSERT(columns >= 0);
- Q_ASSERT(model->hasChildren(parent) == (rows > 0));
-
- qDebug() << "parent:" << model->data(parent).toString() << "rows:" << rows
- << "columns:" << columns << "parent column:" << parent.column();
-
- Q_ASSERT(model->hasIndex(rows, 0, parent) == false);
- Q_ASSERT(model->index(rows, 0, parent).isValid() == false);
- for (int r = 0; r < rows; ++r) {
- if (model->canFetchMore(parent)) {
+ QVERIFY( rows >= 0 );
+ QVERIFY( columns >= 0 );
+ if ( rows > 0 )
+ QVERIFY( model->hasChildren ( parent ) );
+
+ //qDebug() << "parent:" << model->data(parent).toString() << "rows:" << rows
+ // << "columns:" << columns << "parent column:" << parent.column();
+
+ const QModelIndex topLeftChild = model->index( 0, 0, parent );
+
+ QVERIFY( !model->hasIndex ( rows + 1, 0, parent ) );
+ for ( int r = 0; r < rows; ++r ) {
+ if ( model->canFetchMore ( parent ) ) {
fetchingMore = true;
- model->fetchMore(parent);
+ model->fetchMore ( parent );
fetchingMore = false;
}
- Q_ASSERT(model->hasIndex(r, columns, parent) == false);
- Q_ASSERT(model->index(r, columns, parent).isValid() == false);
-// qDebug() << "Cols" << columns;
- for (int c = 0; c < columns; ++c) {
-// qDebug() << "has" << r << c << parent;
- Q_ASSERT(model->hasIndex(r, c, parent) == true);
- QModelIndex index = model->index(r, c, parent);
+ QVERIFY( !model->hasIndex ( r, columns + 1, parent ) );
+ for ( int c = 0; c < columns; ++c ) {
+ QVERIFY( model->hasIndex ( r, c, parent ) );
+ QModelIndex index = model->index ( r, c, parent );
// rowCount() and columnCount() said that it existed...
- Q_ASSERT(index.isValid() == true);
+ QVERIFY( index.isValid() );
// index() should always return the same index when called twice in a row
- QModelIndex modifiedIndex = model->index(r, c, parent);
- Q_ASSERT(index == modifiedIndex);
+ QModelIndex modifiedIndex = model->index ( r, c, parent );
+ QVERIFY( index == modifiedIndex );
// Make sure we get the same index if we request it twice in a row
- QModelIndex a = model->index(r, c, parent);
- QModelIndex b = model->index(r, c, parent);
- Q_ASSERT(a == b);
+ QModelIndex a = model->index ( r, c, parent );
+ QModelIndex b = model->index ( r, c, parent );
+ QVERIFY( a == b );
+
+ {
+ const QModelIndex sibling = model->sibling( r, c, topLeftChild );
+ QVERIFY( index == sibling );
+ }
+ {
+ const QModelIndex sibling = topLeftChild.sibling( r, c );
+ QVERIFY( index == sibling );
+ }
// Some basic checking on the index that is returned
- Q_ASSERT(index.model() == model);
-// qDebug() << index.row() << r;
- Q_ASSERT(index.row() == r);
- Q_ASSERT(index.column() == c);
+ QVERIFY( index.model() == model );
+ QCOMPARE( index.row(), r );
+ QCOMPARE( index.column(), c );
// While you can technically return a QVariant usually this is a sign
- // of an bug in data() Disable if this really is ok in your model.
- if (!model->data(index, Qt::DisplayRole).isValid()) {
- qDebug() << index << index.data() << index.parent();
- }
- Q_ASSERT(model->data(index, Qt::DisplayRole).isValid() == true);
+ // of a bug in data(). Disable if this really is ok in your model.
+// QVERIFY( model->data ( index, Qt::DisplayRole ).isValid() );
// If the next test fails here is some somewhat useful debug you play with.
- /*
+
if (model->parent(index) != parent) {
qDebug() << r << c << currentDepth << model->data(index).toString()
<< model->data(parent).toString();
qDebug() << index << parent << model->parent(index);
- // And a view that you can even use to show the model.
- //QTreeView view;
- //view.setModel(model);
- //view.show();
- }*/
+// And a view that you can even use to show the model.
+// QTreeView view;
+// view.setModel(model);
+// view.show();
+ }
// Check that we can get back our real parent.
-// qDebug() << index.data() << parent << model->parent ( index ) << parent.data() << model->parent ( index ).data() << r << rows << c << columns;
- Q_ASSERT(model->parent(index) == parent);
+ QCOMPARE( model->parent ( index ), parent );
// recursively go down the children
- if (model->hasChildren(index) && currentDepth < 10) {
-// qDebug() << r << c << "has children" << model->rowCount(index);
- checkChildren(index, ++currentDepth);
+ if ( model->hasChildren ( index ) && currentDepth < 10 ) {
+ //qDebug() << r << c << "has children" << model->rowCount(index);
+ checkChildren ( index, ++currentDepth );
}/* else { if (currentDepth >= 10) qDebug() << "checked 10 deep"; };*/
// make sure that after testing the children that the index doesn't change.
- QModelIndex newerIndex = model->index(r, c, parent);
- Q_ASSERT(index == newerIndex);
+ QModelIndex newerIndex = model->index ( r, c, parent );
+ QVERIFY( index == newerIndex );
}
}
}
@@ -426,69 +387,68 @@
void ModelTest::data()
{
// Invalid index should return an invalid qvariant
- Q_ASSERT(!model->data(QModelIndex()).isValid());
+ QVERIFY( !model->data ( QModelIndex() ).isValid() );
- if (model->rowCount() == 0) {
+ if ( model->rowCount() == 0 )
return;
- }
// A valid index should have a valid QVariant data
- Q_ASSERT(model->index(0, 0).isValid());
+ QVERIFY( model->index ( 0, 0 ).isValid() );
// shouldn't be able to set data on an invalid index
- Q_ASSERT(model->setData(QModelIndex(), QLatin1String("foo"), Qt::DisplayRole) == false);
+ QVERIFY( !model->setData ( QModelIndex(), QLatin1String ( "foo" ), Qt::DisplayRole ) );
// General Purpose roles that should return a QString
- QVariant variant = model->data(model->index(0, 0), Qt::ToolTipRole);
- if (variant.isValid()) {
- Q_ASSERT(variant.canConvert<QString>());
- }
- variant = model->data(model->index(0, 0), Qt::StatusTipRole);
- if (variant.isValid()) {
- Q_ASSERT(variant.canConvert<QString>());
- }
- variant = model->data(model->index(0, 0), Qt::WhatsThisRole);
- if (variant.isValid()) {
- Q_ASSERT(variant.canConvert<QString>());
+ QVariant variant = model->data ( model->index ( 0, 0 ), Qt::ToolTipRole );
+ if ( variant.isValid() ) {
+ QVERIFY( variant.canConvert<QString>() );
+ }
+ variant = model->data ( model->index ( 0, 0 ), Qt::StatusTipRole );
+ if ( variant.isValid() ) {
+ QVERIFY( variant.canConvert<QString>() );
+ }
+ variant = model->data ( model->index ( 0, 0 ), Qt::WhatsThisRole );
+ if ( variant.isValid() ) {
+ QVERIFY( variant.canConvert<QString>() );
}
// General Purpose roles that should return a QSize
- variant = model->data(model->index(0, 0), Qt::SizeHintRole);
- if (variant.isValid()) {
- Q_ASSERT(variant.canConvert<QSize>());
+ variant = model->data ( model->index ( 0, 0 ), Qt::SizeHintRole );
+ if ( variant.isValid() ) {
+ QVERIFY( variant.canConvert<QSize>() );
}
// General Purpose roles that should return a QFont
- QVariant fontVariant = model->data(model->index(0, 0), Qt::FontRole);
- if (fontVariant.isValid()) {
- Q_ASSERT(fontVariant.canConvert<QFont>());
+ QVariant fontVariant = model->data ( model->index ( 0, 0 ), Qt::FontRole );
+ if ( fontVariant.isValid() ) {
+ QVERIFY( fontVariant.canConvert<QFont>() );
}
// Check that the alignment is one we know about
- QVariant textAlignmentVariant = model->data(model->index(0, 0), Qt::TextAlignmentRole);
- if (textAlignmentVariant.isValid()) {
+ QVariant textAlignmentVariant = model->data ( model->index ( 0, 0 ), Qt::TextAlignmentRole );
+ if ( textAlignmentVariant.isValid() ) {
int alignment = textAlignmentVariant.toInt();
- Q_ASSERT(alignment == (alignment & (Qt::AlignHorizontal_Mask | Qt::AlignVertical_Mask)));
+ QCOMPARE( alignment, ( alignment & ( Qt::AlignHorizontal_Mask | Qt::AlignVertical_Mask ) ) );
}
// General Purpose roles that should return a QColor
- QVariant colorVariant = model->data(model->index(0, 0), Qt::BackgroundColorRole);
- if (colorVariant.isValid()) {
- Q_ASSERT(colorVariant.canConvert<QColor>());
+ QVariant colorVariant = model->data ( model->index ( 0, 0 ), Qt::BackgroundColorRole );
+ if ( colorVariant.isValid() ) {
+ QVERIFY( colorVariant.canConvert<QColor>() );
}
- colorVariant = model->data(model->index(0, 0), Qt::TextColorRole);
- if (colorVariant.isValid()) {
- Q_ASSERT(colorVariant.canConvert<QColor>());
+ colorVariant = model->data ( model->index ( 0, 0 ), Qt::TextColorRole );
+ if ( colorVariant.isValid() ) {
+ QVERIFY( colorVariant.canConvert<QColor>() );
}
// Check that the "check state" is one we know about.
- QVariant checkStateVariant = model->data(model->index(0, 0), Qt::CheckStateRole);
- if (checkStateVariant.isValid()) {
+ QVariant checkStateVariant = model->data ( model->index ( 0, 0 ), Qt::CheckStateRole );
+ if ( checkStateVariant.isValid() ) {
int state = checkStateVariant.toInt();
- Q_ASSERT(state == Qt::Unchecked ||
+ QVERIFY( state == Qt::Unchecked ||
state == Qt::PartiallyChecked ||
- state == Qt::Checked);
+ state == Qt::Checked );
}
}
@@ -497,23 +457,18 @@
\sa rowsInserted()
*/
-void ModelTest::rowsAboutToBeInserted(const QModelIndex &parent, int start, int end)
+void ModelTest::rowsAboutToBeInserted ( const QModelIndex &parent, int start, int /* end */)
{
// Q_UNUSED(end);
- qDebug() << "rowsAboutToBeInserted" << "start=" << start << "end=" << end << "parent=" << model->data(parent).value<QString>()
- << "current count of parent=" << model->rowCount(parent); // << "display of last=" << model->data( model->index(start-1, 0, parent) );
+// qDebug() << "rowsAboutToBeInserted" << "start=" << start << "end=" << end << "parent=" << model->data ( parent ).toString()
+// << "current count of parent=" << model->rowCount ( parent ); // << "display of last=" << model->data( model->index(start-1, 0, parent) );
// qDebug() << model->index(start-1, 0, parent) << model->data( model->index(start-1, 0, parent) );
Changing c;
c.parent = parent;
- c.oldSize = model->rowCount(parent);
- c.last = model->data(model->index(start - 1, 0, parent));
- c.next = model->data(model->index(start, 0, parent));
- qDebug() << "last=" << c.last << c.next;
- insert.push(c);
- if (pedantic) {
- ensureConsistent();
- status.type = Status::InsertingRows;
- }
+ c.oldSize = model->rowCount ( parent );
+ c.last = model->data ( model->index ( start - 1, 0, parent ) );
+ c.next = model->data ( model->index ( start, 0, parent ) );
+ insert.push ( c );
}
/*!
@@ -521,145 +476,45 @@
\sa rowsAboutToBeInserted()
*/
-void ModelTest::rowsInserted(const QModelIndex &parent, int start, int end)
+void ModelTest::rowsInserted ( const QModelIndex & parent, int start, int end )
{
Changing c = insert.pop();
- Q_ASSERT(c.parent == parent);
- qDebug() << "rowsInserted" << "start=" << start << "end=" << end << "oldsize=" << c.oldSize
- << "parent=" << model->data(parent).value<QString>() << "current rowcount=" << model->rowCount(parent);
+ QVERIFY( c.parent == parent );
+// qDebug() << "rowsInserted" << "start=" << start << "end=" << end << "oldsize=" << c.oldSize
+// << "parent=" << model->data ( parent ).toString() << "current rowcount of parent=" << model->rowCount ( parent );
+
+// for (int ii=start; ii <= end; ii++)
+// {
+// qDebug() << "itemWasInserted:" << ii << model->data ( model->index ( ii, 0, parent ));
+// }
+// qDebug();
- for (int ii = start; ii <= end; ii++) {
- qDebug() << "itemWasInserted:" << model->data(model->index(ii, 0, parent));
- }
+ QVERIFY( c.oldSize + ( end - start + 1 ) == model->rowCount ( parent ) );
+ QVERIFY( c.last == model->data ( model->index ( start - 1, 0, c.parent ) ) );
- Q_ASSERT(c.oldSize + (end - start + 1) == model->rowCount(parent));
- Q_ASSERT(c.last == model->data(model->index(start - 1, 0, c.parent)));
- /*
if (c.next != model->data(model->index(end + 1, 0, c.parent))) {
qDebug() << start << end;
for (int i=0; i < model->rowCount(); ++i)
qDebug() << model->index(i, 0).data().toString();
qDebug() << c.next << model->data(model->index(end + 1, 0, c.parent));
}
- */
- qDebug() << c.next << model->data(model->index(end + 1, 0, c.parent));
- Q_ASSERT(c.next == model->data(model->index(end + 1, 0, c.parent)));
-
- if (pedantic) {
- Q_ASSERT(status.type == Status::InsertingRows);
- refreshStatus();
- }
-}
-
-void ModelTest::modelAboutToBeReset()
-{
- qDebug() << "@@@@@@@@@@@" << "modelAboutToBeReset";
- if (pedantic) {
- ensureConsistent();
- status.type = Status::Resetting;
- }
-}
-
-void ModelTest::modelReset()
-{
- qDebug() << "@@@@@@@@@@@" << "modelReset";
- if (pedantic) {
- Q_ASSERT(status.type == Status::Resetting);
- refreshStatus();
- }
+ QVERIFY( c.next == model->data ( model->index ( end + 1, 0, c.parent ) ) );
}
void ModelTest::layoutAboutToBeChanged()
{
- qDebug() << "@@@@@@@@@@@" << "layoutAboutToBeChanged";
-
- if (pedantic) {
- ensureConsistent();
- status.type = Status::ChangingLayout;
- }
- for (int i = 0; i < qBound(0, model->rowCount(), 100); ++i) {
-// qDebug() << "persisting" << model->index ( i, 0 ) << model->index ( i, 0 ).data();
- changing.append(QPersistentModelIndex(model->index(i, 0)));
- }
+ for ( int i = 0; i < qBound ( 0, model->rowCount(), 100 ); ++i )
+ changing.append ( QPersistentModelIndex ( model->index ( i, 0 ) ) );
}
void ModelTest::layoutChanged()
{
- qDebug() << "@@@@@@@@@@@" << "layoutAboutToBeChanged";
-// qDebug() << "B";
- for (int i = 0; i < changing.count(); ++i) {
+ for ( int i = 0; i < changing.count(); ++i ) {
QPersistentModelIndex p = changing[i];
-// qDebug() << "Bp" << p;
-// qDebug() << "p" << p << p.data();
-// qDebug() << "Ap";
- Q_ASSERT(p == model->index(p.row(), p.column(), p.parent()));
+ QVERIFY( p == model->index ( p.row(), p.column(), p.parent() ) );
}
changing.clear();
-
- if (pedantic) {
- Q_ASSERT(status.type == Status::ChangingLayout);
- refreshStatus();
- }
-
-// qDebug() << "A";
-}
-
-void ModelTest::rowsAboutToBeMoved(const QModelIndex &srcParent, int start, int end, const QModelIndex &destParent, int destinationRow)
-{
- qDebug() << "rowsAboutToBeMoved" << srcParent << start << end << destParent << destinationRow;
-
- for (int row = start, dr = destinationRow; row <= end; ++row, ++dr) {
- qDebug() << "row" << model->index(row, 0, srcParent).data() << "in " << srcParent << "will be moved to " << destParent << dr;
- }
-
- Changing cs;
- cs.parent = srcParent;
- cs.oldSize = model->rowCount(srcParent);
- cs.last = model->data(model->index(start - 1, 0, srcParent));
- cs.next = model->data(model->index(end + 1, 0, srcParent));
- remove.push(cs);
- Changing cd;
- cd.parent = destParent;
- cd.oldSize = model->rowCount(destParent);
- cd.last = model->data(model->index(destinationRow - 1, 0, destParent));
- cd.next = model->data(model->index(destinationRow, 0, destParent));
- insert.push(cd);
-}
-
-void ModelTest::rowsMoved(const QModelIndex &srcParent, int start, int end, const QModelIndex &destParent, int destinationRow)
-{
- qDebug() << "rowsMoved" << srcParent << start << end << destParent << destinationRow;
-
- Changing cd = insert.pop();
- Q_ASSERT(cd.parent == destParent);
- if (srcParent == destParent) {
- Q_ASSERT(cd.oldSize == model->rowCount(destParent));
-
- // TODO: Find out what I can assert here about last and next.
-// Q_ASSERT ( cd.last == model->data ( model->index ( destinationRow - 1, 0, cd.parent ) ) );
-// Q_ASSERT ( cd.next == model->data ( model->index ( destinationRow + (end - start + 1), 0, cd.parent ) ) );
-
- } else {
- qDebug() << cd.oldSize << end << start << model->rowCount(destParent) << destParent.data() << "#########";
- Q_ASSERT(cd.oldSize + (end - start + 1) == model->rowCount(destParent));
-
- Q_ASSERT(cd.last == model->data(model->index(destinationRow - 1, 0, cd.parent)));
- Q_ASSERT(cd.next == model->data(model->index(destinationRow + (end - start + 1), 0, cd.parent)));
- }
- Changing cs = remove.pop();
-
- Q_ASSERT(cs.parent == srcParent);
- if (srcParent == destParent) {
- Q_ASSERT(cs.oldSize == model->rowCount(srcParent));
- } else {
- Q_ASSERT(cs.oldSize - (end - start + 1) == model->rowCount(srcParent));
-
- Q_ASSERT(cs.last == model->data(model->index(start - 1, 0, srcParent)));
-// qDebug() << cs.next << model->data ( model->index ( start, 0, srcParent ) );
- Q_ASSERT(cs.next == model->data(model->index(start, 0, srcParent)));
- }
-
}
/*!
@@ -667,24 +522,15 @@
\sa rowsRemoved()
*/
-void ModelTest::rowsAboutToBeRemoved(const QModelIndex &parent, int start, int end)
+void ModelTest::rowsAboutToBeRemoved ( const QModelIndex &parent, int start, int end )
{
- qDebug() << "ratbr" << parent << start << end;
- for (int ii = start; ii <= end; ii++) {
- qDebug() << "itemwillbe removed:" << model->data(model->index(ii, 0, parent));
- }
-
- if (pedantic) {
- ensureConsistent();
- status.type = Status::RemovingRows;
- }
-
+qDebug() << "ratbr" << parent << start << end;
Changing c;
c.parent = parent;
- c.oldSize = model->rowCount(parent);
- c.last = model->data(model->index(start - 1, 0, parent));
- c.next = model->data(model->index(end + 1, 0, parent));
- remove.push(c);
+ c.oldSize = model->rowCount ( parent );
+ c.last = model->data ( model->index ( start - 1, 0, parent ) );
+ c.next = model->data ( model->index ( end + 1, 0, parent ) );
+ remove.push ( c );
}
/*!
@@ -692,59 +538,37 @@
\sa rowsAboutToBeRemoved()
*/
-void ModelTest::rowsRemoved(const QModelIndex &parent, int start, int end)
+void ModelTest::rowsRemoved ( const QModelIndex & parent, int start, int end )
{
- qDebug() << "rr" << parent << start << end;
+ qDebug() << "rr" << parent << start << end;
Changing c = remove.pop();
- Q_ASSERT(c.parent == parent);
- qDebug() << (c.oldSize - (end - start + 1)) << model->rowCount(parent);
- Q_ASSERT(c.oldSize - (end - start + 1) == model->rowCount(parent));
- Q_ASSERT(c.last == model->data(model->index(start - 1, 0, c.parent)));
- Q_ASSERT(c.next == model->data(model->index(start, 0, c.parent)));
-
- if (pedantic) {
- Q_ASSERT(status.type == Status::RemovingRows);
- refreshStatus();
- }
-}
-
-void ModelTest::refreshStatus()
-{
- status.type = Status::Idle;
- status.nonPersistent.clear();
- status.persistent.clear();
-
- persistStatus(QModelIndex());
-}
-
-void ModelTest::persistStatus(const QModelIndex &index)
-{
- const int rowCount = model->rowCount(index);
- for (int row = 0; row < rowCount; ++row) {
- // TODO: Test multi columns
- static const int column = 0;
- QPersistentModelIndex idx = model->index(row, column, index);
- status.persistent.append(idx);
- status.nonPersistent.append(idx);
- persistStatus(idx);
- }
-}
-
-void ModelTest::ensureSteady()
-{
- Q_ASSERT(insert.isEmpty());
- Q_ASSERT(remove.isEmpty());
- Q_ASSERT(changing.isEmpty());
- ensureConsistent();
-}
-
-void ModelTest::ensureConsistent()
-{
- Q_ASSERT(status.type == Status::Idle);
-
- Q_ASSERT(status.nonPersistent.size() == status.persistent.size());
- for (int i = 0; i < status.nonPersistent.size(); ++i) {
- Q_ASSERT(status.nonPersistent.at(i) == status.persistent.at(i));
- }
+ QVERIFY( c.parent == parent );
+ QVERIFY( c.oldSize - ( end - start + 1 ) == model->rowCount ( parent ) );
+ QVERIFY( c.last == model->data ( model->index ( start - 1, 0, c.parent ) ) );
+ QVERIFY( c.next == model->data ( model->index ( start, 0, c.parent ) ) );
+}
+
+void ModelTest::dataChanged(const QModelIndex &topLeft, const QModelIndex &bottomRight)
+{
+ QVERIFY(topLeft.isValid());
+ QVERIFY(bottomRight.isValid());
+ QModelIndex commonParent = bottomRight.parent();
+ QVERIFY(topLeft.parent() == commonParent);
+ QVERIFY(topLeft.row() <= bottomRight.row());
+ QVERIFY(topLeft.column() <= bottomRight.column());
+ int rowCount = model->rowCount(commonParent);
+ int columnCount = model->columnCount(commonParent);
+ QVERIFY(bottomRight.row() < rowCount);
+ QVERIFY(bottomRight.column() < columnCount);
+}
+
+void ModelTest::headerDataChanged(Qt::Orientation orientation, int start, int end)
+{
+ QVERIFY(start >= 0);
+ QVERIFY(end >= 0);
+ QVERIFY(start <= end);
+ int itemCount = orientation == Qt::Vertical ? model->rowCount() : model->columnCount();
+ QVERIFY(start < itemCount);
+ QVERIFY(end < itemCount);
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kitemmodels-4.97.0/autotests/proxymodeltestsuite/modeltest.h new/kitemmodels-4.98.0/autotests/proxymodeltestsuite/modeltest.h
--- old/kitemmodels-4.97.0/autotests/proxymodeltestsuite/modeltest.h 2014-03-01 12:51:06.000000000 +0100
+++ new/kitemmodels-4.98.0/autotests/proxymodeltestsuite/modeltest.h 2014-03-28 19:35:13.000000000 +0100
@@ -1,27 +1,21 @@
/****************************************************************************
**
-** Copyright (C) 2007 Trolltech ASA. All rights reserved.
-** Copyright (C) 2010 Stephen Kelly <steveire(a)gmail.com>
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/legal
**
-** This file is part of the Qt Concurrent project on Trolltech Labs.
+** This file is part of the test suite of the Qt Toolkit.
**
-** This file may be used under the terms of the GNU General Public
-** License version 2.0 as published by the Free Software Foundation
-** and appearing in the file LICENSE.GPL included in the packaging of
-** this file. Please review the following information to ensure GNU
-** General Public Licensing requirements will be met:
-** http://www.trolltech.com/products/qt/opensource.html
-**
-** If you are unsure which license is appropriate for your use, please
-** review the following information:
-** http://www.trolltech.com/products/qt/licensing.html or contact the
-** sales department at sales(a)trolltech.com.
-**
-** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+** GNU Lesser General Public License Usage
+** This file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file COPYING.LIB included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
****************************************************************************/
+
#ifndef MODELTEST_H
#define MODELTEST_H
@@ -29,83 +23,50 @@
#include <QtCore/QAbstractItemModel>
#include <QtCore/QStack>
-#include "proxymodeltestsuite_export.h"
-
-class PROXYMODELTESTSUITE_EXPORT ModelTest : public QObject
+class ModelTest : public QObject
{
- Q_OBJECT
+ Q_OBJECT
public:
- enum Mode {
- Normal,
- Pedantic
- };
-
- ModelTest(QAbstractItemModel *model, QObject *parent = 0);
- ModelTest(QAbstractItemModel *model, Mode testType, QObject *parent = 0);
+ ModelTest( QAbstractItemModel *model, QObject *parent = 0 );
private Q_SLOTS:
- void nonDestructiveBasicTest();
- void rowCount();
- void columnCount();
- void hasIndex();
- void index();
- void parent();
- void data();
+ void nonDestructiveBasicTest();
+ void rowCount();
+ void columnCount();
+ void hasIndex();
+ void index();
+ void parent();
+ void data();
protected Q_SLOTS:
- void runAllTests();
- void layoutAboutToBeChanged();
- void layoutChanged();
- void modelAboutToBeReset();
- void modelReset();
- void rowsAboutToBeInserted(const QModelIndex &parent, int start, int end);
- void rowsInserted(const QModelIndex &parent, int start, int end);
- void rowsAboutToBeRemoved(const QModelIndex &parent, int start, int end);
- void rowsRemoved(const QModelIndex &parent, int start, int end);
- void rowsAboutToBeMoved(const QModelIndex &, int, int, const QModelIndex &, int);
- void rowsMoved(const QModelIndex &, int, int, const QModelIndex &, int);
-
- void ensureConsistent();
- void ensureSteady();
+ void runAllTests();
+ void layoutAboutToBeChanged();
+ void layoutChanged();
+ void rowsAboutToBeInserted( const QModelIndex &parent, int start, int end );
+ void rowsInserted( const QModelIndex & parent, int start, int end );
+ void rowsAboutToBeRemoved( const QModelIndex &parent, int start, int end );
+ void rowsRemoved( const QModelIndex & parent, int start, int end );
+ void dataChanged(const QModelIndex &topLeft, const QModelIndex &bottomRight);
+ void headerDataChanged(Qt::Orientation orientation, int start, int end);
private:
- void checkChildren(const QModelIndex &parent, int currentDepth = 0);
- void refreshStatus();
- void persistStatus(const QModelIndex &index);
- void init();
-
- QAbstractItemModel *const model;
-
- struct Status {
- enum Type {
- Idle,
- InsertingRows,
- RemovingRows,
- MovingRows,
- ChangingLayout,
- Resetting
- };
-
- Type type;
-
- QList<QPersistentModelIndex> persistent;
- QList<QModelIndex> nonPersistent;
- } status;
-
- struct Changing {
- QPersistentModelIndex parent;
- int oldSize;
- QVariant last;
- QVariant next;
- };
- QStack<Changing> insert;
- QStack<Changing> remove;
+ void checkChildren( const QModelIndex &parent, int currentDepth = 0 );
+
+ QAbstractItemModel *model;
+
+ struct Changing {
+ QModelIndex parent;
+ int oldSize;
+ QVariant last;
+ QVariant next;
+ };
+ QStack<Changing> insert;
+ QStack<Changing> remove;
- bool fetchingMore;
- const bool pedantic;
+ bool fetchingMore;
- QList<QPersistentModelIndex> changing;
+ QList<QPersistentModelIndex> changing;
};
#endif
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: opensuse-commit+help(a)opensuse.org
[View Less]
1
0
Hello community,
here is the log from the commit of package kio for openSUSE:Factory checked in at 2014-04-02 17:22:09
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/kio (Old)
and /work/SRC/openSUSE:Factory/.kio.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "kio"
Changes:
--------
--- /work/SRC/openSUSE:Factory/kio/kio.changes 2014-03-10 12:18:08.000000000 +0100
+++ /work/SRC/…
[View More]openSUSE:Factory/.kio.new/kio.changes 2014-04-02 17:22:20.000000000 +0200
@@ -1,0 +2,10 @@
+Sat Mar 29 19:47:42 UTC 2014 - hrvoje.senjan(a)gmail.com
+
+- Update to 4.98.0
+ * API improvements and cleanups
+ * Buildsystem fixes
+ * For more details please see:
+ http://www.kde.org/announcements/announce-frameworks5-beta1.php
+- Added kwallet-devel BuildRequires
+
+-------------------------------------------------------------------
Old:
----
kio-4.97.0.tar.xz
New:
----
kio-4.98.0.tar.xz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ kio.spec ++++++
--- /var/tmp/diff_new_pack.DchLT8/_old 2014-04-02 17:22:21.000000000 +0200
+++ /var/tmp/diff_new_pack.DchLT8/_new 2014-04-02 17:22:21.000000000 +0200
@@ -17,10 +17,10 @@
Name: kio
-Version: 4.97.0
+Version: 4.98.0
Release: 0
BuildRequires: cmake >= 2.8.12
-BuildRequires: extra-cmake-modules >= 0.0.11
+BuildRequires: extra-cmake-modules >= 0.0.12
BuildRequires: fdupes
BuildRequires: karchive-devel >= %{_kf5_version}
BuildRequires: kbookmarks-devel >= %{_kf5_version}
@@ -40,6 +40,7 @@
BuildRequires: krb5-devel
BuildRequires: kservice-devel >= %{_kf5_version}
BuildRequires: ktextwidgets-devel >= %{_kf5_version}
+BuildRequires: kwallet-devel >= %{_kf5_version}
BuildRequires: kwidgetsaddons-devel >= %{_kf5_version}
BuildRequires: kwindowsystem-devel >= %{_kf5_version}
BuildRequires: kxmlgui-devel >= %{_kf5_version}
@@ -116,6 +117,7 @@
%{_kf5_servicetypesdir}/kpropertiesdialogplugin.desktop
%{_kf5_servicetypesdir}/kurifilterplugin.desktop
%{_kf5_plugindir}/kio_file.so
+%{_kf5_plugindir}/kded_kpasswdserver.so
%{_kf5_servicesdir}/file.protocol
%{_kf5_plugindir}/kio_help.so
%{_kf5_plugindir}/kio_ghelp.so
@@ -134,6 +136,7 @@
%{_kf5_datadir}/khtml/domain_info
%dir %{_kf5_servicesdir}/kded
%{_kf5_servicesdir}/kded/kcookiejar.desktop
+%{_kf5_servicesdir}/kded/kpasswdserver.desktop
%dir %{_kf5_datadir}/kconf_update
%{_kf5_datadir}/kconf_update/kcookiescfg.upd
%{_kf5_datadir}/kconf_update/kcookiescfg.pl
@@ -154,6 +157,7 @@
%{_kf5_plugindir}/kded_proxyscout.so
%{_kf5_libexecdir}/kpac_dhcp_helper
%{_kf5_libexecdir}/kioslave
+%{_kf5_libexecdir}/kioexec
%dir %{_kf5_datadir}/proxyscout
%{_kf5_datadir}/proxyscout/proxyscout.notifyrc
%{_kf5_servicesdir}/kded/proxyscout.desktop
@@ -172,6 +176,7 @@
%dir %{_kf5_htmldir}/en
%dir %{_kf5_htmldir}
%{_kf5_htmldir}/en/kioslave/
+%{_kf5_htmldir}/en/khelpcenter/
%{_kf5_dbusinterfacesdir}/kf5_org.kde.KDirNotify.xml
%{_kf5_dbusinterfacesdir}/kf5_org.kde.KPasswdServer.xml
%{_kf5_dbusinterfacesdir}/kf5_org.kde.KSlaveLauncher.xml
++++++ kio-4.97.0.tar.xz -> kio-4.98.0.tar.xz ++++++
++++ 5023 lines of diff (skipped)
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: opensuse-commit+help(a)opensuse.org
[View Less]
1
0
Hello community,
here is the log from the commit of package kinit for openSUSE:Factory checked in at 2014-04-02 17:22:08
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/kinit (Old)
and /work/SRC/openSUSE:Factory/.kinit.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "kinit"
Changes:
--------
--- /work/SRC/openSUSE:Factory/kinit/kinit.changes 2014-03-25 13:22:40.000000000 +0100
+++…
[View More] /work/SRC/openSUSE:Factory/.kinit.new/kinit.changes 2014-04-02 17:22:19.000000000 +0200
@@ -1,0 +2,9 @@
+Sat Mar 29 19:47:41 UTC 2014 - hrvoje.senjan(a)gmail.com
+
+- Update to 4.98.0
+ * API improvements and cleanups
+ * Buildsystem fixes
+ * For more details please see:
+ http://www.kde.org/announcements/announce-frameworks5-beta1.php
+
+-------------------------------------------------------------------
Old:
----
kinit-4.97.0.tar.xz
New:
----
kinit-4.98.0.tar.xz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ kinit.spec ++++++
--- /var/tmp/diff_new_pack.oUlTjj/_old 2014-04-02 17:22:20.000000000 +0200
+++ /var/tmp/diff_new_pack.oUlTjj/_new 2014-04-02 17:22:20.000000000 +0200
@@ -17,10 +17,10 @@
Name: kinit
-Version: 4.97.0
+Version: 4.98.0
Release: 0
BuildRequires: cmake >= 2.8.12
-BuildRequires: extra-cmake-modules >= 0.0.11
+BuildRequires: extra-cmake-modules >= 0.0.12
BuildRequires: fdupes
BuildRequires: kcrash-devel >= %{_kf5_version}
BuildRequires: kf5-filesystem
@@ -28,12 +28,12 @@
BuildRequires: kio-devel >= %{_kf5_version}
BuildRequires: kservice-devel >= %{_kf5_version}
BuildRequires: kwindowsystem-devel >= %{_kf5_version}
+BuildRequires: libcap-devel
BuildRequires: pkgconfig(Qt5Core) >= 5.2.0
BuildRequires: pkgconfig(Qt5DBus) >= 5.2.0
BuildRequires: pkgconfig(Qt5Gui) >= 5.2.0
BuildRequires: pkgconfig(Qt5Widgets) >= 5.2.0
BuildRequires: pkgconfig(x11)
-BuildRequires: libcap-devel
#PreReq: permissions
Summary: Helper library to speed up start of applications on KDE workspaces
License: LGPL-2.1+
++++++ kinit-4.97.0.tar.xz -> kinit-4.98.0.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kinit-4.97.0/CMakeLists.txt new/kinit-4.98.0/CMakeLists.txt
--- old/kinit-4.97.0/CMakeLists.txt 2014-03-01 12:51:02.000000000 +0100
+++ new/kinit-4.98.0/CMakeLists.txt 2014-03-28 19:17:02.000000000 +0100
@@ -2,11 +2,11 @@
project(KInit)
-find_package(ECM 0.0.11 REQUIRED NO_MODULE)
+find_package(ECM 0.0.12 REQUIRED NO_MODULE)
set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH} ${ECM_KDE_MODULE_DIR})
set(REQUIRED_QT_VERSION "5.2")
-find_package(Qt5 "${REQUIRED_QT_VERSION}" CONFIG REQUIRED Core Gui Widgets DBus)
+find_package(Qt5 "${REQUIRED_QT_VERSION}" CONFIG REQUIRED Core Gui DBus)
include(KDEInstallDirs)
include(KDEFrameworkCompilerSettings)
include(KDECMakeSettings)
@@ -15,7 +15,7 @@
include(ECMPackageConfigHelpers)
include(ECMSetupVersion)
-set(KF5_VERSION "4.97.0")
+set(KF5_VERSION "4.98.0")
ecm_setup_version(${KF5_VERSION} VARIABLE_PREFIX KINIT
VERSION_HEADER "${CMAKE_CURRENT_BINARY_DIR}/kinit_version.h"
@@ -44,6 +44,7 @@
find_package(KF5I18n ${KF5_VERSION} REQUIRED)
find_package(KF5WindowSystem ${KF5_VERSION} REQUIRED)
find_package(KF5Crash ${KF5_VERSION} REQUIRED)
+ find_package(KF5Config ${KF5_VERSION} REQUIRED)
# Due to a CMake bug, we need to explicitly find private dependencies of our dependencies
# Remove when we depend on CMake 3.0.0
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kinit-4.97.0/ConfigureChecks.cmake new/kinit-4.98.0/ConfigureChecks.cmake
--- old/kinit-4.97.0/ConfigureChecks.cmake 2014-03-01 12:51:02.000000000 +0100
+++ new/kinit-4.98.0/ConfigureChecks.cmake 2014-03-28 19:17:02.000000000 +0100
@@ -1,15 +1,17 @@
-include (CheckFunctionExists)
-include (CheckIncludeFiles)
-include (CheckVariableExists)
+include(CheckFunctionExists)
+include(CheckIncludeFiles)
+include(CheckVariableExists)
include(CheckLibraryExists)
check_variable_exists(__progname HAVE___PROGNAME)
-check_variable_exists(__progname_full HAVE___PROGNAME_FULL)
check_include_files(sys/pstat.h HAVE_SYS_PSTAT_H)
-check_include_files(sys/types.h HAVE_SYS_TYPES_H)
-check_include_files(unistd.h HAVE_UNISTD_H)
check_include_files(sys/select.h HAVE_SYS_SELECT_H)
-check_include_files(sys/exec.h HAVE_SYS_EXEC_H)
check_function_exists(pstat HAVE_PSTAT)
check_function_exists(setproctitle HAVE_SETPROCTITLE)
check_library_exists(socket connect "" HAVE_SOCKET_LIBRARY)
+
+if(CMAKE_SYSTEM_NAME STREQUAL "Linux" OR CMAKE_SYSTEM_NAME STREQUAL "Darwin")
+ set(CAN_CLOBBER_ARGV TRUE)
+else()
+ set(CAN_CLOBBER_ARGV FALSE)
+endif()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kinit-4.97.0/KF5InitMacros.cmake new/kinit-4.98.0/KF5InitMacros.cmake
--- old/kinit-4.97.0/KF5InitMacros.cmake 2014-03-01 12:51:02.000000000 +0100
+++ new/kinit-4.98.0/KF5InitMacros.cmake 2014-03-28 19:17:02.000000000 +0100
@@ -34,6 +34,7 @@
endif(NOT _res_position EQUAL -1)
_FIND_KDEINIT_FILE(_KDE5INIT_WIN32_DUMMY_FILEPATH "_win32lib")
+ set(_KDEINIT5_TARGET_NAME_ ${_target_NAME})
configure_file(${_KDE5INIT_WIN32_DUMMY_FILEPATH} ${CMAKE_CURRENT_BINARY_DIR}/${_target_NAME}_win32lib_dummy.cpp)
add_library(kdeinit_${_target_NAME} STATIC ${CMAKE_CURRENT_BINARY_DIR}/${_target_NAME}_win32lib_dummy.cpp)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kinit-4.97.0/README.autostart new/kinit-4.98.0/README.autostart
--- old/kinit-4.97.0/README.autostart 2014-03-01 12:51:02.000000000 +0100
+++ new/kinit-4.98.0/README.autostart 1970-01-01 01:00:00.000000000 +0100
@@ -1,62 +0,0 @@
-KDE SESSION AUTOSTART
-=====================
-
-KDE session startup occurs in the following sequence:
-
- Window manager startup
- Autostart phase 1
- Session restoration
- Autostart phase 2
-
-Applications may be scheduled to be automatically run at KDE session startup
-in either autostart phase 1 or phase 2. Autostart phase 1 is the original
-autostart phase; phase 2 was introduced in KDE 3. To run in either phase, an
-application's .desktop file must be located in a KDE autostart directory such
-as $KDEDIR/share/autostart or $KDEHOME/share/autostart. The .desktop file can
-contain the following optional entries to control its autostart:
-
- X-KDE-autostart-condition = rcfile:group:entry:default
-
- rcfile = name of a config file (including path if necessary)
- group = name of a group within the config file
- entry = name of a boolean entry within the group
- default = true or false
-
- Starts the application only if the specified boolean entry in the
- specified config file has the value 'true'. If the specified entry is
- missing from the config file, the application will only be started if
- 'default' is 'true'.
- If the entry is not within a group, the group entry can be left empty.
-
- X-KDE-autostart-after = desktop_name
-
- desktop_name = the name of another .desktop file excluding path and
- the .desktop suffix. E.g. panel.desktop would appear
- as 'X-KDE-autostart-after=panel'
-
- Waits until the .desktop file specified by 'desktop_name' has been
- autostarted. The entry is ignored if the specified application is not
- scheduled in the same autostart phase as this .desktop file.
-
- X-KDE-autostart-phase = phase
-
- phase = 1 or 2
-
- Starts the application in the autostart phase specified by 'phase'.
- If this entry is missing or 'phase' < 1, 'phase' defaults to 1. If
- 'phase' > 2 the application will not be autostarted since the specified
- autostart phase will never be reached.
-
-
- Hidden = true
-
- Disables autostarting the application.
-
-
-KUniqueApplication and session restoration
-------------------------------------------
-
-If KUniqueApplication applications are autostarted before they are restored
-from the previous session, they will never see the session restoration command.
-So if you need to autostart a KUniqueApplication which may also be restored
-in session restoration, you should schedule it for autostart in phase 2.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kinit-4.97.0/README.wrapper new/kinit-4.98.0/README.wrapper
--- old/kinit-4.97.0/README.wrapper 2014-03-01 12:51:02.000000000 +0100
+++ new/kinit-4.98.0/README.wrapper 1970-01-01 01:00:00.000000000 +0100
@@ -1,38 +0,0 @@
-README
-
-kdeinit4_wrapper, kshell4 and kwrapper4 are programs that
-start programs via kdeinit4.
-
-E.g. You can make a symbolic link from $KDEDIR/bin/konsole to
-$KDEDIR/bin/kdeinit4_wrapper. Typing 'konsole' on the command line
-will then start 'konsole.so' through kdeinit instead.
-
-kdeinit4_wrapper is the simplest form, it only passes the program
-and arguments to kdeinit, nothing else
-
-kshell is usually the best choice, it passes the program,
-arguments, complete environment ( $PATH, etc. ) and current
-working directory to kdeinit
-
-kwrapper tries to make the program look like it was actually
-really started directly and not via kdeinit. In addition to
-what kshell does, it also tries to redirect the program
-output to the console from which kwrapper was started, it waits
-for the program started via kdeinit to finish and only after then
-it exits ( it doesn't return its return value though ), and
-it also passes most signals it gets to the process of the started
-program ( thus allowing you to break it using Ctrl+C or stopping
-it using Ctrl+Z ). The drawbacks of this are that you'll have one
-more process running, and also the signal passing and output
-redirection may not work 100% reliably
-
-
-TODO
-====
-
-* There is no portable way to read out the complete environment and
- pass it to kdeinit. - kdeinit should probably unset every
- variable that's not set in the environment it gets from kshell or
- kwrapper
-* stdout/stderr of the started application goes to the console where
- kdeinit was started. - done, I hope it's ok
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kinit-4.97.0/docs/session-autostart.txt new/kinit-4.98.0/docs/session-autostart.txt
--- old/kinit-4.97.0/docs/session-autostart.txt 1970-01-01 01:00:00.000000000 +0100
+++ new/kinit-4.98.0/docs/session-autostart.txt 2014-03-28 19:17:02.000000000 +0100
@@ -0,0 +1,62 @@
+KDE SESSION AUTOSTART
+=====================
+
+KDE session startup occurs in the following sequence:
+
+ Window manager startup
+ Autostart phase 1
+ Session restoration
+ Autostart phase 2
+
+Applications may be scheduled to be automatically run at KDE session startup
+in either autostart phase 1 or phase 2. Autostart phase 1 is the original
+autostart phase; phase 2 was introduced in KDE 3. To run in either phase, an
+application's .desktop file must be located in a KDE autostart directory such
+as $KDEDIR/share/autostart or $KDEHOME/share/autostart. The .desktop file can
+contain the following optional entries to control its autostart:
+
+ X-KDE-autostart-condition = rcfile:group:entry:default
+
+ rcfile = name of a config file (including path if necessary)
+ group = name of a group within the config file
+ entry = name of a boolean entry within the group
+ default = true or false
+
+ Starts the application only if the specified boolean entry in the
+ specified config file has the value 'true'. If the specified entry is
+ missing from the config file, the application will only be started if
+ 'default' is 'true'.
+ If the entry is not within a group, the group entry can be left empty.
+
+ X-KDE-autostart-after = desktop_name
+
+ desktop_name = the name of another .desktop file excluding path and
+ the .desktop suffix. E.g. panel.desktop would appear
+ as 'X-KDE-autostart-after=panel'
+
+ Waits until the .desktop file specified by 'desktop_name' has been
+ autostarted. The entry is ignored if the specified application is not
+ scheduled in the same autostart phase as this .desktop file.
+
+ X-KDE-autostart-phase = phase
+
+ phase = 1 or 2
+
+ Starts the application in the autostart phase specified by 'phase'.
+ If this entry is missing or 'phase' < 1, 'phase' defaults to 1. If
+ 'phase' > 2 the application will not be autostarted since the specified
+ autostart phase will never be reached.
+
+
+ Hidden = true
+
+ Disables autostarting the application.
+
+
+KUniqueApplication and session restoration
+------------------------------------------
+
+If KUniqueApplication applications are autostarted before they are restored
+from the previous session, they will never see the session restoration command.
+So if you need to autostart a KUniqueApplication which may also be restored
+in session restoration, you should schedule it for autostart in phase 2.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kinit-4.97.0/docs/wrapper.txt new/kinit-4.98.0/docs/wrapper.txt
--- old/kinit-4.97.0/docs/wrapper.txt 1970-01-01 01:00:00.000000000 +0100
+++ new/kinit-4.98.0/docs/wrapper.txt 2014-03-28 19:17:02.000000000 +0100
@@ -0,0 +1,36 @@
+README
+
+kdeinit5_wrapper, kshell5 and kwrapper5 are programs that
+start programs via kdeinit.
+
+E.g. You can make a symbolic link from $KDEDIR/bin/konsole to
+$KDEDIR/bin/kdeinit5_wrapper. Typing 'konsole' on the command line
+will then start 'konsole.so' through kdeinit instead.
+
+kdeinit5_wrapper is the simplest form, it only passes the program
+and arguments to kdeinit, nothing else
+
+kshell5 is usually the best choice, it passes the program,
+arguments, complete environment ( $PATH, etc. ) and current
+working directory to kdeinit
+
+kwrapper5 tries to make the program look like it was actually
+really started directly and not via kdeinit. In addition to
+what kshell5 does, it also tries to redirect the program
+output to the console from which kwrapper5 was started, it waits
+for the program started via kdeinit to finish and only after then
+it exits ( it doesn't return its return value though ), and
+it also passes most signals it gets to the process of the started
+program ( thus allowing you to break it using Ctrl+C or stopping
+it using Ctrl+Z ). The drawbacks of this are that you'll have one
+more process running, and also the signal passing and output
+redirection may not work 100% reliably.
+
+
+TODO
+====
+
+* There is no portable way to read out the complete environment and
+ pass it to kdeinit. - kdeinit should probably unset every
+ variable that's not set in the environment it gets from kshell or
+ kwrapper
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kinit-4.97.0/kde5init_win32lib_dummy.cpp.in new/kinit-4.98.0/kde5init_win32lib_dummy.cpp.in
--- old/kinit-4.97.0/kde5init_win32lib_dummy.cpp.in 2014-03-01 12:51:02.000000000 +0100
+++ new/kinit-4.98.0/kde5init_win32lib_dummy.cpp.in 2014-03-28 19:17:02.000000000 +0100
@@ -1,5 +1,5 @@
/* dummy file, used by KF5_ADD_KDEINIT_EXECUTABLE() under Windows,
* so that the created static library is not completely empty */
-extern "C" int kdeinit_${_KDEINIT4_TARGET_NAME_}_dummy(void) { return 42; }
+extern "C" int kdeinit_${_KDEINIT5_TARGET_NAME_}_dummy(void) { return 42; }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kinit-4.97.0/src/Messages.sh new/kinit-4.98.0/src/Messages.sh
--- old/kinit-4.97.0/src/Messages.sh 1970-01-01 01:00:00.000000000 +0100
+++ new/kinit-4.98.0/src/Messages.sh 2014-03-28 19:17:02.000000000 +0100
@@ -0,0 +1,18 @@
+#!/bin/sh
+
+# Invoke the extractrc script on all .ui, .rc, and .kcfg files in the sources.
+# The results are stored in a pseudo .cpp file to be picked up by xgettext.
+lst=`find . -name \*.rc -o -name \*.ui -o -name \*.kcfg`
+if [ -n "$lst" ] ; then
+ $EXTRACTRC $lst >> rc.cpp
+fi
+
+# If your framework contains tips-of-the-day, call preparetips as well.
+if [ -f "data/tips" ] ; then
+ ( cd data && $PREPARETIPS > ../tips.cpp )
+fi
+
+# Extract strings from all source files.
+# If your framework depends on KI18n, use $XGETTEXT. If it uses Qt translation
+# system, use $EXTRACT_TR_STRINGS.
+$XGETTEXT `find . -name \*.cpp -o -name \*.h -name \*.qml` -o $podir/kinit5.pot
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kinit-4.97.0/src/config-kdeinit.h.cmake new/kinit-4.98.0/src/config-kdeinit.h.cmake
--- old/kinit-4.97.0/src/config-kdeinit.h.cmake 2014-03-01 12:51:02.000000000 +0100
+++ new/kinit-4.98.0/src/config-kdeinit.h.cmake 2014-03-28 19:17:02.000000000 +0100
@@ -7,13 +7,13 @@
/* These are for proctitle.cpp: */
#cmakedefine01 HAVE___PROGNAME
-#cmakedefine01 HAVE___PROGNAME_FULL
#cmakedefine01 HAVE_SYS_PSTAT_H
#cmakedefine01 HAVE_PSTAT
#cmakedefine01 HAVE_SETPROCTITLE
+#cmakedefine01 CAN_CLOBBER_ARGV
+
#cmakedefine01 HAVE_X11
#cmakedefine01 HAVE_SYS_SELECT_H
-#cmakedefine01 HAVE_SYS_EXEC_H
/* for start_kdeinit */
#cmakedefine01 KDEINIT_OOM_PROTECT
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kinit-4.97.0/src/kdeinit/CMakeLists.txt new/kinit-4.98.0/src/kdeinit/CMakeLists.txt
--- old/kinit-4.97.0/src/kdeinit/CMakeLists.txt 2014-03-01 12:51:02.000000000 +0100
+++ new/kinit-4.98.0/src/kdeinit/CMakeLists.txt 2014-03-28 19:17:02.000000000 +0100
@@ -22,16 +22,18 @@
target_link_libraries(kdeinit5 ${kdeinit_LIBS} ${KINIT_SOCKET_LIBRARY}
Qt5::Gui #QFont::initialize
- KF5::Service #KLibrary
KF5::WindowSystem # KStartupInfo
KF5::Crash # KCrash::loadedByKdeinit
KF5::I18n #i18n() used on some error messages
+ KF5::ConfigCore
Qt5::DBus
)
-if(WIN32)
- target_compile_definitions(kdeinit5 PRIVATE CMAKE_INSTALL_PREFIX="${CMAKE_INSTALL_PREFIX}")
-endif()
+target_compile_definitions(kdeinit5 PRIVATE
+ CMAKE_INSTALL_PREFIX="${CMAKE_INSTALL_PREFIX}"
+ LIB_INSTALL_DIR="${LIB_INSTALL_DIR}"
+ LIBEXEC_INSTALL_DIR="${LIBEXEC_INSTALL_DIR}"
+)
if (X11_FOUND)
target_link_libraries(kdeinit5 ${X11_X11_LIB})
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kinit-4.97.0/src/kdeinit/kinit.cpp new/kinit-4.98.0/src/kdeinit/kinit.cpp
--- old/kinit-4.97.0/src/kdeinit/kinit.cpp 2014-03-01 12:51:02.000000000 +0100
+++ new/kinit-4.98.0/src/kdeinit/kinit.cpp 2014-03-28 19:17:02.000000000 +0100
@@ -52,7 +52,6 @@
#include <QtCore/QRegExp>
#include <QFont>
#include <kcrash.h>
-#include <klibrary.h>
#include <kconfig.h>
#include <klocalizedstring.h>
#include <QDebug>
@@ -88,10 +87,10 @@
#ifdef Q_OS_UNIX
//TODO: make sure what libraries we want here...
static const char *extra_libs[] = {
- "libKIOCore.so.5",
- "libKParts.so.5",
+ "libKF5KIOCore.so.5",
+ "libKF5Parts.so.5",
//#ifdef __KDE_HAVE_GCC_VISIBILITY // Removed for KF5, we'll see.
- "libPlasma.so.5"
+ "libKF5Plasma.so.5"
//#endif
};
#endif
@@ -472,34 +471,34 @@
{
QString lib;
QByteArray name;
- QByteArray exec;
QString libpath;
QByteArray execpath;
+ bool libpath_relative = false;
if (_name[0] != '/') {
name = _name;
lib = QFile::decodeName(name);
- exec = name;
- KLibrary klib(QLatin1String("libkdeinit5_") + lib);
- libpath = klib.fileName();
- if (libpath.isEmpty()) {
- KLibrary klib(lib);
- libpath = klib.fileName(); // this is really just a way to call findLibraryInternal
- }
- execpath = execpath_avoid_loops(exec, envc, envs, avoid_loops);
- if (libpath.isEmpty() && execpath.isEmpty()) {
- fprintf(stderr, "Didn't find \"%s\", neither as an executable nor as a plugin. Please check $PATH and $QT_PLUGIN_PATH.\n", name.constData());
- }
+ libpath = QLatin1String("libkdeinit5_") + lib;
+ libpath_relative = true;
+ execpath = execpath_avoid_loops(name, envc, envs, avoid_loops);
} else {
name = _name;
lib = QFile::decodeName(name);
name = name.mid(name.lastIndexOf('/') + 1);
- exec = _name;
+
+ // FIXME: this .so extension stuff is very Linux-specific
if (lib.endsWith(QLatin1String(".so"))) {
libpath = lib;
} else {
- // try to match an absolute path to an executable binary (either in bin/ or in libexec/)
- // to a kdeinit module in the same prefix
+ execpath = _name;
+
+ // Try to match an absolute path to an executable binary (either in
+ // bin/ or in libexec/) to a kdeinit module in the same prefix.
+ //
+ // Note that these *_INSTALL_DIR values should normally relative to
+ // the install prefix, although this may not be the case if the user
+ // has overridden them, and so this search is inherently fragile in
+ // the face of unusual installation layouts.
if (lib.contains(QLatin1String(LIBEXEC_INSTALL_DIR))) {
libpath = QString(lib).replace(QLatin1String(LIBEXEC_INSTALL_DIR),
QLatin1String(LIB_INSTALL_DIR "/libkdeinit5_")) + QLatin1String(".so");
@@ -511,7 +510,6 @@
if (!QFile::exists(libpath)) {
libpath.clear();
}
- execpath = exec;
}
}
#ifndef NDEBUG
@@ -630,12 +628,12 @@
/* set the process name, so that killall works like intended */
r = prctl(PR_SET_NAME, (unsigned long) name.data(), 0, 0, 0);
if (r == 0) {
- proctitle_set("%s [kdeinit]%s", name.data(), procTitle.data() ? procTitle.data() : "");
+ proctitle_set("-%s [kdeinit5]%s", name.data(), procTitle.data() ? procTitle.data() : "");
} else {
- proctitle_set("kdeinit5: %s%s", name.data(), procTitle.data() ? procTitle.data() : "");
+ proctitle_set("%s%s", name.data(), procTitle.data() ? procTitle.data() : "");
}
#else
- proctitle_set("kdeinit5: %s%s", name.data(), procTitle.data() ? procTitle.data() : "");
+ proctitle_set("%s%s", name.data(), procTitle.data() ? procTitle.data() : "");
#endif
#endif
}
@@ -652,7 +650,20 @@
QLibrary l(libpath);
if (!libpath.isEmpty()) {
- if (!l.load() || !l.isLoaded()) {
+ if (!l.load()) {
+ if (libpath_relative) {
+ // NB: Because Qt makes the actual dlopen() call, the
+ // RUNPATH of kdeinit is *not* respected - see
+ // https://sourceware.org/bugzilla/show_bug.cgi?id=13945
+ // - so we try hacking it in ourselves
+ QString install_lib_dir = QFile::decodeName(
+ CMAKE_INSTALL_PREFIX "/" LIB_INSTALL_DIR "/");
+ libpath = install_lib_dir + libpath;
+ l.setFileName(libpath);
+ l.load();
+ }
+ }
+ if (!l.isLoaded()) {
QString ltdlError(l.errorString());
if (execpath.isEmpty()) {
// Error
@@ -660,7 +671,7 @@
exitWithErrorMsg(errorMsg);
} else {
// Print warning
- fprintf(stderr, "Could not open library %s: %s\n", qPrintable(lib),
+ fprintf(stderr, "Could not open %s using a library: %s\n", qPrintable(lib),
qPrintable(ltdlError));
}
}
@@ -883,17 +894,6 @@
exit(255);
}
}
-#if 0 // obsolete in kde4. Should we check writing to another file instead?
- path = qgetenv("ICEAUTHORITY");
- if (path.isEmpty()) {
- path = home_dir;
- path += "/.ICEauthority";
- }
- if (access(path.data(), R_OK | W_OK) && (errno != ENOENT)) {
- fprintf(stderr, "kdeinit5: Aborting. No write access to '%s'.\n", path.data());
- exit(255);
- }
-#endif
}
/** Test if socket file is already present
@@ -1380,62 +1380,9 @@
}
}
-static void kdeinit_library_path()
+static void generate_socket_name()
{
- const QStringList ltdl_library_path =
- QFile::decodeName(qgetenv("LTDL_LIBRARY_PATH")).split(QLatin1Char(':'), QString::SkipEmptyParts);
-#ifdef Q_OS_DARWIN
- const QByteArray ldlibpath = qgetenv("DYLD_LIBRARY_PATH");
-#else
- const QByteArray ldlibpath = qgetenv("LD_LIBRARY_PATH");
-#endif
- const QStringList ld_library_path =
- QFile::decodeName(ldlibpath).split(QLatin1Char(':'), QString::SkipEmptyParts);
-
-#if 0 // unused
-
- QByteArray extra_path;
- const QStringList candidates = s_instance->dirs()->resourceDirs("lib");
- for (QStringList::ConstIterator it = candidates.begin();
- it != candidates.end();
- ++it) {
- QString d = *it;
- if (ltdl_library_path.contains(d)) {
- continue;
- }
- if (ld_library_path.contains(d)) {
- continue;
- }
- if (d[d.length() - 1] == QLatin1Char('/')) {
- d.truncate(d.length() - 1);
- if (ltdl_library_path.contains(d)) {
- continue;
- }
- if (ld_library_path.contains(d)) {
- continue;
- }
- }
- if ((d == QLatin1String("/lib")) || (d == QLatin1String("/usr/lib"))) {
- continue;
- }
-
- QByteArray dir = QFile::encodeName(d);
-
- if (access(dir, R_OK)) {
- continue;
- }
-
- if (!extra_path.isEmpty()) {
- extra_path += ':';
- }
- extra_path += dir;
- }
-#endif
-
-// if (!extra_path.isEmpty())
-// lt_dlsetsearchpath(extra_path.data());
-
QByteArray display = qgetenv(displayEnvVarName().constData());
if (display.isEmpty()) {
#if HAVE_X11 // qt5: see displayEnvVarName()
@@ -1677,7 +1624,7 @@
}
-int main(int argc, char **argv, char **envp)
+int main(int argc, char **argv)
{
#ifndef _WIN32_WCE
setlocale(LC_ALL, "");
@@ -1687,10 +1634,7 @@
pid_t pid;
bool do_fork = true;
int launch_klauncher = 1;
- // KDE5 TODO: make this 0 by default, so that a random kde app doesn't start kded5 upfront,
- // but on demand when a service needs it. In startkde, however, use +kded5 or --kded.
- // (+kded5 might not work because it doesn't fork on startup anymore)
- int launch_kded = 1;
+ int launch_kded = 0;
int keep_running = 1;
d.suicide = false;
@@ -1701,16 +1645,17 @@
if (strcmp(safe_argv[i], "--no-klauncher") == 0) {
launch_klauncher = 0;
}
- if (strcmp(safe_argv[i], "--no-kded") == 0) {
- launch_kded = 0;
+ if (strcmp(safe_argv[i], "--kded") == 0) {
+ launch_kded = 1;
}
-#ifdef Q_OS_MAC
- // make it nofork to match KUniqueApplication, technically command-line incompatible
- if (strcmp(safe_argv[i], "--nofork") == 0)
-#else
- if (strcmp(safe_argv[i], "--no-fork") == 0)
-#endif
+ // allow both nofork and no-fork for compatibility with
+ // old versions (both of this and of KUniqueApplication)
+ if (strcmp(safe_argv[i], "--nofork") == 0) {
+ do_fork = false;
+ }
+ if (strcmp(safe_argv[i], "--no-fork") == 0) {
do_fork = false;
+ }
if (strcmp(safe_argv[i], "--suicide") == 0) {
d.suicide = true;
}
@@ -1729,13 +1674,9 @@
#endif
if (strcmp(safe_argv[i], "--help") == 0) {
printf("Usage: kdeinit5 [options]\n");
-#ifdef Q_OS_MAC
- printf(" --nofork Do not fork\n");
-#else
printf(" --no-fork Do not fork\n");
-#endif
// printf(" --no-klauncher Do not start klauncher\n");
- printf(" --no-kded Do not start kded\n");
+ printf(" --kded Start kded\n");
printf(" --suicide Terminate when no KDE applications are left running\n");
printf(" --version Show version information\n");
// printf(" --exit Terminate when kded has run\n");
@@ -1786,10 +1727,9 @@
/** Prepare to change process name **/
#ifndef SKIP_PROCTITLE
- proctitle_init(argc, argv, envp);
+ proctitle_init(argc, argv);
#endif
- kdeinit_library_path();
// don't change envvars before proctitle_init()
unsetenv("LD_BIND_NOW");
unsetenv("DYLD_BIND_AT_LAUNCH");
@@ -1808,6 +1748,7 @@
setupX();
#endif
+ generate_socket_name();
if (keep_running) {
/*
* Create ~/.kde/tmp-<hostname>/kdeinit5-<display> socket for incoming wrapper
@@ -1894,7 +1835,7 @@
free(safe_argv);
#ifndef SKIP_PROCTITLE
- proctitle_set("kdeinit5 Running...");
+ proctitle_set("Running...");
#endif
if (!keep_running) {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kinit-4.97.0/src/kdeinit/proctitle.cpp new/kinit-4.98.0/src/kdeinit/proctitle.cpp
--- old/kinit-4.97.0/src/kdeinit/proctitle.cpp 2014-03-01 12:51:02.000000000 +0100
+++ new/kinit-4.98.0/src/kdeinit/proctitle.cpp 2014-03-28 19:17:02.000000000 +0100
@@ -1,234 +1,211 @@
+/* Based on setproctitle.c from OpenSSH 6.6p1 */
+
/*
- * ProFTPD - FTP server daemon
- * Copyright (c) 2007 The ProFTPD Project team //krazy:exclude=copyright
- * Copyright (c) 2007 Alex Merry <alex.merry(a)kdemail.net>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+ * Copyright 2014 Alex Merry <alex.merry(a)kde.org>
+ * Copyright 2003 Damien Miller
+ * Copyright (c) 1983, 1995-1997 Eric P. Allman
+ * Copyright (c) 1988, 1993
+ * The Regents of the University of California. All rights reserved.
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of the University nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the
- * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301 USA
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
*/
#include "proctitle.h"
#include <config-kdeinit.h>
-#include <QByteArray>
+#define PT_NONE 0 /* don't use it at all */
+#define PT_PSTAT 1 /* use pstat(PSTAT_SETCMD, ...) */
+#define PT_REUSEARGV 2 /* cover argv with title information */
+#define PT_SETPROCTITLE 3 /* forward onto the native setproctitle */
-#include <string.h>
-#include <stdio.h>
#include <stdarg.h>
+#include <stdio.h>
#include <stdlib.h>
-
-#define PF_ARGV_NONE 0
-#define PF_ARGV_NEW 1
-#define PF_ARGV_WRITEABLE 2
-#define PF_ARGV_PSTAT 3
-#define PF_ARGV_PSSTRINGS 4
+#include <sys/types.h>
+#include <unistd.h>
+#include <string.h>
#if HAVE_SETPROCTITLE
-# define PF_ARGV_TYPE PF_ARGV_NONE
-# if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-# endif /* HAVE_SYS_TYPES_H */
-# if HAVE_UNISTD_H
-# include <unistd.h>
-# endif /* HAVE_UNISTD_H */
-
-#else /* HAVE_SETPROCTITLE */
-# ifdef __GNU_HURD__
-# define PF_ARGV_TYPE PF_ARGV_NEW
-# else /* __GNU_HURD__ */
-# define PF_ARGV_TYPE PF_ARGV_WRITEABLE
-
-# if HAVE_SYS_PSTAT_H && HAVE_PSTAT
-# include <sys/pstat.h>
-# undef PF_ARGV_TYPE
-# define PF_ARGV_TYPE PF_ARGV_PSTAT
-# endif /* HAVE_SYS_PSTAT_H && HAVE_PSTAT */
-
-# if HAVE_SYS_EXEC_H
-# include <sys/exec.h>
-# if PS_STRINGS
-# include <machine/vmparam.h>
-# undef PF_ARGV_TYPE
-# define PF_ARGV_TYPE PF_ARGV_PSSTRINGS
-# endif /* PS_STRINGS */
-# endif /* HAVE_SYS_EXEC_H */
+# define PT_TYPE PT_SETPROCTITLE
+ // process title should get prepended automagically
+# define ADD_PROCTITLE 0
+#elif HAVE_SYS_PSTAT_H && HAVE_PSTAT
+# include <sys/pstat.h>
+# define PT_TYPE PT_PSTAT
+#elif CAN_CLOBBER_ARGV
+# define PT_TYPE PT_REUSEARGV
+#endif
-# endif /* !__GNU_HURD__ */
+#ifndef PT_TYPE
+# define PT_TYPE PT_NONE
+#endif
+#ifndef ADD_PROCTITLE
+# define ADD_PROCTITLE 1
+#endif
-#endif /* !HAVE_SETPROCTITLE */
+#if PT_TYPE == PT_REUSEARGV
+static char *argv_start = NULL;
+static size_t argv_env_len = 0;
+#endif
#if HAVE___PROGNAME
extern char *__progname;
-#endif /* HAVE___PROGNAME */
-#if HAVE___PROGNAME_FULL
-extern char *__progname_full;
-#endif /* HAVE___PROGNAME_FULL */
-extern char **environ;
-
-static char **Argv = NULL;
-
-#if PF_ARGV_TYPE == PF_ARGV_WRITEABLE /* Only this mode uses LastArgv */
-static char *LastArgv = NULL;
-static char *cleanUpTo = NULL;
+#else
+char *__progname;
#endif
-/**
- * Set up the memory space for setting the proctitle
- */
-void proctitle_init(int argc, char *argv[], char *envp[])
+void
+proctitle_init(int argc, char *argv[])
{
- register int i, envpsize;
- char **p;
+#if HAVE___PROGNAME
+ // progname may be a reference to argv[0]
+ __progname = strdup(__progname);
+#else
+ if (argc == 0 || argv[0] == NULL) {
+ __progname = "unknown"; /* XXX */
+ } else {
+ char *p = strrchr(argv[0], '/');
+ if (p == NULL)
+ p = argv[0];
+ else
+ p++;
- /* Move the environment so proctitle_set can use the space. */
- for (i = envpsize = 0; envp[i] != NULL; i++) {
- envpsize += strlen(envp[i]) + 1;
+ __progname = strdup(p);
}
+#endif
- if ((p = (char **) malloc((i + 1) * sizeof(char *))) != NULL) {
- environ = p;
+#if PT_TYPE == PT_REUSEARGV
+ if (argc == 0 || argv[0] == NULL)
+ return;
- for (i = 0; envp[i] != NULL; i++) {
- if ((environ[i] = static_cast<char *>(malloc(strlen(envp[i]) + 1))) != NULL) {
- strcpy(environ[i], envp[i]);
- }
- }
+ extern char **environ;
+ char *lastargv = NULL;
+ char **envp = environ;
+ int i;
- environ[i] = NULL;
- }
+ /*
+ * NB: This assumes that argv has already been copied out of the
+ * way. This is true for kdeinit, but may not be true for other
+ * programs. Beware.
+ */
- Argv = argv;
+ /* Fail if we can't allocate room for the new environment */
+ for (i = 0; envp[i] != NULL; i++)
+ ;
+ if ((environ = (char**)calloc(i + 1, sizeof(*environ))) == NULL) {
+ environ = envp; /* put it back */
+ return;
+ }
-# if PF_ARGV_TYPE == PF_ARGV_WRITEABLE /* Only this mode uses LastArgv */
+ /*
+ * Find the last argv string or environment variable within
+ * our process memory area.
+ */
for (i = 0; i < argc; i++) {
- if (!i || (LastArgv + 1 == argv[i])) {
- LastArgv = argv[i] + strlen(argv[i]);
- }
+ if (lastargv == NULL || lastargv + 1 == argv[i])
+ lastargv = argv[i] + strlen(argv[i]);
}
- cleanUpTo = LastArgv;
-
for (i = 0; envp[i] != NULL; i++) {
- /* must not overwrite XDG_SESSION_COOKIE */
- if (!strncmp(envp[i], "XDG_", 4)) {
- break;
- }
- if ((LastArgv + 1) == envp[i]) {
- LastArgv = envp[i] + strlen(envp[i]);
- }
+ if (lastargv + 1 == envp[i])
+ lastargv = envp[i] + strlen(envp[i]);
}
-#endif
-# if HAVE___PROGNAME
- /* Set the __progname variable so glibc and company
- * don't go nuts.
+ argv[1] = NULL;
+ argv_start = argv[0];
+ argv_env_len = lastargv - argv[0] - 1;
+
+ /*
+ * Copy environment
+ * XXX - will truncate env on strdup fail
*/
- __progname = strdup("kdeinit5");
-# endif /* HAVE___PROGNAME */
-# if HAVE___PROGNAME_FULL
- /* __progname_full too */
- __progname_full = strdup(argv[0]);
-# endif /* HAVE___PROGNAME_FULL */
+ for (i = 0; envp[i] != NULL; i++)
+ environ[i] = strdup(envp[i]);
+ environ[i] = NULL;
+#endif /* PT_REUSEARGV */
}
-void proctitle_set(const char *fmt, ...)
+void
+proctitle_set(const char *fmt, ...)
{
- va_list msg;
- static char statbuf[BUFSIZ];
-
-#if ! HAVE_SETPROCTITLE
-# if PF_ARGV_TYPE == PF_ARGV_PSTAT
- union pstun pst;
-# endif /* PF_ARGV_PSTAT */
- char *p;
- int i;
-#endif /* HAVE_SETPROCTITLE */
-
- if (!fmt) {
+#if PT_TYPE != PT_NONE
+#if PT_TYPE == PT_REUSEARGV
+ if (argv_env_len <= 0)
return;
- }
-
- va_start(msg, fmt);
-
- memset(statbuf, 0, sizeof(statbuf));
-
-#if HAVE_SETPROCTITLE
-# if __FreeBSD__ >= 4 && !defined(FREEBSD4_0) && !defined(FREEBSD4_1)
- /* FreeBSD's setproctitle() automatically prepends the process name. */
- qvsnprintf(statbuf, sizeof(statbuf), fmt, msg);
-
-# else /* FREEBSD4 */
- /* Manually append the process name for non-FreeBSD platforms. */
- qsnprintf(statbuf, sizeof(statbuf), "%s", "kdeinit5: ");
- qvsnprintf(statbuf + strlen(statbuf),
- sizeof(statbuf) - strlen(statbuf),
- fmt,
- msg);
-
-# endif /* FREEBSD4 */
- setproctitle("%s", statbuf);
-
-#else /* HAVE_SETPROCTITLE */
- /* Manually append the process name for non-setproctitle() platforms. */
- qsnprintf(statbuf, sizeof(statbuf), "%s", "kdeinit5: ");
- qvsnprintf(statbuf + strlen(statbuf),
- sizeof(statbuf) - strlen(statbuf),
- fmt,
- msg);
-
-#endif /* HAVE_SETPROCTITLE */
+#endif
- va_end(msg);
+ bool skip_proctitle = false;
+ if (fmt != NULL && fmt[0] == '-') {
+ skip_proctitle = true;
+ ++fmt;
+ }
+ char ptitle[1024];
+ memset(ptitle, '\0', sizeof(ptitle));
+ size_t len = 0;
+
+#if ADD_PROCTITLE
+ if (!skip_proctitle) {
+ strncpy(ptitle, __progname, sizeof(ptitle)-1);
+ len = strlen(ptitle);
+ if (fmt != NULL && sizeof(ptitle) - len > 2) {
+ strcpy(ptitle + len, ": ");
+ len += 2;
+ }
+ }
+#endif
-#if HAVE_SETPROCTITLE
- return;
-#else
- i = strlen(statbuf);
+ if (fmt != NULL) {
+ int r = -1;
+ if (len < sizeof(ptitle) - 1) {
+ va_list ap;
+ va_start(ap, fmt);
+ r = vsnprintf(ptitle + len, sizeof(ptitle) - len , fmt, ap);
+ va_end(ap);
+ }
+ if (r == -1 || (size_t)r >= sizeof(ptitle) - len)
+ return;
+ }
-# if PF_ARGV_TYPE == PF_ARGV_NEW
- /* We can just replace argv[] arguments. Nice and easy. */
- Argv[0] = statbuf;
- Argv[1] = NULL;
-# endif /* PF_ARGV_NEW */
-
-# if PF_ARGV_TYPE == PF_ARGV_WRITEABLE
- const int maxlen = (LastArgv - Argv[0]) - 1;
- /* We can overwrite individual argv[] arguments. Semi-nice. */
- qsnprintf(Argv[0], maxlen, "%s", statbuf);
- p = &Argv[0][i];
- /* Clear the rest used by arguments, but don't clear the memory
- that is usually used for environment variables. Some
- tools, like ConsoleKit must have access to the process'es initial
- environment (more exact, the XDG_SESSION_COOKIE variable stored there).
- If this code causes another side effect, we have to specifically
- always append those variables to our environment. */
- while (p < cleanUpTo) {
- *p++ = '\0';
- }
-
- Argv[1] = NULL;
-# endif /* PF_ARGV_WRITEABLE */
-
-# if PF_ARGV_TYPE == PF_ARGV_PSTAT
- pst.pst_command = statbuf;
- pstat(PSTAT_SETCMD, pst, i, 0, 0);
-# endif /* PF_ARGV_PSTAT */
-
-# if PF_ARGV_TYPE == PF_ARGV_PSSTRINGS
- PS_STRINGS->ps_nargvstr = 1;
- PS_STRINGS->ps_argvstr = statbuf;
-# endif /* PF_ARGV_PSSTRINGS */
+#if PT_TYPE == PT_PSTAT
+ union pstun pst;
+ pst.pst_command = ptitle;
+ pstat(PSTAT_SETCMD, pst, strlen(ptitle), 0, 0);
+#elif PT_TYPE == PT_REUSEARGV
+ strncpy(argv_start, ptitle, argv_env_len);
+ argv_start[argv_env_len-1] = '\0';
+#elif PT_TYPE == PT_SETPROCTITLE
+ if (fmt == NULL) {
+ setproctitle(NULL);
+#if defined(__FreeBSD__)
+ } else if (skip_proctitle) {
+ // setproctitle on FreeBSD allows skipping the process title
+ setproctitle("-%s", ptitle);
+#endif
+ } else {
+ setproctitle("%s", ptitle);
+ }
+#endif
-#endif /* HAVE_SETPROCTITLE */
+#endif /* !PT_NONE */
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kinit-4.97.0/src/kdeinit/proctitle.h new/kinit-4.98.0/src/kdeinit/proctitle.h
--- old/kinit-4.97.0/src/kdeinit/proctitle.h 2014-03-01 12:51:02.000000000 +0100
+++ new/kinit-4.98.0/src/kdeinit/proctitle.h 2014-03-28 19:17:02.000000000 +0100
@@ -1,48 +1,63 @@
/*
- * ProFTPD - FTP server daemon
- * Copyright (c) 2007 The ProFTPD Project team //krazy:exclude=copyright
- * Copyright (c) 2007 Alex Merry <alex.merry(a)kdemail.net>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the
- * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301 USA
+ * Copyright 2014 Alex Merry <alex.merry(a)kde.org>
+ * Copyright 2003 Damien Miller
+ * Copyright (c) 1983, 1995-1997 Eric P. Allman
+ * Copyright (c) 1988, 1993
+ * The Regents of the University of California. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of the University nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
*/
-#ifndef PROCTITLE_H
-#define PROCTITLE_H
+#ifndef SETPROCTITLE_H
+#define SETPROCTITLE_H
/**
- * Initialises the program data variables to allow the
- * changing of the process title. This _must_ be called
- * before proctitle_set, and must only be called once.
- *
- * @param argc argc, as passed to main()
- * @param argv argv, as passed to main()
- * @param envp envp, as passed to main()
+ * Set up the data structures for changing the process title.
+ *
+ * This must be called before proctitle_set, and must not be called
+ * multiple times. Be warned that this function and proctitle_set may
+ * alter the contents of argv, and so any argument parsing should be
+ * done before calling this function.
+ *
+ * @param argc argc, as passed to main()
+ * @param argv argv, as passed to main() (NB: this MUST NOT be a copy
+ * of argv!)
*/
-void proctitle_init(int argc, char *argv[], char *envp[]);
+void proctitle_init(int argc, char *argv[]);
/**
- * Change the process title. It accepts a variable number
- * of arguments (a va_list) in the manner of the printf
- * family of functions. See the documentation for
- * printf for a description of the format string.
+ * Set the process title that appears on the ps command.
+ *
+ * The title is set to the executable's name, followed by the result
+ * of a printf-style expansion of the arguments as specified by the fmt
+ * argument. If fmt begins with a '-' character, the executable's name
+ * is skipped (providing the platform implementation supports it;
+ * OpenBSD and NetBSD do not).
+ *
+ * Note that proctitle_init must be called before using this function.
*/
-void proctitle_set(const char *fmt, ...)
-#ifdef __GNUC__
-__attribute__((format(printf, 1, 2)))
-#endif
-;
+void proctitle_set(const char *fmt, ...);
-#endif /* PROCTITLE_H */
+#endif // SETPROCTITLE_H
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kinit-4.97.0/src/klauncher/klauncher.cpp new/kinit-4.98.0/src/klauncher/klauncher.cpp
--- old/kinit-4.97.0/src/klauncher/klauncher.cpp 2014-03-01 12:51:02.000000000 +0100
+++ new/kinit-4.98.0/src/klauncher/klauncher.cpp 2014-03-28 19:17:02.000000000 +0100
@@ -45,9 +45,9 @@
#include <kconfig.h>
#include <QDebug>
-#include <klibrary.h>
#include <klocalizedstring.h>
#include <kdesktopfile.h>
+#include <kpluginloader.h> // to find kioslave modules
#include <kprotocolmanager.h>
#include <kprotocolinfo.h>
#include <krun.h> // TODO port away from kiofilewidgets
@@ -137,7 +137,15 @@
mSlaveDebug = QString::fromLocal8Bit(qgetenv("KDE_SLAVE_DEBUG_WAIT"));
if (!mSlaveDebug.isEmpty()) {
+#ifndef USE_KPROCESS_FOR_KIOSLAVES
qWarning("Klauncher running in slave-debug mode for slaves of protocol '%s'", qPrintable(mSlaveDebug));
+#else
+ // Slave debug mode causes kdeinit to suspend the process waiting
+ // for the developer to attach gdb to the process; we do not have
+ // a good way of doing a similar thing if we are using QProcess.
+ mSlaveDebug.clear();
+ qWarning("slave-debug mode is not available as Klauncher is not using kdeinit");
+#endif
}
mSlaveValgrind = QString::fromLocal8Bit(qgetenv("KDE_SLAVE_VALGRIND"));
if (!mSlaveValgrind.isEmpty()) {
@@ -1015,19 +1023,25 @@
return slave->pid();
}
- QString name = KProtocolInfo::exec(protocol);
- if (name.isEmpty()) {
+ QString slaveModule = KProtocolInfo::exec(protocol);
+ if (slaveModule.isEmpty()) {
error = i18n("Unknown protocol '%1'.\n", protocol);
return 0;
}
+ KPluginLoader loader(slaveModule);
+ QString slaveModulePath = loader.fileName();
+ if (slaveModulePath.isEmpty()) {
+ error = i18n("Could not find the '%1' plugin.\n", slaveModule);
+ return 0;
+ }
QStringList arg_list;
#ifdef USE_KPROCESS_FOR_KIOSLAVES
- arg_list << name;
+ arg_list << slaveModulePath;
arg_list << protocol;
arg_list << mConnectionServer.address().toString();
arg_list << app_socket;
- name = QFile::decodeName(CMAKE_INSTALL_PREFIX "/" LIBEXEC_INSTALL_DIR "/kioslave");
+ QString name = QFile::decodeName(CMAKE_INSTALL_PREFIX "/" LIBEXEC_INSTALL_DIR "/kioslave");
#else
QString arg1 = protocol;
QString arg2 = mConnectionServer.address().toString();
@@ -1035,26 +1049,25 @@
arg_list.append(arg1);
arg_list.append(arg2);
arg_list.append(arg3);
+ QString name = slaveModulePath;
#endif
// qDebug() << "KLauncher: launching new slave " << name << " with protocol=" << protocol
// << " args=" << arg_list << endl;
#ifdef Q_OS_UNIX
- if (mSlaveDebug == protocol) {
#ifndef USE_KPROCESS_FOR_KIOSLAVES
+ // see comments where mSlaveDebug is set in KLauncher::KLauncher
+ if (mSlaveDebug == protocol) {
klauncher_header request_header;
request_header.cmd = LAUNCHER_DEBUG_WAIT;
request_header.arg_length = 0;
kde_safe_write(kdeinitSocket, &request_header, sizeof(request_header));
-#else
- name = QString::fromLatin1("gdb");
-#endif
}
+#endif
if (mSlaveValgrind == protocol) {
+ arg_list.prepend(name);
#ifndef USE_KPROCESS_FOR_KIOSLAVES // otherwise we've already done this
- KLibrary lib(name);
- arg_list.prepend(lib.fileName());
arg_list.prepend(QFile::decodeName(CMAKE_INSTALL_PREFIX "/" LIBEXEC_INSTALL_DIR "/kioslave"));
#endif
name = QString::fromLatin1("valgrind");
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: opensuse-commit+help(a)opensuse.org
[View Less]
1
0
Hello community,
here is the log from the commit of package kimageformats for openSUSE:Factory checked in at 2014-04-02 17:22:08
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/kimageformats (Old)
and /work/SRC/openSUSE:Factory/.kimageformats.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "kimageformats"
Changes:
--------
--- /work/SRC/openSUSE:Factory/kimageformats/…
[View More]kimageformats.changes 2014-03-10 12:17:30.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.kimageformats.new/kimageformats.changes 2014-04-02 17:22:18.000000000 +0200
@@ -1,0 +2,9 @@
+Sat Mar 29 19:47:41 UTC 2014 - hrvoje.senjan(a)gmail.com
+
+- Update to 4.98.0
+ * API improvements and cleanups
+ * Buildsystem fixes
+ * For more details please see:
+ http://www.kde.org/announcements/announce-frameworks5-beta1.php
+
+-------------------------------------------------------------------
Old:
----
kimageformats-4.97.0.tar.xz
New:
----
kimageformats-4.98.0.tar.xz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ kimageformats.spec ++++++
--- /var/tmp/diff_new_pack.wgQ6gs/_old 2014-04-02 17:22:19.000000000 +0200
+++ /var/tmp/diff_new_pack.wgQ6gs/_new 2014-04-02 17:22:19.000000000 +0200
@@ -17,10 +17,10 @@
Name: kimageformats
-Version: 4.97.0
+Version: 4.98.0
Release: 0
BuildRequires: cmake >= 2.8.12
-BuildRequires: extra-cmake-modules >= 0.0.11
+BuildRequires: extra-cmake-modules >= 0.0.12
BuildRequires: fdupes
BuildRequires: kf5-filesystem
BuildRequires: libjasper-devel
++++++ kimageformats-4.97.0.tar.xz -> kimageformats-4.98.0.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kimageformats-4.97.0/CMakeLists.txt new/kimageformats-4.98.0/CMakeLists.txt
--- old/kimageformats-4.97.0/CMakeLists.txt 2014-03-01 15:49:38.000000000 +0100
+++ new/kimageformats-4.98.0/CMakeLists.txt 2014-03-28 19:17:00.000000000 +0100
@@ -2,9 +2,9 @@
project(KImageFormats)
-find_package(ECM 0.0.11 REQUIRED NO_MODULE)
+find_package(ECM 0.0.12 REQUIRED NO_MODULE)
-set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH} ${ECM_KDE_MODULE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
+set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH} ${ECM_KDE_MODULE_DIR})
include(KDEInstallDirs)
include(KDEFrameworkCompilerSettings)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kimageformats-4.97.0/autotests/CMakeLists.txt new/kimageformats-4.98.0/autotests/CMakeLists.txt
--- old/kimageformats-4.97.0/autotests/CMakeLists.txt 2014-03-01 15:49:38.000000000 +0100
+++ new/kimageformats-4.98.0/autotests/CMakeLists.txt 2014-03-28 19:17:00.000000000 +0100
@@ -1,11 +1,18 @@
#find_package(Qt5Test ${REQUIRED_QT_VERSION} NO_MODULE)
include(ECMMarkAsTest)
+include(CMakeParseArguments)
add_definitions(-DPLUGIN_DIR="${CMAKE_CURRENT_BINARY_DIR}/../src")
remove_definitions(-DQT_NO_CAST_FROM_ASCII)
macro(kimageformats_read_tests)
+ cmake_parse_arguments(KIF_RT "" "FUZZ" "" ${ARGN})
+ set(_fuzzarg)
+ if (KIF_RT_FUZZ)
+ set(_fuzzarg -f ${KIF_RT_FUZZ})
+ endif()
+
if (NOT TARGET readtest)
add_executable(readtest readtest.cpp)
target_link_libraries(readtest Qt5::Gui)
@@ -13,10 +20,11 @@
PRIVATE IMAGEDIR="${CMAKE_CURRENT_SOURCE_DIR}/read")
ecm_mark_as_test(readtest)
endif()
- foreach(_testname ${ARGN})
+
+ foreach(_testname ${KIF_RT_UNPARSED_ARGUMENTS})
add_test(
NAME kimageformats-read-${_testname}
- COMMAND readtest ${_testname}
+ COMMAND readtest ${_fuzzarg} ${_testname}
)
endforeach(_testname)
endmacro()
@@ -53,6 +61,10 @@
ras
rgb
tga
+)
+# Allow some fuzziness when reading this formats, to allow for
+# rounding errors (eg: in alpha blending).
+kimageformats_read_tests(FUZZ 1
xcf
)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kimageformats-4.97.0/autotests/readtest.cpp new/kimageformats-4.98.0/autotests/readtest.cpp
--- old/kimageformats-4.97.0/autotests/readtest.cpp 2014-03-01 15:49:38.000000000 +0100
+++ new/kimageformats-4.98.0/autotests/readtest.cpp 2014-03-28 19:17:00.000000000 +0100
@@ -29,6 +29,8 @@
#include <QImageReader>
#include <QTextStream>
+#include "../tests/format-enum.h"
+
static void writeImageData(const char *name, const QString &filename, const QImage &image)
{
QFile file(filename);
@@ -49,6 +51,27 @@
}
}
+// allow each byte to be different by up to 1, to allow for rounding errors
+static bool fuzzyeq(const QImage &im1, const QImage &im2, uchar fuzziness)
+{
+ const int height = im1.height();
+ const int width = im1.width();
+ for (int i = 0; i < height; ++i) {
+ const uchar *line1 = im1.scanLine(i);
+ const uchar *line2 = im2.scanLine(i);
+ for (int j = 0; j < width; ++j) {
+ if (line1[j] > line2[j]) {
+ if (line1[j] - line2[j] > fuzziness)
+ return false;
+ } else {
+ if (line2[j] - line1[j] > fuzziness)
+ return false;
+ }
+ }
+ }
+ return true;
+}
+
int main(int argc, char ** argv)
{
QCoreApplication app(argc, argv);
@@ -61,6 +84,11 @@
parser.addHelpOption();
parser.addVersionOption();
parser.addPositionalArgument(QStringLiteral("format"), QStringLiteral("format to test"));
+ QCommandLineOption fuzz(
+ QStringList() << QStringLiteral("f") << QStringLiteral("fuzz"),
+ QStringLiteral("Allow for some deviation in ARGB data."),
+ QStringLiteral("max"));
+ parser.addOption(fuzz);
parser.process(app);
@@ -73,6 +101,17 @@
parser.showHelp(1);
}
+ uchar fuzziness = 0;
+ if (parser.isSet(fuzz)) {
+ bool ok;
+ uint fuzzarg = parser.value(fuzz).toUInt(&ok);
+ if (!ok || fuzzarg > 255) {
+ QTextStream(stderr) << "Error: max fuzz argument must be a number between 0 and 255\n";
+ parser.showHelp(1);
+ }
+ fuzziness = uchar(fuzzarg);
+ }
+
QString suffix = args.at(0);
QByteArray format = suffix.toLatin1();
@@ -115,20 +154,47 @@
++failed;
continue;
}
- inputImage = inputImage.convertToFormat(expImage.format());
- if (expImage != inputImage) {
+ if (expImage.width() != inputImage.width()) {
+ QTextStream(stdout) << "FAIL : " << fi.fileName()
+ << ": width was " << inputImage.width()
+ << " but " << expfilename << " width was "
+ << expImage.width() << "\n";
+ ++failed;
+ } else if (expImage.height() != inputImage.height()) {
QTextStream(stdout) << "FAIL : " << fi.fileName()
- << ": differs from " << expfilename << "\n";
- writeImageData("expected data",
- fi.fileName() + QLatin1String("-expected.data"),
- expImage);
- writeImageData("actual data",
- fi.fileName() + QLatin1String("-actual.data"),
- inputImage);
+ << ": height was " << inputImage.height()
+ << " but " << expfilename << " height was "
+ << expImage.height() << "\n";
++failed;
} else {
- QTextStream(stdout) << "PASS : " << fi.fileName() << "\n";
- ++passed;
+ if (inputImage.format() != QImage::Format_ARGB32) {
+ QTextStream(stdout) << "INFO : " << fi.fileName()
+ << ": converting " << fi.fileName()
+ << " from " << formatToString(inputImage.format())
+ << " to ARGB32\n";
+ inputImage = inputImage.convertToFormat(QImage::Format_ARGB32);
+ }
+ if (expImage.format() != QImage::Format_ARGB32) {
+ QTextStream(stdout) << "INFO : " << fi.fileName()
+ << ": converting " << expfilename
+ << " from " << formatToString(expImage.format())
+ << " to ARGB32\n";
+ expImage = expImage.convertToFormat(QImage::Format_ARGB32);
+ }
+ if (fuzzyeq(inputImage, expImage, fuzziness)) {
+ QTextStream(stdout) << "PASS : " << fi.fileName() << "\n";
+ ++passed;
+ } else {
+ QTextStream(stdout) << "FAIL : " << fi.fileName()
+ << ": differs from " << expfilename << "\n";
+ writeImageData("expected data",
+ fi.fileName() + QLatin1String("-expected.data"),
+ expImage);
+ writeImageData("actual data",
+ fi.fileName() + QLatin1String("-actual.data"),
+ inputImage);
+ ++failed;
+ }
}
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kimageformats-4.97.0/cmake/FindOpenEXR.cmake new/kimageformats-4.98.0/cmake/FindOpenEXR.cmake
--- old/kimageformats-4.97.0/cmake/FindOpenEXR.cmake 2014-03-01 15:49:38.000000000 +0100
+++ new/kimageformats-4.98.0/cmake/FindOpenEXR.cmake 1970-01-01 01:00:00.000000000 +0100
@@ -1,144 +0,0 @@
-# Try to find the OpenEXR libraries
-#
-# This will define:
-#
-# OpenEXR_FOUND - True if OpenEXR is available
-# OpenEXR_LIBRARIES - Link to these to use OpenEXR
-# OpenEXR_INCLUDE_DIRS - Include directory for OpenEXR
-# OpenEXR_DEFINITIONS - Compiler flags required to link against OpenEXR
-# OpenEXR::IlmImf - imported target to link against (instead of using the above variables)
-#
-
-
-# Copyright (c) 2006, Alexander Neundorf, <neundorf(a)kde.org>
-# Copyright (c) 2013-2014, Alex Merry, <alex.merry(a)kdemail.net>
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-#
-# 1. Redistributions of source code must retain the copyright
-# notice, this list of conditions and the following disclaimer.
-# 2. Redistributions in binary form must reproduce the copyright
-# notice, this list of conditions and the following disclaimer in the
-# documentation and/or other materials provided with the distribution.
-# 3. The name of the author may not be used to endorse or promote products
-# derived from this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
-# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
-# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
-# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
-# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-
-if(${CMAKE_VERSION} VERSION_LESS 2.8.12)
- message(FATAL_ERROR "CMake 2.8.12 is required by FindOpenEXR.cmake")
-endif()
-
-# use pkg-config to get the directories and then use these values
-# in the FIND_PATH() and FIND_LIBRARY() calls
-find_package(PkgConfig)
-pkg_check_modules(PC_OpenEXR QUIET OpenEXR)
-
-set(OpenEXR_DEFINITIONS ${PC_OpenEXR_CFLAGS_OTHER})
-
-find_path(OpenEXR_INCLUDE_DIR ImfRgbaFile.h
- PATHS
- ${PC_OpenEXR_INCLUDEDIR}
- ${PC_OpenEXR_INCLUDE_DIRS}
- PATH_SUFFIXES OpenEXR
-)
-
-# Required libraries for OpenEXR
-find_library(OpenEXR_HALF_LIBRARY NAMES Half
- PATHS
- ${PC_OpenEXR_LIBDIR}
- ${PC_OpenEXR_LIBRARY_DIRS}
-)
-find_library(OpenEXR_IEX_LIBRARY NAMES Iex
- PATHS
- ${PC_OpenEXR_LIBDIR}
- ${PC_OpenEXR_LIBRARY_DIRS}
-)
-find_library(OpenEXR_IMATH_LIBRARY NAMES Imath
- PATHS
- ${PC_OpenEXR_LIBDIR}
- ${PC_OpenEXR_LIBRARY_DIRS}
-)
-find_library(OpenEXR_ILMTHREAD_LIBRARY NAMES IlmThread
- PATHS
- ${PC_OpenEXR_LIBDIR}
- ${PC_OpenEXR_LIBRARY_DIRS}
-)
-# This is the actual OpenEXR library
-find_library(OpenEXR_ILMIMF_LIBRARY NAMES IlmImf
- PATHS
- ${PC_OpenEXR_LIBDIR}
- ${PC_OpenEXR_LIBRARY_DIRS}
-)
-
-set(_OpenEXR_deps
- ${OpenEXR_HALF_LIBRARY}
- ${OpenEXR_IEX_LIBRARY}
- ${OpenEXR_IMATH_LIBRARY}
- ${OpenEXR_ILMTHREAD_LIBRARY})
-
-set(OpenEXR_LIBRARIES
- ${_OpenEXR_deps}
- ${OpenEXR_ILMIMF_LIBRARY})
-
-if (OpenEXR_INCLUDE_DIR AND EXISTS "${OpenEXR_INCLUDE_DIR}/OpenEXRConfig.h")
- file(STRINGS "${OpenEXR_INCLUDE_DIR}/OpenEXRConfig.h" openexr_version_str
- REGEX "^#define[\t ]+OPENEXR_VERSION_STRING[\t ]+\"[^\"]*\"")
- string(REGEX REPLACE "^#define[\t ]+OPENEXR_VERSION_STRING[\t ]+\"([^\"]*).*"
- "\\1" OpenEXR_VERSION_STRING "${openexr_version_str}")
- unset(openexr_version_str)
-endif ()
-
-include(FindPackageHandleStandardArgs)
-# find_package_handle_standard_args reports the value of the first variable
-# on success, so make sure this is the actual OpenEXR library
-find_package_handle_standard_args(OpenEXR
- FOUND_VAR OpenEXR_FOUND
- REQUIRED_VARS
- OpenEXR_ILMIMF_LIBRARY
- OpenEXR_HALF_LIBRARY
- OpenEXR_IEX_LIBRARY
- OpenEXR_IMATH_LIBRARY
- OpenEXR_ILMTHREAD_LIBRARY
- OpenEXR_INCLUDE_DIR
- VERSION_VAR OpenEXR_VERSION_STRING)
-
-set(OpenEXR_INCLUDE_DIRS ${OpenEXR_INCLUDE_DIR})
-
-include(FeatureSummary)
-set_package_properties(OpenEXR PROPERTIES
- URL http://www.openexr.com/
- DESCRIPTION "A library for handling OpenEXR high dynamic-range image files")
-
-mark_as_advanced(
- OpenEXR_INCLUDE_DIR
- OpenEXR_LIBRARIES
- OpenEXR_DEFINITIONS
- OpenEXR_ILMIMF_LIBRARY
- OpenEXR_ILMTHREAD_LIBRARY
- OpenEXR_IMATH_LIBRARY
- OpenEXR_IEX_LIBRARY
- OpenEXR_HALF_LIBRARY
-)
-
-if(OpenEXR_FOUND AND NOT TARGET OpenEXR::IlmImf)
- add_library(OpenEXR::IlmImf UNKNOWN IMPORTED)
- set_target_properties(OpenEXR::IlmImf PROPERTIES
- IMPORTED_LOCATION "${OpenEXR_ILMIMF_LIBRARY}"
- INTERFACE_COMPILE_OPTIONS "${OpenEXR_DEFINITIONS}"
- INTERFACE_INCLUDE_DIRECTORIES "${OpenEXR_INCLUDE_DIR}"
- INTERFACE_LINK_LIBRARIES "${_OpenEXR_deps}"
- )
-endif()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kimageformats-4.97.0/tests/CMakeLists.txt new/kimageformats-4.98.0/tests/CMakeLists.txt
--- old/kimageformats-4.97.0/tests/CMakeLists.txt 2014-03-01 15:49:38.000000000 +0100
+++ new/kimageformats-4.98.0/tests/CMakeLists.txt 2014-03-28 19:17:00.000000000 +0100
@@ -12,4 +12,5 @@
kimageformats_executable_tests(
imageconverter
+ imagedump
)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kimageformats-4.97.0/tests/format-enum.h new/kimageformats-4.98.0/tests/format-enum.h
--- old/kimageformats-4.97.0/tests/format-enum.h 1970-01-01 01:00:00.000000000 +0100
+++ new/kimageformats-4.98.0/tests/format-enum.h 2014-03-28 19:17:00.000000000 +0100
@@ -0,0 +1,73 @@
+/*
+ * Copyright 2014 Alex Merry <alex.merry(a)kde.org>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) version 3, or any
+ * later version accepted by the membership of KDE e.V. (or its
+ * successor approved by the membership of KDE e.V.), which shall
+ * act as a proxy defined in Section 6 of version 3 of the license.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library. If not, see
+ * <http://www.gnu.org/licenses/>.
+ */
+
+#include <QImage>
+
+// Generated from QImage::Format enum
+static const char * qimage_format_enum_names[] = {
+ "Invalid",
+ "Mono",
+ "MonoLSB",
+ "Indexed8",
+ "RGB32",
+ "ARGB32",
+ "ARGB32_Premultiplied",
+ "RGB16",
+ "ARGB8565_Premultiplied",
+ "RGB666",
+ "ARGB6666_Premultiplied",
+ "RGB555",
+ "ARGB8555_Premultiplied",
+ "RGB888",
+ "RGB444",
+ "ARGB4444_Premultiplied",
+ "RGBX8888",
+ "RGBA8888",
+ "RGBA8888_Premultiplied"
+};
+// Never claim there are more than QImage::NImageFormats supported formats.
+// This is future-proofing against the above list being extended.
+static const int qimage_format_enum_names_count =
+ (sizeof(qimage_format_enum_names) / sizeof(*qimage_format_enum_names) > int(QImage::NImageFormats))
+ ? int(QImage::NImageFormats)
+ : (sizeof(qimage_format_enum_names) / sizeof(*qimage_format_enum_names));
+
+QImage::Format formatFromString(const QString &str)
+{
+ for (int i = 0; i < qimage_format_enum_names_count; ++i) {
+ if (str.compare(QLatin1String(qimage_format_enum_names[i]), Qt::CaseInsensitive) == 0) {
+ return (QImage::Format)(i);
+ }
+ }
+ return QImage::Format_Invalid;
+}
+
+QString formatToString(QImage::Format format)
+{
+ int index = int(format);
+ if (index > 0 && index < qimage_format_enum_names_count) {
+ return QLatin1String(qimage_format_enum_names[index]);
+ }
+ return QLatin1String("<unknown:") +
+ QString::number(index) +
+ QLatin1String(">");
+}
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kimageformats-4.97.0/tests/imagedump.cpp new/kimageformats-4.98.0/tests/imagedump.cpp
--- old/kimageformats-4.97.0/tests/imagedump.cpp 1970-01-01 01:00:00.000000000 +0100
+++ new/kimageformats-4.98.0/tests/imagedump.cpp 2014-03-28 19:17:00.000000000 +0100
@@ -0,0 +1,128 @@
+/*
+ * Copyright 2013 Alex Merry <alex.merry(a)kdemail.net>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) version 3, or any
+ * later version accepted by the membership of KDE e.V. (or its
+ * successor approved by the membership of KDE e.V.), which shall
+ * act as a proxy defined in Section 6 of version 3 of the license.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library. If not, see
+ * <http://www.gnu.org/licenses/>.
+ */
+
+#include <stdio.h>
+
+#include <QCommandLineOption>
+#include <QCommandLineParser>
+#include <QCoreApplication>
+#include <QDebug>
+#include <QImageReader>
+#include <QFile>
+#include <QMetaObject>
+#include <QMetaEnum>
+#include <QTextStream>
+
+#include "format-enum.h"
+
+int main(int argc, char **argv)
+{
+ QCoreApplication app(argc, argv);
+ QCoreApplication::addLibraryPath(QStringLiteral(PLUGIN_DIR));
+ QCoreApplication::setApplicationName(QStringLiteral("imagedump"));
+ QCoreApplication::setApplicationVersion(QStringLiteral("1.0.0.0"));
+
+ QCommandLineParser parser;
+ parser.setApplicationDescription(QStringLiteral("Dumps the content of QImage::bits()"));
+ parser.addHelpOption();
+ parser.addVersionOption();
+ parser.addPositionalArgument(QStringLiteral("image"), QStringLiteral("image file"));
+ parser.addPositionalArgument(QStringLiteral("datafile"), QStringLiteral("file QImage data should be written to"));
+ QCommandLineOption informat(
+ QStringList() << QStringLiteral("f") << QStringLiteral("file-format"),
+ QStringLiteral("Image file format"),
+ QStringLiteral("format"));
+ parser.addOption(informat);
+ QCommandLineOption qimgformat(
+ QStringList() << QStringLiteral("q") << QStringLiteral("qimage-format"),
+ QStringLiteral("QImage data format"),
+ QStringLiteral("format"));
+ parser.addOption(qimgformat);
+ QCommandLineOption listformats(
+ QStringList() << QStringLiteral("l") << QStringLiteral("list-file-formats"),
+ QStringLiteral("List supported image file formats"));
+ parser.addOption(listformats);
+ QCommandLineOption listqformats(
+ QStringList() << QStringLiteral("p") << QStringLiteral("list-qimage-formats"),
+ QStringLiteral("List supported QImage data formats"));
+ parser.addOption(listqformats);
+
+ parser.process(app);
+
+ const QStringList files = parser.positionalArguments();
+
+ if (parser.isSet(listformats)) {
+ QTextStream out(stdout);
+ out << "File formats:\n";
+ foreach (const QByteArray &fmt, QImageReader::supportedImageFormats()) {
+ out << " " << fmt << '\n';
+ }
+ return 0;
+ }
+ if (parser.isSet(listqformats)) {
+ QTextStream out(stdout);
+ out << "QImage formats:\n";
+ // skip QImage::Format_Invalid
+ for (int i = 1; i < qimage_format_enum_names_count; ++i) {
+ out << " " << qimage_format_enum_names[i] << '\n';
+ }
+ return 0;
+ }
+
+ if (files.count() != 2) {
+ QTextStream(stderr) << "Must provide exactly two files\n";
+ parser.showHelp(1);
+ }
+ QImageReader reader(files.at(0), parser.value(informat).toLatin1());
+ QImage img = reader.read();
+ if (img.isNull()) {
+ QTextStream(stderr) << "Could not read image: "
+ << reader.errorString() << '\n';
+ return 2;
+ }
+
+ QFile output(files.at(1));
+ if (!output.open(QIODevice::WriteOnly)) {
+ QTextStream(stderr) << "Could not open " << files.at(1)
+ << " for writing: "
+ << output.errorString() << '\n';
+ return 3;
+ }
+ if (parser.isSet(qimgformat)) {
+ QImage::Format qformat = formatFromString(parser.value(qimgformat));
+ if (qformat == QImage::Format_Invalid) {
+ QTextStream(stderr) << "Unknown QImage data format "
+ << parser.value(qimgformat) << '\n';
+ return 4;
+ }
+ img = img.convertToFormat(qformat);
+ }
+ qint64 written = output.write(reinterpret_cast<const char *>(img.bits()), img.byteCount());
+ if (written != img.byteCount()) {
+ QTextStream(stderr) << "Could not write image data to " << files.at(1)
+ << ":" << output.errorString() << "\n";
+ return 5;
+ }
+ QTextStream(stdout) << "Created " << files.at(1) << " with data format "
+ << formatToString(img.format()) << "\n";
+
+ return 0;
+}
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: opensuse-commit+help(a)opensuse.org
[View Less]
1
0
Hello community,
here is the log from the commit of package kidletime for openSUSE:Factory checked in at 2014-04-02 17:22:07
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/kidletime (Old)
and /work/SRC/openSUSE:Factory/.kidletime.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "kidletime"
Changes:
--------
--- /work/SRC/openSUSE:Factory/kidletime/kidletime.changes 2014-03-10 12:…
[View More]17:29.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.kidletime.new/kidletime.changes 2014-04-02 17:22:17.000000000 +0200
@@ -1,0 +2,9 @@
+Sat Mar 29 19:47:40 UTC 2014 - hrvoje.senjan(a)gmail.com
+
+- Update to 4.98.0
+ * API improvements and cleanups
+ * Buildsystem fixes
+ * For more details please see:
+ http://www.kde.org/announcements/announce-frameworks5-beta1.php
+
+-------------------------------------------------------------------
Old:
----
kidletime-4.97.0.tar.xz
New:
----
kidletime-4.98.0.tar.xz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ kidletime.spec ++++++
--- /var/tmp/diff_new_pack.hOrUMG/_old 2014-04-02 17:22:18.000000000 +0200
+++ /var/tmp/diff_new_pack.hOrUMG/_new 2014-04-02 17:22:18.000000000 +0200
@@ -18,10 +18,10 @@
%define lname libKF5IdleTime5
Name: kidletime
-Version: 4.97.0
+Version: 4.98.0
Release: 0
BuildRequires: cmake >= 2.8.12
-BuildRequires: extra-cmake-modules >= 0.0.11
+BuildRequires: extra-cmake-modules >= 0.0.12
BuildRequires: fdupes
BuildRequires: kf5-filesystem
BuildRequires: pkgconfig(Qt5Core) >= 5.2.0
++++++ kidletime-4.97.0.tar.xz -> kidletime-4.98.0.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kidletime-4.97.0/CMakeLists.txt new/kidletime-4.98.0/CMakeLists.txt
--- old/kidletime-4.97.0/CMakeLists.txt 2014-03-01 12:50:58.000000000 +0100
+++ new/kidletime-4.98.0/CMakeLists.txt 2014-03-28 19:16:58.000000000 +0100
@@ -3,16 +3,17 @@
project(KIdleTime)
# ECM setup
-find_package(ECM 0.0.11 REQUIRED NO_MODULE)
+find_package(ECM 0.0.12 REQUIRED NO_MODULE)
set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH} ${ECM_KDE_MODULE_DIR})
include(FeatureSummary)
+include(CMakeFindFrameworks)
include(GenerateExportHeader)
include(ECMPackageConfigHelpers)
include(ECMSetupVersion)
include(ECMGenerateHeaders)
-set(KF5_VERSION "4.97.0")
+set(KF5_VERSION "4.98.0")
ecm_setup_version(${KF5_VERSION} VARIABLE_PREFIX KIDLETIME
VERSION_HEADER "${CMAKE_CURRENT_BINARY_DIR}/kidletime_version.h"
@@ -27,16 +28,19 @@
set(REQUIRED_QT_VERSION 5.2.0)
find_package(Qt5 ${REQUIRED_QT_VERSION} CONFIG REQUIRED Widgets)
-if(NOT WIN32)
+if(NOT WIN32 AND NOT APPLE)
find_package(Qt5 ${REQUIRED_QT_VERSION} CONFIG REQUIRED X11Extras DBus)
endif()
-if (APPLE)
- find_package(Carbon REQUIRED)
-endif ()
+if(APPLE)
+ cmake_find_frameworks(CoreFoundation Carbon)
+endif()
+
+if(NOT APPLE)
+ find_package(X11)
+ find_package(XCB COMPONENTS XCB)
+endif()
-find_package(X11)
-find_package(XCB COMPONENTS XCB)
if(X11_FOUND)
find_package(XCB COMPONENTS XCB SYNC)
find_package(X11_XCB)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kidletime-4.97.0/src/CMakeLists.txt new/kidletime-4.98.0/src/CMakeLists.txt
--- old/kidletime-4.97.0/src/CMakeLists.txt 2014-03-01 12:50:58.000000000 +0100
+++ new/kidletime-4.98.0/src/CMakeLists.txt 2014-03-28 19:16:58.000000000 +0100
@@ -27,6 +27,7 @@
set(kidletime_LIBS ${kidletime_LIBS} ${X11_LIBRARIES} Qt5::X11Extras)
elseif (APPLE)
set(kidletime_LIB_SRCS ${kidletime_LIB_SRCS} macpoller.cpp)
+ set(kidletime_LIBS "-framework CoreFoundation -framework Carbon")
elseif (WIN32)
set(kidletime_LIB_SRCS ${kidletime_LIB_SRCS} windowspoller.cpp)
endif ()
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: opensuse-commit+help(a)opensuse.org
[View Less]
1
0
Hello community,
here is the log from the commit of package kiconthemes for openSUSE:Factory checked in at 2014-04-02 17:22:06
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/kiconthemes (Old)
and /work/SRC/openSUSE:Factory/.kiconthemes.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "kiconthemes"
Changes:
--------
--- /work/SRC/openSUSE:Factory/kiconthemes/kiconthemes.changes …
[View More]2014-03-10 12:18:07.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.kiconthemes.new/kiconthemes.changes 2014-04-02 17:22:16.000000000 +0200
@@ -1,0 +2,9 @@
+Sat Mar 29 19:47:39 UTC 2014 - hrvoje.senjan(a)gmail.com
+
+- Update to 4.98.0
+ * API improvements and cleanups
+ * Buildsystem fixes
+ * For more details please see:
+ http://www.kde.org/announcements/announce-frameworks5-beta1.php
+
+-------------------------------------------------------------------
Old:
----
kiconthemes-4.97.0.tar.xz
New:
----
kiconthemes-4.98.0.tar.xz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ kiconthemes.spec ++++++
--- /var/tmp/diff_new_pack.OT9MU7/_old 2014-04-02 17:22:17.000000000 +0200
+++ /var/tmp/diff_new_pack.OT9MU7/_new 2014-04-02 17:22:17.000000000 +0200
@@ -18,10 +18,10 @@
%define lname libKF5IconThemes5
Name: kiconthemes
-Version: 4.97.0
+Version: 4.98.0
Release: 0
BuildRequires: cmake >= 2.8.12
-BuildRequires: extra-cmake-modules >= 0.0.11
+BuildRequires: extra-cmake-modules >= 0.0.12
BuildRequires: fdupes
BuildRequires: kconfigwidgets-devel >= %{_kf5_version}
BuildRequires: kf5-filesystem
++++++ kiconthemes-4.97.0.tar.xz -> kiconthemes-4.98.0.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kiconthemes-4.97.0/CMakeLists.txt new/kiconthemes-4.98.0/CMakeLists.txt
--- old/kiconthemes-4.97.0/CMakeLists.txt 2014-03-01 12:50:56.000000000 +0100
+++ new/kiconthemes-4.98.0/CMakeLists.txt 2014-03-28 19:16:57.000000000 +0100
@@ -3,7 +3,7 @@
project(KIconThemes)
# ECM setup
-find_package(ECM 0.0.11 REQUIRED NO_MODULE)
+find_package(ECM 0.0.12 REQUIRED NO_MODULE)
set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH} ${ECM_KDE_MODULE_DIR})
include(KDEInstallDirs)
@@ -15,7 +15,7 @@
include(ECMGenerateHeaders)
include(ECMMarkNonGuiExecutable)
-set(KF5_VERSION "4.97.0")
+set(KF5_VERSION "4.98.0")
ecm_setup_version(${KF5_VERSION}
VARIABLE_PREFIX KICONTHEMES
@@ -24,10 +24,10 @@
SOVERSION 5)
# Dependencies
-set(QT_REQUIRED_VERSION 5.2.0)
-find_package(Qt5Widgets ${QT_REQUIRED_VERSION} REQUIRED NO_MODULE)
-find_package(Qt5Svg ${QT_REQUIRED_VERSION} REQUIRED NO_MODULE)
-find_package(Qt5DBus ${QT_REQUIRED_VERSION} REQUIRED NO_MODULE)
+set(REQUIRED_QT_VERSION 5.2.0)
+find_package(Qt5Widgets ${REQUIRED_QT_VERSION} REQUIRED NO_MODULE)
+find_package(Qt5Svg ${REQUIRED_QT_VERSION} REQUIRED NO_MODULE)
+find_package(Qt5DBus ${REQUIRED_QT_VERSION} REQUIRED NO_MODULE)
if("${CMAKE_BINARY_DIR}" STREQUAL "${CMAKE_CURRENT_BINARY_DIR}")
find_package(KF5I18n ${KF5_VERSION} REQUIRED)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kiconthemes-4.97.0/KF5IconThemesConfig.cmake.in new/kiconthemes-4.98.0/KF5IconThemesConfig.cmake.in
--- old/kiconthemes-4.97.0/KF5IconThemesConfig.cmake.in 2014-03-01 12:50:56.000000000 +0100
+++ new/kiconthemes-4.98.0/KF5IconThemesConfig.cmake.in 2014-03-28 19:16:57.000000000 +0100
@@ -5,7 +5,7 @@
find_dependency(KF5ItemViews "@KF5_VERSION@")
find_dependency(KF5WidgetsAddons "@KF5_VERSION@")
-find_dependency(Qt5Widgets "@QT_REQUIRED_VERSION@")
+find_dependency(Qt5Widgets "@REQUIRED_QT_VERSION@")
include("${CMAKE_CURRENT_LIST_DIR}/KF5IconThemesTargets.cmake")
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kiconthemes-4.97.0/docs/DESIGN.iconloading new/kiconthemes-4.98.0/docs/DESIGN.iconloading
--- old/kiconthemes-4.97.0/docs/DESIGN.iconloading 2014-03-01 12:50:56.000000000 +0100
+++ new/kiconthemes-4.98.0/docs/DESIGN.iconloading 1970-01-01 01:00:00.000000000 +0100
@@ -1,187 +0,0 @@
-Discussion of Icon Loading for KDE 3
-====================================================
-
-This document describes the design ideas for improving icon loading
-in KDE 3.
-
-
-On Wednesday 08 August 2001 04:15 pm, Waldo Bastian wrote:
-> On Wednesday 08 August 2001 03:52 pm, Dirk Mueller wrote:
-> > On Mit, 08 Aug 2001, Waldo Bastian wrote:
-> > > I'm not really sure how to do it... the idea is this:
-> > >
-> > > A list of shared icons is published somewhere.
-> > > Applications load this list
-> > > For all icons the application wants to use:
-> > > It checks whether a shared version is available,
-> > > if so it uses that one.
-> > > If not, it loads the icon.
-> > > When it has loaded most icons, it somehow (*) adds the icons that it loaded
-> > > to the list of published icons.
-> > >
-> > > I think that the somehow (*) part can be done most reliable by a
-> > > central service, e.g. a KDED module. That might also be able to keep
-> > > track of usage so that it can throw icons out that aren't used any
-> > > more. I think it will be difficult / slow if we need to do ref-counting
-> > > for each and every shared icon using some mechanism that involves X.
-> >
-> > True. but things become a bit complicated if an application reregisters
-> > with a different name. or do we handle that already ?
-> >
-> > what do you do if the DCOP-connection lifetime is crossing the
-> > pixmap-lifetime somehow, i.e. the pixmap is still referenced after
-> > closing the dcop connection on shutdown ?
-
-Ok, I have looked into this a bit more and it seems to be rather easy to
-create one or more pixmaps in a server process containing icons, a client can
-then create a pixmap of the right size itself and with a simple XCopyArea
-call, it can copy the icon from the server pixmap to its own pixmap.
-
-That way the application's pixmap always remain valid.
-
-Some example code to get the idea:
-
-Server can publish an icon (test.png) like this:
- QImage i("test.png");
- QPixmap p;
- p.convertFromImage(i);
- qWarning("Handle = %08x", p.handle());
-
-Now, if Handle is e.g. 0x06c0000b, the following code (in another process)
-can copy this pixmap:
-
- QPixmap p(35,35);
- Drawable src = 0x06c0000b;
- XGCValues values;
- GC gc = XCreateGC(qt_xdisplay(), src, 0, &values);
- XCopyArea(qt_xdisplay(), src, p.handle(), gc, 0, 0, 30, 30, 0, 0);
- // p contains now 30x30 pixels of test.png.
-
-The only hard part is then to publish the icons in a way that applications
-know what to copy. I'm thinking about a ksycoca-sort-of index that
-applications can map and can use to do fast lookups with. This has no major
-problems except for the race-condition that might exist when an icon is
-removed. In that case you will remove it from the index first and then later
-you will remove the actual image data from the pixmap, however, you must make
-sure that none of the client apps will be using the outdated index informatin
-any more before you can remove the actual image data.
-
-For practical purposes that might be solved by removing the entry from the
-index, informing the applications via DCOP to flush their outdated index
-information and then waiting for a sufficient long period, e.. 5 minutes,
-before actually removing the image data.
-
-I can also imagine a scenario where the index information is only used very
-temporarily, e.g. during the creation of a KMainWindow (mmap the file in the
-constructor, unmap it from the next event loop) that way icons can be removed
-from the index and after e.g. a timeout of 5 minutes one can be relatively
-sure that the index will no longer be used.
-
-I think the best way to distribute the index information is through the file
-system but the update mechanism for this file should probably more complex
-than the one used in ksycoca. Since ksycoca updates only happen once in a
-while, we can afford it to write out a whole new file. For icons this will
-probably be more difficult since updates will be part of normal operation, if
-the index file is rather large (no idea about that.. how much icons are in
-use on an average desktop? 50? 200? 500? 500*80bytes = 40Kb, not too bad) we
-might want to write out only the updates, that would probably mean that we
-need to have some sort of extensible on-disk hash-table.
-Would that be worth the hassle? If we need to access hash-buckets throughout
-this 40Kb the OS probably ends up writing all of this file to disk ayway.
-
-Better keep it simple to start with then...
-
-Cheers,
-Waldo
---
-KDE 2.2: We deliver.
-
-<Zogje> do you have any idea how many Kb of pixmaps are stored in the X-server on average?
-<Zogje> e.g. with a standard desktop with 5 konsole's and konqueror or os
-<Zogje> cause I was wondering... if we copy pixmaps on the X-server with XCopyArea like I proposed in my mail
-<Zogje> then the next step could be to use shared pixmaps on the X-server... if the X-server could refcount pixmaps
-<Zogje> i don't think it supports that at the moment
-<antlarr> I'm not sure, but Konqueror seems to open around 500 icons (some of them repeated), and konsole... 40 ? (I made the experiments with my other computer and it's down at the moment)
-<Zogje> and those icons are 22x22? 32x32?
-<Zogje> 4 bytes per pixel?
-<antlarr> I can have a look to see the sizes (my original experiments counted them in separate counters)
-<antlarr> yes, 4 bytes per pixel
-<Zogje> that's about 1.5Kb to 4Kb per pixmap
-<Zogje> cause I think pixmap space on the X_server is a limited resource
-<Zogje> it prolly can cache them in video-memory
-<antlarr> Zogje: what worries me most is how to know when to delete a pixmap from X
-<Zogje> but if we have the same pixmap 20 times in the X-server
-<Zogje> then we are wasting such caching in a terrible way.. and that would cost us performance
-<Zogje> antlarr: yes, that's why I say, we would need refcounting in the X-server itself
-<Zogje> antlarr: should talk with Keith about that
-<antlarr> Zogje: but if you unload the icon after all apps stop using it, then there's no benefit after you start konqueror again, because they'll have to be loaded again
-<Zogje> antlarr: but it will be easier to make the point if we have some solid data behind it
-<Zogje> antlarr: well.. there are two issues
-<antlarr> you'll just stop loading repeated icons that way
-<Zogje> 1) you want to have the benefit of caching, and for that you want to have the icon in the cache, you can throw it away after some time if you think it will not be needed any longer
-<Zogje> 2) If you actually _share_ the pixmap, you must 100% guarante that the pixmap remains available as long as it is in use
-<Zogje> so for the 1)-case there is no hard requirement, it just affects your cache-efficiency
-<Zogje> the 2)-case is a hard requirement, in that if you don't meet it, you will have incorrect operation
-<antlarr> Zogje: yes
-<Zogje> we can meet 2) by coying the pixmap with e.g. XCopyArea
-<Zogje> but a better way would be to have refcounting in the server
-<Zogje> that's independent from 1)
-<antlarr> Yes, that would be much better
-<Zogje> antlarr: so if you can provide staticstic on the icons in use on a typical KDE desktop, including total size and number of icons shared, etc.
-<antlarr> Zogje: ok, I'll try it tomorrow morning (I think I'll have some time, but little as I'm trying to study for exams)
-<antlarr> Btw, do you plan to use a kind of "icon server" ?
-<Zogje> antlarr: then we can take that to the XFree guys and say, if you gives us refcounting we can save XXX Kb of pixmap data on the x-server and we think that will give us better performance
-<antlarr> Yes, you're right, that would be the best thing to do
-<Zogje> in the mean time we might want to implement such an icon-server then, so that when they actually make ref-counting we can hook it in and get the results directly
-<antlarr> So you think the apps should load the icon, apply the effects, convert it to a X pixmap and use it. But how do you plan to know if an icon is already in the XServer ? via atoms ?
-<antlarr> s/an icon/an icon with the respective effects applied/
-<antlarr> pmax: that's precisely where I want to get to.
-<Zogje> antlarr: I would like to publish an index of the icons and their handles through the filesystem
-<Zogje> the app loads the icon, applies the effects, when it has finished starting up it
-<Zogje> can make a DCOP call to the icon-server and tell it, here, I'm using these icons
-<Zogje> then the icon-server can copy (or refcount++) them and update the file with the
-<Zogje> published icons
-<antlarr> Ok, so there'll be an icon server
-<Zogje> yes
-<antlarr> Zogje: you can never know when the app has finished starting up, as it can load some icons later than that
-<Zogje> you could basically publish the icons via properties on the X server itself as well
-<Zogje> but I think that will be slow
-<antlarr> Zogje: yes, I think that too
-<antlarr> But I'm not sure about the file with published icons
-<Zogje> well, when it loads icons later on, it can tell the icon-server about them later on
-<Zogje> or just ignore it
-<Zogje> whatever works
-<antlarr> what happens with remote connections of apps running on different hosts ?
-<Zogje> they are on their own
-<pmax> over a slow link
-<pmax> icon server becomes n times slower, right?
-<Zogje> pmax: when?
-<pmax> remote X connections
-<antlarr> pmax: it doesn't matter if it's a slow or fast link, I'm talking about the problem with loaded icons that are available on one of the computers, but not on another and about the file with the published icons
-<Zogje> pmax: if you use X properties you have X-server round-trips, so that will be an issue on slow-links
-<pmax> antlarr: true
-<Zogje> pmax: you don't have that if you use the file-system
-<pmax> you can always send icons back and forth with dcop too though
-<Zogje> antlarr: we have a DCOP communication space that is limited to a certain host and X-Display
-<pmax> I send x.509's pem encoded through dcop
-<Zogje> antlarr: icon caching should happen within that space
-<Zogje> antlarr: you can combine multiple spaces in various ways... but they don't communicate with each other
-<Zogje> pmax: no, i don't plan too
-<Zogje> pmax: it is faster to load the icon from disk than to use dcop, probably
-<antlarr> Zogje: ok
-<pmax> Zogje: certainly, but if there is a case where the icon doesn't exist on a remote machine, it could easily be transferred like that
-<Zogje> pmax: if the icons doesn't exist you haven't instaled KDE correctly
-<pmax> (I was referring to antlarr's comment)
-<antlarr> pmax: why do that if you can just store it in the X server and tell the icon server what icon is yours?
-<pmax> what about an app that is only on one machine but not the other? then it's icons won't be there
-<Zogje> pmax??
-<pmax> antlarr: I'm not saying that's the best way.. I was just saying it's a possibility
-<Zogje> pmax: how does that work now?
-<antlarr> pmax: Zogje is right, there's no problem with remote apps, it will just not use the icon cache, nothing more
-<vod> just found it
-<pmax> oh I see
-<Zogje> to answer you rfirst question: "won't the ipc be a bottleneck?" no, because you don't use ipc in the critical part (the icon loading)
-<pmax> yup I understand how it works now I think
-<Zogje> instead you access an index from disk which is quite fast (as fast as ksycoca)
-<pmax> I think this will definitely speed things up on my machine since I have a relatively fast box with slow disks
-<Zogje> that's why I want to use the file-system instaed of X-properties
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kiconthemes-4.97.0/src/CMakeLists.txt new/kiconthemes-4.98.0/src/CMakeLists.txt
--- old/kiconthemes-4.97.0/src/CMakeLists.txt 2014-03-01 12:50:56.000000000 +0100
+++ new/kiconthemes-4.98.0/src/CMakeLists.txt 2014-03-28 19:16:57.000000000 +0100
@@ -1,4 +1,7 @@
add_subdirectory(tools/kiconfinder)
+if (APPLE)
+ add_subdirectory(tools/ksvg2icns)
+endif()
set(kiconthemes_SRCS
kiconbutton.cpp
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kiconthemes-4.97.0/src/Messages.sh new/kiconthemes-4.98.0/src/Messages.sh
--- old/kiconthemes-4.97.0/src/Messages.sh 1970-01-01 01:00:00.000000000 +0100
+++ new/kiconthemes-4.98.0/src/Messages.sh 2014-03-28 19:16:57.000000000 +0100
@@ -0,0 +1,18 @@
+#!/bin/sh
+
+# Invoke the extractrc script on all .ui, .rc, and .kcfg files in the sources.
+# The results are stored in a pseudo .cpp file to be picked up by xgettext.
+lst=`find . -name \*.rc -o -name \*.ui -o -name \*.kcfg`
+if [ -n "$lst" ] ; then
+ $EXTRACTRC $lst >> rc.cpp
+fi
+
+# If your framework contains tips-of-the-day, call preparetips as well.
+if [ -f "data/tips" ] ; then
+ ( cd data && $PREPARETIPS > ../tips.cpp )
+fi
+
+# Extract strings from all source files.
+# If your framework depends on KI18n, use $XGETTEXT. If it uses Qt translation
+# system, use $EXTRACT_TR_STRINGS.
+$XGETTEXT `find . -name \*.cpp -o -name \*.h -name \*.qml` -o $podir/kiconthemes5.pot
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kiconthemes-4.97.0/src/kiconbutton.h new/kiconthemes-4.98.0/src/kiconbutton.h
--- old/kiconthemes-4.97.0/src/kiconbutton.h 2014-03-01 12:50:56.000000000 +0100
+++ new/kiconthemes-4.98.0/src/kiconbutton.h 2014-03-28 19:16:57.000000000 +0100
@@ -31,25 +31,26 @@
class KICONTHEMES_EXPORT KIconButton: public QPushButton
{
Q_OBJECT
- Q_PROPERTY(QString icon READ icon WRITE setIcon RESET resetIcon)
+ Q_PROPERTY(QString icon READ icon WRITE setIcon RESET resetIcon NOTIFY iconChanged USER true)
Q_PROPERTY(int iconSize READ iconSize WRITE setIconSize)
Q_PROPERTY(bool strictIconSize READ strictIconSize WRITE setStrictIconSize)
public:
/**
- * Constructs a KIconButton using the global iconloader.
+ * Constructs a KIconButton using the global icon loader.
*
* @param parent The parent widget.
*/
explicit KIconButton(QWidget *parent = 0L);
/**
- * Constructs a KIconButton using a specific KIconLoader.
+ * Constructs a KIconButton using a specific icon loader.
*
* @param loader The icon loader to use.
* @param parent The parent widget.
*/
KIconButton(KIconLoader *loader, QWidget *parent);
+
/**
* Destructs the button.
*/
@@ -57,7 +58,7 @@
/**
* Sets a strict icon size policy for allowed icons. When true,
- * only icons of the specified group's size in setIconType are allowed,
+ * only icons of the specified group's size in setIconType() are allowed,
* and only icons of that size will be shown in the icon dialog.
*/
void setStrictIconSize(bool b);
@@ -95,23 +96,21 @@
* @see iconSize
*/
void setIconSize(int size);
-
/**
- * Returns the iconsize set via setIconSize() or 0, if the default
- * iconsize will be used.
+ * Returns the icon size set via setIconSize() or 0, if the default
+ * icon size will be used.
*/
int iconSize() const;
/**
- * Sets the size of the icon to be shown on the button
+ * Sets the size of the icon to be shown on the button.
* @see KIconLoader::StdSizes
* @see buttonIconSize
* @since 4.1
*/
void setButtonIconSize(int size);
-
/**
- * Returns the Button's Icon-Size
+ * Returns the button's icon size.
* @since 4.1
*/
int buttonIconSize() const;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kiconthemes-4.97.0/src/kicondialog.h new/kiconthemes-4.98.0/src/kicondialog.h
--- old/kiconthemes-4.97.0/src/kicondialog.h 2014-03-01 12:50:56.000000000 +0100
+++ new/kiconthemes-4.98.0/src/kicondialog.h 2014-03-28 19:16:57.000000000 +0100
@@ -24,7 +24,7 @@
/**
* Dialog for interactive selection of icons. Use the function
- * getIcon() let the user select an icon.
+ * getIcon() to let the user select an icon.
*
* @short An icon selection dialog.
*/
@@ -34,14 +34,14 @@
public:
/**
- * Constructs an icon selection dialog using the global iconloader.
+ * Constructs an icon selection dialog using the global icon loader.
*
* @param parent The parent widget.
*/
explicit KIconDialog(QWidget *parent = 0L);
/**
- * Constructs an icon selection dialog using a specific iconloader.
+ * Constructs an icon selection dialog using a specific icon loader.
*
* @param loader The icon loader to use.
* @param parent The parent widget.
@@ -54,18 +54,22 @@
~KIconDialog();
/**
- * Sets a strict icon size policy for allowed icons. When true,
- * only icons of the specified group's size in getIcon() are shown.
+ * Sets a strict icon size policy for allowed icons.
+ *
+ * @param policy When true, only icons of the specified group's
+ * size in getIcon() are shown.
* When false, icons not available at the desired group's size will
* also be selectable.
*/
- void setStrictIconSize(bool b);
+ void setStrictIconSize(bool policy);
/**
* Returns true if a strict icon size policy is set.
*/
bool strictIconSize() const;
+
/**
- * sets a custom icon directory
+ * Sets the location of the custom icon directory. Only local directory
+ * paths are allowed.
*/
void setCustomLocation(const QString &location);
@@ -75,20 +79,18 @@
* @see iconSize
*/
void setIconSize(int size);
-
/**
- * Returns the iconsize set via setIconSize() or 0, if the default
- * iconsize will be used.
+ * Returns the icon size set via setIconSize() or 0, if the default
+ * icon size will be used.
*/
int iconSize() const;
/**
* Allows you to set the same parameters as in the class method
* getIcon(), as well as two additional parameters to lock
- * the choice between system and user dirs and to lock the custom user
- * dir itself.
+ * the choice between system and user directories and to lock the
+ * custom icon directory itself.
*/
-
void setup(KIconLoader::Group group,
KIconLoader::Context context = KIconLoader::Application,
bool strictIconSize = false, int iconSize = 0,
@@ -104,7 +106,7 @@
QString openDialog();
/**
- * show()es this dialog and emits a newIcon(const QString&) signal when
+ * show()s this dialog and emits a newIconName(const QString&) signal when
* successful. QString() will be emitted if the dialog was aborted.
*/
void showDialog();
@@ -120,7 +122,7 @@
* @param strictIconSize When true, only icons of the specified group's size
* are shown, otherwise icon not available in the desired group's size
* will also be selectable.
- * @param iconSize the size of the icons -- the default of the icongroup
+ * @param iconSize the size of the icons -- the default of the icon group
* if set to 0
* @param user Begin with the "user icons" instead of "system icons".
* @param parent The parent widget of the dialog.
@@ -134,7 +136,7 @@
const QString &caption = QString());
Q_SIGNALS:
- void newIconName(const QString &);
+ void newIconName(const QString &iconName);
protected Q_SLOTS:
void slotOk();
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kiconthemes-4.97.0/src/kiconeffect.h new/kiconthemes-4.98.0/src/kiconeffect.h
--- old/kiconthemes-4.97.0/src/kiconeffect.h 2014-03-01 12:50:56.000000000 +0100
+++ new/kiconthemes-4.98.0/src/kiconeffect.h 2014-03-28 19:16:57.000000000 +0100
@@ -62,9 +62,9 @@
* Note that 'LastEffect' is no valid icon effect but only
* used internally to check for invalid icon effects.
*
- * @li NoEffect: Don't apply any icon effect
+ * @li NoEffect: Do not apply any icon effect
* @li ToGray: Tints the icon gray
- * @li Colorize: Tints the icon with an other color
+ * @li Colorize: Tints the icon with a specific color
* @li ToGamma: Change the gamma value of the icon
* @li DeSaturate: Reduce the saturation of the icon
* @li ToMonochrome: Produces a monochrome icon
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kiconthemes-4.97.0/src/tools/ksvg2icns/CMakeLists.txt new/kiconthemes-4.98.0/src/tools/ksvg2icns/CMakeLists.txt
--- old/kiconthemes-4.97.0/src/tools/ksvg2icns/CMakeLists.txt 1970-01-01 01:00:00.000000000 +0100
+++ new/kiconthemes-4.98.0/src/tools/ksvg2icns/CMakeLists.txt 2014-03-28 19:16:57.000000000 +0100
@@ -0,0 +1,5 @@
+add_executable(ksvg2icns ksvg2icns.cpp)
+ecm_mark_nongui_executable(ksvg2icns)
+target_link_libraries(ksvg2icns Qt5::Gui Qt5::Svg)
+
+install(TARGETS ksvg2icns ${INSTALL_TARGETS_DEFAULT_ARGS})
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kiconthemes-4.97.0/src/tools/ksvg2icns/ksvg2icns.cpp new/kiconthemes-4.98.0/src/tools/ksvg2icns/ksvg2icns.cpp
--- old/kiconthemes-4.97.0/src/tools/ksvg2icns/ksvg2icns.cpp 1970-01-01 01:00:00.000000000 +0100
+++ new/kiconthemes-4.98.0/src/tools/ksvg2icns/ksvg2icns.cpp 2014-03-28 19:16:57.000000000 +0100
@@ -0,0 +1,162 @@
+/******************************************************************************
+ * Copyright 2014 Harald Fernengel <harry(a)kdevelop.org> *
+ * *
+ * This program is free software; you can redistribute it and/or *
+ * modify it under the terms of the GNU Lesser General Public *
+ * *
+ * License as published by the Free Software Foundation; either *
+ * version 2.1 of the License, or (at your option) version 3, or any *
+ * later version accepted by the membership of KDE e.V. (or its *
+ * successor approved by the membership of KDE e.V.), which shall *
+ * act as a proxy defined in Section 6 of version 3 of the license. *
+ * *
+ * This library is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this library. If not, see *
+ * <http://www.gnu.org/licenses/>. *
+ * *
+ ******************************************************************************/
+
+/* This tool converts an svg to a Mac OS X icns file.
+ * Note: Requires the 'iconutil' Mac OS X binary
+ */
+
+#include <QCommandLineParser>
+#include <QFileInfo>
+#include <QProcess>
+#include <QTemporaryDir>
+
+#include <QGuiApplication>
+#include <QPainter>
+#include <QSvgRenderer>
+
+#include "../../../kiconthemes_version.h"
+
+#include <stdio.h>
+
+#define EXIT_ON_ERROR(isOk, ...) \
+ do { \
+ if (!(isOk)) { \
+ fprintf(stderr, __VA_ARGS__); \
+ return 1; \
+ } \
+ } while (false);
+
+static bool writeImage(QSvgRenderer &svg, int size, const QString &outFile1, const QString &outFile2 = QString())
+{
+ QImage out(size, size, QImage::Format_ARGB32);
+ out.fill(Qt::transparent);
+
+ QPainter painter(&out);
+ svg.render(&painter);
+ painter.end();
+
+ if (!out.save(outFile1)) {
+ fprintf(stderr, "Unable to write %s\n", qPrintable(outFile1));
+ return false;
+ }
+ if (!outFile2.isEmpty() && !out.save(outFile2)) {
+ fprintf(stderr, "Unable to write %s\n", qPrintable(outFile2));
+ return false;
+ }
+
+ return true;
+}
+
+int main(int argc, char *argv[])
+{
+ QGuiApplication app(argc, argv);
+
+ app.setApplicationName("ksvg2icns");
+ app.setApplicationVersion(KICONTHEMES_VERSION_STRING);
+ QCommandLineParser parser;
+ parser.setApplicationDescription(app.translate("main", "Creates an icns file from an svg image"));
+ parser.addPositionalArgument("iconname", app.translate("main", "The svg icon to convert"));
+ parser.addHelpOption();
+
+ parser.process(app);
+ if (parser.positionalArguments().isEmpty()) {
+ parser.showHelp();
+ return 1;
+ }
+
+ bool isOk;
+
+ // create a temporary dir to create an iconset
+ QTemporaryDir tmpDir("ksvg2icns");
+ tmpDir.setAutoRemove(true);
+
+ isOk = tmpDir.isValid();
+ EXIT_ON_ERROR(isOk, "Unable to create temporary directory\n");
+
+ isOk = QDir(tmpDir.path()).mkdir("out.iconset");
+ EXIT_ON_ERROR(isOk, "Unable to create out.iconset directory\n");
+
+ const QString outPath = tmpDir.path() + "/out.iconset";
+
+ const QStringList &args = app.arguments();
+ EXIT_ON_ERROR(args.size() == 2,
+ "Usage: %s svg-image\n",
+ qPrintable(args.value(0)));
+
+ const QString &svgFileName = args.at(1);
+
+ // open the actual svg file
+ QSvgRenderer svg;
+ isOk = svg.load(svgFileName);
+ EXIT_ON_ERROR(isOk, "Unable to load %s\n", qPrintable(svgFileName));
+
+ // The sizes are from:
+ // https://developer.apple.com/library/mac/documentation/GraphicsAnimation/Con…
+
+ struct OutFiles
+ {
+ int size;
+ QString out1;
+ QString out2;
+ };
+
+ // create the pngs in various resolutions
+ const OutFiles outFiles[] = {
+ { 1024, outPath + "/icon_512x512(a)2x.png", QString() },
+ { 512, outPath + "/icon_512x512.png", outPath + "/icon_256x256(a)2x.png" },
+ { 256, outPath + "/icon_256x256.png", outPath + "/icon_128x128(a)2x.png" },
+ { 128, outPath + "/icon_128x128.png", QString() },
+ { 64, outPath + "/icon_32x32(a)2x.png", QString() },
+ { 32, outPath + "/icon_32x32.png", outPath + "/icon_16x16(a)2x.png" },
+ { 16, outPath + "/icon_16x16.png", QString() }
+ };
+
+ for (size_t i = 0; i < sizeof(outFiles) / sizeof(OutFiles); ++i) {
+ isOk = writeImage(svg, outFiles[i].size, outFiles[i].out1, outFiles[i].out2);
+ if (!isOk) {
+ return 1;
+ }
+ }
+
+ // convert the iconset to icns using the "iconutil" command
+
+ const QString outIcns = QFileInfo(svgFileName).baseName() + ".icns";
+
+ const QStringList utilArgs = QStringList()
+ << "-c" << "icns"
+ << "-o" << outIcns
+ << outPath;
+
+ QProcess iconUtil;
+ iconUtil.setProgram("iconUtil");
+ iconUtil.setArguments(utilArgs);
+
+ iconUtil.start("iconutil", utilArgs, QIODevice::ReadOnly);
+ isOk = iconUtil.waitForFinished(-1);
+ EXIT_ON_ERROR(isOk, "Unable to launch iconutil: %s\n", qPrintable(iconUtil.errorString()));
+
+ EXIT_ON_ERROR(iconUtil.exitStatus() == QProcess::NormalExit, "iconutil crashed!\n");
+ EXIT_ON_ERROR(iconUtil.exitCode() == 0, "iconutil returned %d\n", iconUtil.exitCode());
+
+ return 0;
+}
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: opensuse-commit+help(a)opensuse.org
[View Less]
1
0
Hello community,
here is the log from the commit of package ki18n for openSUSE:Factory checked in at 2014-04-02 17:22:04
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ki18n (Old)
and /work/SRC/openSUSE:Factory/.ki18n.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "ki18n"
Changes:
--------
--- /work/SRC/openSUSE:Factory/ki18n/ki18n.changes 2014-03-10 12:17:40.000000000 +0100
+++…
[View More] /work/SRC/openSUSE:Factory/.ki18n.new/ki18n.changes 2014-04-02 17:22:15.000000000 +0200
@@ -1,0 +2,9 @@
+Sat Mar 29 19:47:39 UTC 2014 - hrvoje.senjan(a)gmail.com
+
+- Update to 4.98.0
+ * API improvements and cleanups
+ * Buildsystem fixes
+ * For more details please see:
+ http://www.kde.org/announcements/announce-frameworks5-beta1.php
+
+-------------------------------------------------------------------
Old:
----
ki18n-4.97.0.tar.xz
New:
----
ki18n-4.98.0.tar.xz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ ki18n.spec ++++++
--- /var/tmp/diff_new_pack.vN6lEJ/_old 2014-04-02 17:22:15.000000000 +0200
+++ /var/tmp/diff_new_pack.vN6lEJ/_new 2014-04-02 17:22:15.000000000 +0200
@@ -18,10 +18,10 @@
%define lname libKF5I18n5
Name: ki18n
-Version: 4.97.0
+Version: 4.98.0
Release: 0
BuildRequires: cmake >= 2.8.12
-BuildRequires: extra-cmake-modules >= 0.0.11
+BuildRequires: extra-cmake-modules >= 0.0.12
BuildRequires: fdupes
BuildRequires: kf5-filesystem
BuildRequires: pkgconfig(Qt5Concurrent) >= 5.2.0
++++++ ki18n-4.97.0.tar.xz -> ki18n-4.98.0.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ki18n-4.97.0/CMakeLists.txt new/ki18n-4.98.0/CMakeLists.txt
--- old/ki18n-4.97.0/CMakeLists.txt 2014-03-01 12:50:54.000000000 +0100
+++ new/ki18n-4.98.0/CMakeLists.txt 2014-03-28 19:16:55.000000000 +0100
@@ -3,7 +3,7 @@
project(KI18n)
# ECM setup
-find_package(ECM 0.0.11 REQUIRED NO_MODULE)
+find_package(ECM 0.0.12 REQUIRED NO_MODULE)
set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH} ${ECM_KDE_MODULE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
include(FeatureSummary)
@@ -12,7 +12,7 @@
include(ECMSetupVersion)
include(ECMGenerateHeaders)
-set(KF5_VERSION "4.97.0")
+set(KF5_VERSION "4.98.0")
ecm_setup_version(
${KF5_VERSION}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ki18n-4.97.0/autotests/CMakeLists.txt new/ki18n-4.98.0/autotests/CMakeLists.txt
--- old/ki18n-4.97.0/autotests/CMakeLists.txt 2014-03-01 12:50:54.000000000 +0100
+++ new/ki18n-4.98.0/autotests/CMakeLists.txt 2014-03-28 19:16:55.000000000 +0100
@@ -6,7 +6,7 @@
macro(KI18N_UNIT_TESTS)
foreach(_testname ${ARGN})
- add_executable(${_testname} ${_testname}.cpp)
+ add_executable(${_testname} ${_testname}.cpp testhelpers.cpp)
target_link_libraries(${_testname} Qt5::Test Qt5::Concurrent KF5::I18n)
add_test(ki18n-${_testname} ${_testname})
ecm_mark_as_test(${_testname})
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ki18n-4.97.0/autotests/ktranscript-test.ini new/ki18n-4.98.0/autotests/ktranscript-test.ini
--- old/ki18n-4.97.0/autotests/ktranscript-test.ini 1970-01-01 01:00:00.000000000 +0100
+++ new/ki18n-4.98.0/autotests/ktranscript-test.ini 2014-03-28 19:16:55.000000000 +0100
@@ -0,0 +1,4 @@
+[fr]
+StringKey=StringValue
+BoolKey=true
+NumberKey=12345
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ki18n-4.97.0/autotests/ktranscripttest.cpp new/ki18n-4.98.0/autotests/ktranscripttest.cpp
--- old/ki18n-4.97.0/autotests/ktranscripttest.cpp 2014-03-01 12:50:54.000000000 +0100
+++ new/ki18n-4.98.0/autotests/ktranscripttest.cpp 2014-03-28 19:16:55.000000000 +0100
@@ -1,5 +1,7 @@
/*
Copyright 2013 Aurélien Gâteau <agateau(a)kde.org>
+Copyright (C) 2014 Chusslove Illich <caslav.ilic(a)gmx.net>
+Copyright (C) 2014 Kevin Krammer <krammer(a)kde.org>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
@@ -19,6 +21,8 @@
*/
#include "ktranscripttest.h"
+#include "testhelpers.h"
+
#include <QtTest/QtTest>
#include <QDebug>
@@ -39,6 +43,8 @@
void KTranscriptTest::initTestCase()
{
+ QVERIFY2(deployTestConfig(), "Could not deploy test ktranscript.ini");
+
QString pluginPath = QStringLiteral(KTRANSCRIPT_PATH);
QVERIFY2(QFile::exists(pluginPath), "Could not find ktranscript plugin");
@@ -49,6 +55,12 @@
QVERIFY(initf);
m_transcript = initf();
QVERIFY(m_transcript);
+
+}
+
+void KTranscriptTest::cleanupTestCase()
+{
+ QVERIFY2(removeTestConfig(), "Could not remove test ktranscript.ini");
}
void KTranscriptTest::test_data()
@@ -153,8 +165,30 @@
<< (QVariantList() << "test_normKey" << "Some &Thing")
<< false
<< "something";
- // TODO: How to test getConf* functions?
- // Enable setting user configuration path from environment variable?
+ QTest::newRow("test_getConfString")
+ << (QVariantList() << "test_getConfString" << "StringKey")
+ << false
+ << "StringValue";
+ QTest::newRow("test_getConfStringWithDefault")
+ << (QVariantList() << "test_getConfStringWithDefault" << "NoSuchKey" << "DefaultValue")
+ << false
+ << "DefaultValue";
+ QTest::newRow("test_getConfBool")
+ << (QVariantList() << "test_getConfBool" << "BoolKey")
+ << false
+ << "true";
+ QTest::newRow("test_getConfBoolWithDefault")
+ << (QVariantList() << "test_getConfBoolWithDefault" << "NoSuchKey" << true)
+ << false
+ << "true";
+ QTest::newRow("test_getConfNumber")
+ << (QVariantList() << "test_getConfNumber" << "NumberKey")
+ << false
+ << "12345";
+ QTest::newRow("test_getConfNumberWithDefault")
+ << (QVariantList() << "test_getConfNumberWithDefault" << "NoSuchKey" << 54321)
+ << false
+ << "54321";
}
void KTranscriptTest::test()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ki18n-4.97.0/autotests/ktranscripttest.h new/ki18n-4.98.0/autotests/ktranscripttest.h
--- old/ki18n-4.97.0/autotests/ktranscripttest.h 2014-03-01 12:50:54.000000000 +0100
+++ new/ki18n-4.98.0/autotests/ktranscripttest.h 2014-03-28 19:16:55.000000000 +0100
@@ -45,6 +45,7 @@
private Q_SLOTS:
void initTestCase();
+ void cleanupTestCase();
void test_data();
void test();
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ki18n-4.97.0/autotests/test.js new/ki18n-4.98.0/autotests/test.js
--- old/ki18n-4.97.0/autotests/test.js 2014-03-01 12:50:54.000000000 +0100
+++ new/ki18n-4.98.0/autotests/test.js 2014-03-28 19:16:55.000000000 +0100
@@ -100,3 +100,26 @@
return Ts.normKey(phrase);
});
+Ts.setcall("test_getConfString", function(key) {
+ return Ts.getConfString(key);
+});
+
+Ts.setcall("test_getConfStringWithDefault", function(key, defValue) {
+ return Ts.getConfString(key, defValue);
+});
+
+Ts.setcall("test_getConfBool", function(key) {
+ return "" + Ts.getConfBool(key);
+});
+
+Ts.setcall("test_getConfBoolWithDefault", function(key, defValue) {
+ return "" + Ts.getConfBool(key, defValue);
+});
+
+Ts.setcall("test_getConfNumber", function(key) {
+ return "" + Ts.getConfNumber(key);
+});
+
+Ts.setcall("test_getConfNumberWithDefault", function(key, defValue) {
+ return "" + Ts.getConfNumber(key, defValue);
+});
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ki18n-4.97.0/autotests/testhelpers.cpp new/ki18n-4.98.0/autotests/testhelpers.cpp
--- old/ki18n-4.97.0/autotests/testhelpers.cpp 1970-01-01 01:00:00.000000000 +0100
+++ new/ki18n-4.98.0/autotests/testhelpers.cpp 2014-03-28 19:16:55.000000000 +0100
@@ -0,0 +1,75 @@
+/* This file is part of the KI18N Framework
+ Copyright (C) 2014 Kevin Krammer <krammer(a)kde.org>
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include "testhelpers.h"
+
+#include <QDebug>
+#include <QDir>
+#include <QFile>
+#include <QFileInfo>
+#include <QStandardPaths>
+#include <QtTest/QtTest>
+
+static const QString targetFileName = QStringLiteral("ktranscript.ini");
+
+bool deployTestConfig()
+{
+ QStandardPaths::setTestModeEnabled(true);
+
+ QDir configDir = QStandardPaths::writableLocation(QStandardPaths::ConfigLocation);
+ const QFileInfo targetFile = QFileInfo(configDir, targetFileName);
+
+ if (!configDir.exists()) {
+ if (!QDir::current().mkpath(configDir.absolutePath())) {
+ qWarning() << "Failed to create config dir" << configDir.absolutePath();
+ return false;
+ }
+ } else if (targetFile.exists()) {
+ if (!configDir.remove(targetFileName)) {
+ qWarning() << "Failed to remove existing test config file" << targetFile.absoluteFilePath();
+ return false;
+ }
+ }
+
+ QFile sourceFile(QFINDTESTDATA("ktranscript-test.ini"));
+ if (!sourceFile.exists()) {
+ qWarning() << "Could not locate test data file" << sourceFile.fileName();
+ return false;
+ }
+
+ if (!sourceFile.copy(targetFile.absoluteFilePath())) {
+ qWarning() << "Failed to copy test config file" << sourceFile.fileName()
+ << "to target location" << targetFile.absoluteFilePath();
+ return false;
+ }
+
+ return true;
+}
+
+bool removeTestConfig()
+{
+ Q_ASSERT(QStandardPaths::isTestModeEnabled());
+
+ QDir configDir = QStandardPaths::writableLocation(QStandardPaths::ConfigLocation);
+ if (!configDir.exists()) {
+ return true;
+ }
+
+ return configDir.remove(targetFileName);
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ki18n-4.97.0/autotests/testhelpers.h new/ki18n-4.98.0/autotests/testhelpers.h
--- old/ki18n-4.97.0/autotests/testhelpers.h 1970-01-01 01:00:00.000000000 +0100
+++ new/ki18n-4.98.0/autotests/testhelpers.h 2014-03-28 19:16:55.000000000 +0100
@@ -0,0 +1,28 @@
+/* This file is part of the KI18N Framework
+ Copyright (C) 2014 Kevin Krammer <krammer(a)kde.org>
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef TESTHELPERS_H
+#define TESTHELPERS_H
+
+#include <QHash>
+
+bool deployTestConfig();
+bool removeTestConfig();
+
+#endif // TESTHELPERS_H
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ki18n-4.97.0/cmake/KF5I18NMacros.cmake new/ki18n-4.98.0/cmake/KF5I18NMacros.cmake
--- old/ki18n-4.97.0/cmake/KF5I18NMacros.cmake 2014-03-01 12:50:54.000000000 +0100
+++ new/ki18n-4.98.0/cmake/KF5I18NMacros.cmake 2014-03-28 19:16:55.000000000 +0100
@@ -19,7 +19,6 @@
add_custom_command(OUTPUT ${_header}
COMMAND ${CMAKE_COMMAND}
ARGS
- -DKDE4_HEADER:BOOL=ON
-DKDE_UIC_EXECUTABLE:FILEPATH=${QT_UIC_EXECUTABLE}
-DKDE_UIC_FILE:FILEPATH=${_tmp_FILE}
-DKDE_UIC_H_FILE:FILEPATH=${_header}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ki18n-4.97.0/cmake/kf5i18nuic.cmake new/ki18n-4.98.0/cmake/kf5i18nuic.cmake
--- old/ki18n-4.97.0/cmake/kf5i18nuic.cmake 2014-03-01 12:50:54.000000000 +0100
+++ new/ki18n-4.98.0/cmake/kf5i18nuic.cmake 2014-03-28 19:16:55.000000000 +0100
@@ -4,17 +4,13 @@
# Redistribution and use is allowed according to the terms of the BSD license.
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
-# the kde4 branch
-if (KDE4_HEADER)
+EXECUTE_PROCESS(COMMAND ${KDE_UIC_EXECUTABLE}
+ -tr tr2i18n
+ ${KDE_UIC_FILE}
+ OUTPUT_VARIABLE _uic_CONTENTS
+)
- EXECUTE_PROCESS(COMMAND ${KDE_UIC_EXECUTABLE}
- -tr tr2i18n
- ${KDE_UIC_FILE}
- OUTPUT_VARIABLE _uic_CONTENTS
- )
-
- set(KDE_UIC_CPP_FILE ${KDE_UIC_H_FILE})
-endif (KDE4_HEADER)
+set(KDE_UIC_CPP_FILE ${KDE_UIC_H_FILE})
IF (_uic_CONTENTS)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ki18n-4.97.0/src/Messages.sh new/ki18n-4.98.0/src/Messages.sh
--- old/ki18n-4.97.0/src/Messages.sh 2014-03-01 12:50:54.000000000 +0100
+++ new/ki18n-4.98.0/src/Messages.sh 2014-03-28 19:16:55.000000000 +0100
@@ -1,2 +1,2 @@
#! /usr/bin/env bash
-$XGETTEXT *.cpp *.h -o $podir/ki18n.pot
+$XGETTEXT *.cpp *.h -o $podir/ki18n5.pot
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ki18n-4.97.0/src/ktranscript.cpp new/ki18n-4.98.0/src/ktranscript.cpp
--- old/ki18n-4.97.0/src/ktranscript.cpp 2014-03-01 12:50:54.000000000 +0100
+++ new/ki18n-4.98.0/src/ktranscript.cpp 2014-03-28 19:16:55.000000000 +0100
@@ -40,6 +40,7 @@
#include <QIODevice>
#include <QTextStream>
#include <QRegExp>
+#include <QStandardPaths>
#include <qendian.h>
class KTranscriptImp;
@@ -324,6 +325,8 @@
QVariant::Type vtype = val.type();
if (vtype == QVariant::String) {
return QScriptValue(val.toString());
+ } else if (vtype == QVariant::Bool) {
+ return QScriptValue(val.toBool());
} else if (vtype == QVariant::Double
|| vtype == QVariant::Int || vtype == QVariant::UInt
|| vtype == QVariant::LongLong || vtype == QVariant::ULongLong) {
@@ -468,7 +471,11 @@
KTranscriptImp::KTranscriptImp()
{
// Load user configuration.
- const QString tsConfigPath = QDir::homePath() + QLatin1Char('/') + QLatin1String(".transcriptrc");
+
+ QString tsConfigPath = QStandardPaths::locate(QStandardPaths::ConfigLocation, QStringLiteral("ktranscript.ini"));
+ if (tsConfigPath.isEmpty()) {
+ tsConfigPath = QDir::homePath() + QLatin1Char('/') + QLatin1String(".transcriptrc");
+ }
config = readConfig(tsConfigPath);
}
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: opensuse-commit+help(a)opensuse.org
[View Less]
1
0
Hello community,
here is the log from the commit of package khtml for openSUSE:Factory checked in at 2014-04-02 17:22:03
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/khtml (Old)
and /work/SRC/openSUSE:Factory/.khtml.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "khtml"
Changes:
--------
--- /work/SRC/openSUSE:Factory/khtml/khtml.changes 2014-03-28 16:24:13.000000000 +0100
+++…
[View More] /work/SRC/openSUSE:Factory/.khtml.new/khtml.changes 2014-04-02 17:22:12.000000000 +0200
@@ -1,0 +2,9 @@
+Sat Mar 29 19:47:38 UTC 2014 - hrvoje.senjan(a)gmail.com
+
+- Update to 4.98.0
+ * API improvements and cleanups
+ * Buildsystem fixes
+ * For more details please see:
+ http://www.kde.org/announcements/announce-frameworks5-beta1.php
+
+-------------------------------------------------------------------
Old:
----
khtml-4.97.0.tar.xz
New:
----
khtml-4.98.0.tar.xz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ khtml.spec ++++++
--- /var/tmp/diff_new_pack.UY7eR0/_old 2014-04-02 17:22:14.000000000 +0200
+++ /var/tmp/diff_new_pack.UY7eR0/_new 2014-04-02 17:22:14.000000000 +0200
@@ -18,10 +18,10 @@
%define lname libKF5KHtml5
Name: khtml
-Version: 4.97.0
+Version: 4.98.0
Release: 0
BuildRequires: cmake >= 2.8.12
-BuildRequires: extra-cmake-modules >= 0.0.11
+BuildRequires: extra-cmake-modules >= 0.0.12
BuildRequires: fdupes
BuildRequires: giflib-devel
BuildRequires: karchive-devel >= %{_kf5_version}
@@ -135,7 +135,7 @@
%{_kf5_servicesdir}/kmultipart.desktop
%{_kf5_datadir}/kjava/
%{_kf5_datadir}/khtml/
-%_kf5_configdir/khtmlrc
+%config %{_kf5_configdir}/khtmlrc
%files devel
%defattr(-,root,root)
++++++ khtml-4.97.0.tar.xz -> khtml-4.98.0.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/khtml-4.97.0/CMakeLists.txt new/khtml-4.98.0/CMakeLists.txt
--- old/khtml-4.97.0/CMakeLists.txt 2014-03-01 12:50:52.000000000 +0100
+++ new/khtml-4.98.0/CMakeLists.txt 2014-03-29 08:19:09.000000000 +0100
@@ -2,7 +2,7 @@
project(KHtml)
-find_package(ECM 0.0.11 REQUIRED NO_MODULE)
+find_package(ECM 0.0.12 REQUIRED NO_MODULE)
set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH} ${ECM_KDE_MODULE_DIR})
include(FeatureSummary)
include(GenerateExportHeader)
@@ -16,7 +16,7 @@
include(KDEFrameworkCompilerSettings)
include(KDECMakeSettings)
-set(KF5_VERSION "4.97.0")
+set(KF5_VERSION "4.98.0")
find_package(KF5Archive ${KF5_VERSION} REQUIRED)
find_package(KF5Codecs ${KF5_VERSION} REQUIRED)
find_package(KF5GlobalAccel ${KF5_VERSION} REQUIRED)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/khtml-4.97.0/src/BUILDING-TESTREGRESSION new/khtml-4.98.0/src/BUILDING-TESTREGRESSION
--- old/khtml-4.97.0/src/BUILDING-TESTREGRESSION 2014-03-01 12:50:52.000000000 +0100
+++ new/khtml-4.98.0/src/BUILDING-TESTREGRESSION 2014-03-29 08:19:09.000000000 +0100
@@ -1,3 +1,5 @@
+FIXME: update these docs for Qt5 / KF5
+
In order to be able to use testregression, you have to build your Qt and kdelibs in a special manner.
Here are the needed steps.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/khtml-4.97.0/src/CMakeLists.txt new/khtml-4.98.0/src/CMakeLists.txt
--- old/khtml-4.97.0/src/CMakeLists.txt 2014-03-01 12:50:52.000000000 +0100
+++ new/khtml-4.98.0/src/CMakeLists.txt 2014-03-29 08:19:09.000000000 +0100
@@ -532,11 +532,6 @@
# Fairly certain this isn't used anywhere
# qt5_generate_dbus_interface(khtml_iface.h org.kde.KHtmlPart.xml)
-if(kdelibs_SOURCE_DIR)
- qt5_generate_dbus_interface(${CMAKE_SOURCE_DIR}/tier3/kio/src/ioslaves/http/kcookiejar/kcookieserver.h org.kde.KCookieServer.xml)
- set(KCookieServer_DBUS_INTERFACE ${CMAKE_CURRENT_BINARY_DIR}/org.kde.KCookieServer.xml)
-endif()
-
qt5_add_dbus_interface(khtml_LIB_SRCS ${KCookieServer_DBUS_INTERFACE} kcookiejar_interface)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/khtml-4.97.0/src/Messages.sh new/khtml-4.98.0/src/Messages.sh
--- old/khtml-4.97.0/src/Messages.sh 1970-01-01 01:00:00.000000000 +0100
+++ new/khtml-4.98.0/src/Messages.sh 2014-03-29 08:19:09.000000000 +0100
@@ -0,0 +1,18 @@
+#!/bin/sh
+
+# Invoke the extractrc script on all .ui, .rc, and .kcfg files in the sources.
+# The results are stored in a pseudo .cpp file to be picked up by xgettext.
+lst=`find . -name \*.rc -o -name \*.ui -o -name \*.kcfg`
+if [ -n "$lst" ] ; then
+ $EXTRACTRC $lst >> rc.cpp
+fi
+
+# If your framework contains tips-of-the-day, call preparetips as well.
+if [ -f "data/tips" ] ; then
+ ( cd data && $PREPARETIPS > ../tips.cpp )
+fi
+
+# Extract strings from all source files.
+# If your framework depends on KI18n, use $XGETTEXT. If it uses Qt translation
+# system, use $EXTRACT_TR_STRINGS.
+$XGETTEXT `find . -name \*.cpp -o -name \*.h -name \*.qml` -o $podir/khtml5.pot
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/khtml-4.97.0/src/dom/dom_node.cpp new/khtml-4.98.0/src/dom/dom_node.cpp
--- old/khtml-4.97.0/src/dom/dom_node.cpp 2014-03-01 12:50:52.000000000 +0100
+++ new/khtml-4.98.0/src/dom/dom_node.cpp 2014-03-29 08:19:09.000000000 +0100
@@ -260,7 +260,7 @@
if (!impl) {
return 0;
}
- return impl->childNodes();
+ return impl->childNodes().get();
}
Node Node::firstChild() const
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/khtml-4.97.0/src/dom/html_form.h new/khtml-4.98.0/src/dom/html_form.h
--- old/khtml-4.97.0/src/dom/html_form.h 2014-03-01 12:50:52.000000000 +0100
+++ new/khtml-4.98.0/src/dom/html_form.h 2014-03-29 08:19:09.000000000 +0100
@@ -188,9 +188,7 @@
~HTMLFieldSetElement();
- /**
- * ### KDE 4.0: remove.
- */
+ // TODO: deprecate/remove?
HTMLFormElement form() const;
};
@@ -394,9 +392,7 @@
*/
void setDefaultChecked(bool);
- /**
- * ### KDE 4.0: remove.
- */
+ // TODO: deprecate/remove?
HTMLFormElement form() const;
/**
@@ -787,9 +783,7 @@
~HTMLLegendElement();
- /**
- * ### KDE 4.0: remove
- */
+ // TODO: deprecate/remove?
HTMLFormElement form() const;
/**
@@ -940,9 +934,7 @@
*/
long length() const;
- /**
- * ### KDE 4.0: remove.
- */
+ // TODO: deprecate/remove?
HTMLFormElement form() const;
/**
@@ -1094,9 +1086,7 @@
*/
void setDefaultValue(const DOMString &);
- /**
- * ### KDE 4.0: remove.
- */
+ // TODO: deprecate/remove?
HTMLFormElement form() const;
/**
@@ -1293,9 +1283,7 @@
~HTMLOptionElement();
- /**
- * ### KDE 4.0: remove
- */
+ // TODO: deprecate/remove?
HTMLFormElement form() const;
/**
@@ -1414,9 +1402,7 @@
~HTMLIsIndexElement();
- /**
- * ### KDE 4.0: remove
- */
+ // TODO: deprecate/remove?
HTMLFormElement form() const;
/**
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/khtml-4.97.0/src/ecma/debugger/breakpointsdock.cpp new/khtml-4.98.0/src/ecma/debugger/breakpointsdock.cpp
--- old/khtml-4.97.0/src/ecma/debugger/breakpointsdock.cpp 2014-03-01 12:50:52.000000000 +0100
+++ new/khtml-4.98.0/src/ecma/debugger/breakpointsdock.cpp 2014-03-29 08:19:09.000000000 +0100
@@ -27,7 +27,7 @@
{
BreakpointsDock::BreakpointsDock(QWidget *parent)
- : QDockWidget("", parent) //### KDE4.1: restore title
+ : QDockWidget("", parent) // TODO: restore title
{
setFeatures(DockWidgetMovable | DockWidgetFloatable);
QListWidget *widget = new QListWidget;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/khtml-4.97.0/src/ecma/debugger/scriptsdock.cpp new/khtml-4.98.0/src/ecma/debugger/scriptsdock.cpp
--- old/khtml-4.97.0/src/ecma/debugger/scriptsdock.cpp 2014-03-01 12:50:52.000000000 +0100
+++ new/khtml-4.98.0/src/ecma/debugger/scriptsdock.cpp 2014-03-29 08:19:09.000000000 +0100
@@ -91,7 +91,7 @@
QString favicon;
if (document->url().isEmpty()) {
- domain = "????"; // ### KDE4.1: proper i18n'able string
+ domain = "????"; // TODO: proper i18n'able string
}
else {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/khtml-4.97.0/src/ecma/kjs_dom.cpp new/khtml-4.98.0/src/ecma/kjs_dom.cpp
--- old/khtml-4.97.0/src/ecma/kjs_dom.cpp 2014-03-01 12:50:52.000000000 +0100
+++ new/khtml-4.98.0/src/ecma/kjs_dom.cpp 2014-03-29 08:19:09.000000000 +0100
@@ -279,7 +279,7 @@
case ParentElement: // IE only apparently
return getDOMNode(exec, node.parentNode());
case ChildNodes:
- return getDOMNodeList(exec, node.childNodes());
+ return getDOMNodeList(exec, node.childNodes().get());
case FirstChild:
return getDOMNode(exec, node.firstChild());
case LastChild:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/khtml-4.97.0/src/ecma/kjs_html.cpp new/khtml-4.98.0/src/ecma/kjs_html.cpp
--- old/khtml-4.97.0/src/ecma/kjs_html.cpp 2014-03-01 12:50:52.000000000 +0100
+++ new/khtml-4.98.0/src/ecma/kjs_html.cpp 2014-03-29 08:19:09.000000000 +0100
@@ -1884,7 +1884,7 @@
QString href = getURLArg(ATTR_HREF);
switch (token) {
case AnchorHash: {
- const QString encodedHash = QUrl(href).fragment();
+ const QString encodedHash = QUrl(href).fragment(QUrl::FullyEncoded);
if (encodedHash.isEmpty()) {
return jsString("");
}
@@ -1967,7 +1967,7 @@
case AreaHref:
return jsString(url.url());
case AreaHash: {
- const QString encodedHash = url.fragment();
+ const QString encodedHash = url.fragment(QUrl::FullyEncoded);
if (encodedHash.isEmpty()) {
return jsString("");
}
@@ -2634,8 +2634,9 @@
// read-only: text <--- According to the DOM, but JavaScript and JScript both allow changes.
// So, we'll do it here and not add it to our DOM headers.
case OptionText: {
- SharedPtr<DOM::NodeListImpl> nl(option.childNodes());
- for (unsigned int i = 0; i < nl->length(); i++) {
+ RefPtr<DOM::NodeListImpl> nl(option.childNodes());
+ const unsigned int length = nl->length();
+ for (unsigned int i = 0; i < length; ++i) {
if (nl->item(i)->nodeType() == DOM::Node::TEXT_NODE) {
static_cast<DOM::TextImpl *>(nl->item(i))->setData(str, exception);
return;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/khtml-4.97.0/src/ecma/kjs_navigator.cpp new/khtml-4.98.0/src/ecma/kjs_navigator.cpp
--- old/khtml-4.97.0/src/ecma/kjs_navigator.cpp 2014-03-01 12:50:52.000000000 +0100
+++ new/khtml-4.98.0/src/ecma/kjs_navigator.cpp 2014-03-29 08:19:09.000000000 +0100
@@ -27,6 +27,7 @@
#include <kconfig.h>
#include <kconfiggroup.h>
+#include <ksharedconfig.h>
#include <QDebug>
#include <kprotocolmanager.h>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/khtml-4.97.0/src/ecma/kjs_window.cpp new/khtml-4.98.0/src/ecma/kjs_window.cpp
--- old/khtml-4.97.0/src/ecma/kjs_window.cpp 2014-03-01 12:50:52.000000000 +0100
+++ new/khtml-4.98.0/src/ecma/kjs_window.cpp 2014-03-29 08:19:09.000000000 +0100
@@ -2553,8 +2553,7 @@
////////////////////// ScheduledAction ////////////////////////
-// KDE 4: Make those parameters const ... &
-ScheduledAction::ScheduledAction(JSObject *_func, List _args, DateTimeMS _nextTime, int _interval, bool _singleShot,
+ScheduledAction::ScheduledAction(JSObject *_func, const List &_args, const DateTimeMS &_nextTime, int _interval, bool _singleShot,
int _timerId)
{
//qDebug() << "ScheduledAction::ScheduledAction(isFunction) " << this;
@@ -2568,8 +2567,7 @@
timerId = _timerId;
}
-// KDE 4: Make it const QString &
-ScheduledAction::ScheduledAction(QString _code, DateTimeMS _nextTime, int _interval, bool _singleShot, int _timerId)
+ScheduledAction::ScheduledAction(const QString &_code, const DateTimeMS &_nextTime, int _interval, bool _singleShot, int _timerId)
{
//qDebug() << "ScheduledAction::ScheduledAction(!isFunction) " << this;
//func = 0;
@@ -2994,7 +2992,7 @@
QUrl url = m_frame->m_part->url();
switch (token) {
case Hash: {
- const QString encodedHash = url.fragment();
+ const QString encodedHash = url.fragment(QUrl::FullyEncoded);
if (encodedHash.isEmpty()) {
return jsString("");
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/khtml-4.97.0/src/ecma/kjs_window.h new/khtml-4.98.0/src/ecma/kjs_window.h
--- old/khtml-4.97.0/src/ecma/kjs_window.h 2014-03-01 12:50:52.000000000 +0100
+++ new/khtml-4.98.0/src/ecma/kjs_window.h 2014-03-29 08:19:09.000000000 +0100
@@ -292,8 +292,8 @@
class ScheduledAction
{
public:
- ScheduledAction(JSObject *_func, List _args, DateTimeMS _nextTime, int _interval, bool _singleShot, int _timerId);
- ScheduledAction(QString _code, DateTimeMS _nextTime, int _interval, bool _singleShot, int _timerId);
+ ScheduledAction(JSObject *_func, const List &_args, const DateTimeMS &_nextTime, int _interval, bool _singleShot, int _timerId);
+ ScheduledAction(const QString &_code, const DateTimeMS &_nextTime, int _interval, bool _singleShot, int _timerId);
~ScheduledAction();
bool execute(Window *window);
void mark();
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/khtml-4.97.0/src/ecma/xmlhttprequest.cpp new/khtml-4.98.0/src/ecma/xmlhttprequest.cpp
--- old/khtml-4.97.0/src/ecma/xmlhttprequest.cpp 2014-03-01 12:50:52.000000000 +0100
+++ new/khtml-4.98.0/src/ecma/xmlhttprequest.cpp 2014-03-29 08:19:09.000000000 +0100
@@ -227,14 +227,14 @@
// Token according to RFC 2616
static bool isValidFieldName(const QString &name)
{
- int l = name.length();
+ const int l = name.length();
if (l == 0) {
return false;
}
const QChar *c = name.constData();
for (int i = 0; i < l; ++i, ++c) {
- int u = c->unicode();
+ ushort u = c->unicode();
if (u < 32 || u > 126) {
return false;
}
@@ -254,14 +254,14 @@
static bool isValidFieldValue(const QString &name)
{
- int l = name.length();
+ const int l = name.length();
if (l == 0) {
return true;
}
const QChar *c = name.constData();
for (int i = 0; i < l; ++i, ++c) {
- int u = c->unicode();
+ ushort u = c->unicode();
if (u == '\n' || u == '\r') {
return false;
}
@@ -273,36 +273,35 @@
static bool canSetRequestHeader(const QString &name)
{
- static QSet<CaseInsensitiveString> forbiddenHeaders;
+ if (name.startsWith(QLatin1String("sec-"), Qt::CaseInsensitive) ||
+ name.startsWith(QLatin1String("proxy-"), Qt::CaseInsensitive)) {
+ return false;
+ }
+ static QSet<CaseInsensitiveString> forbiddenHeaders;
if (forbiddenHeaders.isEmpty()) {
static const char *const hdrs[] = {
"accept-charset",
"accept-encoding",
+ "access-control-request-headers",
+ "access-control-request-method",
+ "connection",
"content-length",
- "connect",
- "copy",
+ "content-transfer-encoding",
+ "cookie",
+ "cookie2",
"date",
- "delete",
+ "dnt",
"expect",
- "head",
"host",
"keep-alive",
- "lock",
- "mkcol",
- "move",
- "options",
- "put",
- "propfind",
- "proppatch",
- "proxy-authorization",
+ "origin",
"referer",
"te",
- "trace",
"trailer",
"transfer-encoding",
- "unlock",
"upgrade",
+ "user-agent",
"via"
};
for (size_t i = 0; i < sizeof(hdrs) / sizeof(char *); ++i) {
@@ -495,19 +494,12 @@
// We need to use a POST-like setup even for non-post whenever we
// have a payload.
- if (m_method == QLatin1String("POST") || !_body.isEmpty()) {
-
+ const bool havePayload = !_body.isEmpty();
+ if (m_method == QLatin1String("POST") || havePayload) {
// FIXME: determine post encoding correctly by looking in headers
// for charset.
QByteArray buf = _body.toUtf8();
-
job = KIO::storedHttpPost(buf, url, KIO::HideProgressInfo);
- if (contentType.isNull()) {
- job->addMetaData("content-type", "Content-type: text/plain");
- } else {
- job->addMetaData("content-type", contentType);
- }
-
} else {
job = KIO::storedGet(url, KIO::NoReload, KIO::HideProgressInfo);
}
@@ -515,6 +507,14 @@
// Regardless of job type, make sure the method is set
job->addMetaData("CustomHTTPMethod", m_method);
+ // Set headers
+
+ if (!contentType.isNull()) {
+ job->addMetaData("content-type", contentType);
+ } else if (havePayload) {
+ job->addMetaData("content-type", "Content-type: text/plain");
+ }
+
if (!m_requestHeaders.isEmpty()) {
QString rh;
HTTPHeaderMap::ConstIterator begin = m_requestHeaders.constBegin();
@@ -621,45 +621,26 @@
ec = DOMException::SYNTAX_ERR;
return;
}
- QString name = _name.toLower();
+
QString value = _value.trimmed();
- if (value.isEmpty()) {
- return;
- }
// Content-type needs to be set separately from the other headers
- if (name == "content-type") {
+ if (_name.compare(QLatin1String("content-type"), Qt::CaseInsensitive) == 0) {
contentType = "Content-type: " + value;
return;
}
- // Sanitize the referrer header to protect against spoofing...
- if (name == "referer") {
- QUrl referrerURL(value);
- if (urlMatchesDocumentDomain(referrerURL)) {
- m_requestHeaders[name] = referrerURL.url();
- }
- return;
- }
-
- // Sanitize the request headers below and handle them as if they are
- // calls to open. Otherwise, we will end up ignoring them all together!
- // TODO: Do something about "put" which kio_http sort of supports and
- // the webDAV headers such as PROPFIND etc...
- if (name == "get" || name == "post") {
- QUrl reqURL(doc->URL().resolved(QUrl(value)));
- open(name, reqURL, async, ec);
- return;
- }
-
// Reject all banned headers.
if (!canSetRequestHeader(_name)) {
- qWarning() << "Refusing to set unsafe XMLHttpRequest header "
- << name << endl;
+ qWarning() << "Refusing to set unsafe XMLHttpRequest header" << _name;
return;
}
- m_requestHeaders[_name] = value;
+ if (m_requestHeaders.contains(_name)) {
+ m_requestHeaders[_name] += (QLatin1String(", ") + value);
+ } else {
+ m_requestHeaders[_name] = value;
+ }
}
JSValue *XMLHttpRequest::getAllResponseHeaders(int &ec) const
@@ -987,16 +968,10 @@
if (args.size() < 2) {
return throwError(exec, SyntaxError, "Not enough arguments");
}
- JSValue *keyArgument = args[0];
- JSValue *valArgument = args[1];
- QString key, val;
- if (!keyArgument->isUndefined() && !keyArgument->isNull()) {
- key = keyArgument->toString(exec).qstring();
- }
- if (!valArgument->isUndefined() && !valArgument->isNull()) {
- val = valArgument->toString(exec).qstring();
- }
- request->setRequestHeader(key, val, ec);
+
+ QString headerFieldName = args[0]->toString(exec).qstring();
+ QString headerFieldValue = args[1]->toString(exec).qstring();
+ request->setRequestHeader(headerFieldName, headerFieldValue, ec);
setDOMException(exec, ec);
return jsUndefined();
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/khtml-4.97.0/src/editing/htmlediting_impl.cpp new/khtml-4.98.0/src/editing/htmlediting_impl.cpp
--- old/khtml-4.97.0/src/editing/htmlediting_impl.cpp 2014-03-01 12:50:52.000000000 +0100
+++ new/khtml-4.98.0/src/editing/htmlediting_impl.cpp 2014-03-29 08:19:09.000000000 +0100
@@ -2416,8 +2416,8 @@
assert(m_parent);
m_parent->ref();
- NodeListImpl *children = m_parent->childNodes();
- for (int i = children->length(); i >= 0; i--) {
+ RefPtr<DOM::NodeListImpl> children = m_parent->childNodes();
+ for (long i = children->length() - 1; i >= 0; --i) {
NodeImpl *node = children->item(i);
if (node == m_removeChild) {
break;
@@ -2523,9 +2523,9 @@
void RemoveNodePreservingChildrenCommandImpl::doApply()
{
- NodeListImpl *children = node()->childNodes();
- int length = children->length();
- for (int i = 0; i < length; i++) {
+ RefPtr<DOM::NodeListImpl> children = node()->childNodes();
+ const unsigned int length = children->length();
+ for (unsigned int i = 0; i < length; ++i) {
NodeImpl *child = children->item(0);
removeNode(child);
insertNodeBefore(child, node());
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/khtml-4.97.0/src/html/html_documentimpl.cpp new/khtml-4.98.0/src/html/html_documentimpl.cpp
--- old/khtml-4.97.0/src/html/html_documentimpl.cpp 2014-03-01 12:50:52.000000000 +0100
+++ new/khtml-4.98.0/src/html/html_documentimpl.cpp 2014-03-29 08:19:09.000000000 +0100
@@ -103,7 +103,7 @@
}
org::kde::KCookieServer kcookiejar("org.kde.kded5", "/modules/kcookiejar", QDBusConnection::sessionBus());
- QDBusReply<QString> reply = kcookiejar.findDOMCookies(URL().url(), qlonglong(windowId));
+ QDBusReply<QString> reply = kcookiejar.findDOMCookies(URL().url());
if (!reply.isValid()) {
qWarning() << "Can't communicate with cookiejar!";
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/khtml-4.97.0/src/html/html_headimpl.cpp new/khtml-4.98.0/src/html/html_headimpl.cpp
--- old/khtml-4.97.0/src/html/html_headimpl.cpp 2014-03-01 12:50:52.000000000 +0100
+++ new/khtml-4.98.0/src/html/html_headimpl.cpp 2014-03-29 08:19:09.000000000 +0100
@@ -836,17 +836,15 @@
void HTMLTitleElementImpl::setText(const DOMString &str)
{
int exceptioncode = 0;
- // Look for an existing text child node
- DOM::NodeListImpl *nl(childNodes());
- if (nl) {
- for (unsigned int i = 0; i < nl->length(); i++) {
- if (nl->item(i)->nodeType() == DOM::Node::TEXT_NODE) {
- static_cast<DOM::TextImpl *>(nl->item(i))->setData(str, exceptioncode);
- return;
- }
+ RefPtr<DOM::NodeListImpl> nl = childNodes();
+ const unsigned int length = nl->length();
+ for (unsigned int i = 0; i < length; ++i) {
+ if (nl->item(i)->nodeType() == DOM::Node::TEXT_NODE) {
+ static_cast<DOM::TextImpl *>(nl->item(i))->setData(str, exceptioncode);
+ return;
}
- delete nl;
}
+
// No child text node found, creating one
DOM::TextImpl *t = document()->createTextNode(str.implementation());
appendChild(t, exceptioncode);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/khtml-4.97.0/src/html/kopenssl.cpp new/khtml-4.98.0/src/html/kopenssl.cpp
--- old/khtml-4.97.0/src/html/kopenssl.cpp 2014-03-01 12:50:52.000000000 +0100
+++ new/khtml-4.98.0/src/html/kopenssl.cpp 2014-03-29 08:19:09.000000000 +0100
@@ -26,9 +26,9 @@
#include <kconfig.h>
#include <kconfiggroup.h>
-#include <klibrary.h>
#include <QtCore/QCoreApplication>
#include <QtCore/QFile>
+#include <QtCore/QLibrary>
#include <QtCore/QRegExp>
extern "C" {
@@ -203,8 +203,8 @@
: sslLib(0), cryptoLib(0), ok(false)
{}
- KLibrary *sslLib;
- KLibrary *cryptoLib;
+ QLibrary *sslLib;
+ QLibrary *cryptoLib;
bool ok;
static KOpenSSLProxy *sSelf;
@@ -298,7 +298,7 @@
}
#ifdef Q_OS_WIN
- d->cryptoLib = new KLibrary("libeay32.dll");
+ d->cryptoLib = new QLibrary("libeay32.dll");
if (!d->cryptoLib->load()) {
delete d->cryptoLib;
d->cryptoLib = 0;
@@ -307,7 +307,7 @@
{
QString libname = findMostRecentLib("/usr/lib" KDELIBSUFF, "crypto");
if (!libname.isNull()) {
- d->cryptoLib = new KLibrary(libname);
+ d->cryptoLib = new QLibrary(libname);
d->cryptoLib->setLoadHints(QLibrary::ExportExternalSymbolsHint);
if (!d->cryptoLib->load()) {
delete d->cryptoLib;
@@ -391,7 +391,7 @@
QString tmpStr(alib);
tmpStr.remove(QRegExp("\\(.*\\)"));
if (QFile(tmpStr).isReadable()) {
- d->cryptoLib = new KLibrary(alib);
+ d->cryptoLib = new QLibrary(alib);
d->cryptoLib->setLoadHints(QLibrary::ExportExternalSymbolsHint);
}
if (d->cryptoLib && d->cryptoLib->load()) {
@@ -408,133 +408,133 @@
if (d->cryptoLib) {
#if KSSL_HAVE_SSL
- K_X509_free = (void (*)(X509 *)) d->cryptoLib->resolveFunction("X509_free");
- K_RAND_egd = (int (*)(const char *)) d->cryptoLib->resolveFunction("RAND_egd");
- K_RAND_load_file = (int (*)(const char *, long)) d->cryptoLib->resolveFunction("RAND_load_file");
- K_RAND_file_name = (const char *(*)(char *, size_t)) d->cryptoLib->resolveFunction("RAND_file_name");
- K_RAND_write_file = (int (*)(const char *)) d->cryptoLib->resolveFunction("RAND_write_file");
- K_CRYPTO_free = (void (*)(void *)) d->cryptoLib->resolveFunction("CRYPTO_free");
- K_d2i_X509 = (X509 * (*)(X509 **, unsigned char **, long)) d->cryptoLib->resolveFunction("d2i_X509");
- K_i2d_X509 = (int (*)(X509 *, unsigned char **)) d->cryptoLib->resolveFunction("i2d_X509");
- K_X509_cmp = (int (*)(X509 *, X509 *)) d->cryptoLib->resolveFunction("X509_cmp");
- K_X509_STORE_CTX_new = (X509_STORE_CTX * (*)(void)) d->cryptoLib->resolveFunction("X509_STORE_CTX_new");
- K_X509_STORE_CTX_free = (void (*)(X509_STORE_CTX *)) d->cryptoLib->resolveFunction("X509_STORE_CTX_free");
- K_X509_verify_cert = (int (*)(X509_STORE_CTX *)) d->cryptoLib->resolveFunction("X509_verify_cert");
- K_X509_STORE_new = (X509_STORE * (*)(void)) d->cryptoLib->resolveFunction("X509_STORE_new");
- K_X509_STORE_free = (void (*)(X509_STORE *)) d->cryptoLib->resolveFunction("X509_STORE_free");
- K_X509_NAME_oneline = (char *(*)(X509_NAME *, char *, int)) d->cryptoLib->resolveFunction("X509_NAME_oneline");
- K_X509_get_subject_name = (X509_NAME * (*)(X509 *)) d->cryptoLib->resolveFunction("X509_get_subject_name");
- K_X509_get_issuer_name = (X509_NAME * (*)(X509 *)) d->cryptoLib->resolveFunction("X509_get_issuer_name");
- K_X509_STORE_add_lookup = (X509_LOOKUP * (*)(X509_STORE *, X509_LOOKUP_METHOD *)) d->cryptoLib->resolveFunction("X509_STORE_add_lookup");
- K_X509_LOOKUP_file = (X509_LOOKUP_METHOD * (*)(void)) d->cryptoLib->resolveFunction("X509_LOOKUP_file");
- K_X509_LOOKUP_free = (void (*)(X509_LOOKUP *)) d->cryptoLib->resolveFunction("X509_LOOKUP_free");
- K_X509_LOOKUP_ctrl = (int (*)(X509_LOOKUP *, int, const char *, long, char **)) d->cryptoLib->resolveFunction("X509_LOOKUP_ctrl");
- K_X509_STORE_CTX_init = (void (*)(X509_STORE_CTX *, X509_STORE *, X509 *, STACK_OF(X509) *)) d->cryptoLib->resolveFunction("X509_STORE_CTX_init");
- K_X509_dup = (X509 * (*)(X509 *)) d->cryptoLib->resolveFunction("X509_dup");
- K_BIO_s_mem = (BIO_METHOD * (*)(void)) d->cryptoLib->resolveFunction("BIO_s_mem");
- K_BIO_new = (BIO * (*)(BIO_METHOD *)) d->cryptoLib->resolveFunction("BIO_new");
- K_BIO_new_fp = (BIO * (*)(FILE *, int)) d->cryptoLib->resolveFunction("BIO_new_fp");
- K_BIO_new_mem_buf = (BIO * (*)(void *, int)) d->cryptoLib->resolveFunction("BIO_new_mem_buf");
- K_BIO_free = (int (*)(BIO *)) d->cryptoLib->resolveFunction("BIO_free");
- K_BIO_ctrl = (long(*)(BIO *, int, long, void *)) d->cryptoLib->resolveFunction("BIO_ctrl");
- K_BIO_write = (int (*)(BIO * b, const void *data, int len)) d->cryptoLib->resolveFunction("BIO_write");
- K_PEM_ASN1_write_bio = (int (*)(int (*)(), const char *, BIO *, char *, const EVP_CIPHER *, unsigned char *, int, pem_password_cb *, void *)) d->cryptoLib->resolveFunction("PEM_ASN1_write_bio");
+ K_X509_free = (void (*)(X509 *)) d->cryptoLib->resolve("X509_free");
+ K_RAND_egd = (int (*)(const char *)) d->cryptoLib->resolve("RAND_egd");
+ K_RAND_load_file = (int (*)(const char *, long)) d->cryptoLib->resolve("RAND_load_file");
+ K_RAND_file_name = (const char *(*)(char *, size_t)) d->cryptoLib->resolve("RAND_file_name");
+ K_RAND_write_file = (int (*)(const char *)) d->cryptoLib->resolve("RAND_write_file");
+ K_CRYPTO_free = (void (*)(void *)) d->cryptoLib->resolve("CRYPTO_free");
+ K_d2i_X509 = (X509 * (*)(X509 **, unsigned char **, long)) d->cryptoLib->resolve("d2i_X509");
+ K_i2d_X509 = (int (*)(X509 *, unsigned char **)) d->cryptoLib->resolve("i2d_X509");
+ K_X509_cmp = (int (*)(X509 *, X509 *)) d->cryptoLib->resolve("X509_cmp");
+ K_X509_STORE_CTX_new = (X509_STORE_CTX * (*)(void)) d->cryptoLib->resolve("X509_STORE_CTX_new");
+ K_X509_STORE_CTX_free = (void (*)(X509_STORE_CTX *)) d->cryptoLib->resolve("X509_STORE_CTX_free");
+ K_X509_verify_cert = (int (*)(X509_STORE_CTX *)) d->cryptoLib->resolve("X509_verify_cert");
+ K_X509_STORE_new = (X509_STORE * (*)(void)) d->cryptoLib->resolve("X509_STORE_new");
+ K_X509_STORE_free = (void (*)(X509_STORE *)) d->cryptoLib->resolve("X509_STORE_free");
+ K_X509_NAME_oneline = (char *(*)(X509_NAME *, char *, int)) d->cryptoLib->resolve("X509_NAME_oneline");
+ K_X509_get_subject_name = (X509_NAME * (*)(X509 *)) d->cryptoLib->resolve("X509_get_subject_name");
+ K_X509_get_issuer_name = (X509_NAME * (*)(X509 *)) d->cryptoLib->resolve("X509_get_issuer_name");
+ K_X509_STORE_add_lookup = (X509_LOOKUP * (*)(X509_STORE *, X509_LOOKUP_METHOD *)) d->cryptoLib->resolve("X509_STORE_add_lookup");
+ K_X509_LOOKUP_file = (X509_LOOKUP_METHOD * (*)(void)) d->cryptoLib->resolve("X509_LOOKUP_file");
+ K_X509_LOOKUP_free = (void (*)(X509_LOOKUP *)) d->cryptoLib->resolve("X509_LOOKUP_free");
+ K_X509_LOOKUP_ctrl = (int (*)(X509_LOOKUP *, int, const char *, long, char **)) d->cryptoLib->resolve("X509_LOOKUP_ctrl");
+ K_X509_STORE_CTX_init = (void (*)(X509_STORE_CTX *, X509_STORE *, X509 *, STACK_OF(X509) *)) d->cryptoLib->resolve("X509_STORE_CTX_init");
+ K_X509_dup = (X509 * (*)(X509 *)) d->cryptoLib->resolve("X509_dup");
+ K_BIO_s_mem = (BIO_METHOD * (*)(void)) d->cryptoLib->resolve("BIO_s_mem");
+ K_BIO_new = (BIO * (*)(BIO_METHOD *)) d->cryptoLib->resolve("BIO_new");
+ K_BIO_new_fp = (BIO * (*)(FILE *, int)) d->cryptoLib->resolve("BIO_new_fp");
+ K_BIO_new_mem_buf = (BIO * (*)(void *, int)) d->cryptoLib->resolve("BIO_new_mem_buf");
+ K_BIO_free = (int (*)(BIO *)) d->cryptoLib->resolve("BIO_free");
+ K_BIO_ctrl = (long(*)(BIO *, int, long, void *)) d->cryptoLib->resolve("BIO_ctrl");
+ K_BIO_write = (int (*)(BIO * b, const void *data, int len)) d->cryptoLib->resolve("BIO_write");
+ K_PEM_ASN1_write_bio = (int (*)(int (*)(), const char *, BIO *, char *, const EVP_CIPHER *, unsigned char *, int, pem_password_cb *, void *)) d->cryptoLib->resolve("PEM_ASN1_write_bio");
K_ASN1_item_i2d_fp = (int (*)(ASN1_ITEM *, FILE *, unsigned char *))
- d->cryptoLib->resolveFunction("ASN1_item_i2d_fp");
- K_NETSCAPE_X509_it = (ASN1_ITEM *) d->cryptoLib->resolveFunction("NETSCAPE_X509_it");
- K_X509_print_fp = (int (*)(FILE *, X509 *)) d->cryptoLib->resolveFunction("X509_print_fp");
- K_i2d_PKCS12 = (int (*)(PKCS12 *, unsigned char **)) d->cryptoLib->resolveFunction("i2d_PKCS12");
- K_i2d_PKCS12_fp = (int (*)(FILE *, PKCS12 *)) d->cryptoLib->resolveFunction("i2d_PKCS12_fp");
- K_PKCS12_newpass = (int (*)(PKCS12 *, char *, char *)) d->cryptoLib->resolveFunction("PKCS12_newpass");
- K_d2i_PKCS12_fp = (PKCS12 * (*)(FILE *, PKCS12 **)) d->cryptoLib->resolveFunction("d2i_PKCS12_fp");
- K_PKCS12_new = (PKCS12 * (*)()) d->cryptoLib->resolveFunction("PKCS12_new");
- K_PKCS12_free = (void (*)(PKCS12 *)) d->cryptoLib->resolveFunction("PKCS12_free");
+ d->cryptoLib->resolve("ASN1_item_i2d_fp");
+ K_NETSCAPE_X509_it = (ASN1_ITEM *) d->cryptoLib->resolve("NETSCAPE_X509_it");
+ K_X509_print_fp = (int (*)(FILE *, X509 *)) d->cryptoLib->resolve("X509_print_fp");
+ K_i2d_PKCS12 = (int (*)(PKCS12 *, unsigned char **)) d->cryptoLib->resolve("i2d_PKCS12");
+ K_i2d_PKCS12_fp = (int (*)(FILE *, PKCS12 *)) d->cryptoLib->resolve("i2d_PKCS12_fp");
+ K_PKCS12_newpass = (int (*)(PKCS12 *, char *, char *)) d->cryptoLib->resolve("PKCS12_newpass");
+ K_d2i_PKCS12_fp = (PKCS12 * (*)(FILE *, PKCS12 **)) d->cryptoLib->resolve("d2i_PKCS12_fp");
+ K_PKCS12_new = (PKCS12 * (*)()) d->cryptoLib->resolve("PKCS12_new");
+ K_PKCS12_free = (void (*)(PKCS12 *)) d->cryptoLib->resolve("PKCS12_free");
K_PKCS12_parse = (int (*)(PKCS12 *, const char *, EVP_PKEY **,
- X509 **, STACK_OF(X509) **)) d->cryptoLib->resolveFunction("PKCS12_parse");
- K_EVP_PKEY_free = (void (*)(EVP_PKEY *)) d->cryptoLib->resolveFunction("EVP_PKEY_free");
- K_EVP_PKEY_new = (EVP_PKEY * (*)()) d->cryptoLib->resolveFunction("EVP_PKEY_new");
- K_X509_REQ_free = (void (*)(X509_REQ *)) d->cryptoLib->resolveFunction("X509_REQ_free");
- K_X509_REQ_new = (X509_REQ * (*)()) d->cryptoLib->resolveFunction("X509_REQ_new");
- K_X509_STORE_CTX_set_chain = (void (*)(X509_STORE_CTX *, STACK_OF(X509) *)) d->cryptoLib->resolveFunction("X509_STORE_CTX_set_chain");
- K_X509_STORE_CTX_set_purpose = (void (*)(X509_STORE_CTX *, int)) d->cryptoLib->resolveFunction("X509_STORE_CTX_set_purpose");
- K_sk_free = (void (*)(STACK *)) d->cryptoLib->resolveFunction("sk_free");
- K_sk_num = (int (*)(STACK *)) d->cryptoLib->resolveFunction("sk_num");
- K_sk_pop = (char *(*)(STACK *)) d->cryptoLib->resolveFunction("sk_pop");
- K_sk_value = (char *(*)(STACK *, int)) d->cryptoLib->resolveFunction("sk_value");
- K_sk_new = (STACK * (*)(int (*)())) d->cryptoLib->resolveFunction("sk_new");
- K_sk_push = (int (*)(STACK *, char *)) d->cryptoLib->resolveFunction("sk_push");
- K_sk_dup = (STACK * (*)(STACK *)) d->cryptoLib->resolveFunction("sk_dup");
- K_i2s_ASN1_INTEGER = (char *(*)(X509V3_EXT_METHOD *, ASN1_INTEGER *)) d->cryptoLib->resolveFunction("i2s_ASN1_INTEGER");
- K_X509_get_serialNumber = (ASN1_INTEGER * (*)(X509 *)) d->cryptoLib->resolveFunction("X509_get_serialNumber");
- K_X509_get_pubkey = (EVP_PKEY * (*)(X509 *)) d->cryptoLib->resolveFunction("X509_get_pubkey");
- K_i2d_PublicKey = (int (*)(EVP_PKEY *, unsigned char **)) d->cryptoLib->resolveFunction("i2d_PublicKey");
- K_X509_check_private_key = (int (*)(X509 *, EVP_PKEY *)) d->cryptoLib->resolveFunction("X509_check_private_key");
- K_BN_bn2hex = (char *(*)(const BIGNUM *)) d->cryptoLib->resolveFunction("BN_bn2hex");
- K_X509_digest = (int (*)(const X509 *, const EVP_MD *, unsigned char *, unsigned int *)) d->cryptoLib->resolveFunction("X509_digest");
- K_EVP_md5 = (EVP_MD * (*)()) d->cryptoLib->resolveFunction("EVP_md5");
- K_ASN1_INTEGER_free = (void (*)(ASN1_INTEGER *)) d->cryptoLib->resolveFunction("ASN1_INTEGER_free");
- K_OBJ_obj2nid = (int (*)(ASN1_OBJECT *)) d->cryptoLib->resolveFunction("OBJ_obj2nid");
- K_OBJ_nid2ln = (const char *(*)(int)) d->cryptoLib->resolveFunction("OBJ_nid2ln");
- K_X509_get_ext_count = (int (*)(X509 *)) d->cryptoLib->resolveFunction("X509_get_ext_count");
- K_X509_get_ext_by_NID = (int (*)(X509 *, int, int)) d->cryptoLib->resolveFunction("X509_get_ext_by_NID");
- K_X509_get_ext_by_OBJ = (int (*)(X509 *, ASN1_OBJECT *, int)) d->cryptoLib->resolveFunction("X509_get_ext_by_OBJ");
- K_X509_get_ext = (X509_EXTENSION * (*)(X509 *, int)) d->cryptoLib->resolveFunction("X509_get_ext");
- K_X509_delete_ext = (X509_EXTENSION * (*)(X509 *, int)) d->cryptoLib->resolveFunction("X509_delete_ext");
- K_X509_add_ext = (int (*)(X509 *, X509_EXTENSION *, int)) d->cryptoLib->resolveFunction("X509_add_ext");
- K_X509_get_ext_d2i = (void *(*)(X509 *, int, int *, int *)) d->cryptoLib->resolveFunction("X509_get_ext_d2i");
- K_i2s_ASN1_OCTET_STRING = (char *(*)(X509V3_EXT_METHOD *, ASN1_OCTET_STRING *)) d->cryptoLib->resolveFunction("i2s_ASN1_OCTET_STRING");
- K_ASN1_BIT_STRING_get_bit = (int (*)(ASN1_BIT_STRING *, int)) d->cryptoLib->resolveFunction("ASN1_BIT_STRING_get_bit");
- K_PKCS7_new = (PKCS7 * (*)()) d->cryptoLib->resolveFunction("PKCS7_new");
- K_PKCS7_free = (void (*)(PKCS7 *)) d->cryptoLib->resolveFunction("PKCS7_free");
- K_PKCS7_content_free = (void (*)(PKCS7 *)) d->cryptoLib->resolveFunction("PKCS7_content_free");
- K_i2d_PKCS7 = (int (*)(PKCS7 *, unsigned char **)) d->cryptoLib->resolveFunction("i2d_PKCS7");
- K_i2d_PKCS7_fp = (int (*)(FILE *, PKCS7 *)) d->cryptoLib->resolveFunction("i2d_PKCS7_fp");
- K_i2d_PKCS7_bio = (int (*)(BIO * bp, PKCS7 * p7)) d->cryptoLib->resolveFunction("i2d_PKCS7_bio");
- K_d2i_PKCS7 = (PKCS7 * (*)(PKCS7 **, unsigned char **, long)) d->cryptoLib->resolveFunction("d2i_PKCS7");
- K_d2i_PKCS7_fp = (PKCS7 * (*)(FILE *, PKCS7 **)) d->cryptoLib->resolveFunction("d2i_PKCS7_fp");
- K_d2i_PKCS7_bio = (PKCS7 * (*)(BIO * bp, PKCS7 **p7)) d->cryptoLib->resolveFunction("d2i_PKCS7_bio");
- K_PKCS7_dup = (PKCS7 * (*)(PKCS7 *)) d->cryptoLib->resolveFunction("PKCS7_dup");
- K_PKCS7_sign = (PKCS7 * (*)(X509 *, EVP_PKEY *, STACK_OF(X509) *, BIO *, int)) d->cryptoLib->resolveFunction("PKCS7_sign");
- K_PKCS7_verify = (int (*)(PKCS7 *, STACK_OF(X509) *, X509_STORE *, BIO *, BIO *, int)) d->cryptoLib->resolveFunction("PKCS7_verify");
- K_PKCS7_get0_signers = (STACK_OF(X509) * (*)(PKCS7 *, STACK_OF(X509) *, int)) d->cryptoLib->resolveFunction("PKCS7_get0_signers");
- K_PKCS7_encrypt = (PKCS7 * (*)(STACK_OF(X509) *, BIO *, EVP_CIPHER *, int)) d->cryptoLib->resolveFunction("PKCS7_encrypt");
- K_PKCS7_decrypt = (int (*)(PKCS7 *, EVP_PKEY *, X509 *, BIO *, int)) d->cryptoLib->resolveFunction("PKCS7_decrypt");
- K_PEM_X509_INFO_read = (STACK_OF(X509_INFO) * (*)(FILE *, STACK_OF(X509_INFO) *, pem_password_cb *, void *)) d->cryptoLib->resolveFunction("PEM_X509_INFO_read");
- K_ASN1_d2i_fp = (char *(*)(char *(*)(), char *(*)(), FILE *, unsigned char **)) d->cryptoLib->resolveFunction("ASN1_d2i_fp");
- K_X509_new = (X509 * (*)()) d->cryptoLib->resolveFunction("X509_new");
- K_X509_PURPOSE_get_count = (int (*)()) d->cryptoLib->resolveFunction("X509_PURPOSE_get_count");
- K_X509_PURPOSE_get_id = (int (*)(X509_PURPOSE *)) d->cryptoLib->resolveFunction("X509_PURPOSE_get_id");
- K_X509_check_purpose = (int (*)(X509 *, int, int)) d->cryptoLib->resolveFunction("X509_check_purpose");
- K_X509_PURPOSE_get0 = (X509_PURPOSE * (*)(int)) d->cryptoLib->resolveFunction("X509_PURPOSE_get0");
- K_EVP_PKEY_assign = (int (*)(EVP_PKEY *, int, char *)) d->cryptoLib->resolveFunction("EVP_PKEY_assign");
- K_X509_REQ_set_pubkey = (int (*)(X509_REQ *, EVP_PKEY *)) d->cryptoLib->resolveFunction("X509_REQ_set_pubkey");
- K_RSA_generate_key = (RSA * (*)(int, unsigned long, void (*)(int, int, void *), void *)) d->cryptoLib->resolveFunction("RSA_generate_key");
- K_i2d_X509_REQ_fp = (int (*)(FILE *, X509_REQ *)) d->cryptoLib->resolveFunction("i2d_X509_REQ_fp");
- K_ERR_clear_error = (void (*)()) d->cryptoLib->resolveFunction("ERR_clear_error");
- K_ERR_get_error = (unsigned long(*)()) d->cryptoLib->resolveFunction("ERR_get_error");
- K_ERR_print_errors_fp = (void (*)(FILE *)) d->cryptoLib->resolveFunction("ERR_print_errors_fp");
- K_X509_get1_email = (STACK * (*)(X509 * x)) d->cryptoLib->resolveFunction("X509_get1_email");
- K_X509_email_free = (void (*)(STACK * sk)) d->cryptoLib->resolveFunction("X509_email_free");
- K_EVP_des_ede3_cbc = (EVP_CIPHER * (*)()) d->cryptoLib->resolveFunction("EVP_des_ede3_cbc");
- K_EVP_des_cbc = (EVP_CIPHER * (*)()) d->cryptoLib->resolveFunction("EVP_des_cbc");
- K_EVP_rc2_cbc = (EVP_CIPHER * (*)()) d->cryptoLib->resolveFunction("EVP_rc2_cbc");
- K_EVP_rc2_64_cbc = (EVP_CIPHER * (*)()) d->cryptoLib->resolveFunction("EVP_rc2_64_cbc");
- K_EVP_rc2_40_cbc = (EVP_CIPHER * (*)()) d->cryptoLib->resolveFunction("EVP_rc2_40_cbc");
- K_i2d_PrivateKey_fp = (int (*)(FILE *, EVP_PKEY *)) d->cryptoLib->resolveFunction("i2d_PrivateKey_fp");
- K_i2d_PKCS8PrivateKey_fp = (int (*)(FILE *, EVP_PKEY *, const EVP_CIPHER *, char *, int, pem_password_cb *, void *)) d->cryptoLib->resolveFunction("i2d_PKCS8PrivateKey_fp");
- K_RSA_free = (void (*)(RSA *)) d->cryptoLib->resolveFunction("RSA_free");
- K_EVP_bf_cbc = (EVP_CIPHER * (*)()) d->cryptoLib->resolveFunction("EVP_bf_cbc");
- K_X509_REQ_sign = (int (*)(X509_REQ *, EVP_PKEY *, const EVP_MD *)) d->cryptoLib->resolveFunction("X509_REQ_sign");
- K_X509_NAME_add_entry_by_txt = (int (*)(X509_NAME *, char *, int, unsigned char *, int, int, int)) d->cryptoLib->resolveFunction("X509_NAME_add_entry_by_txt");
- K_X509_NAME_new = (X509_NAME * (*)()) d->cryptoLib->resolveFunction("X509_NAME_new");
- K_X509_REQ_set_subject_name = (int (*)(X509_REQ *, X509_NAME *)) d->cryptoLib->resolveFunction("X509_REQ_set_subject_name");
- K_ASN1_STRING_data = (unsigned char *(*)(ASN1_STRING *)) d->cryptoLib->resolveFunction("ASN1_STRING_data");
- K_ASN1_STRING_length = (int (*)(ASN1_STRING *)) d->cryptoLib->resolveFunction("ASN1_STRING_length");
+ X509 **, STACK_OF(X509) **)) d->cryptoLib->resolve("PKCS12_parse");
+ K_EVP_PKEY_free = (void (*)(EVP_PKEY *)) d->cryptoLib->resolve("EVP_PKEY_free");
+ K_EVP_PKEY_new = (EVP_PKEY * (*)()) d->cryptoLib->resolve("EVP_PKEY_new");
+ K_X509_REQ_free = (void (*)(X509_REQ *)) d->cryptoLib->resolve("X509_REQ_free");
+ K_X509_REQ_new = (X509_REQ * (*)()) d->cryptoLib->resolve("X509_REQ_new");
+ K_X509_STORE_CTX_set_chain = (void (*)(X509_STORE_CTX *, STACK_OF(X509) *)) d->cryptoLib->resolve("X509_STORE_CTX_set_chain");
+ K_X509_STORE_CTX_set_purpose = (void (*)(X509_STORE_CTX *, int)) d->cryptoLib->resolve("X509_STORE_CTX_set_purpose");
+ K_sk_free = (void (*)(STACK *)) d->cryptoLib->resolve("sk_free");
+ K_sk_num = (int (*)(STACK *)) d->cryptoLib->resolve("sk_num");
+ K_sk_pop = (char *(*)(STACK *)) d->cryptoLib->resolve("sk_pop");
+ K_sk_value = (char *(*)(STACK *, int)) d->cryptoLib->resolve("sk_value");
+ K_sk_new = (STACK * (*)(int (*)())) d->cryptoLib->resolve("sk_new");
+ K_sk_push = (int (*)(STACK *, char *)) d->cryptoLib->resolve("sk_push");
+ K_sk_dup = (STACK * (*)(STACK *)) d->cryptoLib->resolve("sk_dup");
+ K_i2s_ASN1_INTEGER = (char *(*)(X509V3_EXT_METHOD *, ASN1_INTEGER *)) d->cryptoLib->resolve("i2s_ASN1_INTEGER");
+ K_X509_get_serialNumber = (ASN1_INTEGER * (*)(X509 *)) d->cryptoLib->resolve("X509_get_serialNumber");
+ K_X509_get_pubkey = (EVP_PKEY * (*)(X509 *)) d->cryptoLib->resolve("X509_get_pubkey");
+ K_i2d_PublicKey = (int (*)(EVP_PKEY *, unsigned char **)) d->cryptoLib->resolve("i2d_PublicKey");
+ K_X509_check_private_key = (int (*)(X509 *, EVP_PKEY *)) d->cryptoLib->resolve("X509_check_private_key");
+ K_BN_bn2hex = (char *(*)(const BIGNUM *)) d->cryptoLib->resolve("BN_bn2hex");
+ K_X509_digest = (int (*)(const X509 *, const EVP_MD *, unsigned char *, unsigned int *)) d->cryptoLib->resolve("X509_digest");
+ K_EVP_md5 = (EVP_MD * (*)()) d->cryptoLib->resolve("EVP_md5");
+ K_ASN1_INTEGER_free = (void (*)(ASN1_INTEGER *)) d->cryptoLib->resolve("ASN1_INTEGER_free");
+ K_OBJ_obj2nid = (int (*)(ASN1_OBJECT *)) d->cryptoLib->resolve("OBJ_obj2nid");
+ K_OBJ_nid2ln = (const char *(*)(int)) d->cryptoLib->resolve("OBJ_nid2ln");
+ K_X509_get_ext_count = (int (*)(X509 *)) d->cryptoLib->resolve("X509_get_ext_count");
+ K_X509_get_ext_by_NID = (int (*)(X509 *, int, int)) d->cryptoLib->resolve("X509_get_ext_by_NID");
+ K_X509_get_ext_by_OBJ = (int (*)(X509 *, ASN1_OBJECT *, int)) d->cryptoLib->resolve("X509_get_ext_by_OBJ");
+ K_X509_get_ext = (X509_EXTENSION * (*)(X509 *, int)) d->cryptoLib->resolve("X509_get_ext");
+ K_X509_delete_ext = (X509_EXTENSION * (*)(X509 *, int)) d->cryptoLib->resolve("X509_delete_ext");
+ K_X509_add_ext = (int (*)(X509 *, X509_EXTENSION *, int)) d->cryptoLib->resolve("X509_add_ext");
+ K_X509_get_ext_d2i = (void *(*)(X509 *, int, int *, int *)) d->cryptoLib->resolve("X509_get_ext_d2i");
+ K_i2s_ASN1_OCTET_STRING = (char *(*)(X509V3_EXT_METHOD *, ASN1_OCTET_STRING *)) d->cryptoLib->resolve("i2s_ASN1_OCTET_STRING");
+ K_ASN1_BIT_STRING_get_bit = (int (*)(ASN1_BIT_STRING *, int)) d->cryptoLib->resolve("ASN1_BIT_STRING_get_bit");
+ K_PKCS7_new = (PKCS7 * (*)()) d->cryptoLib->resolve("PKCS7_new");
+ K_PKCS7_free = (void (*)(PKCS7 *)) d->cryptoLib->resolve("PKCS7_free");
+ K_PKCS7_content_free = (void (*)(PKCS7 *)) d->cryptoLib->resolve("PKCS7_content_free");
+ K_i2d_PKCS7 = (int (*)(PKCS7 *, unsigned char **)) d->cryptoLib->resolve("i2d_PKCS7");
+ K_i2d_PKCS7_fp = (int (*)(FILE *, PKCS7 *)) d->cryptoLib->resolve("i2d_PKCS7_fp");
+ K_i2d_PKCS7_bio = (int (*)(BIO * bp, PKCS7 * p7)) d->cryptoLib->resolve("i2d_PKCS7_bio");
+ K_d2i_PKCS7 = (PKCS7 * (*)(PKCS7 **, unsigned char **, long)) d->cryptoLib->resolve("d2i_PKCS7");
+ K_d2i_PKCS7_fp = (PKCS7 * (*)(FILE *, PKCS7 **)) d->cryptoLib->resolve("d2i_PKCS7_fp");
+ K_d2i_PKCS7_bio = (PKCS7 * (*)(BIO * bp, PKCS7 **p7)) d->cryptoLib->resolve("d2i_PKCS7_bio");
+ K_PKCS7_dup = (PKCS7 * (*)(PKCS7 *)) d->cryptoLib->resolve("PKCS7_dup");
+ K_PKCS7_sign = (PKCS7 * (*)(X509 *, EVP_PKEY *, STACK_OF(X509) *, BIO *, int)) d->cryptoLib->resolve("PKCS7_sign");
+ K_PKCS7_verify = (int (*)(PKCS7 *, STACK_OF(X509) *, X509_STORE *, BIO *, BIO *, int)) d->cryptoLib->resolve("PKCS7_verify");
+ K_PKCS7_get0_signers = (STACK_OF(X509) * (*)(PKCS7 *, STACK_OF(X509) *, int)) d->cryptoLib->resolve("PKCS7_get0_signers");
+ K_PKCS7_encrypt = (PKCS7 * (*)(STACK_OF(X509) *, BIO *, EVP_CIPHER *, int)) d->cryptoLib->resolve("PKCS7_encrypt");
+ K_PKCS7_decrypt = (int (*)(PKCS7 *, EVP_PKEY *, X509 *, BIO *, int)) d->cryptoLib->resolve("PKCS7_decrypt");
+ K_PEM_X509_INFO_read = (STACK_OF(X509_INFO) * (*)(FILE *, STACK_OF(X509_INFO) *, pem_password_cb *, void *)) d->cryptoLib->resolve("PEM_X509_INFO_read");
+ K_ASN1_d2i_fp = (char *(*)(char *(*)(), char *(*)(), FILE *, unsigned char **)) d->cryptoLib->resolve("ASN1_d2i_fp");
+ K_X509_new = (X509 * (*)()) d->cryptoLib->resolve("X509_new");
+ K_X509_PURPOSE_get_count = (int (*)()) d->cryptoLib->resolve("X509_PURPOSE_get_count");
+ K_X509_PURPOSE_get_id = (int (*)(X509_PURPOSE *)) d->cryptoLib->resolve("X509_PURPOSE_get_id");
+ K_X509_check_purpose = (int (*)(X509 *, int, int)) d->cryptoLib->resolve("X509_check_purpose");
+ K_X509_PURPOSE_get0 = (X509_PURPOSE * (*)(int)) d->cryptoLib->resolve("X509_PURPOSE_get0");
+ K_EVP_PKEY_assign = (int (*)(EVP_PKEY *, int, char *)) d->cryptoLib->resolve("EVP_PKEY_assign");
+ K_X509_REQ_set_pubkey = (int (*)(X509_REQ *, EVP_PKEY *)) d->cryptoLib->resolve("X509_REQ_set_pubkey");
+ K_RSA_generate_key = (RSA * (*)(int, unsigned long, void (*)(int, int, void *), void *)) d->cryptoLib->resolve("RSA_generate_key");
+ K_i2d_X509_REQ_fp = (int (*)(FILE *, X509_REQ *)) d->cryptoLib->resolve("i2d_X509_REQ_fp");
+ K_ERR_clear_error = (void (*)()) d->cryptoLib->resolve("ERR_clear_error");
+ K_ERR_get_error = (unsigned long(*)()) d->cryptoLib->resolve("ERR_get_error");
+ K_ERR_print_errors_fp = (void (*)(FILE *)) d->cryptoLib->resolve("ERR_print_errors_fp");
+ K_X509_get1_email = (STACK * (*)(X509 * x)) d->cryptoLib->resolve("X509_get1_email");
+ K_X509_email_free = (void (*)(STACK * sk)) d->cryptoLib->resolve("X509_email_free");
+ K_EVP_des_ede3_cbc = (EVP_CIPHER * (*)()) d->cryptoLib->resolve("EVP_des_ede3_cbc");
+ K_EVP_des_cbc = (EVP_CIPHER * (*)()) d->cryptoLib->resolve("EVP_des_cbc");
+ K_EVP_rc2_cbc = (EVP_CIPHER * (*)()) d->cryptoLib->resolve("EVP_rc2_cbc");
+ K_EVP_rc2_64_cbc = (EVP_CIPHER * (*)()) d->cryptoLib->resolve("EVP_rc2_64_cbc");
+ K_EVP_rc2_40_cbc = (EVP_CIPHER * (*)()) d->cryptoLib->resolve("EVP_rc2_40_cbc");
+ K_i2d_PrivateKey_fp = (int (*)(FILE *, EVP_PKEY *)) d->cryptoLib->resolve("i2d_PrivateKey_fp");
+ K_i2d_PKCS8PrivateKey_fp = (int (*)(FILE *, EVP_PKEY *, const EVP_CIPHER *, char *, int, pem_password_cb *, void *)) d->cryptoLib->resolve("i2d_PKCS8PrivateKey_fp");
+ K_RSA_free = (void (*)(RSA *)) d->cryptoLib->resolve("RSA_free");
+ K_EVP_bf_cbc = (EVP_CIPHER * (*)()) d->cryptoLib->resolve("EVP_bf_cbc");
+ K_X509_REQ_sign = (int (*)(X509_REQ *, EVP_PKEY *, const EVP_MD *)) d->cryptoLib->resolve("X509_REQ_sign");
+ K_X509_NAME_add_entry_by_txt = (int (*)(X509_NAME *, char *, int, unsigned char *, int, int, int)) d->cryptoLib->resolve("X509_NAME_add_entry_by_txt");
+ K_X509_NAME_new = (X509_NAME * (*)()) d->cryptoLib->resolve("X509_NAME_new");
+ K_X509_REQ_set_subject_name = (int (*)(X509_REQ *, X509_NAME *)) d->cryptoLib->resolve("X509_REQ_set_subject_name");
+ K_ASN1_STRING_data = (unsigned char *(*)(ASN1_STRING *)) d->cryptoLib->resolve("ASN1_STRING_data");
+ K_ASN1_STRING_length = (int (*)(ASN1_STRING *)) d->cryptoLib->resolve("ASN1_STRING_length");
#endif
}
#ifdef Q_OS_WIN
- d->sslLib = new KLibrary("ssleay32.dll");
+ d->sslLib = new QLibrary("ssleay32.dll");
if (!d->sslLib->load()) {
delete d->sslLib;
d->sslLib = 0;
@@ -543,7 +543,7 @@
{
QString libname = findMostRecentLib("/usr/lib", "ssl");
if (!libname.isNull()) {
- d->sslLib = new KLibrary(libname);
+ d->sslLib = new QLibrary(libname);
d->sslLib->setLoadHints(QLibrary::ExportExternalSymbolsHint);
if (!d->sslLib->load()) {
delete d->sslLib;
@@ -566,7 +566,7 @@
QString tmpStr(alib);
tmpStr.remove(QRegExp("\\(.*\\)"));
if (QFile(tmpStr).isReadable()) {
- d->sslLib = new KLibrary(alib);
+ d->sslLib = new QLibrary(alib);
d->sslLib->setLoadHints(QLibrary::ExportExternalSymbolsHint);
}
if (d->sslLib && d->sslLib->load()) {
@@ -585,88 +585,88 @@
if (d->sslLib) {
#if KSSL_HAVE_SSL
// stand back from your monitor and look at this. it's fun! :)
- K_SSL_connect = (int (*)(SSL *)) d->sslLib->resolveFunction("SSL_connect");
- K_SSL_accept = (int (*)(SSL *)) d->sslLib->resolveFunction("SSL_accept");
- K_SSL_read = (int (*)(SSL *, void *, int)) d->sslLib->resolveFunction("SSL_read");
+ K_SSL_connect = (int (*)(SSL *)) d->sslLib->resolve("SSL_connect");
+ K_SSL_accept = (int (*)(SSL *)) d->sslLib->resolve("SSL_accept");
+ K_SSL_read = (int (*)(SSL *, void *, int)) d->sslLib->resolve("SSL_read");
K_SSL_write = (int (*)(SSL *, const void *, int))
- d->sslLib->resolveFunction("SSL_write");
- K_SSL_new = (SSL * (*)(SSL_CTX *)) d->sslLib->resolveFunction("SSL_new");
- K_SSL_free = (void (*)(SSL *)) d->sslLib->resolveFunction("SSL_free");
- K_SSL_shutdown = (int (*)(SSL *)) d->sslLib->resolveFunction("SSL_shutdown");
- K_SSL_CTX_new = (SSL_CTX * (*)(SSL_METHOD *)) d->sslLib->resolveFunction("SSL_CTX_new");
- K_SSL_CTX_free = (void (*)(SSL_CTX *)) d->sslLib->resolveFunction("SSL_CTX_free");
- K_SSL_set_fd = (int (*)(SSL *, int)) d->sslLib->resolveFunction("SSL_set_fd");
- K_SSL_pending = (int (*)(SSL *)) d->sslLib->resolveFunction("SSL_pending");
+ d->sslLib->resolve("SSL_write");
+ K_SSL_new = (SSL * (*)(SSL_CTX *)) d->sslLib->resolve("SSL_new");
+ K_SSL_free = (void (*)(SSL *)) d->sslLib->resolve("SSL_free");
+ K_SSL_shutdown = (int (*)(SSL *)) d->sslLib->resolve("SSL_shutdown");
+ K_SSL_CTX_new = (SSL_CTX * (*)(SSL_METHOD *)) d->sslLib->resolve("SSL_CTX_new");
+ K_SSL_CTX_free = (void (*)(SSL_CTX *)) d->sslLib->resolve("SSL_CTX_free");
+ K_SSL_set_fd = (int (*)(SSL *, int)) d->sslLib->resolve("SSL_set_fd");
+ K_SSL_pending = (int (*)(SSL *)) d->sslLib->resolve("SSL_pending");
K_SSL_CTX_set_cipher_list = (int (*)(SSL_CTX *, const char *))
- d->sslLib->resolveFunction("SSL_CTX_set_cipher_list");
- K_SSL_CTX_set_verify = (void (*)(SSL_CTX *, int, int (*)(int, X509_STORE_CTX *))) d->sslLib->resolveFunction("SSL_CTX_set_verify");
+ d->sslLib->resolve("SSL_CTX_set_cipher_list");
+ K_SSL_CTX_set_verify = (void (*)(SSL_CTX *, int, int (*)(int, X509_STORE_CTX *))) d->sslLib->resolve("SSL_CTX_set_verify");
K_SSL_use_certificate = (int (*)(SSL *, X509 *))
- d->sslLib->resolveFunction("SSL_CTX_use_certificate");
+ d->sslLib->resolve("SSL_CTX_use_certificate");
K_SSL_get_current_cipher = (SSL_CIPHER * (*)(SSL *))
- d->sslLib->resolveFunction("SSL_get_current_cipher");
+ d->sslLib->resolve("SSL_get_current_cipher");
K_SSL_ctrl = (long(*)(SSL *, int, long, char *))
- d->sslLib->resolveFunction("SSL_ctrl");
- K_TLSv1_client_method = (SSL_METHOD * (*)()) d->sslLib->resolveFunction("TLSv1_client_method");
- K_SSLv23_client_method = (SSL_METHOD * (*)()) d->sslLib->resolveFunction("SSLv23_client_method");
- K_SSL_get_peer_certificate = (X509 * (*)(SSL *)) d->sslLib->resolveFunction("SSL_get_peer_certificate");
- K_SSL_CIPHER_get_bits = (int (*)(SSL_CIPHER *, int *)) d->sslLib->resolveFunction("SSL_CIPHER_get_bits");
- K_SSL_CIPHER_get_version = (char *(*)(SSL_CIPHER *)) d->sslLib->resolveFunction("SSL_CIPHER_get_version");
- K_SSL_CIPHER_get_name = (const char *(*)(SSL_CIPHER *)) d->sslLib->resolveFunction("SSL_CIPHER_get_name");
- K_SSL_CIPHER_description = (char *(*)(SSL_CIPHER *, char *, int)) d->sslLib->resolveFunction("SSL_CIPHER_description");
- K_SSL_CTX_use_PrivateKey = (int (*)(SSL_CTX *, EVP_PKEY *)) d->sslLib->resolveFunction("SSL_CTX_use_PrivateKey");
- K_SSL_CTX_use_certificate = (int (*)(SSL_CTX *, X509 *)) d->sslLib->resolveFunction("SSL_CTX_use_certificate");
- K_SSL_get_error = (int (*)(SSL *, int)) d->sslLib->resolveFunction("SSL_get_error");
- K_SSL_get_peer_cert_chain = (STACK_OF(X509) * (*)(SSL *)) d->sslLib->resolveFunction("SSL_get_peer_cert_chain");
- K_SSL_load_client_CA_file = (STACK_OF(X509_NAME) * (*)(const char *)) d->sslLib->resolveFunction("SSL_load_client_CA_file");
- K_SSL_peek = (int (*)(SSL *, void *, int)) d->sslLib->resolveFunction("SSL_peek");
- K_SSL_get1_session = (SSL_SESSION * (*)(SSL *)) d->sslLib->resolveFunction("SSL_get1_session");
- K_SSL_SESSION_free = (void (*)(SSL_SESSION *)) d->sslLib->resolveFunction("SSL_SESSION_free");
- K_SSL_set_session = (int (*)(SSL *, SSL_SESSION *)) d->sslLib->resolveFunction("SSL_set_session");
- K_d2i_SSL_SESSION = (SSL_SESSION * (*)(SSL_SESSION **, unsigned char **, long)) d->sslLib->resolveFunction("d2i_SSL_SESSION");
- K_i2d_SSL_SESSION = (int (*)(SSL_SESSION *, unsigned char **)) d->sslLib->resolveFunction("i2d_SSL_SESSION");
- K_SSL_get_ciphers = (STACK_OF(SSL_CIPHER) * (*)(const SSL *)) d->sslLib->resolveFunction("SSL_get_ciphers");
+ d->sslLib->resolve("SSL_ctrl");
+ K_TLSv1_client_method = (SSL_METHOD * (*)()) d->sslLib->resolve("TLSv1_client_method");
+ K_SSLv23_client_method = (SSL_METHOD * (*)()) d->sslLib->resolve("SSLv23_client_method");
+ K_SSL_get_peer_certificate = (X509 * (*)(SSL *)) d->sslLib->resolve("SSL_get_peer_certificate");
+ K_SSL_CIPHER_get_bits = (int (*)(SSL_CIPHER *, int *)) d->sslLib->resolve("SSL_CIPHER_get_bits");
+ K_SSL_CIPHER_get_version = (char *(*)(SSL_CIPHER *)) d->sslLib->resolve("SSL_CIPHER_get_version");
+ K_SSL_CIPHER_get_name = (const char *(*)(SSL_CIPHER *)) d->sslLib->resolve("SSL_CIPHER_get_name");
+ K_SSL_CIPHER_description = (char *(*)(SSL_CIPHER *, char *, int)) d->sslLib->resolve("SSL_CIPHER_description");
+ K_SSL_CTX_use_PrivateKey = (int (*)(SSL_CTX *, EVP_PKEY *)) d->sslLib->resolve("SSL_CTX_use_PrivateKey");
+ K_SSL_CTX_use_certificate = (int (*)(SSL_CTX *, X509 *)) d->sslLib->resolve("SSL_CTX_use_certificate");
+ K_SSL_get_error = (int (*)(SSL *, int)) d->sslLib->resolve("SSL_get_error");
+ K_SSL_get_peer_cert_chain = (STACK_OF(X509) * (*)(SSL *)) d->sslLib->resolve("SSL_get_peer_cert_chain");
+ K_SSL_load_client_CA_file = (STACK_OF(X509_NAME) * (*)(const char *)) d->sslLib->resolve("SSL_load_client_CA_file");
+ K_SSL_peek = (int (*)(SSL *, void *, int)) d->sslLib->resolve("SSL_peek");
+ K_SSL_get1_session = (SSL_SESSION * (*)(SSL *)) d->sslLib->resolve("SSL_get1_session");
+ K_SSL_SESSION_free = (void (*)(SSL_SESSION *)) d->sslLib->resolve("SSL_SESSION_free");
+ K_SSL_set_session = (int (*)(SSL *, SSL_SESSION *)) d->sslLib->resolve("SSL_set_session");
+ K_d2i_SSL_SESSION = (SSL_SESSION * (*)(SSL_SESSION **, unsigned char **, long)) d->sslLib->resolve("d2i_SSL_SESSION");
+ K_i2d_SSL_SESSION = (int (*)(SSL_SESSION *, unsigned char **)) d->sslLib->resolve("i2d_SSL_SESSION");
+ K_SSL_get_ciphers = (STACK_OF(SSL_CIPHER) * (*)(const SSL *)) d->sslLib->resolve("SSL_get_ciphers");
#endif
// Initialize the library (once only!)
- KLibrary::void_function_ptr x;
- x = d->sslLib->resolveFunction("SSL_library_init");
+ QFunctionPointer x;
+ x = d->sslLib->resolve("SSL_library_init");
if (d->cryptoLib) {
if (x) {
((int (*)())x)();
}
- x = d->cryptoLib->resolveFunction("OpenSSL_add_all_algorithms");
+ x = d->cryptoLib->resolve("OpenSSL_add_all_algorithms");
if (!x) {
- x = d->cryptoLib->resolveFunction("OPENSSL_add_all_algorithms");
+ x = d->cryptoLib->resolve("OPENSSL_add_all_algorithms");
}
if (x) {
((void (*)())x)();
} else {
- x = d->cryptoLib->resolveFunction("OpenSSL_add_all_algorithms_conf");
+ x = d->cryptoLib->resolve("OpenSSL_add_all_algorithms_conf");
if (!x) {
- x = d->cryptoLib->resolveFunction("OPENSSL_add_all_algorithms_conf");
+ x = d->cryptoLib->resolve("OPENSSL_add_all_algorithms_conf");
}
if (x) {
((void (*)())x)();
} else {
- x = d->cryptoLib->resolveFunction("OpenSSL_add_all_algorithms_noconf");
+ x = d->cryptoLib->resolve("OpenSSL_add_all_algorithms_noconf");
if (!x) {
- x = d->cryptoLib->resolveFunction("OPENSSL_add_all_algorithms_noconf");
+ x = d->cryptoLib->resolve("OPENSSL_add_all_algorithms_noconf");
}
if (x) {
((void (*)())x)();
}
}
}
- x = d->cryptoLib->resolveFunction("OpenSSL_add_all_ciphers");
+ x = d->cryptoLib->resolve("OpenSSL_add_all_ciphers");
if (!x) {
- x = d->cryptoLib->resolveFunction("OPENSSL_add_all_ciphers");
+ x = d->cryptoLib->resolve("OPENSSL_add_all_ciphers");
}
if (x) {
((void (*)())x)();
}
- x = d->cryptoLib->resolveFunction("OpenSSL_add_all_digests");
+ x = d->cryptoLib->resolve("OpenSSL_add_all_digests");
if (!x) {
- x = d->cryptoLib->resolveFunction("OPENSSL_add_all_digests");
+ x = d->cryptoLib->resolve("OPENSSL_add_all_digests");
}
if (x) {
((void (*)())x)();
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/khtml-4.97.0/src/java/kjavaappletviewer.desktop new/khtml-4.98.0/src/java/kjavaappletviewer.desktop
--- old/khtml-4.97.0/src/java/kjavaappletviewer.desktop 2014-03-01 12:50:52.000000000 +0100
+++ new/khtml-4.98.0/src/java/kjavaappletviewer.desktop 2014-03-29 08:19:09.000000000 +0100
@@ -12,7 +12,7 @@
Name[br]=Lenner enframmet eus arloadigoù Java
Name[bs]=Ugrađeni prikazivač java Applet-a
Name[ca]=Visor de la miniaplicació Java incrustada
-Name[ca@valencia]=Visor de la miniaplicació Java encastada
+Name[ca@valencia]=Visor de la miniaplicació Java incrustada
Name[cs]=Zabudovaný prohlížeč Java appletů
Name[csb]=Wbùdowóny przezérnik apletów Java
Name[cy]=Gwelydd Rhaglennig Java Mewnadeiladedig
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/khtml-4.97.0/src/khtml.desktop new/khtml-4.98.0/src/khtml.desktop
--- old/khtml-4.97.0/src/khtml.desktop 2014-03-01 12:50:52.000000000 +0100
+++ new/khtml-4.98.0/src/khtml.desktop 2014-03-29 08:19:09.000000000 +0100
@@ -13,7 +13,7 @@
Comment[br]=Parzh HTML gweler enframmus
Comment[bs]=Ugnezdiva komponenta za prikaz HTML‑a
Comment[ca]=Component incrustable per a visualitzar HTML
-Comment[ca@valencia]=Component encastable per a visualitzar HTML
+Comment[ca@valencia]=Component incrustable per a visualitzar HTML
Comment[cs]=Komponenta pro zobrazování HTML
Comment[csb]=Kòmpònent do przezeraniô lopków HTML
Comment[cy]=Cydran gweld HTML mewnadeiladadwy
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/khtml-4.97.0/src/khtml_ext.cpp new/khtml-4.98.0/src/khtml_ext.cpp
--- old/khtml-4.97.0/src/khtml_ext.cpp 2014-03-01 12:50:52.000000000 +0100
+++ new/khtml-4.98.0/src/khtml_ext.cpp 2014-03-29 08:19:09.000000000 +0100
@@ -49,6 +49,7 @@
#include <assert.h>
#include <kconfiggroup.h>
+#include <ksharedconfig.h>
#include <QDebug>
#include <klocalizedstring.h>
#include <kjobuidelegate.h>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/khtml-4.97.0/src/khtml_part.cpp new/khtml-4.98.0/src/khtml_part.cpp
--- old/khtml-4.97.0/src/khtml_part.cpp 2014-03-01 12:50:52.000000000 +0100
+++ new/khtml-4.98.0/src/khtml_part.cpp 2014-03-29 08:19:09.000000000 +0100
@@ -139,6 +139,7 @@
#include "rendering/render_form.h"
#include <kwindowsystem.h>
#include <kconfiggroup.h>
+#include <ksharedconfig.h>
#ifdef KJS_DEBUGGER
#include "ecma/debugger/debugwindow.h"
@@ -679,8 +680,8 @@
}
DOM::HashChangeEventImpl *hashChangeEvImpl = 0;
- const QString &oldRef = q->url().fragment();
- const QString &newRef = url.fragment();
+ const QString &oldRef = q->url().fragment(QUrl::FullyEncoded);
+ const QString &newRef = url.fragment(QUrl::FullyEncoded);
if ((oldRef != newRef) || (oldRef.isNull() && newRef.isEmpty())) {
hashChangeEvImpl = new DOM::HashChangeEventImpl();
hashChangeEvImpl->initHashChangeEvent("hashchange",
@@ -692,7 +693,7 @@
}
if (!q->gotoAnchor(url.fragment(QUrl::FullyEncoded))) {
- q->gotoAnchor(url.fragment());
+ q->gotoAnchor(url.fragment(QUrl::FullyDecoded));
}
q->setUrl(url);
@@ -703,9 +704,8 @@
}
}
-bool KHTMLPart::openUrl(const QUrl &_url)
+bool KHTMLPart::openUrl(const QUrl &url)
{
- QUrl url(_url);
// qDebug() << this << "opening" << url;
#ifndef KHTML_NO_WALLET
@@ -815,7 +815,7 @@
emit started(0);
if (!gotoAnchor(url.fragment(QUrl::FullyEncoded))) {
- gotoAnchor(url.fragment());
+ gotoAnchor(url.fragment(QUrl::FullyDecoded));
}
d->m_bComplete = true;
@@ -950,8 +950,8 @@
// If this was an explicit reload and the user style sheet should be used,
// do a stat to see whether the stylesheet was changed in the meanwhile.
if (args.reload() && !settings()->userStyleSheet().isEmpty()) {
- QUrl url(settings()->userStyleSheet());
- KIO::StatJob *job = KIO::stat(url, KIO::HideProgressInfo);
+ QUrl userStyleSheetUrl(settings()->userStyleSheet());
+ KIO::StatJob *job = KIO::stat(userStyleSheetUrl, KIO::HideProgressInfo);
connect(job, SIGNAL(result(KJob*)),
this, SLOT(slotUserSheetStatDone(KJob*)));
}
@@ -1332,7 +1332,7 @@
{
QStringList args;
args << "khtml_java_js";
- KToolInvocation::kdeinitExec("kcmshell4", args);
+ KToolInvocation::kdeinitExec("kcmshell5", args);
}
QVariant KHTMLPart::executeScript(const QString &filename, int baseLine, const DOM::Node &n, const QString &script)
@@ -7281,8 +7281,8 @@
if (!d->m_doc || !d->m_doc->parsing()) {
disconnect(d->m_view, SIGNAL(finishedLayout()), this, SLOT(restoreScrollPosition()));
}
- if (!gotoAnchor(QUrl(url()).fragment())) {
- gotoAnchor(url().fragment());
+ if (!gotoAnchor(url().fragment(QUrl::FullyEncoded))) {
+ gotoAnchor(url().fragment(QUrl::FullyDecoded));
}
return;
}
@@ -7291,7 +7291,7 @@
// offsets. If the document has been fully loaded, force the new coordinates,
// even if the canvas is too short (can happen when user resizes the window
// during loading).
- if (d->m_view->contentsHeight() - d->m_view->visibleHeight() >= args.yOffset()
+ if ((d->m_view->contentsHeight() - d->m_view->visibleHeight()) >= args.yOffset()
|| d->m_bComplete) {
d->m_view->setContentsPos(args.xOffset(), args.yOffset());
disconnect(d->m_view, SIGNAL(finishedLayout()), this, SLOT(restoreScrollPosition()));
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/khtml-4.97.0/src/khtml_part.h new/khtml-4.98.0/src/khtml_part.h
--- old/khtml-4.97.0/src/khtml_part.h 2014-03-01 12:50:52.000000000 +0100
+++ new/khtml-4.98.0/src/khtml_part.h 2014-03-29 08:19:09.000000000 +0100
@@ -1190,8 +1190,8 @@
/**
* If form notification is on, this will be emitted either for a form
* submit or before the form submit according to the setting.
- * ### KDE4 remove me
*/
+ // TODO: remove/deprecate?
void formSubmitNotification(const char *action, const QString &url,
const QByteArray &formData, const QString &target,
const QString &contentType, const QString &boundary);
@@ -1376,9 +1376,9 @@
*/
void setCaretVisible(bool show);
- // ### KDE4 FIXME:
- // Remove this and make the one below protected+virtual slot.
- // Warning: this is effectively "internal". Be careful.
+ // ### FIXME:
+ // Remove this and make the one below protected+virtual slot.
+ // Warning: this is effectively "internal". Be careful.
void submitFormProxy(const char *action, const QString &url,
const QByteArray &formData,
const QString &target,
@@ -1720,13 +1720,13 @@
/**
* @internal
*/
- // ### KDE4 FIXME:
- // It is desirable to be able to filter form submissions as well.
- // For instance, forms can have a target and an inheriting class
- // might want to filter based on the target. Make this protected
- // and virtual, or provide a better solution.
- // See the web_module for the sidebar for an example where this is
- // necessary.
+ // ### FIXME:
+ // It is desirable to be able to filter form submissions as well.
+ // For instance, forms can have a target and an inheriting class
+ // might want to filter based on the target. Make this protected
+ // and virtual, or provide a better solution.
+ // See the web_module for the sidebar for an example where this is
+ // necessary.
void submitForm(const char *action, const QString &url, const QByteArray &formData,
const QString &target, const QString &contentType = QString(),
const QString &boundary = QString());
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/khtml-4.97.0/src/khtmlimage.desktop new/khtml-4.98.0/src/khtmlimage.desktop
--- old/khtml-4.97.0/src/khtmlimage.desktop 2014-03-01 12:50:52.000000000 +0100
+++ new/khtml-4.98.0/src/khtmlimage.desktop 2014-03-29 08:19:09.000000000 +0100
@@ -13,7 +13,7 @@
Comment[br]=Parzh skeudenn gweler enframmus
Comment[bs]=Ugnezdiva komponenta za prikaz slika
Comment[ca]=Component incrustable per a visualitzar imatges
-Comment[ca@valencia]=Component encastable per a visualitzar imatges
+Comment[ca@valencia]=Component incrustable per a visualitzar imatges
Comment[cs]=Komponenta pro zobrazování obrázků
Comment[csb]=Kòmpònent do przezeraniô òbrôzów
Comment[cy]=Cydran Gweld Delwedd Mewnadeiladadwy
@@ -109,7 +109,7 @@
Name[br]=Gweler Skeudennoù Enklozet
Name[bs]=Ugradivi prikazivač slika
Name[ca]=Visor incrustable d'imatges
-Name[ca@valencia]=Visor encastable d'imatges
+Name[ca@valencia]=Visor incrustable d'imatges
Name[cs]=Zabudovaný prohlížeč obrázků
Name[csb]=Wbùdowóny przezérnik òbrôzów
Name[cy]=Gwelydd Delweddau Mewnadeiladadwy
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/khtml-4.97.0/src/khtmlpart_p.h new/khtml-4.98.0/src/khtmlpart_p.h
--- old/khtml-4.97.0/src/khtmlpart_p.h 2014-03-01 12:50:52.000000000 +0100
+++ new/khtml-4.98.0/src/khtmlpart_p.h 2014-03-29 08:19:09.000000000 +0100
@@ -261,7 +261,6 @@
bool m_restoreScrollPosition;
bool m_statusMessagesEnabled;
bool m_bWalletOpened;
- bool m_urlSelectedOpenedURL; // KDE4: remove
bool m_bDNSPrefetchIsDefault;
int m_DNSPrefetchTimer;
int m_DNSTTLTimer;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/khtml-4.97.0/src/khtmlview.cpp new/khtml-4.98.0/src/khtmlview.cpp
--- old/khtml-4.97.0/src/khtmlview.cpp 2014-03-01 12:50:52.000000000 +0100
+++ new/khtml-4.98.0/src/khtmlview.cpp 2014-03-29 08:19:09.000000000 +0100
@@ -70,6 +70,7 @@
#include <kstringhandler.h>
#include <kconfiggroup.h>
+#include <ksharedconfig.h>
#include <QBitmap>
#include <QDialog>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/khtml-4.97.0/src/kmultipart/kmultipart.desktop new/khtml-4.98.0/src/kmultipart/kmultipart.desktop
--- old/khtml-4.97.0/src/kmultipart/kmultipart.desktop 2014-03-01 12:50:52.000000000 +0100
+++ new/khtml-4.98.0/src/kmultipart/kmultipart.desktop 2014-03-29 08:19:09.000000000 +0100
@@ -13,7 +13,7 @@
Name[bn_IN]=মাল্টিপার্ট/মিক্সড-র জন্য এমবেড করার যোগ্য সামগ্রী
Name[bs]=Ugradiva komponenta za višedijelni/mješoviti MIME
Name[ca]=Component incrustable per a multipart/mescla
-Name[ca@valencia]=Component encastable per a multipart/mescla
+Name[ca@valencia]=Component incrustable per a multipart/mescla
Name[cs]=Pohltitelné komponenty pro 'multipart/mixed'
Name[csb]=Składowi kòmpònent dlô multipart/mixed
Name[da]=Indlejrbar komponent for multipart/mixed
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/khtml-4.97.0/src/misc/AtomicString.cpp new/khtml-4.98.0/src/misc/AtomicString.cpp
--- old/khtml-4.97.0/src/misc/AtomicString.cpp 2014-03-01 12:50:52.000000000 +0100
+++ new/khtml-4.98.0/src/misc/AtomicString.cpp 2014-03-29 08:19:09.000000000 +0100
@@ -172,7 +172,7 @@
}
init();
- UCharBuffer buf = { s, length };
+ UCharBuffer buf = { s, static_cast<uint>(length) };
std::pair<HashSet<DOMStringImpl *>::iterator, bool> addResult = stringTable->add<UCharBuffer, UCharBufferTranslator>(buf);
if (!addResult.second) {
return *addResult.first;
@@ -196,7 +196,7 @@
}
init();
- UCharBuffer buf = {s, length};
+ UCharBuffer buf = {s, static_cast<uint>(length)};
std::pair<HashSet<DOMStringImpl *>::iterator, bool> addResult = stringTable->add<UCharBuffer, UCharBufferTranslator>(buf);
if (!addResult.second) {
return *addResult.first;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/khtml-4.97.0/src/rendering/break_lines.cpp new/khtml-4.98.0/src/rendering/break_lines.cpp
--- old/khtml-4.97.0/src/rendering/break_lines.cpp 2014-03-01 12:50:52.000000000 +0100
+++ new/khtml-4.98.0/src/rendering/break_lines.cpp 2014-03-29 08:19:09.000000000 +0100
@@ -1,5 +1,5 @@
#include <break_lines.h>
-#include <klibrary.h>
+#include <QtCore/QLibrary>
#include <QtCore/QTextCodec>
#include <stdio.h>
#include <stdlib.h>
@@ -46,7 +46,7 @@
int *isbreakable;
int allocated;
int numwbrpos, numisbreakable;
- KLibrary *library;
+ QLibrary *library;
};
static ThaiCache *cache = 0;
@@ -66,13 +66,13 @@
#ifndef HAVE_LIBTHAI
- KLibrary *lib = new KLibrary(QLatin1String("libthai"));
+ QLibrary *lib = new QLibrary(QLatin1String("libthai"));
/* load libthai dynamically */
if ((!th_brk) && thaiCodec) {
printf("Try to load libthai dynamically...\n");
if (lib->load()) {
- th_brk = (th_brk_def) lib->resolveFunction("th_brk");
+ th_brk = (th_brk_def) lib->resolve("th_brk");
}
if (!th_brk) {
// indication that loading failed and we shouldn't try to load again
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/khtml-4.97.0/src/rendering/render_flow.cpp new/khtml-4.98.0/src/rendering/render_flow.cpp
--- old/khtml-4.97.0/src/rendering/render_flow.cpp 2014-03-01 12:50:52.000000000 +0100
+++ new/khtml-4.98.0/src/rendering/render_flow.cpp 2014-03-29 08:19:09.000000000 +0100
@@ -58,7 +58,7 @@
return result;
}
-RenderFlow *RenderFlow::continuationBefore(RenderObject *beforeChild)
+RenderFlow *RenderFlow::continuationBefore(const RenderObject *beforeChild)
{
if (beforeChild && beforeChild->parent() == this) {
return this;
@@ -89,11 +89,14 @@
void RenderFlow::addChildWithContinuation(RenderObject *newChild, RenderObject *beforeChild)
{
RenderFlow *flow = continuationBefore(beforeChild);
- while (beforeChild && beforeChild->parent() != flow && !beforeChild->parent()->isAnonymousBlock()) {
+
+ RenderObject *bc = beforeChild;
+ while (bc && bc->parent() != flow && !bc->parent()->isAnonymousBlock()) {
// skip implicit containers around beforeChild
- beforeChild = beforeChild->parent();
+ bc = bc->parent();
}
- RenderFlow *beforeChildParent = beforeChild ? static_cast<RenderFlow *>(beforeChild->parent()) :
+
+ RenderFlow *beforeChildParent = bc ? static_cast<RenderFlow *>(bc->parent()) :
(flow->continuation() ? flow->continuation() : flow);
if (newChild->isFloatingOrPositioned()) {
@@ -350,12 +353,16 @@
{
if (isRenderInline() && isInlineFlow()) {
QList<QRectF> list;
- for (InlineFlowBox *child = firstLineBox(); child; child = child->nextFlowBox()) {
- QRectF rect(parent()->offsetLeft() + child->xPos(),
- parent()->offsetTop() + child->yPos(),
- child->width(), child->height());
- list.append(clientRectToViewport(rect));
+ InlineFlowBox *child = firstLineBox();
+ if (child) {
+ int x = 0, y = 0;
+ absolutePosition(x,y);
+ do {
+ QRectF rect(x + child->xPos(), y + child->yPos(), child->width(), child->height());
+ list.append(clientRectToViewport(rect));
+ child = child->nextFlowBox();
+ } while (child);
}
// In case our flow is splitted by blocks
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/khtml-4.97.0/src/rendering/render_flow.h new/khtml-4.98.0/src/rendering/render_flow.h
--- old/khtml-4.97.0/src/rendering/render_flow.h 2014-03-01 12:50:52.000000000 +0100
+++ new/khtml-4.98.0/src/rendering/render_flow.h 2014-03-29 08:19:09.000000000 +0100
@@ -60,7 +60,7 @@
{
m_continuation = c;
}
- RenderFlow *continuationBefore(RenderObject *beforeChild);
+ RenderFlow *continuationBefore(const RenderObject *beforeChild);
void addChildWithContinuation(RenderObject *newChild, RenderObject *beforeChild);
virtual void addChildToFlow(RenderObject *newChild, RenderObject *beforeChild) = 0;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/khtml-4.97.0/src/rendering/render_image.cpp new/khtml-4.98.0/src/rendering/render_image.cpp
--- old/khtml-4.97.0/src/rendering/render_image.cpp 2014-03-01 12:50:52.000000000 +0100
+++ new/khtml-4.98.0/src/rendering/render_image.cpp 2014-03-29 08:19:09.000000000 +0100
@@ -119,7 +119,7 @@
iw = br.width();
}
//#ifdef __GNUC__
-// #warning "KDE4: hack for testregression, remove (use above instead) when main branch"
+// #warning "FIXME: hack for testregression, remove (use above instead)"
//#endif
// iw = br.width() + qMax(-fm.minLeftBearing(), 0) + qMax(-fm.minRightBearing(), 0);
@@ -290,7 +290,7 @@
//BEGIN HACK
#if 0
#ifdef __GNUC__
-#warning "KDE4: hack for testregression, remove when main branch"
+#warning "FIXME: hack for testregression, remove"
#endif
ax += qMax(-fm.minLeftBearing(), 0);
cWidth -= qMax(-fm.minLeftBearing(), 0);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/khtml-4.97.0/src/rendering/render_list.cpp new/khtml-4.98.0/src/rendering/render_list.cpp
--- old/khtml-4.97.0/src/rendering/render_list.cpp 2014-03-01 12:50:52.000000000 +0100
+++ new/khtml-4.98.0/src/rendering/render_list.cpp 2014-03-29 08:19:09.000000000 +0100
@@ -376,7 +376,7 @@
if (listPositionInside()) {
//BEGIN HACK
#ifdef __GNUC__
-#warning "KDE4: hack for testregression, remove when main branch"
+#warning "FIXME: hack for testregression, remove"
#endif
_tx += qMax(-fm.minLeftBearing(), 0);
//END HACK
@@ -399,7 +399,7 @@
} else {
//BEGIN HACK
#ifdef __GNUC__
-#warning "KDE4: hack for testregression, remove when main branch"
+#warning "FIXME: hack for testregression, remove"
#endif
_tx += qMax(-fm.minLeftBearing(), 0);
//END HACK
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/khtml-4.97.0/src/xml/dom2_eventsimpl.cpp new/khtml-4.98.0/src/xml/dom2_eventsimpl.cpp
--- old/khtml-4.97.0/src/xml/dom2_eventsimpl.cpp 2014-03-01 12:50:52.000000000 +0100
+++ new/khtml-4.98.0/src/xml/dom2_eventsimpl.cpp 2014-03-29 08:19:09.000000000 +0100
@@ -54,7 +54,7 @@
QList<RegisteredEventListener> listeners = *m_regdListeners.listeners;
QList<RegisteredEventListener>::iterator it;
for (it = listeners.begin(); it != listeners.end(); ++it) {
- //Check whether this got removed...KDE4: use Java-style iterators
+ //Check whether this got removed... TODO: use Java-style iterators
if (!m_regdListeners.stillContainsListener(*it)) {
continue;
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/khtml-4.97.0/src/xml/dom2_eventsimpl.h new/khtml-4.98.0/src/xml/dom2_eventsimpl.h
--- old/khtml-4.97.0/src/xml/dom2_eventsimpl.h 2014-03-01 12:50:52.000000000 +0100
+++ new/khtml-4.98.0/src/xml/dom2_eventsimpl.h 2014-03-29 08:19:09.000000000 +0100
@@ -115,7 +115,7 @@
bool hasEventListener(EventName id);
void clear();
- //### KDE4: should disappear
+ // TODO: remove/deprecate?
bool stillContainsListener(const RegisteredEventListener &listener);
QList<RegisteredEventListener> *listeners;//The actual listener list - may be 0
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/khtml-4.97.0/src/xml/dom_docimpl.h new/khtml-4.98.0/src/xml/dom_docimpl.h
--- old/khtml-4.97.0/src/xml/dom_docimpl.h 2014-03-01 12:50:52.000000000 +0100
+++ new/khtml-4.98.0/src/xml/dom_docimpl.h 2014-03-29 08:19:09.000000000 +0100
@@ -145,8 +145,8 @@
/**
* @internal A cache of element name (or id) to pointer
- * ### KDE4, QHash: better to store values here
*/
+// TODO: QHash: better to store values here
class ElementMappingCache
{
public:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/khtml-4.97.0/src/xml/dom_nodeimpl.cpp new/khtml-4.98.0/src/xml/dom_nodeimpl.cpp
--- old/khtml-4.97.0/src/xml/dom_nodeimpl.cpp 2014-03-01 12:50:52.000000000 +0100
+++ new/khtml-4.98.0/src/xml/dom_nodeimpl.cpp 2014-03-29 08:19:09.000000000 +0100
@@ -126,7 +126,7 @@
return 0;
}
-NodeListImpl *NodeImpl::childNodes()
+WTF::PassRefPtr<DOM::NodeListImpl> NodeImpl::childNodes()
{
return new ChildNodeListImpl(this);
}
@@ -407,16 +407,14 @@
{
evt->setTarget(this);
- // Since event handling code could cause this object to be deleted, grab a reference to the view now
- KHTMLView *view = document()->view();
-
dispatchGenericEvent(evt, exceptioncode);
+ KHTMLPart *part = document()->part();
// If tempEvent is true, this means that the DOM implementation will not be storing a reference to the event, i.e.
// there is no way to retrieve it from javascript if a script does not already have a reference to it in a variable.
// So there is no need for the interpreter to keep the event in its cache
- if (tempEvent && view && view->part() && view->part()->jScript()) {
- view->part()->jScript()->finishedWithEvent(evt);
+ if (tempEvent && part && part->jScript()) {
+ part->jScript()->finishedWithEvent(evt);
}
}
@@ -424,9 +422,10 @@
{
// ### check that type specified
+ ref();
+
// work out what nodes to send event to
QList<EventTargetImpl *> nodeChain;
- NodeImpl *n;
if (evt->target()->eventTargetType() != DOM_NODE) {
// The target is the only thing that goes into the chain.
@@ -439,7 +438,7 @@
evt->setTarget(document());
}
} else if (inDocument()) {
- for (n = this; n; n = n->parentNode()) {
+ for (NodeImpl *n = this; n; n = n->parentNode()) {
n->ref();
nodeChain.prepend(n);
}
@@ -519,10 +518,6 @@
}
}
- // copy this over into a local variable, as the following deref() calls might cause this to be deleted.
- DocumentImpl *doc = m_document.get();
- doc->ref();
-
// deref all nodes in chain
it.toFront();
while (it.hasNext()) {
@@ -530,7 +525,8 @@
}
DocumentImpl::updateDocumentsRendering();
- doc->deref();
+
+ deref();
}
bool NodeImpl::dispatchHTMLEvent(int _id, bool canBubbleArg, bool cancelableArg)
@@ -552,24 +548,20 @@
void NodeImpl::dispatchWindowEvent(EventImpl *evt)
{
- DocumentImpl *doc = document();
- doc->ref();
+ evt->setTarget(document()->windowEventTarget());
+ evt->ref();
int exceptioncode = 0;
-
- evt->setTarget(doc->windowEventTarget());
- evt->ref();
dispatchGenericEvent(evt, exceptioncode);
if (evt->id() == EventImpl::LOAD_EVENT) {
// Trigger Load Event on the enclosing frame if there is one
- DOM::HTMLPartContainerElementImpl *elt = doc->ownerElement();
+ DOM::HTMLPartContainerElementImpl *elt = document()->ownerElement();
if (elt) {
elt->slotEmitLoadEvent();
}
}
- doc->deref();
evt->deref();
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/khtml-4.97.0/src/xml/dom_nodeimpl.h new/khtml-4.98.0/src/xml/dom_nodeimpl.h
--- old/khtml-4.97.0/src/xml/dom_nodeimpl.h 2014-03-01 12:50:52.000000000 +0100
+++ new/khtml-4.98.0/src/xml/dom_nodeimpl.h 2014-03-29 08:19:09.000000000 +0100
@@ -102,7 +102,7 @@
{
return m_next;
}
- virtual NodeListImpl *childNodes();
+ virtual WTF::PassRefPtr<NodeListImpl> childNodes();
virtual NodeImpl *firstChild() const;
virtual NodeImpl *lastChild() const;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/khtml-4.97.0/src/xml/dom_stringimpl.h new/khtml-4.98.0/src/xml/dom_stringimpl.h
--- old/khtml-4.97.0/src/xml/dom_stringimpl.h 2014-03-01 12:50:52.000000000 +0100
+++ new/khtml-4.98.0/src/xml/dom_stringimpl.h 2014-03-29 08:19:09.000000000 +0100
@@ -32,8 +32,8 @@
#include "misc/khtmllayout.h"
#include "misc/shared.h"
-#define QT_ALLOC_QCHAR_VEC( N ) (QChar*) new char[ sizeof(QChar)*( N ) ]
-#define QT_DELETE_QCHAR_VEC( P ) delete[] ((char*)( P ))
+#define QT_ALLOC_QCHAR_VEC( N ) reinterpret_cast<QChar*>(new char[ sizeof(QChar)*( N ) ])
+#define QT_DELETE_QCHAR_VEC( P ) delete[] (reinterpret_cast<char*>( P ))
namespace DOM
{
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/khtml-4.97.0/tests/pics/CMakeLists.txt new/khtml-4.98.0/tests/pics/CMakeLists.txt
--- old/khtml-4.97.0/tests/pics/CMakeLists.txt 2014-03-01 12:50:52.000000000 +0100
+++ new/khtml-4.98.0/tests/pics/CMakeLists.txt 1970-01-01 01:00:00.000000000 +0100
@@ -1,9 +0,0 @@
-
-########### install files ###############
-
-#define exclude file from local/global
-kde4_install_icons( ${DATA_INSTALL_DIR}/khtml/icons )
-
-
-
-
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: opensuse-commit+help(a)opensuse.org
[View Less]
1
0
Hello community,
here is the log from the commit of package kglobalaccel for openSUSE:Factory checked in at 2014-04-02 17:22:02
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/kglobalaccel (Old)
and /work/SRC/openSUSE:Factory/.kglobalaccel.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "kglobalaccel"
Changes:
--------
--- /work/SRC/openSUSE:Factory/kglobalaccel/kglobalaccel.…
[View More]changes 2014-03-10 12:17:27.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.kglobalaccel.new/kglobalaccel.changes 2014-04-02 17:22:11.000000000 +0200
@@ -1,0 +2,9 @@
+Sat Mar 29 19:47:37 UTC 2014 - hrvoje.senjan(a)gmail.com
+
+- Update to 4.98.0
+ * API improvements and cleanups
+ * Buildsystem fixes
+ * For more details please see:
+ http://www.kde.org/announcements/announce-frameworks5-beta1.php
+
+-------------------------------------------------------------------
Old:
----
kglobalaccel-4.97.0.tar.xz
New:
----
kglobalaccel-4.98.0.tar.xz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ kglobalaccel.spec ++++++
--- /var/tmp/diff_new_pack.sJdP5h/_old 2014-04-02 17:22:12.000000000 +0200
+++ /var/tmp/diff_new_pack.sJdP5h/_new 2014-04-02 17:22:12.000000000 +0200
@@ -18,10 +18,10 @@
%define lname libKF5GlobalAccel5
Name: kglobalaccel
-Version: 4.97.0
+Version: 4.98.0
Release: 0
BuildRequires: cmake >= 2.8.12
-BuildRequires: extra-cmake-modules >= 0.0.11
+BuildRequires: extra-cmake-modules >= 0.0.12
BuildRequires: fdupes
BuildRequires: kf5-filesystem
BuildRequires: pkgconfig(Qt5DBus) >= 5.2.0
++++++ kglobalaccel-4.97.0.tar.xz -> kglobalaccel-4.98.0.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kglobalaccel-4.97.0/CMakeLists.txt new/kglobalaccel-4.98.0/CMakeLists.txt
--- old/kglobalaccel-4.97.0/CMakeLists.txt 2014-03-01 12:50:49.000000000 +0100
+++ new/kglobalaccel-4.98.0/CMakeLists.txt 2014-03-28 19:16:50.000000000 +0100
@@ -3,7 +3,7 @@
project(KGlobalAccel)
# ECM setup
-find_package(ECM 0.0.11 REQUIRED NO_MODULE)
+find_package(ECM 0.0.12 REQUIRED NO_MODULE)
set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH} ${ECM_KDE_MODULE_DIR})
include(FeatureSummary)
@@ -12,7 +12,7 @@
include(ECMSetupVersion)
include(ECMGenerateHeaders)
-set(KF5_VERSION "4.97.0")
+set(KF5_VERSION "4.98.0")
ecm_setup_version(${KF5_VERSION} VARIABLE_PREFIX KGLOBALACCEL
VERSION_HEADER "${CMAKE_CURRENT_BINARY_DIR}/kglobalaccel_version.h"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kglobalaccel-4.97.0/src/Messages.sh new/kglobalaccel-4.98.0/src/Messages.sh
--- old/kglobalaccel-4.97.0/src/Messages.sh 1970-01-01 01:00:00.000000000 +0100
+++ new/kglobalaccel-4.98.0/src/Messages.sh 2014-03-28 19:16:50.000000000 +0100
@@ -0,0 +1,18 @@
+#!/bin/sh
+
+# Invoke the extractrc script on all .ui, .rc, and .kcfg files in the sources.
+# The results are stored in a pseudo .cpp file to be picked up by xgettext.
+lst=`find . -name \*.rc -o -name \*.ui -o -name \*.kcfg`
+if [ -n "$lst" ] ; then
+ $EXTRACTRC $lst >> rc.cpp
+fi
+
+# If your framework contains tips-of-the-day, call preparetips as well.
+if [ -f "data/tips" ] ; then
+ ( cd data && $PREPARETIPS > ../tips.cpp )
+fi
+
+# Extract strings from all source files.
+# If your framework depends on KI18n, use $XGETTEXT. If it uses Qt translation
+# system, use $EXTRACT_TR_STRINGS.
+$EXTRACT_TR_STRINGS `find . -name \*.cpp -o -name \*.h -name \*.qml` -o $podir/kglobalaccel5.pot
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kglobalaccel-4.97.0/src/org.kde.KGlobalAccel.xml new/kglobalaccel-4.98.0/src/org.kde.KGlobalAccel.xml
--- old/kglobalaccel-4.97.0/src/org.kde.KGlobalAccel.xml 2014-03-01 12:50:49.000000000 +0100
+++ new/kglobalaccel-4.98.0/src/org.kde.KGlobalAccel.xml 2014-03-28 19:16:50.000000000 +0100
@@ -5,18 +5,18 @@
<signal name="yourShortcutGotChanged">
<arg name="actionId" type="as" direction="out"/>
<arg name="newKeys" type="ai" direction="out"/>
- <annotation name="com.trolltech.QtDBus.QtTypeName.In1" value="QList<int>"/>
+ <annotation name="org.qtproject.QtDBus.QtTypeName.In1" value="QList<int>"/>
</signal>
<method name="allComponents">
<arg type="ao" direction="out"/>
</method>
<method name="allMainComponents">
<arg type="aas" direction="out"/>
- <annotation name="com.trolltech.QtDBus.QtTypeName.Out0" value="QList<QStringList>"/>
+ <annotation name="org.qtproject.QtDBus.QtTypeName.Out0" value="QList<QStringList>"/>
</method>
<method name="allActionsForComponent">
<arg type="aas" direction="out"/>
- <annotation name="com.trolltech.QtDBus.QtTypeName.Out0" value="QList<QStringList>"/>
+ <annotation name="org.qtproject.QtDBus.QtTypeName.Out0" value="QList<QStringList>"/>
<arg name="actionId" type="as" direction="in"/>
</method>
<method name="action">
@@ -29,26 +29,26 @@
</method>
<method name="shortcut">
<arg type="ai" direction="out"/>
- <annotation name="com.trolltech.QtDBus.QtTypeName.Out0" value="QList<int>"/>
+ <annotation name="org.qtproject.QtDBus.QtTypeName.Out0" value="QList<int>"/>
<arg name="actionId" type="as" direction="in"/>
</method>
<method name="defaultShortcut">
<arg type="ai" direction="out"/>
- <annotation name="com.trolltech.QtDBus.QtTypeName.Out0" value="QList<int>"/>
+ <annotation name="org.qtproject.QtDBus.QtTypeName.Out0" value="QList<int>"/>
<arg name="actionId" type="as" direction="in"/>
</method>
<method name="setShortcut">
<arg type="ai" direction="out"/>
- <annotation name="com.trolltech.QtDBus.QtTypeName.Out0" value="QList<int>"/>
+ <annotation name="org.qtproject.QtDBus.QtTypeName.Out0" value="QList<int>"/>
<arg name="actionId" type="as" direction="in"/>
<arg name="keys" type="ai" direction="in"/>
- <annotation name="com.trolltech.QtDBus.QtTypeName.In1" value="QList<int>"/>
+ <annotation name="org.qtproject.QtDBus.QtTypeName.In1" value="QList<int>"/>
<arg name="flags" type="u" direction="in"/>
</method>
<method name="setForeignShortcut">
<arg name="actionId" type="as" direction="in"/>
<arg name="keys" type="ai" direction="in"/>
- <annotation name="com.trolltech.QtDBus.QtTypeName.In1" value="QList<int>"/>
+ <annotation name="org.qtproject.QtDBus.QtTypeName.In1" value="QList<int>"/>
</method>
<method name="setInactive">
<arg name="actionId" type="as" direction="in"/>
@@ -65,7 +65,7 @@
</method>
<method name="getGlobalShortcutsByKey">
<arg type="a(ssssssaiai)" direction="out"/>
- <annotation name="com.trolltech.QtDBus.QtTypeName.Out0" value="QList<KGlobalShortcutInfo>"/>
+ <annotation name="org.qtproject.QtDBus.QtTypeName.Out0" value="QList<KGlobalShortcutInfo>"/>
<arg name="key" type="i" direction="in"/>
</method>
<method name="isGlobalShortcutAvailable">
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kglobalaccel-4.97.0/src/org.kde.kglobalaccel.Component.xml new/kglobalaccel-4.98.0/src/org.kde.kglobalaccel.Component.xml
--- old/kglobalaccel-4.97.0/src/org.kde.kglobalaccel.Component.xml 2014-03-01 12:50:49.000000000 +0100
+++ new/kglobalaccel-4.98.0/src/org.kde.kglobalaccel.Component.xml 2014-03-28 19:16:50.000000000 +0100
@@ -24,12 +24,12 @@
</method>
<method name="allShortcutInfos">
<arg type="a(ssssssaiai)" direction="out"/>
- <annotation name="com.trolltech.QtDBus.QtTypeName.Out0" value="QList<KGlobalShortcutInfo>"/>
+ <annotation name="org.qtproject.QtDBus.QtTypeName.Out0" value="QList<KGlobalShortcutInfo>"/>
<arg name="context" type="s" direction="in"/>
</method>
<method name="allShortcutInfos">
<arg type="a(ssssssaiai)" direction="out"/>
- <annotation name="com.trolltech.QtDBus.QtTypeName.Out0" value="QList<KGlobalShortcutInfo>"/>
+ <annotation name="org.qtproject.QtDBus.QtTypeName.Out0" value="QList<KGlobalShortcutInfo>"/>
</method>
<method name="getShortcutContexts">
<arg type="as" direction="out"/>
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: opensuse-commit+help(a)opensuse.org
[View Less]
1
0
Hello community,
here is the log from the commit of package kfileaudiopreview for openSUSE:Factory checked in at 2014-04-02 17:22:02
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/kfileaudiopreview (Old)
and /work/SRC/openSUSE:Factory/.kfileaudiopreview.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "kfileaudiopreview"
Changes:
--------
--- /work/SRC/openSUSE:Factory/…
[View More]kfileaudiopreview/kfileaudiopreview.changes 2014-03-10 12:18:21.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.kfileaudiopreview.new/kfileaudiopreview.changes 2014-04-02 17:22:10.000000000 +0200
@@ -1,0 +2,9 @@
+Sat Mar 29 19:47:36 UTC 2014 - hrvoje.senjan(a)gmail.com
+
+- Update to 4.98.0
+ * API improvements and cleanups
+ * Buildsystem fixes
+ * For more details please see:
+ http://www.kde.org/announcements/announce-frameworks5-beta1.php
+
+-------------------------------------------------------------------
Old:
----
kfileaudiopreview-4.97.0.tar.xz
New:
----
kfileaudiopreview-4.98.0.tar.xz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ kfileaudiopreview.spec ++++++
--- /var/tmp/diff_new_pack.BhtpqT/_old 2014-04-02 17:22:11.000000000 +0200
+++ /var/tmp/diff_new_pack.BhtpqT/_new 2014-04-02 17:22:11.000000000 +0200
@@ -17,10 +17,10 @@
Name: kfileaudiopreview
-Version: 4.97.0
+Version: 4.98.0
Release: 0
BuildRequires: cmake >= 2.8.12
-BuildRequires: extra-cmake-modules >= 0.0.11
+BuildRequires: extra-cmake-modules >= 0.0.12
BuildRequires: fdupes
BuildRequires: kbookmarks-devel >= %{_kf5_version}
BuildRequires: kcompletion-devel >= %{_kf5_version}
++++++ kfileaudiopreview-4.97.0.tar.xz -> kfileaudiopreview-4.98.0.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kfileaudiopreview-4.97.0/CMakeLists.txt new/kfileaudiopreview-4.98.0/CMakeLists.txt
--- old/kfileaudiopreview-4.97.0/CMakeLists.txt 2014-03-01 12:50:47.000000000 +0100
+++ new/kfileaudiopreview-4.98.0/CMakeLists.txt 2014-03-29 08:18:54.000000000 +0100
@@ -6,7 +6,7 @@
#
# CMake stuff from ECM
#
-find_package(ECM 0.0.11 REQUIRED NO_MODULE)
+find_package(ECM 0.0.12 REQUIRED NO_MODULE)
set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH} ${ECM_KDE_MODULE_DIR})
include(KDEInstallDirs)
@@ -20,8 +20,8 @@
#
# Dependencies
#
-set(QT_REQUIRED_VERSION 5.2.0)
-find_package(Qt5Widgets ${QT_REQUIRED_VERSION} REQUIRED NO_MODULE)
+set(REQUIRED_QT_VERSION 5.2.0)
+find_package(Qt5Widgets ${REQUIRED_QT_VERSION} REQUIRED NO_MODULE)
find_package(Phonon4Qt5 4.6.60 REQUIRED NO_MODULE)
set_package_properties(Phonon4Qt5 PROPERTIES
DESCRIPTION "Qt-based audio library"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kfileaudiopreview-4.97.0/src/kfileaudiopreview.cpp new/kfileaudiopreview-4.98.0/src/kfileaudiopreview.cpp
--- old/kfileaudiopreview-4.97.0/src/kfileaudiopreview.cpp 2014-03-01 12:50:47.000000000 +0100
+++ new/kfileaudiopreview-4.98.0/src/kfileaudiopreview.cpp 2014-03-29 08:18:54.000000000 +0100
@@ -36,6 +36,7 @@
#include <phonon/videowidget.h>
#include "mediacontrols.h"
#include <kconfiggroup.h>
+#include <ksharedconfig.h>
K_PLUGIN_FACTORY(KFileAudioPreviewFactory, registerPlugin<KFileAudioPreview>();)
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: opensuse-commit+help(a)opensuse.org
[View Less]
1
0