Commit 1951c863 authored by Tobias Hunger's avatar Tobias Hunger
Browse files

Reduce padding in often-used structs



Reduce the padding in some often-used structs for 64bit machines.
32bit machines should also profit from most changes, but to a
lesser degree.

Change-Id: Ic4c67b94e962731de4f31164c52a372d78944ccc
Reviewed-by: default avatarTobias Hunger <tobias.hunger@digia.com>
Reviewed-by: default avatarOswald Buddenhagen <oswald.buddenhagen@digia.com>
parent a9582905
......@@ -146,8 +146,8 @@ public:
const QString &text,
unsigned length = 0)
: _level(level),
_fileName(fileName),
_line(line),
_fileName(fileName),
_column(column),
_length(length),
_text(text)
......@@ -185,8 +185,8 @@ public:
private:
int _level;
QString _fileName;
unsigned _line;
QString _fileName;
unsigned _column;
unsigned _length;
QString _text;
......
......@@ -143,9 +143,7 @@ public:
private:
friend class Environment;
Macro *_next;
unsigned _hashcode;
private:
QString decoratedName() const;
struct Flags
......@@ -160,6 +158,7 @@ private:
QVector<PPToken> _definitionTokens;
QVector<QByteArray> _formals;
QString _fileName;
unsigned _hashcode;
unsigned _fileRevision;
unsigned _line;
unsigned _offset;
......
......@@ -118,17 +118,17 @@ private:
QBitArray m_skipping;
QBitArray m_trueTest;
int m_ifLevel;
Internal::TokenBuffer *m_tokenBuffer;
unsigned m_tokenBufferDepth;
Internal::TokenBuffer *m_tokenBuffer;
bool m_inPreprocessorDirective;
QByteArray *m_result;
bool m_markExpandedTokens;
bool m_noLines;
bool m_inCondition;
unsigned m_offsetRef;
QByteArray *m_result;
unsigned m_lineRef;
ExpansionStatus m_expansionStatus;
......
......@@ -79,8 +79,8 @@ private:
QList<int> m_currentDebugIds;
QmlDebugConnection *m_connection;
int m_requestId;
qreal m_slowDownFactor;
int m_reloadQueryId;
qreal m_slowDownFactor;
int m_destroyObjectQueryId;
};
......
......@@ -64,8 +64,8 @@ GradientLine::GradientLine(QWidget *parent) :
m_activeColor(Qt::black),
m_gradientName(QLatin1String("gradient")),
m_colorIndex(0),
m_dragActive(false),
m_yOffset(0),
m_dragActive(false),
m_create(false),
m_active(false),
m_dragOff(false),
......
......@@ -908,9 +908,9 @@ public:
private:
Type _type;
LanguageUtils::ComponentVersion _version;
QString _name;
QString _path;
LanguageUtils::ComponentVersion _version;
QString _as;
AST::UiImport *_ast;
};
......
......@@ -54,7 +54,6 @@ QStyleItem::QStyleItem(QDeclarativeItem *parent)
: QDeclarativeItem(parent),
m_dummywidget(0),
m_styleoption(0),
m_type(Undefined),
m_sunken(false),
m_raised(false),
m_active(true),
......@@ -63,6 +62,7 @@ QStyleItem::QStyleItem(QDeclarativeItem *parent)
m_on(false),
m_horizontal(true),
m_sharedWidget(false),
m_type(Undefined),
m_minimum(0),
m_maximum(100),
m_value(0),
......
......@@ -70,10 +70,10 @@ public:
private:
int m_iconType; //!< icon type
uint m_hash; //!< precalculated hash value - to speed up qHash
QString m_name; //!< symbol name (e.g. SymbolInformation)
QString m_type; //!< symbol type (e.g. (int char))
uint m_hash; //!< precalculated hash value - to speed up qHash
};
//! qHash overload for QHash/QSet
......
......@@ -63,8 +63,8 @@ protected:
void setCategoryIcon(const QString &categoryIcon) { m_categoryIcon = categoryIcon; }
Id m_id;
QString m_displayName;
Id m_category;
QString m_displayName;
QString m_displayCategory;
QString m_categoryIcon;
};
......
......@@ -73,11 +73,11 @@ class Category
{
public:
Id id;
int index;
QString displayName;
QIcon icon;
QList<IOptionsPage *> pages;
QList<IOptionsPageProvider *> providers;
int index;
QTabWidget *tabWidget;
};
......
......@@ -75,13 +75,13 @@ private:
QImage bar;
QString m_text;
QString m_title;
bool m_error;
int m_progressHeight;
int m_minimum;
int m_maximum;
int m_value;
float m_cancelButtonFader;
bool m_finished;
bool m_error;
};
} // namespace Internal
......
......@@ -111,8 +111,8 @@ public:
private:
bool m_isOverloaded;
unsigned m_completionOperator;
mutable QChar m_typedChar;
unsigned m_completionOperator;
QSharedPointer<TypeOfExpression> m_typeOfExpression;
};
......
......@@ -89,9 +89,9 @@ private:
QPointer<TextEditor::ITextEditor> _textEditor;
QTimer *_updateDocumentTimer;
int _updateDocumentInterval;
unsigned _revision;
QFuture<void> _documentParser;
QString _cachedContents;
unsigned _revision;
};
} // namespace Internal
......
......@@ -36,8 +36,8 @@ SearchResultTreeItem::SearchResultTreeItem(const Find::SearchResultItem &item,
: item(item),
m_parent(parent),
m_isUserCheckable(false),
m_checkState(Qt::Unchecked),
m_isGenerated(false)
m_isGenerated(false),
m_checkState(Qt::Unchecked)
{
}
......
......@@ -74,8 +74,8 @@ private:
SearchResultTreeItem *m_parent;
QList<SearchResultTreeItem *> m_children;
bool m_isUserCheckable;
Qt::CheckState m_checkState;
bool m_isGenerated;
Qt::CheckState m_checkState;
};
} // namespace Internal
......
......@@ -46,12 +46,12 @@ struct Tree
{
QString name;
Qt::CheckState checked;
bool isDir;
QList<Tree *> childDirectories;
QList<Tree *> files;
QList<Tree *> visibleFiles;
QIcon icon;
QString fullPath;
bool isDir;
Tree *parent;
};
......
......@@ -56,6 +56,8 @@ struct QmlRangeEventData
QmlDebug::QmlEventLocation location;
QmlDebug::QmlEventType eventType;
bool isBindingLoop;
QHash <QString, QmlRangeEventRelative *> parentHash;
QHash <QString, QmlRangeEventRelative *> childrenHash;
......@@ -67,8 +69,6 @@ struct QmlRangeEventData
double percentOfTime;
qint64 medianTime;
bool isBindingLoop;
QmlRangeEventData &operator=(const QmlRangeEventData &ref);
};
......
......@@ -287,9 +287,9 @@ struct InternalNode
QMap<QString, InternalNode *> subnodes;
QStringList files;
ProjectExplorer::FileType type;
int priority;
QString displayName;
QString typeName;
int priority;
QString fullPath;
QIcon icon;
......@@ -305,7 +305,7 @@ struct InternalNode
qDeleteAll(subnodes);
}
// Creates a tree structure from a list of absolute file paths.
// Creates: a tree structure from a list of absolute file paths.
// Empty directories are compressed into a single entry with a longer path.
// * project
// * /absolute/path
......@@ -1435,9 +1435,9 @@ Qt4ProFileNode::Qt4ProFileNode(Qt4Project *project,
const QString &filePath,
QObject *parent)
: Qt4PriFileNode(project, this, filePath),
m_projectType(InvalidProject),
m_validParse(false),
m_parseInProgress(true),
m_projectType(InvalidProject),
m_readerExact(0),
m_readerCumulative(0)
{
......
......@@ -433,9 +433,13 @@ private:
TargetInformation targetInformation(QtSupport::ProFileReader *reader) const;
void setupInstallsList(const QtSupport::ProFileReader *reader);
bool m_isDeployable;
bool m_validParse;
bool m_parseInProgress;
Qt4ProjectType m_projectType;
Qt4VariablesHash m_varValues;
bool m_isDeployable;
QMap<QString, QDateTime> m_uitimestamps;
TargetInformation m_qt4targetInformation;
......@@ -444,9 +448,6 @@ private:
InstallsList m_installsList;
friend class Qt4NodeHierarchy;
bool m_validParse;
bool m_parseInProgress;
QStringList m_uiHeaderFiles;
// Async stuff
......
......@@ -56,7 +56,6 @@ enum InstructionalType
struct ExampleItem
{
ExampleItem(): difficulty(0), isVideo(false), isHighlighted(false) {}
InstructionalType type;
QString name;
QString projectPath;
QString description;
......@@ -65,13 +64,14 @@ struct ExampleItem
QStringList filesToOpen;
QStringList tags;
QStringList dependencies;
InstructionalType type;
int difficulty;
bool hasSourceCode;
bool isVideo;
bool isHighlighted;
QString videoUrl;
QString videoLength;
QStringList platforms;
bool isHighlighted;
};
class ExamplesListModel : public QAbstractListModel
......
Markdown is supported
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