diff options
| author | 2008-10-15 16:21:01 +0000 | |
|---|---|---|
| committer | 2008-10-15 16:21:01 +0000 | |
| commit | a18fb596e23768c90e714847d7095fa4b3ca57a1 (patch) | |
| tree | 4e4e37b5145414297bea5cb5938be7143fe3395f /src | |
| parent | fix warning (diff) | |
| download | KVIrc-a18fb596e23768c90e714847d7095fa4b3ca57a1.tar.gz KVIrc-a18fb596e23768c90e714847d7095fa4b3ca57a1.tar.bz2 KVIrc-a18fb596e23768c90e714847d7095fa4b3ca57a1.zip | |
other small fixes
git-svn-id: https://svn.kvirc.de/svn/trunk/kvirc@2737 17fca916-40b9-46aa-a4ea-0a15b648b75c
Diffstat (limited to 'src')
| -rw-r--r-- | src/kvirc/ui/kvi_channel.cpp | 2 | ||||
| -rw-r--r-- | src/kvirc/ui/kvi_customtoolbar.cpp | 2 | ||||
| -rw-r--r-- | src/kvirc/ui/kvi_input_editor.cpp | 9 | ||||
| -rw-r--r-- | src/kvirc/ui/kvi_input_history.h | 7 | ||||
| -rw-r--r-- | src/kvirc/ui/kvi_userlistview.cpp | 3 | ||||
| -rw-r--r-- | src/kvirc/ui/kvi_window.cpp | 1 | ||||
| -rw-r--r-- | src/kvirc/ui/kvi_window.h | 6 |
7 files changed, 20 insertions, 10 deletions
diff --git a/src/kvirc/ui/kvi_channel.cpp b/src/kvirc/ui/kvi_channel.cpp index 28855615d..bd976e663 100644 --- a/src/kvirc/ui/kvi_channel.cpp +++ b/src/kvirc/ui/kvi_channel.cpp @@ -1841,7 +1841,7 @@ void KviChannel::pasteLastLog() iLogDay = szLogDate.section('.',2,2).toInt(); // Check log validity - int iInterval = -KVI_OPTION_UINT(KviOption_uintDaysIntervalToPasteOnChannelJoin); + int iInterval = -(int)KVI_OPTION_UINT(KviOption_uintDaysIntervalToPasteOnChannelJoin); QDate logDate(iLogYear,iLogMonth,iLogDay); QDate checkDate = date.addDays(iInterval); diff --git a/src/kvirc/ui/kvi_customtoolbar.cpp b/src/kvirc/ui/kvi_customtoolbar.cpp index d67a9be8c..fb08c1df1 100644 --- a/src/kvirc/ui/kvi_customtoolbar.cpp +++ b/src/kvirc/ui/kvi_customtoolbar.cpp @@ -440,7 +440,7 @@ void KviCustomToolBar::drag(QWidget * pChild, const QPoint & pnt) if(!pMyOwnAction) return; - QAction * pAction; + QAction * pAction=0; removeAction(pMyOwnAction); if(pWidgetToMove) { diff --git a/src/kvirc/ui/kvi_input_editor.cpp b/src/kvirc/ui/kvi_input_editor.cpp index ffdcb68c0..a0c04db3e 100644 --- a/src/kvirc/ui/kvi_input_editor.cpp +++ b/src/kvirc/ui/kvi_input_editor.cpp @@ -1977,7 +1977,11 @@ int KviInputEditor::charIndexFromXPosition(int iXPos) { QChar c = m_szTextBuffer.at(iCurChar); - int iWidthCh = c.unicode() < 32 ? fm.width(getSubstituteChar(c.unicode())) + 3 : fm.width(c); + int iWidthCh; + if (c.unicode() < 32) + iWidthCh=fm.width(getSubstituteChar(c.unicode())) + 3 ; + else + iWidthCh=fm.width(c); if(iXPos < (iCurXPos+(iWidthCh/2))) return iCurChar; else if(iXPos < (iCurXPos+iWidthCh)) return (iCurChar+1); @@ -2023,6 +2027,9 @@ int KviInputEditor::xPositionFromCharIndex(int iChIdx, bool bContentsCoords) return iCurXPos; } +#ifndef COMPILE_USE_STANDALONE_MOC_SOURCES +#include "kvi_input_editor.moc" +#endif //!COMPILE_USE_STANDALONE_MOC_SOURCES /* @doc: texticons diff --git a/src/kvirc/ui/kvi_input_history.h b/src/kvirc/ui/kvi_input_history.h index d32d0126f..3dc74afa8 100644 --- a/src/kvirc/ui/kvi_input_history.h +++ b/src/kvirc/ui/kvi_input_history.h @@ -51,14 +51,15 @@ private: static KviInputHistory * m_pSelf; static unsigned int m_uCount; + +protected: + KviPointerList<QString> * m_pStringList; +public: /** * \brief Constructs the input history object * \return KviInputHistory */ KviInputHistory(); -protected: - KviPointerList<QString> * m_pStringList; -public: /** * \brief Destroys the input history object */ diff --git a/src/kvirc/ui/kvi_userlistview.cpp b/src/kvirc/ui/kvi_userlistview.cpp index 19f186a7a..be982347f 100644 --- a/src/kvirc/ui/kvi_userlistview.cpp +++ b/src/kvirc/ui/kvi_userlistview.cpp @@ -1793,10 +1793,11 @@ void KviUserListViewArea::paintEvent(QPaintEvent * e) KVI_OPTION_UINT(KviOption_uintAvatarScaleWidth), KVI_OPTION_UINT(KviOption_uintAvatarScaleHeight) )->pixmap(); + } else { pPix = pAv->pixmap(); } - //debug("Pixmap: null=%i;height=%i;width=%i",pix.isNull(),pix.height(),pix.width()); + p.drawPixmap(iAvatarAndTextX,iTheY,*pPix); iTheY += pPix->height() + 1; } diff --git a/src/kvirc/ui/kvi_window.cpp b/src/kvirc/ui/kvi_window.cpp index 8cf0a88fa..d04a2a266 100644 --- a/src/kvirc/ui/kvi_window.cpp +++ b/src/kvirc/ui/kvi_window.cpp @@ -1165,6 +1165,7 @@ bool KviWindow::isMinimized() bool KviWindow::isMaximized() { +// debug ("check maximized %s",mdiParent()->plainCaption().utf8().data()); if(mdiParent()) return (mdiParent()->state() == KviMdiChild::Maximized); // Heh...how to check it ? diff --git a/src/kvirc/ui/kvi_window.h b/src/kvirc/ui/kvi_window.h index 99cf9fa24..d4414b768 100644 --- a/src/kvirc/ui/kvi_window.h +++ b/src/kvirc/ui/kvi_window.h @@ -173,7 +173,8 @@ public: // THIS is the function that should be used inline const QString & windowName(){ return m_szName; }; void setWindowName(const QString &szName); - + // Sets the progress for the WindowList item: if "progress" makes sense in your window , well , use this + void setProgress(int progress); // Window type management inline int type() const { return m_iType; }; // This returns a descriptive name of the window type @@ -323,8 +324,7 @@ protected: // called by KviFrame // either lost the active window status or the frame is no longer active (but we're still the active kvirc's subwindow) virtual void lostUserFocus(); - // Sets the progress for the WindowList item: if "progress" makes sense in your window , well , use this - void setProgress(int progress); + // call this in the constructor if your caption is fixed: // it will set m_szPlainTextCaption to szCaption and it will // automatically use it without the need of overriding fillCaptionBuffers |
