From b477a576734ecc272f81da28fb5b089e914e39c5 Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Mon, 9 Jan 2012 16:38:02 -0600 Subject: Fix visibility of krandr and krsync libraries --- krandr/randr.cpp | 143 ++++++++++++++++++++++++++++-------------------------- krsync/krsync.cpp | 67 ++++++++++++------------- krsync/krsync.h | 1 + 3 files changed, 108 insertions(+), 103 deletions(-) diff --git a/krandr/randr.cpp b/krandr/randr.cpp index bd57fdc9f..eb71a818a 100644 --- a/krandr/randr.cpp +++ b/krandr/randr.cpp @@ -53,7 +53,7 @@ public: XRRScreenConfiguration* config; }; -RandRScreen::RandRScreen(int screenIndex) +KDE_EXPORT RandRScreen::RandRScreen(int screenIndex) : d(new RandRScreenPrivate()) , m_screen(screenIndex) , m_shownDialog(NULL) @@ -62,12 +62,12 @@ RandRScreen::RandRScreen(int screenIndex) setOriginal(); } -RandRScreen::~RandRScreen() +KDE_EXPORT RandRScreen::~RandRScreen() { delete d; } -void RandRScreen::loadSettings() +KDE_EXPORT void RandRScreen::loadSettings() { if (d->config) XRRFreeScreenConfigInfo(d->config); @@ -124,14 +124,14 @@ void RandRScreen::loadSettings() } } -void RandRScreen::setOriginal() +KDE_EXPORT void RandRScreen::setOriginal() { m_originalSize = m_currentSize; m_originalRotation = m_currentRotation; m_originalRefreshRate = m_currentRefreshRate; } -bool RandRScreen::applyProposed() +KDE_EXPORT bool RandRScreen::applyProposed() { //kdDebug() << k_funcinfo << " size " << (SizeID)proposedSize() << ", rotation " << proposedRotation() << ", refresh " << refreshRateIndexToHz(proposedSize(), proposedRefreshRate()) << endl; @@ -175,7 +175,7 @@ bool RandRScreen::applyProposed() return false; } -bool RandRScreen::applyProposedAndConfirm() +KDE_EXPORT bool RandRScreen::applyProposedAndConfirm() { if (proposedChanged()) { setOriginal(); @@ -194,7 +194,7 @@ bool RandRScreen::applyProposedAndConfirm() return true; } -bool RandRScreen::confirm() +KDE_EXPORT bool RandRScreen::confirm() { // uncomment the line below and edit out the KTimerDialog stuff to get // a version which works on today's tdelibs (no accept dialog is presented) @@ -228,19 +228,19 @@ bool RandRScreen::confirm() return acceptDialog.exec(); } -void RandRScreen::shownDialogDestroyed() +KDE_EXPORT void RandRScreen::shownDialogDestroyed() { m_shownDialog = NULL; disconnect( kapp->desktop(), TQT_SIGNAL( resized(int)), this, TQT_SLOT( desktopResized())); } -void RandRScreen::desktopResized() +KDE_EXPORT void RandRScreen::desktopResized() { if( m_shownDialog != NULL ) KDialog::centerOnScreen(m_shownDialog, m_screen); } -TQString RandRScreen::changedMessage() const +KDE_EXPORT TQString RandRScreen::changedMessage() const { if (currentRefreshRate() == -1) return i18n("New configuration:\nResolution: %1 x %2\nOrientation: %3") @@ -255,24 +255,24 @@ TQString RandRScreen::changedMessage() const .arg(currentRefreshRateDescription()); } -bool RandRScreen::changedFromOriginal() const +KDE_EXPORT bool RandRScreen::changedFromOriginal() const { return m_currentSize != m_originalSize || m_currentRotation != m_originalRotation || m_currentRefreshRate != m_originalRefreshRate; } -void RandRScreen::proposeOriginal() +KDE_EXPORT void RandRScreen::proposeOriginal() { m_proposedSize = m_originalSize; m_proposedRotation = m_originalRotation; m_proposedRefreshRate = m_originalRefreshRate; } -bool RandRScreen::proposedChanged() const +KDE_EXPORT bool RandRScreen::proposedChanged() const { return m_currentSize != m_proposedSize || m_currentRotation != m_proposedRotation || m_currentRefreshRate != m_proposedRefreshRate; } -TQString RandRScreen::rotationName(int rotation, bool pastTense, bool capitalised) +KDE_EXPORT TQString RandRScreen::rotationName(int rotation, bool pastTense, bool capitalised) { if (!pastTense) switch (rotation) { @@ -326,7 +326,7 @@ TQString RandRScreen::rotationName(int rotation, bool pastTense, bool capitalise } } -TQPixmap RandRScreen::rotationIcon(int rotation) const +KDE_EXPORT TQPixmap RandRScreen::rotationIcon(int rotation) const { // Adjust icons for current screen orientation if (!(m_currentRotation & RR_Rotate_0) && rotation & (RR_Rotate_0 | RR_Rotate_90 | RR_Rotate_180 | RR_Rotate_270)) { @@ -365,20 +365,23 @@ TQPixmap RandRScreen::rotationIcon(int rotation) const } } -TQString RandRScreen::currentRotationDescription() const +KDE_EXPORT TQString RandRScreen::currentRotationDescription() const { TQString ret = rotationName(m_currentRotation & RotateMask); - if (m_currentRotation != m_currentRotation & RotateMask) - if (m_currentRotation & RR_Rotate_0) + if (m_currentRotation != (m_currentRotation & RotateMask)) { + if (m_currentRotation & RR_Rotate_0) { ret = rotationName(m_currentRotation & (RR_Reflect_X + RR_Reflect_X), true, true); - else + } + else { ret += ", " + rotationName(m_currentRotation & (RR_Reflect_X + RR_Reflect_X), true, false); + } + } return ret; } -int RandRScreen::rotationIndexToDegree(int rotation) const +KDE_EXPORT int RandRScreen::rotationIndexToDegree(int rotation) const { switch (rotation & RotateMask) { case RR_Rotate_90: @@ -395,7 +398,7 @@ int RandRScreen::rotationIndexToDegree(int rotation) const } } -int RandRScreen::rotationDegreeToIndex(int degree) const +KDE_EXPORT int RandRScreen::rotationDegreeToIndex(int degree) const { switch (degree) { case 90: @@ -412,27 +415,27 @@ int RandRScreen::rotationDegreeToIndex(int degree) const } } -int RandRScreen::currentPixelWidth() const +KDE_EXPORT int RandRScreen::currentPixelWidth() const { return m_pixelSizes[m_currentSize].width(); } -int RandRScreen::currentPixelHeight() const +KDE_EXPORT int RandRScreen::currentPixelHeight() const { return m_pixelSizes[m_currentSize].height(); } -int RandRScreen::currentMMWidth() const +KDE_EXPORT int RandRScreen::currentMMWidth() const { return m_pixelSizes[m_currentSize].width(); } -int RandRScreen::currentMMHeight() const +KDE_EXPORT int RandRScreen::currentMMHeight() const { return m_pixelSizes[m_currentSize].height(); } -TQStringList RandRScreen::refreshRates(int size) const +KDE_EXPORT TQStringList RandRScreen::refreshRates(int size) const { int nrates; TQStringList ret; @@ -459,22 +462,22 @@ TQStringList RandRScreen::refreshRates(int size) const return ret; } -TQString RandRScreen::refreshRateDirectDescription(int rate) const +KDE_EXPORT TQString RandRScreen::refreshRateDirectDescription(int rate) const { return i18n("Refresh rate in Hertz (Hz)", "%1 Hz").arg(rate); } -TQString RandRScreen::refreshRateIndirectDescription(int size, int index) const +KDE_EXPORT TQString RandRScreen::refreshRateIndirectDescription(int size, int index) const { return i18n("Refresh rate in Hertz (Hz)", "%1 Hz").arg(refreshRateIndexToHz(size, index)); } -TQString RandRScreen::refreshRateDescription(int size, int index) const +KDE_EXPORT TQString RandRScreen::refreshRateDescription(int size, int index) const { return refreshRates(size)[index]; } -bool RandRScreen::proposeRefreshRate(int index) +KDE_EXPORT bool RandRScreen::proposeRefreshRate(int index) { if (index >= 0 && (int)refreshRates(proposedSize()).count() > index) { m_proposedRefreshRate = index; @@ -484,22 +487,22 @@ bool RandRScreen::proposeRefreshRate(int index) return false; } -int RandRScreen::currentRefreshRate() const +KDE_EXPORT int RandRScreen::currentRefreshRate() const { return m_currentRefreshRate; } -TQString RandRScreen::currentRefreshRateDescription() const +KDE_EXPORT TQString RandRScreen::currentRefreshRateDescription() const { return refreshRateIndirectDescription(m_currentSize, m_currentRefreshRate); } -int RandRScreen::proposedRefreshRate() const +KDE_EXPORT int RandRScreen::proposedRefreshRate() const { return m_proposedRefreshRate; } -int RandRScreen::refreshRateHzToIndex(int size, int hz) const +KDE_EXPORT int RandRScreen::refreshRateHzToIndex(int size, int hz) const { int nrates; short* rates = XRRRates(qt_xdisplay(), m_screen, (SizeID)size, &nrates); @@ -515,7 +518,7 @@ int RandRScreen::refreshRateHzToIndex(int size, int hz) const return -1; } -int RandRScreen::refreshRateIndexToHz(int size, int index) const +KDE_EXPORT int RandRScreen::refreshRateIndexToHz(int size, int index) const { int nrates; short* rates = XRRRates(qt_xdisplay(), m_screen, (SizeID)size, &nrates); @@ -530,22 +533,22 @@ int RandRScreen::refreshRateIndexToHz(int size, int index) const return rates[index]; } -int RandRScreen::numSizes() const +KDE_EXPORT int RandRScreen::numSizes() const { return m_pixelSizes.count(); } -const TQSize& RandRScreen::pixelSize(int index) const +KDE_EXPORT const TQSize& RandRScreen::pixelSize(int index) const { return m_pixelSizes[index]; } -const TQSize& RandRScreen::mmSize(int index) const +KDE_EXPORT const TQSize& RandRScreen::mmSize(int index) const { return m_mmSizes[index]; } -int RandRScreen::sizeIndex(TQSize pixelSize) const +KDE_EXPORT int RandRScreen::sizeIndex(TQSize pixelSize) const { for (uint i = 0; i < m_pixelSizes.count(); i++) if (m_pixelSizes[i] == pixelSize) @@ -554,37 +557,37 @@ int RandRScreen::sizeIndex(TQSize pixelSize) const return -1; } -int RandRScreen::rotations() const +KDE_EXPORT int RandRScreen::rotations() const { return m_rotations; } -int RandRScreen::currentRotation() const +KDE_EXPORT int RandRScreen::currentRotation() const { return m_currentRotation; } -int RandRScreen::currentSize() const +KDE_EXPORT int RandRScreen::currentSize() const { return m_currentSize; } -int RandRScreen::proposedRotation() const +KDE_EXPORT int RandRScreen::proposedRotation() const { return m_proposedRotation; } -void RandRScreen::proposeRotation(int newRotation) +KDE_EXPORT void RandRScreen::proposeRotation(int newRotation) { m_proposedRotation = newRotation & OrientationMask; } -int RandRScreen::proposedSize() const +KDE_EXPORT int RandRScreen::proposedSize() const { return m_proposedSize; } -bool RandRScreen::proposeSize(int newSize) +KDE_EXPORT bool RandRScreen::proposeSize(int newSize) { if ((int)m_pixelSizes.count() > newSize) { m_proposedSize = newSize; @@ -594,7 +597,7 @@ bool RandRScreen::proposeSize(int newSize) return false; } -void RandRScreen::load(KConfig& config) +KDE_EXPORT void RandRScreen::load(KConfig& config) { config.setGroup(TQString("Screen%1").arg(m_screen)); @@ -604,7 +607,7 @@ void RandRScreen::load(KConfig& config) proposeRotation(rotationDegreeToIndex(config.readNumEntry("rotation", 0)) + (config.readBoolEntry("reflectX") ? ReflectX : 0) + (config.readBoolEntry("reflectY") ? ReflectY : 0)); } -void RandRScreen::save(KConfig& config) const +KDE_EXPORT void RandRScreen::save(KConfig& config) const { config.setGroup(TQString("Screen%1").arg(m_screen)); config.writeEntry("width", currentPixelWidth()); @@ -615,7 +618,7 @@ void RandRScreen::save(KConfig& config) const config.writeEntry("reflectY", (bool)(currentRotation() & ReflectMask) == ReflectY); } -RandRDisplay::RandRDisplay() +KDE_EXPORT RandRDisplay::RandRDisplay() : m_valid(true) { // Check extension @@ -658,76 +661,76 @@ RandRDisplay::RandRDisplay() setCurrentScreen(TQApplication::desktop()->primaryScreen()); } -bool RandRDisplay::isValid() const +KDE_EXPORT bool RandRDisplay::isValid() const { return m_valid; } -const TQString& RandRDisplay::errorCode() const +KDE_EXPORT const TQString& RandRDisplay::errorCode() const { return m_errorCode; } -int RandRDisplay::eventBase() const +KDE_EXPORT int RandRDisplay::eventBase() const { return m_eventBase; } -int RandRDisplay::screenChangeNotifyEvent() const +KDE_EXPORT int RandRDisplay::screenChangeNotifyEvent() const { return m_eventBase + RRScreenChangeNotify; } -int RandRDisplay::errorBase() const +KDE_EXPORT int RandRDisplay::errorBase() const { return m_errorBase; } -const TQString& RandRDisplay::version() const +KDE_EXPORT const TQString& RandRDisplay::version() const { return m_version; } -void RandRDisplay::setCurrentScreen(int index) +KDE_EXPORT void RandRDisplay::setCurrentScreen(int index) { m_currentScreenIndex = index; m_currentScreen = m_screens.at(m_currentScreenIndex); Q_ASSERT(m_currentScreen); } -int RandRDisplay::screenIndexOfWidget(TQWidget* widget) +KDE_EXPORT int RandRDisplay::screenIndexOfWidget(TQWidget* widget) { int ret = TQApplication::desktop()->screenNumber(widget); return ret != -1 ? ret : TQApplication::desktop()->primaryScreen(); } -int RandRDisplay::currentScreenIndex() const +KDE_EXPORT int RandRDisplay::currentScreenIndex() const { return m_currentScreenIndex; } -void RandRDisplay::refresh() +KDE_EXPORT void RandRDisplay::refresh() { for (RandRScreen* s = m_screens.first(); s; s = m_screens.next()) s->loadSettings(); } -int RandRDisplay::numScreens() const +KDE_EXPORT int RandRDisplay::numScreens() const { return m_numScreens; } -RandRScreen* RandRDisplay::screen(int index) +KDE_EXPORT RandRScreen* RandRDisplay::screen(int index) { return m_screens.at(index); } -RandRScreen* RandRDisplay::currentScreen() +KDE_EXPORT RandRScreen* RandRDisplay::currentScreen() { return m_currentScreen; } -bool RandRDisplay::loadDisplay(KConfig& config, bool loadScreens) +KDE_EXPORT bool RandRDisplay::loadDisplay(KConfig& config, bool loadScreens) { if (loadScreens) for (RandRScreen* s = m_screens.first(); s; s = m_screens.next()) @@ -736,19 +739,19 @@ bool RandRDisplay::loadDisplay(KConfig& config, bool loadScreens) return applyOnStartup(config); } -bool RandRDisplay::applyOnStartup(KConfig& config) +KDE_EXPORT bool RandRDisplay::applyOnStartup(KConfig& config) { config.setGroup("Display"); return config.readBoolEntry("ApplyOnStartup", false); } -bool RandRDisplay::syncTrayApp(KConfig& config) +KDE_EXPORT bool RandRDisplay::syncTrayApp(KConfig& config) { config.setGroup("Display"); return config.readBoolEntry("SyncTrayApp", false); } -void RandRDisplay::saveDisplay(KConfig& config, bool applyOnStartup, bool syncTrayApp) +KDE_EXPORT void RandRDisplay::saveDisplay(KConfig& config, bool applyOnStartup, bool syncTrayApp) { Q_ASSERT(!config.isReadOnly()); @@ -760,7 +763,7 @@ void RandRDisplay::saveDisplay(KConfig& config, bool applyOnStartup, bool syncTr s->save(config); } -void RandRDisplay::applyProposed(bool confirm) +KDE_EXPORT void RandRDisplay::applyProposed(bool confirm) { for (int screenIndex = 0; screenIndex < numScreens(); screenIndex++) { if (screen(screenIndex)->proposedChanged()) { @@ -772,12 +775,12 @@ void RandRDisplay::applyProposed(bool confirm) } } -bool RandRDisplay::showTestConfigurationDialog() +KDE_EXPORT bool RandRDisplay::showTestConfigurationDialog() { return screen(0)->showTestConfigurationDialog(); } -bool RandRScreen::showTestConfigurationDialog() +KDE_EXPORT bool RandRScreen::showTestConfigurationDialog() { // uncomment the line below and edit out the KTimerDialog stuff to get // a version which works on today's tdelibs (no accept dialog is presented) @@ -811,7 +814,7 @@ bool RandRScreen::showTestConfigurationDialog() return acceptDialog.exec(); } -int RandRScreen::pixelCount( int index ) const +KDE_EXPORT int RandRScreen::pixelCount( int index ) const { TQSize sz = pixelSize(index); return sz.width() * sz.height(); diff --git a/krsync/krsync.cpp b/krsync/krsync.cpp index 21d35f04e..a9bf295a2 100644 --- a/krsync/krsync.cpp +++ b/krsync/krsync.cpp @@ -60,8 +60,8 @@ #define CONFIGURATION_FILE_SEPARATOR ';' -KRsync::KRsync (TQObject* parent, const char* name) - : TQObject (parent, name), m_bSettingsLoaded(false), m_progressDialog(false), m_progressDialogExists(false), m_bInSpecialSync(false) +KDE_EXPORT KRsync::KRsync (TQObject* parent, const char* name) + : TQObject (parent, name), m_progressDialog(false), m_progressDialogExists(false), m_bSettingsLoaded(false), m_bInSpecialSync(false) { loadSettings(); @@ -77,14 +77,11 @@ KRsync::KRsync (TQObject* parent, const char* name) redirectPass = ""; // FIXME: just a workaround for konq deficiencies } -KRsync::~KRsync() +KDE_EXPORT KRsync::~KRsync() { } -static char *rsyncPath = NULL; -static char *suPath = NULL; - static int open_pty_pair(int fd[2]) { #if defined(HAVE_TERMIOS_H) && defined(HAVE_GRANTPT) && !defined(HAVE_OPENPTY) @@ -153,7 +150,7 @@ close_master: /** creates the unidirectional sync subprocess */ -bool KRsync::syncUnidirectional(TQString synccommand, TQString syncflags, int parameter_order, TQString localfolder, TQString remotepath) { +KDE_EXPORT bool KRsync::syncUnidirectional(TQString synccommand, TQString syncflags, int parameter_order, TQString localfolder, TQString remotepath) { int fd[2]; int rc, flags; thisFn = TQString(); @@ -216,7 +213,9 @@ bool KRsync::syncUnidirectional(TQString synccommand, TQString syncflags, int pa if (dev) close(open(dev, O_WRONLY, 0)); setpgid(0,0); - system(execstring.ascii()); + if (system(execstring.ascii()) < 0) { + // ERROR + } #undef common_args myDebug( << "could not exec! " << strerror(errno) << endl); ::exit(-1); @@ -290,7 +289,7 @@ bool KRsync::syncUnidirectional(TQString synccommand, TQString syncflags, int pa /** creates the bidirectional sync subprocess */ -bool KRsync::syncBidirectional(TQString synccommand, TQString syncflags, int parameter_order, TQString localfolder, TQString remotepath) { +KDE_EXPORT bool KRsync::syncBidirectional(TQString synccommand, TQString syncflags, int parameter_order, TQString localfolder, TQString remotepath) { int fd[2]; int rc, flags; thisFn = TQString(); @@ -353,7 +352,9 @@ bool KRsync::syncBidirectional(TQString synccommand, TQString syncflags, int par if (dev) close(open(dev, O_WRONLY, 0)); setpgid(0,0); - system(execstring.ascii()); + if (system(execstring.ascii()) < 0) { + // ERROR + } #undef common_args myDebug( << "could not exec! " << strerror(errno) << endl); ::exit(-1); @@ -427,7 +428,7 @@ bool KRsync::syncBidirectional(TQString synccommand, TQString syncflags, int par /** writes one chunk of data to stdin of child process */ -void KRsync::writeChild(const char *buf, KIO::fileoffset_t len) { +KDE_EXPORT void KRsync::writeChild(const char *buf, KIO::fileoffset_t len) { if (outBufPos >= 0 && outBuf) { #if 0 TQString debug; @@ -444,7 +445,7 @@ void KRsync::writeChild(const char *buf, KIO::fileoffset_t len) { /** manages initial communication setup including password queries */ -int KRsync::establishConnectionRsync(char *buffer, KIO::fileoffset_t len) { +KDE_EXPORT int KRsync::establishConnectionRsync(char *buffer, KIO::fileoffset_t len) { TQString buf; buf.setLatin1(buffer,len); int pos; @@ -559,7 +560,7 @@ int KRsync::establishConnectionRsync(char *buffer, KIO::fileoffset_t len) { /** manages initial communication setup including password queries */ -int KRsync::establishConnectionUnison(char *buffer, KIO::fileoffset_t len, TQString localfolder, TQString remotepath) { +KDE_EXPORT int KRsync::establishConnectionUnison(char *buffer, KIO::fileoffset_t len, TQString localfolder, TQString remotepath) { TQString buf; buf.setLatin1(buffer,len); int pos; @@ -743,7 +744,7 @@ Forced close of the connection This function gets called from the application side of the universe, it shouldn't send any response. */ -void KRsync::closeConnection(){ +KDE_EXPORT void KRsync::closeConnection(){ myDebug( << "closeConnection()" << endl); shutdownConnection(true, false); } @@ -751,7 +752,7 @@ void KRsync::closeConnection(){ /** Closes the connection */ -void KRsync::shutdownConnection(bool forced, bool wait){ +KDE_EXPORT void KRsync::shutdownConnection(bool forced, bool wait){ if (childPid) { kill(childPid,SIGTERM); // We may not have permission... childPid = 0; @@ -772,7 +773,7 @@ void KRsync::shutdownConnection(bool forced, bool wait){ // // -------------------------------------------------------------------------------------------- -void KRsync::saveSettings() +KDE_EXPORT void KRsync::saveSettings() { KConfig cfg ("rsyncrc", false, false); cfg.setGroup ("General"); @@ -781,7 +782,7 @@ void KRsync::saveSettings() cfg.sync(); } -void KRsync::loadSettings() +KDE_EXPORT void KRsync::loadSettings() { if (m_bSettingsLoaded) return; @@ -795,7 +796,7 @@ void KRsync::loadSettings() m_bSettingsLoaded = true; } -void KRsync::executeLogoutAutoSync() +KDE_EXPORT void KRsync::executeLogoutAutoSync() { for (TQStringList::Iterator i(cfgautosync_onlogout_list.begin()); i != cfgautosync_onlogout_list.end(); ++i) { setCurrentDirectoryURL(*i); @@ -805,7 +806,7 @@ void KRsync::executeLogoutAutoSync() } } -TQString KRsync::findLocalFolderByName(TQString folderurl) +KDE_EXPORT TQString KRsync::findLocalFolderByName(TQString folderurl) { TQString folderurl_stripped; folderurl_stripped = folderurl; @@ -824,7 +825,7 @@ TQString KRsync::findLocalFolderByName(TQString folderurl) return NULL; } -TQString KRsync::findSyncMethodByName(TQString folderurl) +KDE_EXPORT TQString KRsync::findSyncMethodByName(TQString folderurl) { TQString folderurl_stripped; folderurl_stripped = folderurl; @@ -843,7 +844,7 @@ TQString KRsync::findSyncMethodByName(TQString folderurl) return NULL; } -TQString KRsync::findLoginSyncEnabledByName(TQString folderurl) +KDE_EXPORT TQString KRsync::findLoginSyncEnabledByName(TQString folderurl) { TQString folderurl_stripped; folderurl_stripped = folderurl; @@ -862,7 +863,7 @@ TQString KRsync::findLoginSyncEnabledByName(TQString folderurl) return NULL; } -TQString KRsync::findLogoutSyncEnabledByName(TQString folderurl) +KDE_EXPORT TQString KRsync::findLogoutSyncEnabledByName(TQString folderurl) { TQString folderurl_stripped; folderurl_stripped = folderurl; @@ -881,7 +882,7 @@ TQString KRsync::findLogoutSyncEnabledByName(TQString folderurl) return NULL; } -TQString KRsync::findTimedSyncEnabledByName(TQString folderurl) +KDE_EXPORT TQString KRsync::findTimedSyncEnabledByName(TQString folderurl) { TQString folderurl_stripped; folderurl_stripped = folderurl; @@ -900,7 +901,7 @@ TQString KRsync::findTimedSyncEnabledByName(TQString folderurl) return NULL; } -int KRsync::deleteLocalFolderByName(TQString folderurl) +KDE_EXPORT int KRsync::deleteLocalFolderByName(TQString folderurl) { TQString folderurl_stripped; folderurl_stripped = folderurl; @@ -920,7 +921,7 @@ int KRsync::deleteLocalFolderByName(TQString folderurl) return 1; } -int KRsync::addLocalFolderByName(TQString folderurl, TQString remoteurl, TQString syncmethod, TQString excludelist, TQString sync_on_login, TQString sync_on_logout, TQString sync_timed_interval) +KDE_EXPORT int KRsync::addLocalFolderByName(TQString folderurl, TQString remoteurl, TQString syncmethod, TQString excludelist, TQString sync_on_login, TQString sync_on_logout, TQString sync_timed_interval) { TQString folderurl_stripped; folderurl_stripped = folderurl; @@ -935,12 +936,12 @@ int KRsync::addLocalFolderByName(TQString folderurl, TQString remoteurl, TQStrin return 1; } -void KRsync::setCurrentDirectoryURL (KURL url) +KDE_EXPORT void KRsync::setCurrentDirectoryURL (KURL url) { m_pURL = url; } -void KRsync::slotSetup() +KDE_EXPORT void KRsync::slotSetup() { KURL url = m_pURL; @@ -948,7 +949,7 @@ void KRsync::slotSetup() TQString localfolder = url.directory(true, true) + TQString("/") + url.fileName(true); TQString remotefolder = findLocalFolderByName(url.directory(true, true) + TQString("/") + url.fileName(true)); TQString syncmethod = findSyncMethodByName(url.directory(true, true) + TQString("/") + url.fileName(true)); - int syncint; + int syncint = 1; if (syncmethod == NULL) { syncint = 1; } @@ -978,7 +979,7 @@ void KRsync::slotSetup() connect (m_configDialog, TQT_SIGNAL(cancelClicked()), TQT_SLOT(slotSetupCancelled())); } -void KRsync::slotSetupOK() +KDE_EXPORT void KRsync::slotSetupOK() { KURL url = m_pURL; @@ -1016,12 +1017,12 @@ void KRsync::slotSetupOK() emit setupDone(); } -void KRsync::slotSetupCancelled() +KDE_EXPORT void KRsync::slotSetupCancelled() { emit setupDone(); } -void KRsync::slotRsyncCancelled() +KDE_EXPORT void KRsync::slotRsyncCancelled() { shutdownConnection(true, true); if (m_progressDialogExists == true) { @@ -1031,7 +1032,7 @@ void KRsync::slotRsyncCancelled() emit transferDone(); } -void KRsync::slotUnisonCancelled() +KDE_EXPORT void KRsync::slotUnisonCancelled() { shutdownConnection(true, true); if (m_progressDialogExists == true) { @@ -1043,7 +1044,7 @@ void KRsync::slotUnisonCancelled() emit transferDone(); } -void KRsync::slotSync() +KDE_EXPORT void KRsync::slotSync() { KURL url = m_pURL; diff --git a/krsync/krsync.h b/krsync/krsync.h index c9273f697..9fa46ad6e 100644 --- a/krsync/krsync.h +++ b/krsync/krsync.h @@ -138,6 +138,7 @@ signals: private: KURL m_pURL; + KProgressBoxDialog* m_progressDialog; RsyncConfigDialog* m_configDialog; -- cgit v1.2.1