Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
savoirfairelinux
jami-daemon
Commits
06f8dff8
Commit
06f8dff8
authored
Jul 24, 2012
by
Emmanuel Lepage Vallee
Browse files
[ #13801 ] Fix more pseudo warning
parent
24c90366
Changes
45
Hide whitespace changes
Inline
Side-by-side
kde/src/lib/Call.cpp
View file @
06f8dff8
...
...
@@ -37,16 +37,16 @@ const call_state Call::actionPerformedStateMap [13][5] =
// ACCEPT REFUSE TRANSFER HOLD RECORD /**/
/*INCOMING */
{
CALL_STATE_INCOMING
,
CALL_STATE_INCOMING
,
CALL_STATE_ERROR
,
CALL_STATE_INCOMING
,
CALL_STATE_INCOMING
},
/**/
/*RINGING */
{
CALL_STATE_ERROR
,
CALL_STATE_RINGING
,
CALL_STATE_ERROR
,
CALL_STATE_ERROR
,
CALL_STATE_RINGING
},
/**/
/*CURRENT */
{
CALL_STATE_ERROR
,
CALL_STATE_CURRENT
,
CALL_STATE_TRANSFER
,
CALL_STATE_CURRENT
,
CALL_STATE_CURRENT
},
/**/
/*CURRENT */
{
CALL_STATE_ERROR
,
CALL_STATE_CURRENT
,
CALL_STATE_TRANSFER
RED
,
CALL_STATE_CURRENT
,
CALL_STATE_CURRENT
},
/**/
/*DIALING */
{
CALL_STATE_DIALING
,
CALL_STATE_OVER
,
CALL_STATE_ERROR
,
CALL_STATE_ERROR
,
CALL_STATE_ERROR
},
/**/
/*HOLD */
{
CALL_STATE_ERROR
,
CALL_STATE_HOLD
,
CALL_STATE_TRANSF_HOLD
,
CALL_STATE_HOLD
,
CALL_STATE_HOLD
},
/**/
/*FAILURE */
{
CALL_STATE_ERROR
,
CALL_STATE_FAILURE
,
CALL_STATE_ERROR
,
CALL_STATE_ERROR
,
CALL_STATE_ERROR
},
/**/
/*BUSY */
{
CALL_STATE_ERROR
,
CALL_STATE_BUSY
,
CALL_STATE_ERROR
,
CALL_STATE_ERROR
,
CALL_STATE_ERROR
},
/**/
/*TRANSFER */
{
CALL_STATE_TRANSFER
,
CALL_STATE_TRANSFER
,
CALL_STATE_CURRENT
,
CALL_STATE_TRANSFER
,
CALL_STATE_TRANSFER
},
/**/
/*TRANSFER */
{
CALL_STATE_TRANSFER
RED
,
CALL_STATE_TRANSFER
RED
,
CALL_STATE_CURRENT
,
CALL_STATE_TRANSFER
RED
,
CALL_STATE_TRANSFER
RED
},
/**/
/*TRANSF_HOLD */
{
CALL_STATE_TRANSF_HOLD
,
CALL_STATE_TRANSF_HOLD
,
CALL_STATE_HOLD
,
CALL_STATE_TRANSF_HOLD
,
CALL_STATE_TRANSF_HOLD
},
/**/
/*OVER */
{
CALL_STATE_ERROR
,
CALL_STATE_ERROR
,
CALL_STATE_ERROR
,
CALL_STATE_ERROR
,
CALL_STATE_ERROR
},
/**/
/*ERROR */
{
CALL_STATE_ERROR
,
CALL_STATE_ERROR
,
CALL_STATE_ERROR
,
CALL_STATE_ERROR
,
CALL_STATE_ERROR
},
/**/
/*CONF */
{
CALL_STATE_ERROR
,
CALL_STATE_CURRENT
,
CALL_STATE_TRANSFER
,
CALL_STATE_CURRENT
,
CALL_STATE_CURRENT
},
/**/
/*CONF */
{
CALL_STATE_ERROR
,
CALL_STATE_CURRENT
,
CALL_STATE_TRANSFER
RED
,
CALL_STATE_CURRENT
,
CALL_STATE_CURRENT
},
/**/
/*CONF_HOLD */
{
CALL_STATE_ERROR
,
CALL_STATE_HOLD
,
CALL_STATE_TRANSF_HOLD
,
CALL_STATE_HOLD
,
CALL_STATE_HOLD
},
/**/
};
//
...
...
@@ -80,8 +80,8 @@ const call_state Call::stateChangedStateMap [13][6] =
/*HOLD */
{
CALL_STATE_HOLD
,
CALL_STATE_CURRENT
,
CALL_STATE_BUSY
,
CALL_STATE_HOLD
,
CALL_STATE_OVER
,
CALL_STATE_FAILURE
},
/**/
/*FAILURE */
{
CALL_STATE_FAILURE
,
CALL_STATE_FAILURE
,
CALL_STATE_BUSY
,
CALL_STATE_FAILURE
,
CALL_STATE_OVER
,
CALL_STATE_FAILURE
},
/**/
/*BUSY */
{
CALL_STATE_BUSY
,
CALL_STATE_CURRENT
,
CALL_STATE_BUSY
,
CALL_STATE_BUSY
,
CALL_STATE_OVER
,
CALL_STATE_FAILURE
},
/**/
/*TRANSFER */
{
CALL_STATE_TRANSFER
,
CALL_STATE_TRANSFER
,
CALL_STATE_BUSY
,
CALL_STATE_TRANSF_HOLD
,
CALL_STATE_OVER
,
CALL_STATE_FAILURE
},
/**/
/*TRANSF_HOLD */
{
CALL_STATE_TRANSF_HOLD
,
CALL_STATE_TRANSFER
,
CALL_STATE_BUSY
,
CALL_STATE_TRANSF_HOLD
,
CALL_STATE_OVER
,
CALL_STATE_FAILURE
},
/**/
/*TRANSFER */
{
CALL_STATE_TRANSFER
RED
,
CALL_STATE_TRANSFER
RED
,
CALL_STATE_BUSY
,
CALL_STATE_TRANSF_HOLD
,
CALL_STATE_OVER
,
CALL_STATE_FAILURE
},
/**/
/*TRANSF_HOLD */
{
CALL_STATE_TRANSF_HOLD
,
CALL_STATE_TRANSFER
RED
,
CALL_STATE_BUSY
,
CALL_STATE_TRANSF_HOLD
,
CALL_STATE_OVER
,
CALL_STATE_FAILURE
},
/**/
/*OVER */
{
CALL_STATE_OVER
,
CALL_STATE_OVER
,
CALL_STATE_OVER
,
CALL_STATE_OVER
,
CALL_STATE_OVER
,
CALL_STATE_OVER
},
/**/
/*ERROR */
{
CALL_STATE_ERROR
,
CALL_STATE_ERROR
,
CALL_STATE_ERROR
,
CALL_STATE_ERROR
,
CALL_STATE_ERROR
,
CALL_STATE_ERROR
},
/**/
/*CONF */
{
CALL_STATE_CURRENT
,
CALL_STATE_CURRENT
,
CALL_STATE_BUSY
,
CALL_STATE_HOLD
,
CALL_STATE_OVER
,
CALL_STATE_FAILURE
},
/**/
...
...
@@ -127,8 +127,8 @@ Call::Call(call_state startState, QString callId, QString peerName, QString peer
changeCurrentState
(
startState
)
;
this
->
m_Account
=
account
;
this
->
m_Recording
=
false
;
this
->
m_pStartTime
=
NULL
;
this
->
m_pStopTime
=
NULL
;
this
->
m_pStartTime
=
nullptr
;
this
->
m_pStopTime
=
nullptr
;
m_ContactChanged
=
true
;
CallManagerInterface
&
callManager
=
CallManagerInterfaceSingleton
::
getInstance
();
...
...
@@ -354,7 +354,7 @@ const QString Call::toHumanStateName() const
case
CALL_STATE_BUSY
:
return
(
"Busy"
);
break
;
case
CALL_STATE_TRANSFER
:
case
CALL_STATE_TRANSFER
RED
:
return
(
"Transfer"
);
break
;
case
CALL_STATE_TRANSF_HOLD
:
...
...
@@ -379,7 +379,7 @@ const QString Call::toHumanStateName() const
///Get the time (second from 1 jan 1970) when the call ended
QString
Call
::
getStopTimeStamp
()
const
{
if
(
m_pStopTime
==
NULL
)
if
(
m_pStopTime
==
nullptr
)
return
QString
(
"0"
);
return
QString
::
number
(
m_pStopTime
->
toTime_t
());
}
...
...
@@ -387,7 +387,7 @@ QString Call::getStopTimeStamp() const
///Get the time (second from 1 jan 1970) when the call started
QString
Call
::
getStartTimeStamp
()
const
{
if
(
m_pStartTime
==
NULL
)
if
(
m_pStartTime
==
nullptr
)
return
QString
(
"0"
);
return
QString
::
number
(
m_pStartTime
->
toTime_t
());
}
...
...
@@ -615,7 +615,7 @@ call_state Call::stateChanged(const QString& newStateName)
return
m_CurrentState
;
}
//stateChanged
///An acount have been performed
///An ac
c
ount have been performed
call_state
Call
::
actionPerformed
(
call_action
action
)
{
call_state
previousState
=
m_CurrentState
;
...
...
@@ -708,7 +708,7 @@ void Call::acceptTransf()
qDebug
()
<<
"Accepting call and transferring it to number : "
<<
m_TransferNumber
<<
". callId : "
<<
m_CallId
<<
"ConfId:"
<<
m_ConfId
;
callManager
.
accept
(
m_CallId
);
Q_NOREPLY
callManager
.
transfer
(
m_CallId
,
m_TransferNumber
);
// m_HistoryState = TRANSFERED;
// m_HistoryState = TRANSFER
R
ED;
}
///Put the call on hold
...
...
@@ -868,7 +868,7 @@ void Call::appendText(const QString& str)
QString
*
editNumber
;
switch
(
m_CurrentState
)
{
case
CALL_STATE_TRANSFER
:
case
CALL_STATE_TRANSFER
RED
:
case
CALL_STATE_TRANSF_HOLD
:
editNumber
=
&
m_TransferNumber
;
break
;
...
...
@@ -891,7 +891,7 @@ void Call::backspaceItemText()
QString
*
editNumber
;
switch
(
m_CurrentState
)
{
case
CALL_STATE_TRANSFER
:
case
CALL_STATE_TRANSFER
RED
:
case
CALL_STATE_TRANSF_HOLD
:
editNumber
=
&
m_TransferNumber
;
break
;
...
...
kde/src/lib/CallModel.cpp
View file @
06f8dff8
...
...
@@ -65,7 +65,7 @@ CallModelBase::~CallModelBase()
///When a call state change
void
CallModelBase
::
callStateChanged
(
const
QString
&
callID
,
const
QString
&
state
)
{
//This code is part of the CallModel iterface too
//This code is part of the CallModel i
n
terface too
qDebug
()
<<
"Call State Changed for call "
<<
callID
<<
" . New state : "
<<
state
;
Call
*
call
=
findCallByCallId
(
callID
);
if
(
!
call
)
{
...
...
kde/src/lib/CallModel.h
View file @
06f8dff8
...
...
@@ -87,7 +87,7 @@ private:
signals:
///Emitted when a call state change
void
callStateChanged
(
Call
*
call
);
///Emitted when a new call is incom
m
ing
///Emitted when a new call is incoming
void
incomingCall
(
Call
*
call
);
///Emitted when a conference is created
void
conferenceCreated
(
Call
*
conf
);
...
...
kde/src/lib/CallModel.hpp
View file @
06f8dff8
...
...
@@ -208,7 +208,7 @@ CALLMODEL_TEMPLATE Call* CALLMODEL_T::addDialingCall(const QString& peerName, Ac
}
}
//addDialingCall
///Create a new incom
m
ing call when the daemon is being called
///Create a new incoming call when the daemon is being called
CALLMODEL_TEMPLATE
Call
*
CALLMODEL_T
::
addIncomingCall
(
const
QString
&
callId
)
{
Call
*
call
=
Call
::
buildIncomingCall
(
callId
);
...
...
@@ -240,7 +240,7 @@ CALLMODEL_TEMPLATE void CALLMODEL_T::removeCall(Call* call)
return
;
}
if
(
m_sPrivateCallList_call
[
call
]
!=
NULL
)
{
if
(
m_sPrivateCallList_call
[
call
]
!=
nullptr
)
{
m_sPrivateCallList_call
.
remove
(
call
);
}
...
...
@@ -410,7 +410,7 @@ CALLMODEL_TEMPLATE Call* CALLMODEL_T::getCall ( const CallWidget widget
if
(
m_sPrivateCallList_widget
[
widget
])
{
return
m_sPrivateCallList_widget
[
widget
]
->
call_real
;
}
return
NULL
;
return
nullptr
;
}
///Get a call list from a conference
...
...
@@ -487,7 +487,7 @@ CALLMODEL_TEMPLATE Call* CALLMODEL_T::getCall ( const Index idx
return
m_sPrivateCallList_index
[
idx
]
->
call_real
;
}
qDebug
()
<<
"Call not found"
;
return
NULL
;
return
nullptr
;
}
///Get the call associated with that conference index
...
...
@@ -517,7 +517,7 @@ CALLMODEL_TEMPLATE Call* CALLMODEL_T::getCall ( const QString& callId
if
(
m_sPrivateCallList_callId
[
callId
])
{
return
m_sPrivateCallList_callId
[
callId
]
->
call_real
;
}
return
NULL
;
return
nullptr
;
}
///Get the calls associated with this ID
...
...
@@ -538,7 +538,7 @@ CALLMODEL_TEMPLATE Index CALLMODEL_T::getIndex ( const Call* call
if
(
m_sPrivateCallList_call
[(
Call
*
)
call
])
{
return
m_sPrivateCallList_call
[(
Call
*
)
call
]
->
index
;
}
return
NULL
;
return
nullptr
;
}
///Get the index associated with this index (dummy implementation)
...
...
@@ -547,7 +547,7 @@ CALLMODEL_TEMPLATE Index CALLMODEL_T::getIndex ( const Index idx
if
(
m_sPrivateCallList_index
[
idx
])
{
return
m_sPrivateCallList_index
[
idx
]
->
index
;
}
return
NULL
;
return
nullptr
;
}
///Get the index associated with this call
...
...
@@ -556,7 +556,7 @@ CALLMODEL_TEMPLATE Index CALLMODEL_T::getIndex ( const CallWidget widget
if
(
m_sPrivateCallList_widget
[
widget
])
{
return
m_sPrivateCallList_widget
[
widget
]
->
index
;
}
return
NULL
;
return
nullptr
;
}
///Get the index associated with this ID
...
...
@@ -565,7 +565,7 @@ CALLMODEL_TEMPLATE Index CALLMODEL_T::getIndex ( const QString& callId
if
(
m_sPrivateCallList_callId
[
callId
])
{
return
m_sPrivateCallList_callId
[
callId
]
->
index
;
}
return
NULL
;
return
nullptr
;
}
///Get the widget associated with this call
...
...
@@ -574,7 +574,7 @@ CALLMODEL_TEMPLATE CallWidget CALLMODEL_T::getWidget ( const Call* call
if
(
m_sPrivateCallList_call
[
call
])
{
return
m_sPrivateCallList_call
[
call
]
->
call
;
}
return
NULL
;
return
nullptr
;
}
///Get the widget associated with this ID
...
...
@@ -583,7 +583,7 @@ CALLMODEL_TEMPLATE CallWidget CALLMODEL_T::getWidget ( const Index idx
if
(
m_sPrivateCallList_index
[
idx
])
{
return
m_sPrivateCallList_index
[
idx
]
->
call
;
}
return
NULL
;
return
nullptr
;
}
///Get the widget associated with this widget (dummy)
...
...
@@ -592,7 +592,7 @@ CALLMODEL_TEMPLATE CallWidget CALLMODEL_T::getWidget ( const CallWidget widget
if
(
m_sPrivateCallList_widget
[
widget
])
{
return
m_sPrivateCallList_widget
[
widget
]
->
call
;
}
return
NULL
;
return
nullptr
;
}
///Get the widget associated with this ID
...
...
@@ -601,7 +601,7 @@ CALLMODEL_TEMPLATE CallWidget CALLMODEL_T::getWidget ( const QString& widget
if
(
m_sPrivateCallList_widget
[
widget
])
{
return
m_sPrivateCallList_widget
[
widget
]
->
call
;
}
return
NULL
;
return
nullptr
;
}
///Common set of instruction shared by all gui updater
...
...
kde/src/lib/CredentialModel.h
View file @
06f8dff8
...
...
@@ -49,7 +49,7 @@ public:
void
clear
();
private:
///@struct CredentialData store credential information
s
///@struct CredentialData store credential information
struct
CredentialData2
{
QString
name
;
QString
password
;
...
...
kde/src/lib/VideoModel.cpp
View file @
06f8dff8
...
...
@@ -35,7 +35,7 @@
#include
"VideoRenderer.h"
//Static member
VideoModel
*
VideoModel
::
m_spInstance
=
NULL
;
VideoModel
*
VideoModel
::
m_spInstance
=
nullptr
;
///Constructor
VideoModel
::
VideoModel
()
:
m_BufferSize
(
0
),
m_ShmKey
(
0
),
m_SemKey
(
0
),
m_PreviewState
(
false
)
...
...
kde/src/lib/VideoRenderer.cpp
View file @
06f8dff8
...
...
@@ -268,7 +268,7 @@ void VideoRenderer::stopRendering()
* *
****************************************************************************/
///Get the raw bytes directly from the SHM, not recomm
a
nded, but optimal
///Get the raw bytes directly from the SHM, not recomm
e
nded, but optimal
const
char
*
VideoRenderer
::
rawData
()
{
return
m_pShmArea
->
m_Data
;
...
...
kde/src/lib/callmanager_interface_singleton.cpp
View file @
06f8dff8
...
...
@@ -21,7 +21,7 @@
#include
"callmanager_interface_singleton.h"
CallManagerInterface
*
CallManagerInterfaceSingleton
::
interface
=
NULL
;
CallManagerInterface
*
CallManagerInterfaceSingleton
::
interface
=
nullptr
;
CallManagerInterface
&
CallManagerInterfaceSingleton
::
getInstance
(){
...
...
kde/src/lib/configurationmanager_interface_singleton.cpp
View file @
06f8dff8
...
...
@@ -21,7 +21,7 @@
#include
"configurationmanager_interface_singleton.h"
ConfigurationManagerInterface
*
ConfigurationManagerInterfaceSingleton
::
interface
=
NULL
;
ConfigurationManagerInterface
*
ConfigurationManagerInterfaceSingleton
::
interface
=
nullptr
;
ConfigurationManagerInterface
&
ConfigurationManagerInterfaceSingleton
::
getInstance
()
{
...
...
kde/src/lib/instance_interface_singleton.cpp
View file @
06f8dff8
...
...
@@ -20,7 +20,7 @@
#include
"instance_interface_singleton.h"
InstanceInterface
*
InstanceInterfaceSingleton
::
interface
=
NULL
;
InstanceInterface
*
InstanceInterfaceSingleton
::
interface
=
nullptr
;
InstanceInterface
&
InstanceInterfaceSingleton
::
getInstance
()
{
...
...
kde/src/lib/sflphone_const.h
View file @
06f8dff8
...
...
@@ -280,7 +280,7 @@ typedef enum
CALL_STATE_HOLD
=
4
,
/** Call is on hold */
CALL_STATE_FAILURE
=
5
,
/** Call has failed */
CALL_STATE_BUSY
=
6
,
/** Call is busy */
CALL_STATE_TRANSFER
=
7
,
/** Call is being transfered. During this state, the user can enter the new number. */
CALL_STATE_TRANSFER
RED
=
7
,
/** Call is being transfer
r
ed. During this state, the user can enter the new number. */
CALL_STATE_TRANSF_HOLD
=
8
,
/** Call is on hold for transfer */
CALL_STATE_OVER
=
9
,
/** Call is over and should not be used */
CALL_STATE_ERROR
=
10
,
/** This state should never be reached */
...
...
kde/src/lib/video_interface_singleton.cpp
View file @
06f8dff8
...
...
@@ -19,7 +19,7 @@
#include
"video_interface_singleton.h"
VideoInterface
*
VideoInterfaceSingleton
::
interface
=
NULL
;
VideoInterface
*
VideoInterfaceSingleton
::
interface
=
nullptr
;
VideoInterface
&
VideoInterfaceSingleton
::
getInstance
()
{
...
...
kde/src/test/account_test.cpp
View file @
06f8dff8
...
...
@@ -613,7 +613,7 @@ void AccountTests::testDisableAllAccounts()
(
*
AccountList
::
getInstance
())[
i
]
->
save
();
}
QCOMPARE
(
AccountList
::
getCurrentAccount
(),(
Account
*
)
NULL
);
QCOMPARE
(
AccountList
::
getCurrentAccount
(),(
Account
*
)
nullptr
);
//Restore state
for
(
int
i
=
0
;
i
<
AccountList
::
getInstance
()
->
size
();
i
++
)
{
...
...
kde/src/test/call_test.cpp
View file @
06f8dff8
...
...
@@ -32,7 +32,7 @@ void CallTests::testCallWithoutAccounts()
}
Call
*
call
=
m_pModel
->
addDialingCall
(
"test call"
,
AccountList
::
getCurrentAccount
());
QCOMPARE
(
call
,
(
Call
*
)
NULL
);
QCOMPARE
(
call
,
(
Call
*
)
nullptr
);
//Restore state
for
(
int
i
=
0
;
i
<
AccountList
::
getInstance
()
->
size
();
i
++
)
{
...
...
kde/src/widgets/BookmarkDock.cpp
View file @
06f8dff8
...
...
@@ -127,7 +127,7 @@ BookmarkDock::~BookmarkDock()
void
BookmarkDock
::
addBookmark_internal
(
const
QString
&
phone
)
{
HistoryTreeItem
*
widget
=
new
HistoryTreeItem
(
m_pItemView
,
phone
,
true
);
QTreeWidgetItem
*
item
=
NULL
;
QTreeWidgetItem
*
item
=
nullptr
;
if
(
widget
->
getName
()
==
i18nc
(
"Unknown peer"
,
"Unknown"
)
||
widget
->
getName
().
isEmpty
())
{
item
=
m_pItemView
->
addItem
<
QNumericTreeWidgetItem
>
(
i18nc
(
"Unknown peer"
,
"Unknown"
));
...
...
kde/src/widgets/CallTreeItem.cpp
View file @
06f8dff8
...
...
@@ -378,7 +378,7 @@ void CallTreeItem::updated()
m_pIconL
->
setPixmap
(
QPixmap
(
KStandardDirs
::
locate
(
"data"
,
"sflphone-client-kde/conf-small.png"
)));
}
bool
transfer
=
state
==
CALL_STATE_TRANSFER
||
state
==
CALL_STATE_TRANSF_HOLD
;
bool
transfer
=
state
==
CALL_STATE_TRANSFER
RED
||
state
==
CALL_STATE_TRANSF_HOLD
;
if
(
m_pTransferPrefixL
&&
m_pTransferNumberL
)
{
m_pTransferPrefixL
->
setVisible
(
transfer
);
m_pTransferNumberL
->
setVisible
(
transfer
);
...
...
@@ -406,7 +406,7 @@ void CallTreeItem::updated()
else
{
//kDebug() << "Updating item of call of state OVER. Doing nothing.";
}
if
(
state
==
CALL_STATE_TRANSFER
||
state
==
CALL_STATE_TRANSF_HOLD
)
{
if
(
state
==
CALL_STATE_TRANSFER
RED
||
state
==
CALL_STATE_TRANSF_HOLD
)
{
kDebug
()
<<
"Transferring"
;
emit
askTransfer
(
m_pItemCall
);
}
...
...
@@ -422,7 +422,7 @@ void CallTreeItem::updated()
}
//Start/Stop the elapsed time label
if
((
state
==
CALL_STATE_CURRENT
||
state
==
CALL_STATE_HOLD
||
state
==
CALL_STATE_TRANSFER
)
&&
!
m_pTimer
)
{
if
((
state
==
CALL_STATE_CURRENT
||
state
==
CALL_STATE_HOLD
||
state
==
CALL_STATE_TRANSFER
RED
)
&&
!
m_pTimer
)
{
m_pTimer
=
new
QTimer
(
this
);
m_pTimer
->
setInterval
(
1000
);
connect
(
m_pTimer
,
SIGNAL
(
timeout
()),
this
,
SLOT
(
incrementTimer
()));
...
...
@@ -440,7 +440,7 @@ void CallTreeItem::updated()
* *
****************************************************************************/
///Called when a drag and drop occur
e
while the item have not been dropped yet
///Called when a drag and drop occur while the item have not been dropped yet
void
CallTreeItem
::
dragEnterEvent
(
QDragEnterEvent
*
e
)
{
kDebug
()
<<
"Drag enter"
;
...
...
kde/src/widgets/CallTreeItem.h
View file @
06f8dff8
...
...
@@ -113,7 +113,7 @@ signals:
void
over
(
Call
*
);
///Emitted when the item change
void
changed
();
///Emitted when it is required to expand the childs
///Emitted when it is required to expand the child
ren
s
void
showChilds
(
CallTreeItem
*
);
///Emitted when a call is dropped on the "transfer" button
void
askTransfer
(
Call
*
);
...
...
kde/src/widgets/ContactDock.cpp
View file @
06f8dff8
...
...
@@ -32,13 +32,13 @@
#include
<QtGui/QCheckBox>
#include
<QtGui/QSplitter>
#include
<QtGui/QLabel>
#include
<QtGui/QComboBox>
//KDE
#include
<KDebug>
#include
<KLineEdit>
#include
<KLocalizedString>
#include
<KIcon>
#include
<KComboBox>
//SFLPhone
#include
"klib/AkonadiBackend.h"
...
...
@@ -120,7 +120,7 @@ ContactDock::ContactDock(QWidget* parent) : QDockWidget(parent)
setObjectName
(
"contactDock"
);
m_pFilterLE
=
new
KLineEdit
(
);
m_pSplitter
=
new
QSplitter
(
Qt
::
Vertical
,
this
);
m_pSortByCBB
=
new
Q
ComboBox
(
this
);
m_pSortByCBB
=
new
K
ComboBox
(
this
);
m_pContactView
=
new
ContactTree
(
this
);
m_pCallView
=
new
QListWidget
(
this
);
m_pShowHistoCK
=
new
QCheckBox
(
this
);
...
...
@@ -286,7 +286,7 @@ void ContactDock::loadContactHistory(QTreeWidgetItem* item)
{
if
(
m_pShowHistoCK
->
isChecked
())
{
m_pCallView
->
clear
();
if
(
dynamic_cast
<
QNumericTreeWidgetItem_hist
*>
(
item
)
!=
NULL
)
{
if
(
dynamic_cast
<
QNumericTreeWidgetItem_hist
*>
(
item
)
!=
nullptr
)
{
QNumericTreeWidgetItem_hist
*
realItem
=
dynamic_cast
<
QNumericTreeWidgetItem_hist
*>
(
item
);
foreach
(
Call
*
call
,
HistoryModel
::
getHistory
())
{
if
(
realItem
->
widget
!=
0
)
{
...
...
@@ -342,12 +342,12 @@ void ContactDock::reloadHistoryConst()
* *
****************************************************************************/
///Serialize information
s
to be used for drag and drop
///Serialize information to be used for drag and drop
QMimeData
*
ContactTree
::
mimeData
(
const
QList
<
QTreeWidgetItem
*>
items
)
const
{
kDebug
()
<<
"An history call is being dragged"
;
if
(
items
.
size
()
<
1
)
{
return
NULL
;
return
nullptr
;
}
QMimeData
*
mimeData
=
new
QMimeData
();
...
...
@@ -413,7 +413,7 @@ void ContactDock::keyPressEvent(QKeyEvent* event) {
if
(
m_pContactView
->
selectedItems
()[
0
]
&&
m_pContactView
->
itemWidget
(
m_pContactView
->
selectedItems
()[
0
],
0
))
{
QNumericTreeWidgetItem_hist
*
item
=
dynamic_cast
<
QNumericTreeWidgetItem_hist
*>
(
m_pContactView
->
selectedItems
()[
0
]);
if
(
item
)
{
Call
*
call
=
NULL
;
Call
*
call
=
nullptr
;
SFLPhone
::
app
()
->
view
()
->
selectCallPhoneNumber
(
&
call
,
item
->
widget
->
getContact
());
}
}
...
...
kde/src/widgets/ContactDock.h
View file @
06f8dff8
...
...
@@ -30,7 +30,6 @@
//Qt
class
QSplitter
;
class
QListWidget
;
class
QComboBox
;
class
QTreeWidgetItem
;
class
QCheckBox
;
class
QStringList
;
...
...
@@ -38,6 +37,7 @@ class DateTime;
//KDE
class
KLineEdit
;
class
KComboBox
;
namespace
Akonadi
{
class
EntityTreeView
;
...
...
@@ -73,7 +73,7 @@ private:
QSplitter
*
m_pSplitter
;
ContactTree
*
m_pContactView
;
QListWidget
*
m_pCallView
;
Q
ComboBox
*
m_pSortByCBB
;
K
ComboBox
*
m_pSortByCBB
;
QCheckBox
*
m_pShowHistoCK
;
QList
<
ContactItemWidget
*>
m_Contacts
;
...
...
kde/src/widgets/ContactItemWidget.cpp
View file @
06f8dff8
...
...
@@ -434,7 +434,6 @@ void ContactItemWidget::addPhone()
{
kDebug
()
<<
"Adding to contact"
;
bool
ok
;
//QString number = QInputDialog::getText(0, i18n("Enter a new number"),i18n("New number:"),QLineEdit::Normal,QString(),ok,0);
QString
text
=
QInputDialog
::
getText
(
this
,
i18n
(
"Enter a new number"
),
i18n
(
"New number:"
),
QLineEdit
::
Normal
,
QString
(),
&
ok
);
if
(
ok
&&
!
text
.
isEmpty
())
{
AkonadiBackend
::
getInstance
()
->
addPhoneNumber
(
m_pContactKA
,
text
,
"work"
);
...
...
@@ -456,7 +455,7 @@ void ContactItemWidget::bookmark()
* *
****************************************************************************/
///Called when a drag and drop occur
e
while the item have not been dropped yet
///Called when a drag and drop occur while the item have not been dropped yet
void
ContactItemWidget
::
dragEnterEvent
(
QDragEnterEvent
*
e
)
{
kDebug
()
<<
"Drag enter"
;
...
...
@@ -498,7 +497,7 @@ void ContactItemWidget::transferEvent(QMimeData* data)
if
(
ok
)
{
Call
*
call
=
SFLPhone
::
model
()
->
getCall
(
data
->
data
(
MIME_CALLID
));
if
(
dynamic_cast
<
Call
*>
(
call
))
{
call
->
changeCurrentState
(
CALL_STATE_TRANSFER
);
call
->
changeCurrentState
(
CALL_STATE_TRANSFER
RED
);
SFLPhone
::
model
()
->
transfer
(
call
,
result
);
}
}
...
...
Prev
1
2
3
Next
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment