CMake conversion #13

Merged
MicheleC merged 2 commits from feat/cmake-conversion into master 6 months ago

@ -0,0 +1,90 @@
############################################
#
# (C) 2023 Michele Calgaro
# Michele (DOT) Calgaro (AT) yahoo.it
#
# Improvements and feedback are welcome
#
# This file is released under GPL >= 2
#
############################################
cmake_minimum_required( VERSION 3.5 )
#### general package setup
project( smb4k )
#### include essential cmake modules
include( FindPkgConfig )
include( CheckSymbolExists )
include( CheckIncludeFile )
include( CheckLibraryExists )
include( CheckCSourceCompiles )
include( CheckCXXSourceCompiles )
include( CheckTypeSize )
#### include our cmake modules
include( TDEMacros )
##### set version number
tde_set_project_version( )
##### setup install paths
include( TDESetupPaths )
tde_setup_paths( )
##### optional stuff
option( WITH_ALL_OPTIONS "Enable all optional support" OFF )
option( WITH_GCC_VISIBILITY "Enable fvisibility and fvisibility-inlines-hidden" ${WITH_ALL_OPTIONS} )
##### user requested modules
option( BUILD_ALL "Build all" ON )
option( BUILD_DOC "Build documentation" ${BUILD_ALL} )
option( BUILD_TRANSLATIONS "Build translations" ${BUILD_ALL} )
##### configure checks
include( ConfigureChecks.cmake )
##### global compiler settings
set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${TQT_CXX_FLAGS}" )
set( CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--no-undefined" )
set( CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} -Wl,--no-undefined" )
##### directories
add_subdirectory( smb4k )
add_subdirectory( plugin )
add_subdirectory( utilities )
##### other data ################################
tde_conditional_add_project_docs( BUILD_DOC )
tde_conditional_add_subdirectory( BUILD_TRANSLATIONS po )
##### write configure files
configure_file( config.h.cmake config.h @ONLY )

@ -0,0 +1,26 @@
###########################################
# #
# Improvements and feedback are welcome #
# #
# This file is released under GPL >= 3 #
# #
###########################################
# required stuff
find_package( TQt )
find_package( TDE )
tde_setup_architecture_flags( )
include(TestBigEndian)
test_big_endian(WORDS_BIGENDIAN)
tde_setup_largefiles( )
##### check for gcc visibility support
if( WITH_GCC_VISIBILITY )
tde_setup_gcc_visibility( )
endif( WITH_GCC_VISIBILITY )

@ -0,0 +1,8 @@
#define VERSION "@VERSION@"
// Defined if you have fvisibility and fvisibility-inlines-hidden support.
#cmakedefine __KDE_HAVE_GCC_VISIBILITY 1
/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most
significant byte first (like Motorola and SPARC, unlike Intel). */
#cmakedefine WORDS_BIGENDIAN @WORDS_BIGENDIAN@

@ -0,0 +1,30 @@
include_directories(
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_CURRENT_BINARY_DIR}
${CMAKE_BINARY_DIR}
${TQT_INCLUDE_DIRS}
${TDE_INCLUDE_DIR}
)
link_directories(
${TQT_LIBRARY_DIRS}
${TDE_LIBRARY_DIRS}
)
##### pluginloader
tde_import( konqueror )
tde_add_kpart( konqsidebar_smb4k AUTOMOC
SOURCES smb4k_konqplugin.cpp
LINK tdecore-shared tdeui-shared tdeio-shared tdeparts-shared konqsidebarplugin-shared smb4kcore-shared
DESTINATION ${PLUGIN_INSTALL_DIR}
)
MicheleC marked this conversation as resolved
SlavekB commented 6 months ago
Review

Forgotten unnecessary blank line.

Forgotten unnecessary blank line.
##### other files
tde_create_translated_desktop(
SOURCE smb4k_add.desktop
DESTINATION ${DATA_INSTALL_DIR}/konqsidebartng/add
)
MicheleC marked this conversation as resolved
SlavekB commented 6 months ago
Review

Unexpected indentation.

Unexpected indentation.

@ -0,0 +1 @@
tde_add_project_translations()

@ -0,0 +1,46 @@
include_directories(
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_CURRENT_BINARY_DIR}
${CMAKE_BINARY_DIR}
${TQT_INCLUDE_DIRS}
${TDE_INCLUDE_DIR}
)
link_directories(
${TDE_LIBRARY_DIRS}
)
##### subfolders
add_subdirectory( core )
add_subdirectory( dialogs )
add_subdirectory( browser )
add_subdirectory( configdlg )
add_subdirectory( icons )
add_subdirectory( iconview )
add_subdirectory( listview )
add_subdirectory( searchdlg )
##### smb4k (executable)
tde_add_executable( smb4k AUTOMOC
SOURCES main.cpp smb4k.cpp smb4ksystemtray.cpp
LINK
tdecore-shared tdeui-shared tdeio-shared tdeparts-shared smb4kcore-shared smb4kdialogs-shared
DESTINATION ${BIN_INSTALL_DIR}
)
##### other files
tde_create_translated_desktop(
SOURCE smb4k.desktop
DESTINATION ${XDG_APPS_INSTALL_DIR}
)
install(
FILES smb4k_shell.rc
DESTINATION ${DATA_INSTALL_DIR}/smb4k
)

@ -0,0 +1,31 @@
include_directories(
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_CURRENT_BINARY_DIR}
${CMAKE_BINARY_DIR}
${TQT_INCLUDE_DIRS}
${TDE_INCLUDE_DIR}
)
link_directories(
${TQT_LIBRARY_DIRS}
${TDE_LIBRARY_DIRS}
)
##### smb4knetworkbrowser (shared)
tde_add_kpart( libsmb4knetworkbrowser AUTOMOC
SOURCES
smb4knetworkbrowser_part.cpp smb4knetworkbrowser.cpp
smb4knetworkbrowseritem.cpp smb4knetworkbrowsertooltip.cpp
LINK tdecore-shared tdeui-shared tdeparts-shared smb4kcore-shared smb4kdialogs-shared
DESTINATION ${PLUGIN_INSTALL_DIR}
)
##### other files
install(
FILES smb4knetworkbrowser_part.rc
DESTINATION ${DATA_INSTALL_DIR}/smb4knetworkbrowserpart
)

@ -1918,7 +1918,7 @@ TDEInstance *Smb4KNetworkBrowserPartFactory::instance()
extern "C"
{
void *init_libsmb4knetworkbrowser()
KDE_EXPORT void *init_libsmb4knetworkbrowser()
{
TDEGlobal::locale()->insertCatalogue( "smb4k" );
return new Smb4KNetworkBrowserPartFactory;

@ -0,0 +1,23 @@
include_directories(
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_CURRENT_BINARY_DIR}
${CMAKE_BINARY_DIR}
${TQT_INCLUDE_DIRS}
${TDE_INCLUDE_DIR}
)
link_directories(
${TQT_LIBRARY_DIRS}
${TDE_LIBRARY_DIRS}
)
##### smb4tdeconfigdialog (shared)
tde_add_kpart( libsmb4tdeconfigdialog AUTOMOC
SOURCES
smb4kauthoptions.cpp smb4tdeconfigdialog.cpp smb4knetworkoptions.cpp smb4tdersyncoptions.cpp
smb4ksambaoptions.cpp smb4kshareoptions.cpp smb4ksuperuseroptions.cpp smb4kuserinterfaceoptions.cpp
LINK tdecore-shared tdeui-shared tdeio-shared smb4kcore-shared
DESTINATION ${PLUGIN_INSTALL_DIR}
)

@ -1212,7 +1212,7 @@ const TQStringList & )
extern "C"
{
void *init_libsmb4tdeconfigdialog()
KDE_EXPORT void *init_libsmb4tdeconfigdialog()
{
TDEGlobal::locale()->insertCatalogue( "smb4k" );
return new Smb4TDEConfigDialogFactory;

@ -0,0 +1,49 @@
include_directories(
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_CURRENT_BINARY_DIR}
${CMAKE_BINARY_DIR}
${TQT_INCLUDE_DIRS}
${TDE_INCLUDE_DIR}
)
link_directories(
${TQT_LIBRARY_DIRS}
${TDE_LIBRARY_DIRS}
)
##### smb4kcore (shared)
tde_add_library( smb4kcore SHARED AUTOMOC
SOURCES
smb4kauthinfo.cpp smb4kbookmark.cpp smb4kbookmarkhandler.cpp smb4kcore.cpp
smb4kerror.cpp smb4tdefileio.cpp smb4tdeglobal.cpp smb4kglobal_p.cpp
smb4khomesshareshandler.cpp smb4kmounter.cpp smb4kmounter_p.cpp
smb4knetworkitems.cpp smb4kpasswordhandler.cpp smb4kpreviewer.cpp
smb4kpreviewitem.cpp smb4kprint.cpp smb4kprintinfo.cpp smb4ksambaoptionshandler.cpp
smb4ksambaoptionsinfo.cpp smb4kscanner.cpp smb4kscanner_p.cpp smb4ksettings.kcfgc
smb4kshare.cpp smb4ksynchronizationinfo.cpp smb4ksynchronizer.cpp
LINK tdecore-shared tdeui-shared tdeio-shared tdewalletclient-shared
VERSION 2.0.0
DESTINATION ${LIB_INSTALL_DIR}
)
##### other files
install(
FILES smb4k.kcfg
DESTINATION ${SHARE_INSTALL_PREFIX}/config.kcfg
)
install(
FILES
smb4kauthinfo.h smb4kbookmark.h smb4kbookmarkhandler.h
smb4kcore.h smb4kdefs.h smb4kerror.h smb4tdefileio.h smb4tdeglobal.h
smb4khomesshareshandler.h smb4kmounter.h smb4knetworkitems.h
smb4kpasswordhandler.h smb4kpreviewer.h smb4kpreviewitem.h
smb4kprint.h smb4kprintinfo.h smb4ksambaoptionshandler.h
smb4ksambaoptionsinfo.h smb4kscanner.h smb4kshare.h
smb4ksynchronizationinfo.h smb4ksynchronizer.h
DESTINATION ${INCLUDE_INSTALL_DIR}
MicheleC marked this conversation as resolved
SlavekB commented 6 months ago
Review

Headers should be installed in ${INCLUDE_INSTALL_DIR}. Adding the tde subfolder is a relic of automake builds. If in the future we want to install, for example, in /usr/include/tde, then this path will be set to ${INCLUDE_INSTALL_DIR}.

Headers should be installed in `${INCLUDE_INSTALL_DIR}`. Adding the `tde` subfolder is a relic of automake builds. If in the future we want to install, for example, in `/usr/include/tde`, then this path will be set to `${INCLUDE_INSTALL_DIR}`.
Review

I also agree that the tde location looks weird. I added it to mirror the current automake build structure, but happy to simply use ${INCLUDE_INSTALL_DIR}

I also agree that the `tde` location looks weird. I added it to mirror the current automake build structure, but happy to simply use `${INCLUDE_INSTALL_DIR}`
)

@ -31,6 +31,8 @@
#include <tqstring.h>
#include <tqcstring.h>
#include <kdemacros.h>
/**
* This class provides a container for the authentication data.
*
@ -38,7 +40,7 @@
*/
class Smb4KAuthInfo
class KDE_EXPORT Smb4KAuthInfo
{
public:
/**

@ -31,6 +31,8 @@
// TQt includes
#include <tqstring.h>
#include <kdemacros.h>
// forward declarations
class Smb4KShareItem;
@ -38,7 +40,7 @@ class Smb4KShareItem;
* This class is a container for a set bookmark on a samba share
*/
class Smb4KBookmark
class KDE_EXPORT Smb4KBookmark
{
public:
/**

@ -34,6 +34,8 @@
#include <tqobject.h>
#include <tqvaluelist.h>
#include <kdemacros.h>
// forward declarations
class Smb4KHostItem;
class Smb4KBookmark;
@ -46,7 +48,7 @@ class Smb4KBookmark;
* @author Alexander Reinholdt <dustpuppy@mail.berlios.de>
*/
class Smb4KBookmarkHandler : public TQObject
class KDE_EXPORT Smb4KBookmarkHandler : public TQObject
{
TQ_OBJECT

@ -36,6 +36,8 @@
#include <tqtimer.h>
#include <tqvaluelist.h>
#include <kdemacros.h>
// application specific includes
#include "smb4kscanner.h"
#include "smb4kmounter.h"
@ -57,7 +59,7 @@ class Smb4KShare;
* @author Alexander Reinholdt <dustpuppy@users.berlios.de>
*/
class Smb4KCore : public TQObject
class KDE_EXPORT Smb4KCore : public TQObject
{
TQ_OBJECT

@ -102,7 +102,7 @@ const TQString &Smb4TDEGlobalPrivate::tempDir()
{
Smb4KError::error( ERROR_CREATING_TEMP_DIR, tmpd_name, strerror( errno ) );
return TQString();
return TQString::null;
}
m_temp_dir = TQString( tmpd_name );

@ -369,18 +369,18 @@ void Smb4KMounter::import()
if ( (!new_share->isBroken() &&
(tqstrncmp( new_share->canonicalPath(),
TQDir( Smb4KSettings::mountPrefix() ).canonicalPath(),
TQDir( Smb4KSettings::mountPrefix() ).canonicalPath().length() ) == 0 ||
TQDir( Smb4KSettings::mountPrefix() ).canonicalPath().local8Bit(),
TQDir( Smb4KSettings::mountPrefix() ).canonicalPath().local8Bit().length() ) == 0 ||
tqstrncmp( new_share->canonicalPath(),
TQDir::home().canonicalPath(),
TQDir::home().canonicalPath().length() ) == 0)) ||
TQDir::home().canonicalPath().local8Bit(),
TQDir::home().canonicalPath().local8Bit().length() ) == 0)) ||
(new_share->isBroken() &&
(tqstrncmp( new_share->path(),
TQDir::homeDirPath(),
TQDir::homeDirPath().length() ) == 0 ||
TQDir::homeDirPath().local8Bit(),
TQDir::homeDirPath().local8Bit().length() ) == 0 ||
tqstrncmp( new_share->path(),
Smb4KSettings::mountPrefix(),
Smb4KSettings::mountPrefix().length() ) == 0)) )
Smb4KSettings::mountPrefix().local8Bit(),
Smb4KSettings::mountPrefix().local8Bit().length() ) == 0)) )
{
foreign = false;
}
@ -1053,7 +1053,7 @@ void Smb4KMounter::processMount()
#endif
#if !defined(__sun) && !defined(__irix__)
if ( statfs( m_priv->path(), &filesystem ) == -1 )
if ( statfs( m_priv->path().local8Bit(), &filesystem ) == -1 )
#elif defined(__irix__)
if ( statfs( m_priv->path(), &filesystem, sizeof( filesystem ), 0 ) == -1 )
#else
@ -1588,12 +1588,13 @@ void Smb4KMounter::slotShutdown()
for ( TQValueListIterator<Smb4KShare *> bs = broken_shares.begin(); bs != broken_shares.end(); ++bs )
{
TQString path = Smb4KSettings::mountPrefix()+*it;
if ( tqstrncmp( (*bs)->path(),
Smb4KSettings::mountPrefix()+*it,
(Smb4KSettings::mountPrefix()+*it).length() ) == 0 ||
path.local8Bit(),
path.local8Bit().length() ) == 0 ||
tqstrncmp( (*bs)->canonicalPath(),
Smb4KSettings::mountPrefix()+*it,
(Smb4KSettings::mountPrefix()+*it).length() ) == 0 )
path.local8Bit(),
path.local8Bit().length() ) == 0 )
{
broken = true;

@ -37,6 +37,7 @@
#include <tqfile.h>
// KDE includes
#include <kdemacros.h>
#include <kprocess.h>
// application specific includes
@ -56,7 +57,7 @@ class Smb4KShare;
* @author Alexander Reinholdt <dustpuppy@users.berlios.de>
*/
class Smb4KMounter : public TQObject
class KDE_EXPORT Smb4KMounter : public TQObject
{
TQ_OBJECT

@ -35,12 +35,14 @@
#include <tqobject.h>
#include <tqstring.h>
#include <kdemacros.h>
/**
* This class provides a container for a workgroup/domain found in the network
* neighborhood.
*/
class Smb4KWorkgroupItem
class KDE_EXPORT Smb4KWorkgroupItem
{
public:
/**
@ -158,7 +160,7 @@ class Smb4KWorkgroupItem
* neighborhood.
*/
class Smb4KHostItem
class KDE_EXPORT Smb4KHostItem
{
public:
/**
@ -361,7 +363,7 @@ class Smb4KHostItem
* network neighborhood.
*/
class Smb4KShareItem
class KDE_EXPORT Smb4KShareItem
{
public:
/**

@ -35,9 +35,10 @@
#include <tqcheckbox.h>
// KDE includes
#include <tdewallet.h>
#include <kdemacros.h>
#include <kdialogbase.h>
#include <kprocess.h>
#include <tdewallet.h>
// forward declarations
#ifndef __FreeBSD__
@ -60,7 +61,7 @@ class Smb4KAuthInfo;
* @author Alexander Reinholdt <dustpuppy@users.berlios.de>
*/
class Smb4KPasswordHandler : public TQObject
class KDE_EXPORT Smb4KPasswordHandler : public TQObject
{
TQ_OBJECT

@ -36,6 +36,7 @@
#include <tqptrqueue.h>
// KDE includes
#include <kdemacros.h>
#include <kprocess.h>
// forward declarations
@ -48,7 +49,7 @@ class Smb4KPreviewItem;
* @author Alexander Reinholdt <dustpuppy@users.berlios.de>
*/
class Smb4KPreviewer : public TQObject
class KDE_EXPORT Smb4KPreviewer : public TQObject
{
TQ_OBJECT

@ -35,6 +35,8 @@
#include <tqmap.h>
#include <tqpair.h>
#include <kdemacros.h>
// application specific includes
#include "smb4knetworkitems.h"
@ -47,7 +49,7 @@ typedef TQPair<int, TQString> ContentsItem;
* @author Alexander Reinholdt <dustpuppy@users.berlios.de>
*/
class Smb4KPreviewItem
class KDE_EXPORT Smb4KPreviewItem
{
public:
/**

@ -36,8 +36,9 @@
#include <tqwidget.h>
// KDE includes
#include <kprocess.h>
#include <kdemacros.h>
#include <kdialogbase.h>
#include <kprocess.h>
// forward declarations
class Smb4KPrintInfo;
@ -52,7 +53,7 @@ class Smb4KPrintInfo;
* @author Alexander Reinholdt <dustpuppy@users.berlios.de>
*/
class Smb4KPrint : public TQObject
class KDE_EXPORT Smb4KPrint : public TQObject
{
TQ_OBJECT

@ -33,6 +33,8 @@
// TQt includes
#include <tqstring.h>
#include <kdemacros.h>
// application specific includes
#include "smb4knetworkitems.h"
@ -41,7 +43,7 @@
* that is needed to print a file.
*/
class Smb4KPrintInfo
class KDE_EXPORT Smb4KPrintInfo
{
public:
/**

@ -35,6 +35,7 @@
#include <tqmap.h>
// KDE includes
#include <kdemacros.h>
#include <tdeconfig.h>
// forward declarations
@ -49,7 +50,7 @@ class Smb4KShare;
* @author Alexander Reinholdt <dustpuppy@mail.berlios.de>
*/
class Smb4KSambaOptionsHandler : public TQObject
class KDE_EXPORT Smb4KSambaOptionsHandler : public TQObject
{
TQ_OBJECT

@ -34,6 +34,8 @@
// TQt includes
#include <tqstring.h>
#include <kdemacros.h>
// forward declarations
class Smb4KShare;
@ -45,7 +47,7 @@ class Smb4KShare;
* @author Alexander Reinholdt <dustpuppy@mail.berlios.de>
*/
class Smb4KSambaOptionsInfo
class KDE_EXPORT Smb4KSambaOptionsInfo
{
public:
/**

@ -36,6 +36,7 @@
#include <tqptrqueue.h>
// KDE includes
#include <kdemacros.h>
#include <kprocess.h>
// application specific includes
@ -55,7 +56,7 @@ class Smb4KShareItem;
* @author Alexander Reinholdt <dustpuppy@mail.berlios.de>
*/
class Smb4KScanner : public TQObject
class KDE_EXPORT Smb4KScanner : public TQObject
{
TQ_OBJECT

@ -4,3 +4,4 @@ Singleton=true
Mutators=true
ItemAccessors=true
SetUserTexts=true
Visibility=KDE_EXPORT

@ -38,6 +38,7 @@
#include <tqcstring.h>
// KDE includes
#include <kdemacros.h>
#include <kuser.h>
@ -50,7 +51,7 @@
* @author Alexander Reinholdt <dustpuppy@users.berlios.de>
*/
class Smb4KShare
class KDE_EXPORT Smb4KShare
{
public:
/**

@ -31,8 +31,9 @@
#endif
// KDE includes
#include <kprocess.h>
#include <kdemacros.h>
#include <kdialogbase.h>
#include <kprocess.h>
// TQt includes
#include <tqobject.h>
@ -51,7 +52,7 @@ class Smb4KSynchronizationInfo;
*/
class Smb4KSynchronizer : public TQObject
class KDE_EXPORT Smb4KSynchronizer : public TQObject
{
TQ_OBJECT

@ -36,6 +36,7 @@
#include <tqcstring.h>
// KDE include
#include <kdemacros.h>
#include <kprocess.h>
@ -46,7 +47,7 @@
* @author Alexander Reinholdt <dustpuppy@mail.berlios.de>
*/
class Smb4KFileIO : public TQObject
class KDE_EXPORT Smb4KFileIO : public TQObject
{
TQ_OBJECT

@ -29,6 +29,7 @@
#include <tqstring.h>
#include <tqtimer.h>
#include <kdemacros.h>
#include <tdeconfig.h>
// forward declarations:
@ -42,7 +43,7 @@ class Smb4KHomesSharesHandler;
* @author Alexander Reinholdt <dustpuppy@users.berlios.de>
*/
namespace Smb4TDEGlobal
namespace KDE_EXPORT Smb4TDEGlobal
{
/**
* This returns the pointer to the global timer for the application.

@ -0,0 +1,23 @@
include_directories(
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_CURRENT_BINARY_DIR}
${CMAKE_BINARY_DIR}
${TQT_INCLUDE_DIRS}
${TDE_INCLUDE_DIR}
)
link_directories(
${TQT_LIBRARY_DIRS}
${TDE_LIBRARY_DIRS}
)
##### smb4kdialogs (shared)
tde_add_library( smb4kdialogs SHARED AUTOMOC
SOURCES
smb4kbookmarkeditor.cpp smb4kcustomoptionsdialog.cpp smb4kmountdialog.cpp
smb4kpreviewdialog.cpp smb4kprintdialog.cpp smb4ksynchronizationdialog.cpp
LINK tdecore-shared tdeui-shared smb4kcore-shared
DESTINATION ${LIB_INSTALL_DIR}
)

@ -31,6 +31,7 @@
#endif
// KDE includes
#include <kdemacros.h>
#include <kdialogbase.h>
#include <tdelistview.h>
#include <tdeactioncollection.h>
@ -41,7 +42,7 @@
* @author Alexander Reinholdt <dustpuppy@users.berlios.de>
*/
class Smb4KBookmarkEditor : public KDialogBase
class KDE_EXPORT Smb4KBookmarkEditor : public KDialogBase
{
TQ_OBJECT

@ -35,6 +35,7 @@
#include <tqcheckbox.h>
// KDE includes
#include <kdemacros.h>
#include <kdialogbase.h>
#include <knuminput.h>
#include <kcombobox.h>
@ -44,7 +45,7 @@
class Smb4KHostItem;
class Smb4KShareItem;
class Smb4KCustomOptionsDialog : public KDialogBase
class KDE_EXPORT Smb4KCustomOptionsDialog : public KDialogBase
{
TQ_OBJECT

@ -35,6 +35,7 @@
#include <tqcheckbox.h>
// KDE includes
#include <kdemacros.h>
#include <kdialogbase.h>
#include <klineedit.h>
@ -44,7 +45,7 @@
* @author Alexander Reinholdt <dustpuppy@users.berlios.de>
*/
class Smb4KMountDialog : public KDialogBase
class KDE_EXPORT Smb4KMountDialog : public KDialogBase
{
TQ_OBJECT

@ -34,6 +34,7 @@
#include <tqvaluelist.h>
// KDE includes
#include <kdemacros.h>
#include <kdialogbase.h>
#include <kiconview.h>
#include <tdetoolbar.h>
@ -52,7 +53,7 @@ class Smb4KShareItem;
* @author Alexander Reinholdt <dustpuppy@users.berlios.de>
*/
class Smb4KPreviewDialog : public KDialogBase
class KDE_EXPORT Smb4KPreviewDialog : public KDialogBase
{
TQ_OBJECT

@ -34,6 +34,7 @@
#include <tqstring.h>
// KDE includes
#include <kdemacros.h>
#include <kdialogbase.h>
// forward declarations
@ -48,7 +49,7 @@ class Smb4KShareItem;
* @author Alexander Reinholdt <dustpuppy@users.berlios.de>
*/
class Smb4KPrintDialog : public KDialogBase
class KDE_EXPORT Smb4KPrintDialog : public KDialogBase
{
TQ_OBJECT

@ -31,6 +31,7 @@
#endif
// KDE includes
#include <kdemacros.h>
#include <kdialogbase.h>
#include <kurlrequester.h>
@ -46,7 +47,7 @@ class Smb4KSynchronizationInfo;
* @author Alexander Reinholdt <dustpuppy@users.berlios.de>
*/
class Smb4KSynchronizationDialog : public KDialogBase
class KDE_EXPORT Smb4KSynchronizationDialog : public KDialogBase
{
TQ_OBJECT

@ -0,0 +1 @@
tde_install_icons( ${PROJECT_NAME} )

@ -0,0 +1,31 @@
include_directories(
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_CURRENT_BINARY_DIR}
${CMAKE_BINARY_DIR}
${TQT_INCLUDE_DIRS}
${TDE_INCLUDE_DIR}
)
link_directories(
${TQT_LIBRARY_DIRS}
${TDE_LIBRARY_DIRS}
)
##### smb4ksharesiconview (shared)
tde_add_kpart( libsmb4ksharesiconview AUTOMOC
SOURCES
smb4ksharesiconview.cpp smb4ksharesiconview_part.cpp
smb4ksharesiconviewitem.cpp smb4ksharesiconviewtooltip.cpp
LINK tdecore-shared tdeui-shared tdeio-shared tdeparts-shared smb4kcore-shared smb4kdialogs-shared
DESTINATION ${PLUGIN_INSTALL_DIR}
)
##### other files
install(
FILES smb4ksharesiconview_part.rc
DESTINATION ${DATA_INSTALL_DIR}/smb4ksharesiconviewpart
)

@ -562,7 +562,7 @@ TDEInstance *Smb4KSharesIconViewPartFactory::instance()
extern "C"
{
void *init_libsmb4ksharesiconview()
KDE_EXPORT void *init_libsmb4ksharesiconview()
{
TDEGlobal::locale()->insertCatalogue( "smb4k" );
return new Smb4KSharesIconViewPartFactory;

@ -0,0 +1,31 @@
include_directories(
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_CURRENT_BINARY_DIR}
${CMAKE_BINARY_DIR}
${TQT_INCLUDE_DIRS}
${TDE_INCLUDE_DIR}
)
link_directories(
${TQT_LIBRARY_DIRS}
${TDE_LIBRARY_DIRS}
)
##### smb4kdialogs (shared)
tde_add_kpart( libsmb4kshareslistview AUTOMOC
SOURCES
smb4kshareslistview.cpp smb4kshareslistview_part.cpp
smb4kshareslistviewitem.cpp smb4kshareslistviewtooltip.cpp
LINK tdecore-shared tdeui-shared tdeio-shared tdeparts-shared smb4kcore-shared smb4kdialogs-shared
DESTINATION ${PLUGIN_INSTALL_DIR}
)
##### other files
install(
FILES smb4kshareslistview_part.rc
DESTINATION ${DATA_INSTALL_DIR}/smb4kshareslistviewpart
)

@ -689,7 +689,7 @@ TDEInstance *Smb4KSharesListViewPartFactory::instance()
extern "C"
{
void *init_libsmb4kshareslistview()
KDE_EXPORT void *init_libsmb4kshareslistview()
{
TDEGlobal::locale()->insertCatalogue( "smb4k" );
return new Smb4KSharesListViewPartFactory;

@ -0,0 +1,21 @@
include_directories(
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_CURRENT_BINARY_DIR}
${CMAKE_BINARY_DIR}
${TQT_INCLUDE_DIRS}
${TDE_INCLUDE_DIR}
)
link_directories(
${TQT_LIBRARY_DIRS}
${TDE_LIBRARY_DIRS}
)
##### smb4ksearchdialog (shared)
tde_add_kpart( libsmb4ksearchdialog AUTOMOC
SOURCES smb4ksearchdialog.cpp smb4ksearchdialog_part.cpp smb4ksearchdialogitem.cpp
LINK tdecore-shared tdeui-shared tdeparts-shared smb4kcore-shared
DESTINATION ${PLUGIN_INSTALL_DIR}
)

@ -267,7 +267,7 @@ TDEInstance *Smb4KSearchDialogPartFactory::instance()
extern "C"
{
void *init_libsmb4ksearchdialog()
KDE_EXPORT void *init_libsmb4ksearchdialog()
{
TDEGlobal::locale()->insertCatalogue( "smb4k" );
return new Smb4KSearchDialogPartFactory;

@ -261,7 +261,7 @@ void Smb4KApp::setupView()
createGUI( m_shares_part );
accel()->insert( i18n( "Jump to shares view" ), CTRL+Key_3, TQT_TQOBJECT(this), TQT_SLOT( slotJumpToSharesView() ), false, true );
accel()->insert( i18n( "Jump to shares view" ).utf8().data(), CTRL+Key_3, TQT_TQOBJECT(this), TQT_SLOT( slotJumpToSharesView() ), false, true );
}
}
else
@ -290,7 +290,7 @@ void Smb4KApp::setupView()
factory()->addClient( m_browser_part );
accel()->insert( i18n( "Jump to network browser" ), CTRL+Key_1, TQT_TQOBJECT(this), TQT_SLOT( slotJumpToNetworkBrowser() ), false, true );
accel()->insert( i18n( "Jump to network browser" ).utf8().data(), CTRL+Key_1, TQT_TQOBJECT(this), TQT_SLOT( slotJumpToNetworkBrowser() ), false, true );
}
}
else
@ -329,7 +329,7 @@ void Smb4KApp::setupView()
factory()->addClient( m_search_part );
accel()->insert( i18n( "Jump to search dialog" ), CTRL+Key_2, TQT_TQOBJECT(this), TQT_SLOT( slotJumpToSearchDialog() ), false, true );
accel()->insert( i18n( "Jump to search dialog" ).utf8().data(), CTRL+Key_2, TQT_TQOBJECT(this), TQT_SLOT( slotJumpToSearchDialog() ), false, true );
}
}
else
@ -886,7 +886,7 @@ void Smb4KApp::slotSetupBookmarksMenu()
for ( TQStringList::ConstIterator it = display_strings.begin(); it != display_strings.end(); ++it )
{
TDEAction *a = new TDEAction( *it, "folder", TDEShortcut::null(), 0, 0, actionCollection(), *it );
TDEAction *a = new TDEAction( *it, "folder", TDEShortcut::null(), 0, 0, actionCollection(), (*it).utf8() );
a->setGroup( "Bookmarks" );
connect( a, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( slotBookmarkActivated() ) );
bookmark_list.append( a );

@ -289,7 +289,7 @@ void Smb4KSystemTray::slotSetupBookmarksMenu()
for ( TQStringList::ConstIterator it = display_strings.begin(); it != display_strings.end(); ++it )
{
// Create the bookmark action:
TDEAction *a = new TDEAction( *it, "folder", TDEShortcut::null(), 0, 0, actionCollection(), "st_"+*it );
TDEAction *a = new TDEAction( *it, "folder", TDEShortcut::null(), 0, 0, actionCollection(), ("st_"+*it).utf8() );
a->setGroup( "Bookmarks" );
connect( a, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( slotBookmarkActivated() ) );
@ -494,7 +494,7 @@ void Smb4KSystemTray::slotSetupSharesMenu()
{
// Find the "Force Unmount" action and decide if it needs to be
// enabled/disabled:
TDEAction *force = actionCollection()->action( "st_[force]_"+canonical_path );
TDEAction *force = actionCollection()->action( ("st_[force]_"+canonical_path).utf8() );
if ( force )
{
@ -512,7 +512,7 @@ void Smb4KSystemTray::slotSetupSharesMenu()
if ( menu )
{
// Unmount action
action = actionCollection()->action( "st_[unmount]_"+canonical_path );
action = actionCollection()->action( ("st_[unmount]_"+canonical_path).utf8() );
if ( action )
{
@ -522,7 +522,7 @@ void Smb4KSystemTray::slotSetupSharesMenu()
#ifdef __linux__
// Force Unmount action
action = actionCollection()->action( "st_[force]_"+canonical_path );
action = actionCollection()->action( ("st_[force]_"+canonical_path).utf8() );
if ( action )
{
@ -532,7 +532,7 @@ void Smb4KSystemTray::slotSetupSharesMenu()
#endif
// Synchronize action
action = actionCollection()->action( "st_[synchronize]_"+canonical_path );
action = actionCollection()->action( ("st_[synchronize]_"+canonical_path).utf8() );
if ( action )
{
@ -541,7 +541,7 @@ void Smb4KSystemTray::slotSetupSharesMenu()
}
// Konsole action
action = actionCollection()->action( "st_[konsole]_"+canonical_path );
action = actionCollection()->action( ("st_[konsole]_"+canonical_path).utf8() );
if ( action )
{
@ -550,7 +550,7 @@ void Smb4KSystemTray::slotSetupSharesMenu()
}
// Konqueror action
action = actionCollection()->action( "st_[filemanager]_"+canonical_path );
action = actionCollection()->action( ("st_[filemanager]_"+canonical_path).utf8() );
if ( action )
{
@ -575,7 +575,7 @@ void Smb4KSystemTray::slotSetupSharesMenu()
if ( menu )
{
// Unmount action
action = actionCollection()->action( "st_[unmount]_"+canonical_path );
action = actionCollection()->action( ("st_[unmount]_"+canonical_path).utf8() );
if ( action )
{
@ -585,7 +585,7 @@ void Smb4KSystemTray::slotSetupSharesMenu()
#ifdef __linux__
// Force Unmount action
action = actionCollection()->action( "st_[force]_"+canonical_path );
action = actionCollection()->action( ("st_[force]_"+canonical_path).utf8() );
if ( action )
{
@ -595,7 +595,7 @@ void Smb4KSystemTray::slotSetupSharesMenu()
#endif
// Synchronize action
action = actionCollection()->action( "st_[synchronize]_"+canonical_path );
action = actionCollection()->action( ("st_[synchronize]_"+canonical_path).utf8() );
if ( action )
{
@ -604,7 +604,7 @@ void Smb4KSystemTray::slotSetupSharesMenu()
}
// Konsole action
action = actionCollection()->action( "st_[konsole]_"+canonical_path );
action = actionCollection()->action( ("st_[konsole]_"+canonical_path).utf8() );
if ( action )
{
@ -613,7 +613,7 @@ void Smb4KSystemTray::slotSetupSharesMenu()
}
// Konqueror action
action = actionCollection()->action( "st_[filemanager]_"+canonical_path );
action = actionCollection()->action( ("st_[filemanager]_"+canonical_path).utf8() );
if ( action )
{
@ -638,7 +638,7 @@ void Smb4KSystemTray::slotSetupSharesMenu()
if ( menu )
{
// Unmount action
action = actionCollection()->action( "st_[unmount]_"+canonical_path );
action = actionCollection()->action( ("st_[unmount]_"+canonical_path).utf8() );
if ( action )
{
@ -648,7 +648,7 @@ void Smb4KSystemTray::slotSetupSharesMenu()
#ifdef __linux__
// Force Unmount action
action = actionCollection()->action( "st_[force]_"+canonical_path );
action = actionCollection()->action( ("st_[force]_"+canonical_path).utf8() );
if ( action )
{
@ -658,7 +658,7 @@ void Smb4KSystemTray::slotSetupSharesMenu()
#endif
// Synchronize action
action = actionCollection()->action( "st_[synchronize]_"+canonical_path );
action = actionCollection()->action( ("st_[synchronize]_"+canonical_path).utf8() );
if ( action )
{
@ -667,7 +667,7 @@ void Smb4KSystemTray::slotSetupSharesMenu()
}
// Konsole action
action = actionCollection()->action( "st_[konsole]_"+canonical_path );
action = actionCollection()->action( ("st_[konsole]_"+canonical_path).utf8() );
if ( action )
{
@ -676,7 +676,7 @@ void Smb4KSystemTray::slotSetupSharesMenu()
}
// Konqueror action
action = actionCollection()->action( "st_[filemanager]_"+canonical_path );
action = actionCollection()->action( ("st_[filemanager]_"+canonical_path).utf8() );
if ( action )
{
@ -866,9 +866,9 @@ void Smb4KSystemTray::slotSetupSharesMenu()
// Disable actions that should not be performed on an inaccessible
// share:
actionCollection()->action( TQString("st_[synchronize]_"+(*it)->canonicalPath()) )->setEnabled( false );
actionCollection()->action( TQString("st_[konsole]_"+(*it)->canonicalPath()) )->setEnabled( false );
actionCollection()->action( TQString("st_[filemanager]_"+(*it)->canonicalPath()) )->setEnabled( false );
actionCollection()->action( TQString("st_[synchronize]_"+(*it)->canonicalPath()).utf8() )->setEnabled( false );
actionCollection()->action( TQString("st_[konsole]_"+(*it)->canonicalPath()).utf8() )->setEnabled( false );
actionCollection()->action( TQString("st_[filemanager]_"+(*it)->canonicalPath()).utf8() )->setEnabled( false );
}
// Change the text if necessary:
@ -904,7 +904,7 @@ void Smb4KSystemTray::slotSetupSharesMenu()
TDEAction *action = NULL;
// Unmount action
action = actionCollection()->action( "st_[unmount]_"+canonical_path );
action = actionCollection()->action( ("st_[unmount]_"+canonical_path).utf8() );
if ( action )
{
@ -914,7 +914,7 @@ void Smb4KSystemTray::slotSetupSharesMenu()
#ifdef __linux__
// Force Unmount action
action = actionCollection()->action( "st_[force]_"+canonical_path );
action = actionCollection()->action( ("st_[force]_"+canonical_path).utf8() );
if ( action )
{
@ -924,7 +924,7 @@ void Smb4KSystemTray::slotSetupSharesMenu()
#endif
// Synchronize action
action = actionCollection()->action( "st_[synchronize]_"+canonical_path );
action = actionCollection()->action( ("st_[synchronize]_"+canonical_path).utf8() );
if ( action )
{
@ -933,7 +933,7 @@ void Smb4KSystemTray::slotSetupSharesMenu()
}
// Konsole action
action = actionCollection()->action( "st_[konsole]_"+canonical_path );
action = actionCollection()->action( ("st_[konsole]_"+canonical_path).utf8() );
if ( action )
{
@ -942,7 +942,7 @@ void Smb4KSystemTray::slotSetupSharesMenu()
}
// Konqueror action
action = actionCollection()->action( "st_[filemanager]_"+canonical_path );
action = actionCollection()->action( ("st_[filemanager]_"+canonical_path).utf8() );
if ( action )
{

@ -0,0 +1,40 @@
include_directories(
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_CURRENT_BINARY_DIR}
${CMAKE_BINARY_DIR}
${TDE_INCLUDE_DIR}
${TQT_INCLUDE_DIRS}
)
link_directories(
${TQT_LIBRARY_DIRS}
${TDE_LIBRARY_DIRS}
)
##### (executable)
tde_add_executable( smb4k_mount AUTOMOC
SOURCES smb4k_mount.cpp
DESTINATION ${BIN_INSTALL_DIR}
)
tde_add_executable( smb4k_umount AUTOMOC
SOURCES smb4k_umount.cpp
DESTINATION ${BIN_INSTALL_DIR}
)
tde_add_executable( smb4k_kill AUTOMOC
SOURCES smb4k_kill.cpp
DESTINATION ${BIN_INSTALL_DIR}
)
tde_add_executable( smb4k_cat AUTOMOC
SOURCES smb4k_cat.cpp
DESTINATION ${BIN_INSTALL_DIR}
)
tde_add_executable( smb4k_mv AUTOMOC
SOURCES smb4k_mv.cpp
DESTINATION ${BIN_INSTALL_DIR}
)
Loading…
Cancel
Save