[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    KDE/kdenetwork/kopete/kopete/chatwindow
From:       Aleix Pol Gonzalez <aleixpol () gmail ! com>
Date:       2009-08-23 23:18:26
Message-ID: 1251069506.083387.27191.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 1014838 by apol:

Do not cast to const if we have to const_cast later.
Do not forward-declare stuff we don't need.
Add a title to the Participants tab.



 M  +4 -5      kopetechatwindow.cpp  
 M  +0 -2      kopetechatwindow.h  


--- trunk/KDE/kdenetwork/kopete/kopete/chatwindow/kopetechatwindow.cpp #1014837:1014838
@@ -204,7 +204,7 @@
 	updateBg = true;
 	m_tabBar = 0L;
 
-	m_participantsWidget = new QDockWidget(this);
+	m_participantsWidget = new QDockWidget(i18n("Participants"), this);
 	m_participantsWidget->setAllowedAreas(Qt::RightDockWidgetArea | Qt::LeftDockWidgetArea);
 	m_participantsWidget->setFeatures(QDockWidget::DockWidgetClosable);
 	m_participantsWidget->setTitleBarWidget(0L);
@@ -1317,15 +1317,14 @@
 
 void KopeteChatWindow::updateChatLabel()
 {
-	const ChatView* cv = dynamic_cast<const ChatView*>( sender() );
-	if ( !cv || !m_tabBar )
+	ChatView* chat = dynamic_cast<ChatView*>( sender() );
+	if ( !chat || !m_tabBar )
 		return;
 
-	ChatView* chat  = const_cast<ChatView*>( cv );
 	if ( m_tabBar )
 	{
 		m_tabBar->setTabText( m_tabBar->indexOf( chat ), chat->caption() );
-		if ( m_tabBar->count() < 2 || m_tabBar->currentWidget() == static_cast<const QWidget *>(cv) )
+		if ( m_tabBar->count() < 2 || m_tabBar->currentWidget() == chat )
 			setCaption( chat->caption() );
 	}
 }
--- trunk/KDE/kdenetwork/kopete/kopete/chatwindow/kopetechatwindow.h #1014837:1014838
@@ -40,7 +40,6 @@
 class KActionMenu;
 class KTemporaryFile;
 class QPixmap;
-class QTabWidget;
 class KSqueezedTextLabel;
 class KPushButton;
 class QVBoxLayout;
@@ -49,7 +48,6 @@
 class QLabel;
 class KopeteEmoticonAction;
 class ChatView;
-class SidebarWidget;
 class QDockWidget;
 
 namespace Kopete
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic