mirror of
https://bitbucket.org/smil3y/kde-playground.git
synced 2025-02-23 10:22:50 +00:00
generic: misc cleanups and adjustments
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
parent
aaa9d1cf48
commit
2cf532fa19
20 changed files with 24 additions and 40 deletions
|
@ -1,18 +1,14 @@
|
|||
project (kde-playground)
|
||||
project(kde-playground)
|
||||
|
||||
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/modules")
|
||||
|
||||
set(QT_MIN_VERSION "4.8.2")
|
||||
find_package(KDE4 4.14.3 REQUIRED)
|
||||
find_package(KDE4 4.18.0 REQUIRED)
|
||||
include(KDE4Defaults)
|
||||
include(GenerateExportHeader)
|
||||
|
||||
set(LIBRARY_TYPE SHARED)
|
||||
|
||||
add_definitions(${QT_DEFINITIONS} ${KDE4_DEFINITIONS})
|
||||
add_definitions(-DQT_USE_FAST_CONCATENATION -DQT_USE_FAST_OPERATOR_PLUS)
|
||||
|
||||
include_directories(${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR} ${KDE4_INCLUDES})
|
||||
include_directories(${CMAKE_SOURCE_DIR} ${CMAKE_BINARY_DIR} ${KDE4_INCLUDES})
|
||||
|
||||
macro_optional_add_subdirectory (kdbg)
|
||||
macro_optional_add_subdirectory (pykde4)
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
#include <KInputDialog>
|
||||
#include <kio/deletejob.h>
|
||||
#include <KMenu>
|
||||
#include <KMenuBar>
|
||||
#include <QMenuBar>
|
||||
#include <KRecentFilesAction>
|
||||
#include <KShortcutsDialog>
|
||||
#include <KStatusNotifierItem>
|
||||
|
@ -149,7 +149,7 @@ MainWindow::MainWindow()
|
|||
{
|
||||
// menu structure
|
||||
|
||||
KMenuBar *menuBar = KMainWindow::menuBar();
|
||||
QMenuBar *menuBar = KMainWindow::menuBar();
|
||||
collection = new KActionCollection(this);
|
||||
|
||||
KMenu *menu = new KMenu(i18n("&File"), this);
|
||||
|
|
|
@ -29,7 +29,6 @@
|
|||
#include <QApplication>
|
||||
#include <QStandardItemModel>
|
||||
|
||||
#include <KGenericFactory>
|
||||
#include <KConfig>
|
||||
#include <KAction>
|
||||
#include <KIcon>
|
||||
|
|
|
@ -58,7 +58,7 @@ using namespace KIO;
|
|||
|
||||
extern "C"
|
||||
{
|
||||
KDE_EXPORT int kdemain(int argc, char **argv);
|
||||
Q_DECL_EXPORT int kdemain(int argc, char **argv);
|
||||
|
||||
#ifdef HAVE_GPHOTO2_5
|
||||
static void frontendCameraStatus(GPContext *context, const char *status, void *data);
|
||||
|
|
|
@ -14,7 +14,7 @@ set(core_SRCS
|
|||
utils.cpp
|
||||
logger.cpp
|
||||
config.cpp
|
||||
globalconfig.cpp )
|
||||
globalconfig.cpp
|
||||
)
|
||||
|
||||
qt4_automoc(${core_SRCS})
|
||||
add_library(core STATIC ${core_SRCS})
|
||||
|
|
|
@ -28,8 +28,8 @@ set(libviews_SRCS
|
|||
coverageitem.cpp
|
||||
sourceitem.cpp
|
||||
instritem.cpp
|
||||
partlistitem.cpp )
|
||||
partlistitem.cpp
|
||||
)
|
||||
|
||||
qt4_automoc(${libviews_SRCS})
|
||||
add_library(views STATIC ${libviews_SRCS})
|
||||
target_link_libraries(views core)
|
||||
|
|
|
@ -4,7 +4,6 @@ set(qcachegrind_SRCS qcgmain.cpp qcgtoplevel.cpp qcgconfig.cpp
|
|||
configdialog.cpp configpage.cpp qtcolorbutton.cpp
|
||||
generalsettings.cpp sourcesettings.cpp colorsettings.cpp)
|
||||
|
||||
qt4_automoc(${qcachegrind_SRCS})
|
||||
qt4_wrap_ui(qcachegrind_H generalsettings.ui sourcesettings.ui colorsettings.ui)
|
||||
qt4_add_resources(qcachegrind_RSRC qcachegrind.qrc)
|
||||
|
||||
|
|
|
@ -9,8 +9,6 @@ add_definitions(${QT_DEFINITIONS} ${KDE4_DEFINITIONS})
|
|||
|
||||
include(KDE4Defaults)
|
||||
include(MacroLibrary)
|
||||
#include(ManualStuff.cmake)
|
||||
#include(ConfigureChecks.cmake)
|
||||
|
||||
add_subdirectory(kdbg)
|
||||
add_subdirectory(po)
|
||||
|
|
|
@ -4,6 +4,7 @@ add_subdirectory(typetables)
|
|||
|
||||
include_directories(${KDE4_INCLUDES} ${KDE4_INCLUDE_DIR} ${QT_INCLUDES} )
|
||||
include(CheckFunctionExists)
|
||||
include(CheckIncludeFiles)
|
||||
|
||||
CHECK_INCLUDE_FILES(pty.h HAVE_PTY_H)
|
||||
CHECK_INCLUDE_FILES(libutil.h HAVE_LIBUTIL_H)
|
||||
|
|
|
@ -13,7 +13,6 @@
|
|||
#include <QFileInfo>
|
||||
#include <QListWidget>
|
||||
#include <QApplication>
|
||||
#include <kcodecs.h> // KMD5
|
||||
#include <kconfig.h>
|
||||
#include <klocale.h> /* i18n */
|
||||
#include <kmessagebox.h>
|
||||
|
@ -677,7 +676,7 @@ QString KDebugger::getConfigForExe(const QString& name)
|
|||
// a hash of the directory, followed by the program name.
|
||||
// Assume that the first 15 positions of the hash are unique;
|
||||
// this keeps the file names short.
|
||||
QString hash = KMD5(dir.toUtf8()).base64Digest();
|
||||
QString hash = dir.toUtf8().toBase64();
|
||||
hash.replace('/', QString()); // avoid directory separators
|
||||
QString pgmConfigFile = hash.left(15) + "-" + fi.fileName();
|
||||
pgmConfigFile = KStandardDirs::locateLocal("sessions", pgmConfigFile);
|
||||
|
|
|
@ -21,11 +21,11 @@
|
|||
|
||||
#include "application.h"
|
||||
#include "mainwindow.h"
|
||||
#include "version.h"
|
||||
|
||||
#include <KCmdLineArgs>
|
||||
#include <KAboutData>
|
||||
#include <KLocale>
|
||||
#include <kdeversion.h>
|
||||
|
||||
using namespace KHC;
|
||||
|
||||
|
@ -56,7 +56,7 @@ int Application::newInstance()
|
|||
int main( int argc, char **argv )
|
||||
{
|
||||
KAboutData aboutData( "khelpcenter", 0, ki18n("KDE Help Center"),
|
||||
HELPCENTER_VERSION,
|
||||
KDE_VERSION_STRING,
|
||||
ki18n("The KDE Help Center"),
|
||||
KAboutData::License_GPL,
|
||||
ki18n("(c) 1999-2011, The KHelpCenter developers") );
|
||||
|
|
|
@ -41,7 +41,7 @@ namespace KHC {
|
|||
|
||||
}
|
||||
|
||||
extern "C" { int KDE_EXPORT kdemain(int argc, char **argv); }
|
||||
extern "C" { int Q_DECL_EXPORT kdemain(int argc, char **argv); }
|
||||
|
||||
#endif // KHC_APPLICATION_H
|
||||
// vim:ts=2:sw=2:et
|
||||
|
|
|
@ -256,7 +256,7 @@ bool DocEntry::docExists() const
|
|||
if ( !mUrl.isEmpty() )
|
||||
{
|
||||
KUrl docUrl( mUrl );
|
||||
if ( docUrl.isLocalFile() && !KStandardDirs::exists( docUrl.toLocalFile() ) )
|
||||
if ( docUrl.isLocalFile() && !KGlobal::dirs()->exists( docUrl.toLocalFile() ) )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -33,7 +33,7 @@ void HTMLSearch::scanDir(const QString& dir)
|
|||
|
||||
QStringList::ConstIterator it;
|
||||
|
||||
if ( KStandardDirs::exists( dir + "index.docbook" ) ) {
|
||||
if ( KGlobal::dirs()->exists( dir + "index.docbook" ) ) {
|
||||
_files.append(dir + "index.docbook");
|
||||
progress->setFilesScanned(++_filesScanned);
|
||||
} else {
|
||||
|
|
|
@ -628,7 +628,8 @@ void KCMHelpCenter::slotReceivedStdout()
|
|||
mStdOut.append( text );
|
||||
} else {
|
||||
if ( mProgressDialog ) {
|
||||
mProgressDialog->appendLog( mStdOut + text.left( pos ) );
|
||||
QByteArray logtext = mStdOut + text.left( pos );
|
||||
mProgressDialog->appendLog( logtext );
|
||||
mStdOut = text.mid( pos + 1 );
|
||||
}
|
||||
}
|
||||
|
|
|
@ -21,8 +21,6 @@
|
|||
|
||||
#include "khc_indexbuilder.h"
|
||||
|
||||
#include "version.h"
|
||||
|
||||
#include <KAboutData>
|
||||
#include <KLocale>
|
||||
#include <KCmdLineArgs>
|
||||
|
@ -31,6 +29,7 @@
|
|||
#include <KProcess>
|
||||
#include <KConfig>
|
||||
#include <KShell>
|
||||
#include <kdeversion.h>
|
||||
|
||||
#include <QFile>
|
||||
#include <QTextStream>
|
||||
|
@ -152,7 +151,7 @@ int main( int argc, char **argv )
|
|||
{
|
||||
KAboutData aboutData( "khc_indexbuilder", 0,
|
||||
ki18n("KHelpCenter Index Builder"),
|
||||
HELPCENTER_VERSION,
|
||||
KDE_VERSION_STRING,
|
||||
ki18n("The KDE Help Center"),
|
||||
KAboutData::License_GPL,
|
||||
ki18n("(c) 2003, The KHelpCenter developers") );
|
||||
|
|
|
@ -232,7 +232,7 @@ void HelpProtocol::get( const KUrl& url )
|
|||
}
|
||||
} else {
|
||||
QString docbook_file = file.left(file.lastIndexOf('/')) + "/index.docbook";
|
||||
if (!KStandardDirs::exists(file)) {
|
||||
if (!KGlobal::dirs()->exists(file)) {
|
||||
file = docbook_file;
|
||||
} else {
|
||||
QFileInfo fi(file);
|
||||
|
|
|
@ -33,7 +33,7 @@ extern "C" int xmlLoadExtDtdDefaultValue;
|
|||
|
||||
extern "C"
|
||||
{
|
||||
KDE_EXPORT int kdemain( int argc, char **argv )
|
||||
Q_DECL_EXPORT int kdemain( int argc, char **argv )
|
||||
{
|
||||
Q_ASSERT(!KGlobal::hasMainComponent()); // kdeinit is messed up if this is the case.
|
||||
KComponentData componentData( "kio_help", "kio_help4" );
|
||||
|
|
|
@ -115,7 +115,7 @@ xmlParserInputPtr meinExternalEntityLoader(const char *URL, const char *ID,
|
|||
URL = "docbook/xml-dtd-4.1.2/docbookx.dtd";
|
||||
|
||||
QString file;
|
||||
if (KStandardDirs::exists( QDir::currentPath() + "/" + URL ) )
|
||||
if (KGlobal::dirs()->exists( QDir::currentPath() + "/" + URL ) )
|
||||
file = QDir::currentPath() + "/" + URL;
|
||||
else
|
||||
file = locate("dtd", URL);
|
||||
|
|
|
@ -1,8 +0,0 @@
|
|||
|
||||
#ifndef KHC_VERSION_H
|
||||
#define KHC_VERSION_H
|
||||
|
||||
#define HELPCENTER_VERSION KDE_VERSION_STRING
|
||||
|
||||
#endif // KHC_VERSION_H
|
||||
// vim:ts=2:sw=2:et
|
Loading…
Add table
Reference in a new issue