Do not allow the adition of a source that is already connected
If you try to connect a source that is already connected, it should return and not create a duplicate of that source. Signed-off-by: Artur Duque de Souza <asouza@kde.org>
This commit is contained in:
parent
96d7d83ee9
commit
add8249568
@ -193,6 +193,10 @@ Plasma::Service *DataSource::serviceForSource(const QString &source)
|
||||
|
||||
void DataSource::connectSource(const QString &source)
|
||||
{
|
||||
if (m_connectedSources.contains(source)) {
|
||||
return;
|
||||
}
|
||||
|
||||
m_newSources.append(source);
|
||||
m_connectedSources.append(source);
|
||||
m_changes |= SourcesChanged;
|
||||
|
Loading…
Reference in New Issue
Block a user