Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit 98ca94ad authored by Patrick Spendrin's avatar Patrick Spendrin

make a private konsole library as said on kde-devel@

use the correct export macros to make a windows patch easier.

svn path=/trunk/KDE/kdebase/apps/konsole/; revision=922444
parent e45c312a
......@@ -30,6 +30,9 @@
// KDE
#include <KBookmarkManager>
// Konsole
#include "konsole_export.h"
class KMenu;
class KBookmarkMenu;
class KBookmarkManager;
......@@ -51,7 +54,7 @@ class ViewProperties;
*
* When the user selects a bookmark, the openUrl() signal is emitted.
*/
class BookmarkHandler : public QObject, public KBookmarkOwner
class KONSOLEPRIVATE_EXPORT BookmarkHandler : public QObject, public KBookmarkOwner
{
Q_OBJECT
......
......@@ -33,7 +33,7 @@ configure_file (config-konsole.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-konsol
Session.h
Konsole::Session )
set(konsole_COMMON_SRCS
set(konsoleprivate_SRCS
${sessionadaptors_SRCS}
BlockArray.cpp
BookmarkHandler.cpp
......@@ -95,14 +95,7 @@ configure_file (config-konsole.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-konsol
### Konsole Application
set(konsole_KDEINIT_SRCS
${konsole_COMMON_SRCS}
Application.cpp
MainWindow.cpp
main.cpp
)
kde4_add_ui_files(konsole_KDEINIT_SRCS
kde4_add_ui_files(konsoleprivate_SRCS
ColorSchemeEditor.ui
CopyInputDialog.ui
EditProfileDialog.ui
......@@ -111,11 +104,22 @@ configure_file (config-konsole.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-konsol
RemoteConnectionDialog.ui
)
kde4_add_library(konsoleprivate SHARED ${konsoleprivate_SRCS})
target_link_libraries(konsoleprivate ${konsole_LIBS})
target_link_libraries(konsoleprivate LINK_INTERFACE_LIBRARIES ${konsole_LIBS})
set(konsole_KDEINIT_SRCS
Application.cpp
MainWindow.cpp
main.cpp
)
kde4_add_app_icon(konsole_KDEINIT_SRCS "${KDE4_ICON_INSTALL_DIR}/oxygen/*/apps/utilities-terminal.png")
kde4_add_kdeinit_executable( konsole ${konsole_KDEINIT_SRCS})
target_link_libraries(kdeinit_konsole ${konsole_LIBS})
target_link_libraries(kdeinit_konsole konsoleprivate)
install(TARGETS kdeinit_konsole ${INSTALL_TARGETS_DEFAULT_ARGS} )
install(TARGETS konsole ${INSTALL_TARGETS_DEFAULT_ARGS})
install(TARGETS kdeinit_konsole konsole konsoleprivate ${INSTALL_TARGETS_DEFAULT_ARGS})
### Embedded Konsole KPart
......@@ -126,7 +130,7 @@ configure_file (config-konsole.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-konsol
kde4_add_plugin(konsolepart WITH_PREFIX ${konsolepart_PART_SRCS})
set_target_properties(konsolepart PROPERTIES DEFINE_SYMBOL KONSOLE_PART)
target_link_libraries(konsolepart ${KDE4_KPARTS_LIBS} ${konsole_LIBS})
target_link_libraries(konsolepart ${KDE4_KPARTS_LIBS} konsoleprivate)
install(TARGETS konsolepart DESTINATION ${PLUGIN_INSTALL_DIR} )
### konsoleprofile command-line tool
......
......@@ -61,7 +61,7 @@ class Profile;
* the persistant argument set to false. These changes are then
* un-done when the dialog is closed.
*/
class EditProfileDialog : public KDialog
class KONSOLEPRIVATE_EXPORT EditProfileDialog : public KDialog
{
Q_OBJECT
......
......@@ -33,6 +33,8 @@
#include <QtCore/QTextStream>
#include <QtCore/QTimer>
// Konsole
#include "konsole_export.h"
namespace Konsole
{
......@@ -117,7 +119,7 @@ enum
* how long the emulation has been active/idle for and also respond to
* a 'bell' event in different ways.
*/
class Emulation : public QObject
class KONSOLEPRIVATE_EXPORT Emulation : public QObject
{
Q_OBJECT
......
......@@ -29,8 +29,8 @@
#include <QtCore/QMetaType>
#include <QtCore/QVarLengthArray>
// KDE
#include <kdemacros.h>
// Konsole
#include "konsole_export.h"
class QIODevice;
class QTextStream;
......@@ -442,7 +442,7 @@ private:
* Manages the keyboard translations available for use by terminal sessions,
* see KeyboardTranslator.
*/
class KDE_EXPORT KeyboardTranslatorManager
class KONSOLEPRIVATE_EXPORT KeyboardTranslatorManager
{
public:
/**
......
......@@ -48,7 +48,7 @@ namespace Konsole
* the user to add new profiles, and remove or edit existing
* profile types.
*/
class ManageProfilesDialog : public KDialog
class KONSOLEPRIVATE_EXPORT ManageProfilesDialog : public KDialog
{
Q_OBJECT
......
......@@ -34,7 +34,9 @@
// KDE
#include <KSharedPtr>
#include <KDebug>
#include <kdemacros.h>
// Konsole
#include "konsole_export.h"
class KConfig;
class KConfigGroup;
......@@ -61,7 +63,7 @@ class ProfileGroup;
* Profiles can be loaded from disk using ProfileReader instances
* and saved to disk using ProfileWriter instances.
*/
class KDE_EXPORT Profile : public QSharedData
class KONSOLEPRIVATE_EXPORT Profile : public QSharedData
{
friend class KDE4ProfileReader;
......@@ -439,7 +441,7 @@ inline bool Profile::canInheritProperty(Property property)
* This can be used as a parent for other profiles or a fallback in case
* a profile cannot be loaded from disk.
*/
class FallbackProfile : public Profile
class KONSOLEPRIVATE_EXPORT FallbackProfile : public Profile
{
public:
FallbackProfile();
......@@ -458,7 +460,7 @@ public:
* The Profile::Name and Profile::Path properties are unique to individual profiles,
* setting these properties on a ProfileGroup has no effect.
*/
class KDE_EXPORT ProfileGroup : public Profile
class KONSOLEPRIVATE_EXPORT ProfileGroup : public Profile
{
public:
typedef KSharedPtr<ProfileGroup> Ptr;
......@@ -598,7 +600,7 @@ private:
* Icon=konsole;Directory=/home/bob
* @endcode
*/
class ProfileCommandParser
class KONSOLEPRIVATE_EXPORT ProfileCommandParser
{
public:
/**
......
......@@ -25,6 +25,7 @@
#include <QtCore/QObject>
#include "Profile.h"
#include "konsole_export.h"
class QAction;
class QActionGroup;
......@@ -46,7 +47,7 @@ class Profile;
* The user-data associated with each session can be passed to the createProfile() method of the
* SessionManager to create a new terminal session.
*/
class ProfileList : public QObject
class KONSOLEPRIVATE_EXPORT ProfileList : public QObject
{
Q_OBJECT
......
......@@ -31,7 +31,9 @@
// KDE
#include <KPtyProcess>
#include <kdemacros.h>
// Konsole
#include "konsole_export.h"
namespace Konsole
{
......@@ -49,7 +51,7 @@ namespace Konsole
* To start the terminal process, call the start() method
* with the program name and appropriate arguments.
*/
class KDE_EXPORT Pty: public KPtyProcess
class KONSOLEPRIVATE_EXPORT Pty: public KPtyProcess
{
Q_OBJECT
......
......@@ -30,7 +30,7 @@
// KDE
#include <KApplication>
#include <KMainWindow>
#include <kdemacros.h>
#include "konsole_export.h"
// Konsole
#include "History.h"
......@@ -58,7 +58,7 @@ class ZModemDialog;
* or send input to the program in the terminal in the form of keypresses and mouse
* activity.
*/
class KDE_EXPORT Session : public QObject
class KONSOLEPRIVATE_EXPORT Session : public QObject
{
Q_OBJECT
......
......@@ -81,7 +81,7 @@ typedef QPointer<Session> SessionPtr;
* which contains the view to plug the controller's actions into the menu when
* the view is focused.
*/
class SessionController : public ViewProperties , public KXMLGUIClient
class KONSOLEPRIVATE_EXPORT SessionController : public ViewProperties , public KXMLGUIClient
{
Q_OBJECT
......
......@@ -56,7 +56,7 @@ class Session;
* how to display them. The favorite status of a profile can be altered using
* setFavorite() and retrieved using isFavorite()
*/
class KDE_EXPORT SessionManager : public QObject
class KONSOLEPRIVATE_EXPORT SessionManager : public QObject
{
Q_OBJECT
......
......@@ -29,6 +29,7 @@
// Konsole
#include "Filter.h"
#include "Character.h"
#include "konsole_export.h"
class QDrag;
class QDragEnterEvent;
......@@ -63,7 +64,7 @@ class ScreenWindow;
*
* TODO More documentation
*/
class TerminalDisplay : public QWidget
class KONSOLEPRIVATE_EXPORT TerminalDisplay : public QWidget
{
Q_OBJECT
......
......@@ -65,7 +65,7 @@ class ViewSplitter;
* user interface elements specific to each display/session pair.
*
*/
class ViewManager : public QObject
class KONSOLEPRIVATE_EXPORT ViewManager : public QObject
{
Q_OBJECT
......
......@@ -29,6 +29,9 @@
// KDE
#include <KUrl>
// Konsole
#include "konsole_export.h"
namespace Konsole
{
......@@ -39,7 +42,7 @@ namespace Konsole
* This can be used by navigation widgets in a ViewContainer sub-class to provide a tab, label or other
* item for switching between views.
*/
class ViewProperties : public QObject
class KONSOLEPRIVATE_EXPORT ViewProperties : public QObject
{
Q_OBJECT
......
/*
This file is part of the KDE project
Copyright (C) 2009 Patrick Spendrin <ps_ml@gmx.de>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License version 2 as published by the Free Software Foundation.
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 KONSOLE_EXPORT_H
#define KONSOLE_EXPORT_H
/* needed for KDE_EXPORT macros */
#include <kdemacros.h>
#ifndef KONSOLEPRIVATE_EXPORT
# if defined(MAKE_KONSOLEPRIVATE_LIB)
/* We are building this library */
# define KONSOLEPRIVATE_EXPORT KDE_EXPORT
# else
/* We are using this library */
# define KONSOLEPRIVATE_EXPORT KDE_IMPORT
# endif
#endif
#endif
set(EXECUTABLE_OUTPUT_PATH ${CMAKE_CURRENT_BINARY_DIR})
include_directories( ${KDE4_KPTY_INCLUDES} ${KDE4_KPARTS_INCLUDES} ${QT_QTTEST_INCLUDES})
set(KONSOLE_TEST_LIBS ${QT_QTTEST_LIBRARY} kdeinit_konsole)
set(KONSOLE_TEST_LIBS ${QT_QTTEST_LIBRARY} konsoleprivate)
kde4_add_executable(PartTest TEST PartTest.cpp)
target_link_libraries(PartTest ${KDE4_KPARTS_LIBS} ${KDE4_KPTY_LIBS} ${KONSOLE_TEST_LIBS})
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment