Commit 83491d35 authored by Robert Knight's avatar Robert Knight
Browse files

Q_UINT* -> quint* , QEvent::Accel* -> QEvent::Shortcut* , add missing QPalette include.

svn path=/branches/work/konsole-split-view/; revision=650889
parent 17f6836b
......@@ -75,6 +75,11 @@ SessionManager* Application::sessionManager()
return _sessionManager;
}
Application::~Application()
{
delete _sessionManager;
}
void Application::detachView(Session* session)
{
MainWindow* window = newMainWindow();
......
......@@ -53,6 +53,8 @@ public:
/** Constructs a new Konsole application. */
Application();
virtual ~Application();
/** Creates a new main window and opens a default terminal session */
virtual int newInstance();
......
......@@ -283,7 +283,7 @@ Session* SessionManager::createSession(QString configPath )
void SessionManager::sessionTerminated(Session* session)
{
_sessions.remove(session);
_sessions.removeAll(session);
session->deleteLater();
}
......
......@@ -172,12 +172,12 @@ public:
inline bool operator == (const CharacterColor& a, const CharacterColor& b)
{
return *reinterpret_cast<const Q_UINT32*>(&a.t) == *reinterpret_cast<const Q_UINT32*>(&b.t);
return *reinterpret_cast<const quint32*>(&a.t) == *reinterpret_cast<const quint32*>(&b.t);
}
inline bool operator != (const CharacterColor& a, const CharacterColor& b)
{
return *reinterpret_cast<const Q_UINT32*>(&a.t) != *reinterpret_cast<const Q_UINT32*>(&b.t);
return *reinterpret_cast<const quint32*>(&a.t) != *reinterpret_cast<const quint32*>(&b.t);
}
inline const QColor color256(UINT8 u, const ColorEntry* base)
......
......@@ -217,7 +217,7 @@ void TerminalDisplay::setColorTable(const ColorEntry table[])
QCodec.
*/
static inline bool isLineChar(Q_UINT16 c) { return ((c & 0xFF80) == 0x2500);}
static inline bool isLineChar(quint16 c) { return ((c & 0xFF80) == 0x2500);}
static inline bool isLineCharString(const QString& string)
{
return (string.length() > 0) && (isLineChar(string.at(0).unicode()));
......@@ -522,7 +522,7 @@ static void drawLineChar(QPainter& paint, int x, int y, int w, int h, uchar code
int ex = x + w - 1;
int ey = y + h - 1;
Q_UINT32 toDraw = LineChars[code];
quint32 toDraw = LineChars[code];
//Top _lines:
if (toDraw & TopL)
......@@ -725,8 +725,8 @@ void TerminalDisplay::drawAttrStr(QPainter &paint, const QRect& rect,
if ( true_transparency && qAlpha(_blendColor) < 0xff ) {
QRgb col = bColor.rgb();
Q_UINT8 salpha = 192;
Q_UINT8 dalpha = 255 - salpha;
quint8 salpha = 192;
quint8 dalpha = 255 - salpha;
int a, r, g, b;
a = qMin( (qAlpha (col) * salpha) / 255 + (qAlpha (_blendColor) * dalpha) / 255, 255 );
......@@ -1067,7 +1067,7 @@ void TerminalDisplay::updateImage()
// where characters exceed their cell width.
if (dirtyMask[x])
{
Q_UINT16 c = newLine[x+0].character;
quint16 c = newLine[x+0].character;
if ( !c )
continue;
int p = 0;
......@@ -1433,7 +1433,7 @@ void TerminalDisplay::paintContents(QPainter &paint, const QRect &rect)
QChar *disstrU = new QChar[_usedColumns];
for (int y = luy; y <= rly; y++)
{
Q_UINT16 c = _image[loc(lux,y)].character;
quint16 c = _image[loc(lux,y)].character;
int x = lux;
if(!c && x)
x--; // Search for start of multi-column character
......@@ -2435,8 +2435,7 @@ void TerminalDisplay::onClearSelection()
bool TerminalDisplay::eventFilter( QObject *obj, QEvent *e )
{
if ( (e->type() == QEvent::Accel ||
e->type() == QEvent::AccelAvailable ) && qApp->focusWidget() == this )
if ( e->type() == QEvent::Shortcut && qApp->focusWidget() == this )
{
static_cast<QKeyEvent *>( e )->ignore();
......@@ -2556,7 +2555,7 @@ void TerminalDisplay::imEndEvent( QIMEvent *e )
// focus in TerminalDisplay, so that the key will be passed to the terminal instead.
bool TerminalDisplay::event( QEvent *e )
{
if ( e->type() == QEvent::AccelOverride )
if ( e->type() == QEvent::ShortcutOverride )
{
QKeyEvent *ke = static_cast<QKeyEvent *>( e );
int keyCodeQt = ke->key() | ke->modifiers();
......
......@@ -381,7 +381,7 @@ void TabbedViewContainerV2::setActiveView(QWidget* view)
Q_ASSERT( index != -1 );
_stackWidget->setCurrentWidget(view);
_tabBar->setCurrentTab(index);
_tabBar->setCurrentIndex(index);
}
void TabbedViewContainerV2::viewAdded( QWidget* view )
{
......
......@@ -15,7 +15,7 @@ struct interval {
};
/* auxiliary function for binary search in interval table */
static int bisearch(Q_UINT16 ucs, const struct interval *table, int max) {
static int bisearch(quint16 ucs, const struct interval *table, int max) {
int min = 0;
int mid;
......@@ -61,11 +61,11 @@ static int bisearch(Q_UINT16 ucs, const struct interval *table, int max) {
* ISO 8859-1 and WGL4 characters, Unicode control characters,
* etc.) have a column width of 1.
*
* This implementation assumes that Q_UINT16 characters are encoded
* This implementation assumes that quint16 characters are encoded
* in ISO 10646.
*/
int konsole_wcwidth(Q_UINT16 ucs)
int konsole_wcwidth(quint16 ucs)
{
/* sorted list of non-overlapping intervals of non-spacing characters */
static const struct interval combining[] = {
......@@ -140,7 +140,7 @@ int konsole_wcwidth(Q_UINT16 ucs)
* encodings who want to migrate to UCS. It is not otherwise
* recommended for general use.
*/
int konsole_wcwidth_cjk(Q_UINT16 ucs)
int konsole_wcwidth_cjk(quint16 ucs)
{
/* sorted list of non-overlapping intervals of East Asian Ambiguous
* characters */
......
......@@ -10,7 +10,7 @@
#include <qglobal.h>
#include <QString>
int konsole_wcwidth(Q_UINT16 ucs);
int konsole_wcwidth(quint16 ucs);
#if 0
int konsole_wcwidth_cjk(Q_UINT16 ucs);
#endif
......
// WARNING: Autogenerated by "fontembedder ./linefont.src".
// You probably do not want to hand-edit this!
static const Q_UINT32 LineChars[] = {
static const quint32 LineChars[] = {
0x00007c00, 0x000fffe0, 0x00421084, 0x00e739ce, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00427000, 0x004e7380, 0x00e77800, 0x00ef7bc0,
0x00421c00, 0x00439ce0, 0x00e73c00, 0x00e7bde0, 0x00007084, 0x000e7384, 0x000079ce, 0x000f7bce,
......
......@@ -55,6 +55,7 @@
#include <QDir>
#include <QDateTime>
#include <Q3PtrList>
#include <QPalette>
// KDE
#include <KApplication>
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment