forked from qt-creator/qt-creator
Remove dead code.
Change-Id: I693fa221027a10c739bde0d27813a57fefbf836f Reviewed-by: Eike Ziller <eike.ziller@nokia.com>
This commit is contained in:
@@ -1227,11 +1227,6 @@ static const char colorKey[] = "Color";
|
||||
static const char windowGeometryKey[] = "WindowGeometry";
|
||||
static const char windowStateKey[] = "WindowState";
|
||||
|
||||
// TODO compat for <= 2.1, remove later
|
||||
static const char geometryKey[] = "Geometry";
|
||||
static const char maxKey[] = "Maximized";
|
||||
static const char fullScreenKey[] = "FullScreen";
|
||||
|
||||
void MainWindow::readSettings()
|
||||
{
|
||||
m_settings->beginGroup(QLatin1String(settingsGroup));
|
||||
|
||||
@@ -207,30 +207,6 @@ void LocatorModel::setEntries(const QList<FilterEntry> &entries)
|
||||
mEntries = entries;
|
||||
reset();
|
||||
}
|
||||
#if 0
|
||||
void LocatorModel::setDisplayCount(int count)
|
||||
{
|
||||
// TODO: This method is meant to be used for increasing the number of items displayed at the
|
||||
// user's request. There is however no way yet for the user to request this.
|
||||
if (count == mDisplayCount)
|
||||
return;
|
||||
|
||||
const int displayedOld = qMin(mDisplayCount, mEntries.size());
|
||||
const int displayedNew = qMin(count, mEntries.size());
|
||||
|
||||
if (displayedNew < displayedOld)
|
||||
beginRemoveRows(QModelIndex(), displayedNew - 1, displayedOld - 1);
|
||||
else if (displayedNew > displayedOld)
|
||||
beginInsertRows(QModelIndex(), displayedOld - 1, displayedNew - 1);
|
||||
|
||||
mDisplayCount = count;
|
||||
|
||||
if (displayedNew < displayedOld)
|
||||
endRemoveRows();
|
||||
else if (displayedNew > displayedOld)
|
||||
endInsertRows();
|
||||
}
|
||||
#endif
|
||||
|
||||
// =========== CompletionList ===========
|
||||
|
||||
@@ -255,32 +231,10 @@ CompletionList::CompletionList(QWidget *parent)
|
||||
|
||||
void CompletionList::updatePreferredSize()
|
||||
{
|
||||
//header()->setStretchLastSection(false);
|
||||
//updateGeometries();
|
||||
|
||||
const QStyleOptionViewItem &option = viewOptions();
|
||||
const QSize shint = itemDelegate()->sizeHint(option, model()->index(0, 0));
|
||||
#if 0
|
||||
const int visibleItems = model()->rowCount();
|
||||
|
||||
// TODO: Look into enabling preferred height as well. Current problem is that this doesn't
|
||||
// work nicely from the user perspective if the list is popping up instead of down.
|
||||
//const int h = shint.height() * visibleItems;
|
||||
|
||||
const QScrollBar *vscroll = verticalScrollBar();
|
||||
int preferredWidth = header()->length() + frameWidth() * 2
|
||||
+ (vscroll->isVisibleTo(this) ? vscroll->width() : 0);
|
||||
const int diff = preferredWidth - width();
|
||||
|
||||
// Avoid resizing the list widget when there are no results or when the preferred size is
|
||||
// only a little smaller than our current size
|
||||
if (visibleItems == 0 || (diff > -100 && diff < 0))
|
||||
preferredWidth = width();
|
||||
#endif
|
||||
|
||||
m_preferredSize = QSize(730, //qMax(600, preferredWidth),
|
||||
shint.height() * 17 + frameWidth() * 2);
|
||||
//header()->setStretchLastSection(true);
|
||||
m_preferredSize = QSize(730, shint.height() * 17 + frameWidth() * 2);
|
||||
}
|
||||
|
||||
// =========== LocatorWidget ===========
|
||||
|
||||
Reference in New Issue
Block a user