aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGravatar Fabio Bas2010-10-17 17:22:11 +0000
committerGravatar Fabio Bas2010-10-17 17:22:11 +0000
commit5fda833b5154e6649047b72b83c9b4facaf23053 (patch)
tree42bcc38e551bc120047926043f250bfee051479c /src
parentupdated po{,t} files (diff)
downloadKVIrc-5fda833b5154e6649047b72b83c9b4facaf23053.tar.gz
KVIrc-5fda833b5154e6649047b72b83c9b4facaf23053.tar.bz2
KVIrc-5fda833b5154e6649047b72b83c9b4facaf23053.zip
probable compilation fix
git-svn-id: https://svn.kvirc.de/svn/trunk/kvirc@5086 17fca916-40b9-46aa-a4ea-0a15b648b75c
Diffstat (limited to 'src')
-rw-r--r--src/modules/dcc/broker.cpp17
-rw-r--r--src/modules/dcc/libkvidcc.cpp3
-rw-r--r--src/modules/dcc/requests.cpp3
-rw-r--r--src/modules/dcc/video.cpp18
-rw-r--r--src/modules/dcc/video.h2
5 files changed, 23 insertions, 20 deletions
diff --git a/src/modules/dcc/broker.cpp b/src/modules/dcc/broker.cpp
index 9d3216127..4801a005c 100644
--- a/src/modules/dcc/broker.cpp
+++ b/src/modules/dcc/broker.cpp
@@ -475,8 +475,11 @@ void KviDccBroker::passiveVideoExecute(KviDccDescriptor * dcc)
dcc->console()->frame()->addWindow(v,!bMinimized);
if(bMinimized)v->minimize();
m_pDccWindowList->append(v);
-}
+#else
+void KviDccBroker::passiveVideoExecute(KviDccDescriptor * dcc)
+{
#endif
+}
///////////////////////////////////////////////////////////////////////////////
@@ -749,7 +752,7 @@ void KviDccBroker::renameOverwriteResume(KviDccBox *box,KviDccDescriptor * dcc)
if(
(!bOk) || // remote size is unknown
(iRemoteSize > (quint64)fi.size()) // or it is larger than the actual size on disk
- )
+ )
{
tmp = __tr2qs_ctx( \
"The file '<b>%1</b>' already exists " \
@@ -791,13 +794,13 @@ void KviDccBroker::renameOverwriteResume(KviDccBox *box,KviDccDescriptor * dcc)
(bOk) && // only if the remote size is really known
(iRemoteSize > (quint64)fi.size()) && // only if the remote size is larger than the local size
(!KviDccFileTransfer::nonFailedTransferWithLocalFileName(dcc->szLocalFileName)) // only if there is no transfer with this local file name yet
- )
+ )
{
// yep, auto resume...
dcc->bResume = true;
recvFileExecute(0,dcc);
} else if(iRemoteSize == (quint64)fi.size())
- {
+ {
dcc->console()->output(KVI_OUT_DCCMSG,"Transfer aborted: file %Q already completed",&(dcc->szLocalFileName));
cancelDcc(0,dcc);
} else {
@@ -806,7 +809,7 @@ void KviDccBroker::renameOverwriteResume(KviDccBox *box,KviDccDescriptor * dcc)
}
return;
}
-
+
dcc->szLocalFileSize = "0";
// everything OK
@@ -918,7 +921,7 @@ void KviDccBroker::sendFileExecute(KviDccBox * box,KviDccDescriptor *dcc)
delete dcc;
return;
}
-
+
dcc->szFileName = dcc->szLocalFileName;
dcc->szFileName = QFileInfo(dcc->szFileName).fileName();
@@ -960,7 +963,7 @@ bool KviDccBroker::handleResumeRequest(KviDccRequest * dcc,const char * filename
// valid zero port resume request
if(filePos >= t->m_uFileSize)
return false; // invalid resume size
-
+
// ok!
t->m_uResumePosition = filePos;
diff --git a/src/modules/dcc/libkvidcc.cpp b/src/modules/dcc/libkvidcc.cpp
index 9fec7efd6..d4dc740ff 100644
--- a/src/modules/dcc/libkvidcc.cpp
+++ b/src/modules/dcc/libkvidcc.cpp
@@ -1191,7 +1191,7 @@ static bool dcc_kvs_cmd_video(KviKvsModuleCommandCall * c)
#ifdef COMPILE_DISABLE_DCC_VIDEO
c->warning(__tr2qs_ctx("DCC VIDEO support not enabled at compilation time","dcc"));
return true;
-#endif
+#else
KviDccDescriptor * d = new KviDccDescriptor(c->window()->console());
@@ -1245,6 +1245,7 @@ static bool dcc_kvs_cmd_video(KviKvsModuleCommandCall * c)
}
return true;
+#endif
}
diff --git a/src/modules/dcc/requests.cpp b/src/modules/dcc/requests.cpp
index 37ae55525..0d053c706 100644
--- a/src/modules/dcc/requests.cpp
+++ b/src/modules/dcc/requests.cpp
@@ -1082,8 +1082,7 @@ static void dccModuleParseDccVideo(KviDccRequest *dcc)
__tr2qs_ctx("The above request cannot be accepted: DCC VIDEO support not enabled at compilation time ","dcc"));
return;
}
-#endif
-#ifndef COMPILE_DISABLE_DCC_VIDEO
+#else
// Actually unused parameter
if(!kvi_dcc_video_is_valid_codec(dcc->szParam1.ptr()))
{
diff --git a/src/modules/dcc/video.cpp b/src/modules/dcc/video.cpp
index 34e01caca..eae11d33f 100644
--- a/src/modules/dcc/video.cpp
+++ b/src/modules/dcc/video.cpp
@@ -306,7 +306,7 @@ void KviDccVideoThread::startRecording()
#ifndef COMPILE_DISABLE_DCC_VIDEO
//qDebug("Start recording");
if(m_bRecording)return; // already started
-
+
// qDebug("Posting event");
KviThreadDataEvent<int> * e = new KviThreadDataEvent<int>(KVI_DCC_THREAD_EVENT_ACTION);
e->setData(new int(KVI_DCC_VIDEO_THREAD_ACTION_START_RECORDING));
@@ -386,7 +386,7 @@ void KviDccVideoThread::run()
if(!readWriteStep())goto exit_dcc;
if(!videoStep())goto exit_dcc;
if(!textStep())goto exit_dcc;
-
+
usleep(FRAME_DURATION*1000);
// qDebug("in %d out %d in_sig %d out_sig %d", m_inFrameBuffer.size(), m_outFrameBuffer.size(), m_videoInSignalBuffer.size(), m_videoOutSignalBuffer.size());
}
@@ -407,7 +407,7 @@ KviDccVideo::KviDccVideo(KviFrame *pFrm,KviDccDescriptor * dcc,const char * name
m_pszTarget = 0;
m_pLayout = new QGridLayout(this);
-
+
m_pButtonBox = new KviTalHBox(this);
m_pLabel = new KviThemedLabel(m_pButtonBox, this, "dcc_chat_label");
@@ -434,7 +434,7 @@ KviDccVideo::KviDccVideo(KviFrame *pFrm,KviDccDescriptor * dcc,const char * name
m_pInVideoLabel->setScaledContents(true);
m_pInVideoLabel->setAlignment(Qt::AlignCenter);
m_pLayout->addWidget(m_pInVideoLabel, 1, 0, 6, 1);
-
+
//local video
m_pOutVideoLabel = new QLabel();
m_pOutVideoLabel->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
@@ -448,7 +448,7 @@ KviDccVideo::KviDccVideo(KviFrame *pFrm,KviDccDescriptor * dcc,const char * name
m_pVideoLabel[0] = new QLabel();
m_pVideoLabel[0]->setText(__tr2qs_ctx("Video device:","dcc"));
m_pLayout->addWidget(m_pVideoLabel[0], 1, 2, 1, 1);
-
+
m_pCDevices = new QComboBox();
m_pLayout->addWidget(m_pCDevices, 2, 2, 1, 1);
@@ -612,7 +612,7 @@ const QString & KviDccVideo::target()
// This may change on the fly...
if(!m_pszTarget)
m_pszTarget = new QString();
-
+
m_pszTarget->sprintf("%s@%s:%s",m_pDescriptor->szNick.toUtf8().data(),m_pDescriptor->szIp.toUtf8().data(),m_pDescriptor->szPort.toUtf8().data());
return *m_pszTarget;
}
@@ -697,7 +697,7 @@ void KviDccVideo::ownMessage(const QString &text, bool bUserFeedback)
KviStr buf(KviStr::Format,"%s\r\n",d);
QString tmp = text.right(text.length() - 1);
m_tmpTextDataOut.append(buf.ptr(), buf.len());
-
+
if(bUserFeedback)
m_pFrm->firstConsole()->outputPrivmsg(this,KVI_OUT_OWNPRIVMSG,
m_pDescriptor->szLocalNick.toUtf8().data(),m_pDescriptor->szLocalUser.toUtf8().data(),
@@ -709,7 +709,7 @@ void KviDccVideo::ownMessage(const QString &text, bool bUserFeedback)
#endif
KviStr buf(KviStr::Format,"%s\r\n",d);
m_tmpTextDataOut.append(buf.ptr(), buf.len());
-
+
if(bUserFeedback)
m_pFrm->firstConsole()->outputPrivmsg(this,KVI_OUT_OWNPRIVMSG,
m_pDescriptor->szLocalNick.toUtf8().data(),m_pDescriptor->szLocalUser.toUtf8().data(),
@@ -928,7 +928,7 @@ void KviDccVideo::connected()
connect(g_pVideoDevicePool, SIGNAL(deviceRegistered(const QString &) ), SLOT(deviceRegistered(const QString &)) );
connect(g_pVideoDevicePool, SIGNAL(deviceUnregistered(const QString &) ), SLOT(deviceUnregistered(const QString &)) );
- }
+ }
#endif
m_pSlaveThread->start();
diff --git a/src/modules/dcc/video.h b/src/modules/dcc/video.h
index 311c38d50..3d038e09e 100644
--- a/src/modules/dcc/video.h
+++ b/src/modules/dcc/video.h
@@ -109,7 +109,7 @@ protected:
KviThemedLabel * m_pLabel;
KviTalHBox * m_pButtonBox;
KviTalHBox * m_pButtonContainer;
-
+
QLabel *m_pInVideoLabel;
QLabel *m_pOutVideoLabel;
QComboBox *m_pCDevices;