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

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
......
......@@ -238,8 +238,8 @@ FormatDescription::FormatDescription(TextStyle id, const QString &displayName, c
FormatDescription::FormatDescription(TextStyle id, const QString &displayName, const QString &tooltipText, const Format &format) :
m_id(id),
m_displayName(displayName),
m_format(format),
m_displayName(displayName),
m_tooltipText(tooltipText)
{
}
......
......@@ -76,8 +76,8 @@ public:
private:
TextStyle m_id; // Name of the category
QString m_displayName; // Displayed name of the category
Format m_format; // Default format
QString m_displayName; // Displayed name of the category
QString m_tooltipText; // Description text for category
};
......
......@@ -40,8 +40,8 @@ using namespace TextEditor;
using namespace Internal;
HighlightDefinition::HighlightDefinition() :
m_singleLineCommentAfterWhiteSpaces(false),
m_keywordCaseSensitivity(Qt::CaseSensitive),
m_singleLineCommentAfterWhiteSpaces(false),
m_indentationBasedFolding(false)
{
QString s(QLatin1String(".():!+,-<=>%&/;?[]^{|}~\\*, \t"));
......
......@@ -106,7 +106,6 @@ private:
QString m_initialContext;
QString m_singleLineComment;
bool m_singleLineCommentAfterWhiteSpaces;
QString m_multiLineCommentStart;
QString m_multiLineCommentEnd;
......@@ -114,6 +113,7 @@ private:
Qt::CaseSensitivity m_keywordCaseSensitivity;
bool m_singleLineCommentAfterWhiteSpaces;
bool m_indentationBasedFolding;
QSet<QChar> m_delimiters;
......
......@@ -56,8 +56,8 @@ public:
: m_markableInterface(0),
m_lineNumber(line),
m_priority(NormalPriority),
m_widthFactor(1.0),
m_visible(true)
m_visible(true),
m_widthFactor(1.0)
{}
virtual ~ITextMark();
......@@ -95,10 +95,10 @@ private:
Q_DISABLE_COPY(ITextMark)
ITextMarkable *m_markableInterface;
int m_lineNumber;
QIcon m_icon;
Priority m_priority;
double m_widthFactor;
bool m_visible;
QIcon m_icon;
double m_widthFactor;
};
typedef QList<ITextMark *> TextMarks;
......
......@@ -41,9 +41,9 @@ using namespace TextEditor::Internal;
TextEditorOverlay::TextEditorOverlay(BaseTextEditorWidget *editor) :
QObject(editor),
m_visible(false),
m_alpha(true),
m_borderWidth(1),
m_dropShadowWidth(2),
m_alpha(true),
m_firstSelectionOriginalBegin(-1),
m_editor(editor),
m_viewport(editor->viewport())
......
......@@ -112,9 +112,9 @@ private:
QTextCursor assembleCursorForSelection(int selectionIndex) const;
bool m_visible;
bool m_alpha;
int m_borderWidth;
int m_dropShadowWidth;
bool m_alpha;
int m_firstSelectionOriginalBegin;
BaseTextEditorWidget *m_editor;
QWidget *m_viewport;
......
......@@ -49,8 +49,8 @@ class ParseData::Private {
Q_DECLARE_TR_FUNCTIONS(Valgrind::Callgrind::ParseData)
public:
Private(ParseData *q)
: m_lineNumberPositionIndex(-1)
, m_pid(0)
: m_pid(0)
, m_lineNumberPositionIndex(-1)
, m_part(0)
, m_version(0)
, m_cycleCacheValid(false)
......@@ -62,14 +62,15 @@ public:
QStringList m_events;
QStringList m_positions;
int m_lineNumberPositionIndex;
QVector<quint64> m_totalCosts;
QVector<const Function *> m_functions;
QString m_command;
quint64 m_pid;
int m_lineNumberPositionIndex;
uint m_part;
QStringList m_descriptions;
int m_version;
bool m_cycleCacheValid;
QStringList m_descriptions;
QString m_creator;
QHash<qint64, QHash<qint64, QVector<Function *> > > functionLookup;
......@@ -84,7 +85,6 @@ public:
void cycleDetection();
void cleanupFunctionCycles();
bool m_cycleCacheValid;
QVector<const Function *> m_cycleCache;
ParseData *m_q;
......
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