This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Kate starts with a useless window size

Tags: None
(comma "," separated)
alecail
Registered Member
Posts
14
Karma
0
OS
Everytime I start Kate, its size is the minimum possible vertical size, and a very small horizontal size.

Here is my setup:

Qt: 4.8.0
KDE Development Platform: 4.8.1 (4.8.1)
Kate: 3.8.1

$ lsb_release -a
Description: Ubuntu precise (development branch)
Release: 12.04
Codename: precise

I traced the problem to a missing call to resize(size) in the constructor:
File: katemainwindow.cpp

Code: Select all
  if (!initialGeometrySet())
  {
    int scnum = QApplication::desktop()->screenNumber(parentWidget());
    QRect desk = QApplication::desktop()->screenGeometry(scnum);

    QSize size;

    // try to load size
    if (sconfig)
    {
      KConfigGroup cg( sconfig, sgroup );
      size.setWidth (cg.readEntry( QString::fromLatin1("Width %1").arg(desk.width()), 0 ));
      size.setHeight (cg.readEntry( QString::fromLatin1("Height %1").arg(desk.height()), 0 ));
      qDebug() << "Loaded size(previous size):" << size;
       resize (size);
// missing resize()
// size was correctly computed but not used.

    }

    // if thats fails, try to reuse size
    if (size.isEmpty())


Now it's working as expected.
User avatar
scummos
Global Moderator
Posts
1175
Karma
7
OS
You should submit this to reviewboard.kde.org, then it's likely to be accepted I think. :)


I'm working on the KDevelop IDE.


Bookmarks



Who is online

Registered users: Bing [Bot], Google [Bot], kde-naveen, Sogou [Bot]