1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-10 23:44:24 +00:00

Added a unit-test, and removed constness from a couple more return types.

This commit is contained in:
Julian Storer 2011-09-13 15:09:21 +01:00
parent bd9a32c757
commit dce7cd9cd1
16 changed files with 79 additions and 53 deletions

View file

@ -294,7 +294,7 @@ void FileBrowserComponent::setFileFilter (const FileFilter* const newFileFilter)
}
}
const String FileBrowserComponent::getActionVerb() const
String FileBrowserComponent::getActionVerb() const
{
return isSaveMode() ? TRANS("Save") : TRANS("Open");
}

View file

@ -153,7 +153,7 @@ public:
E.g. if browsing in "load file" mode, this will be "Open", if in "save file"
mode, it'll be "Save", etc.
*/
virtual const String getActionVerb() const;
virtual String getActionVerb() const;
/** Returns true if the saveMode flag was set when this component was created.
*/

View file

@ -205,7 +205,6 @@ public:
return columnComponents [owner.getHeader().getIndexOfColumnId (columnId, true)];
}
private:
TableListBox& owner;
OwnedArray<Component> columnComponents;
@ -269,7 +268,6 @@ TableListBox::TableListBox (const String& name, TableListBoxModel* const model_)
TableListBox::~TableListBox()
{
header = nullptr;
}
void TableListBox::setModel (TableListBoxModel* const newModel)
@ -332,8 +330,8 @@ bool TableListBox::isAutoSizeMenuOptionShown() const
return autoSizeOptionsShown;
}
const Rectangle<int> TableListBox::getCellPosition (const int columnId, const int rowNumber,
const bool relativeToComponentTopLeft) const
Rectangle<int> TableListBox::getCellPosition (const int columnId, const int rowNumber,
const bool relativeToComponentTopLeft) const
{
Rectangle<int> headerCell (header->getColumnPosition (header->getIndexOfColumnId (columnId, true)));
@ -479,8 +477,8 @@ void TableListBoxModel::deleteKeyPressed (int) {}
void TableListBoxModel::returnKeyPressed (int) {}
void TableListBoxModel::listWasScrolled() {}
const String TableListBoxModel::getCellTooltip (int /*rowNumber*/, int /*columnId*/) { return String::empty; }
var TableListBoxModel::getDragSourceDescription (const SparseSet<int>&) { return var::null; }
String TableListBoxModel::getCellTooltip (int /*rowNumber*/, int /*columnId*/) { return String::empty; }
var TableListBoxModel::getDragSourceDescription (const SparseSet<int>&) { return var::null; }
Component* TableListBoxModel::refreshComponentForCell (int, int, bool, Component* existingComponentToUpdate)
{
@ -489,5 +487,4 @@ Component* TableListBoxModel::refreshComponentForCell (int, int, bool, Component
return nullptr;
}
END_JUCE_NAMESPACE

View file

@ -146,7 +146,7 @@ public:
/** Returns a tooltip for a particular cell in the table.
*/
virtual const String getCellTooltip (int rowNumber, int columnId);
virtual String getCellTooltip (int rowNumber, int columnId);
//==============================================================================
/** Override this to be informed when rows are selected or deselected.
@ -275,8 +275,8 @@ public:
If relativeToComponentTopLeft is false, the co-ords are relative to the
top-left of the table's top-left cell.
*/
const Rectangle<int> getCellPosition (int columnId, int rowNumber,
bool relativeToComponentTopLeft) const;
Rectangle<int> getCellPosition (int columnId, int rowNumber,
bool relativeToComponentTopLeft) const;
/** Returns the component that currently represents a given cell.
If the component for this cell is off-screen or if the position is out-of-range,