Browse Source

Got rid of some very old legacy VC6 workaround typedefs

tags/2021-05-28
jules 7 years ago
parent
commit
a7e3339f86
15 changed files with 12 additions and 55 deletions
  1. +3
    -3
      modules/juce_data_structures/values/juce_Value.cpp
  2. +0
    -2
      modules/juce_data_structures/values/juce_Value.h
  3. +0
    -4
      modules/juce_gui_basics/buttons/juce_Button.h
  4. +0
    -2
      modules/juce_gui_basics/layout/juce_ScrollBar.h
  5. +0
    -2
      modules/juce_gui_basics/menus/juce_MenuBarModel.h
  6. +3
    -10
      modules/juce_gui_basics/properties/juce_TextPropertyComponent.cpp
  7. +0
    -4
      modules/juce_gui_basics/properties/juce_TextPropertyComponent.h
  8. +2
    -2
      modules/juce_gui_basics/widgets/juce_ComboBox.cpp
  9. +0
    -2
      modules/juce_gui_basics/widgets/juce_ComboBox.h
  10. +4
    -11
      modules/juce_gui_basics/widgets/juce_Label.cpp
  11. +0
    -2
      modules/juce_gui_basics/widgets/juce_Label.h
  12. +0
    -2
      modules/juce_gui_basics/widgets/juce_Slider.h
  13. +0
    -2
      modules/juce_gui_basics/widgets/juce_TableHeaderComponent.h
  14. +0
    -2
      modules/juce_gui_basics/widgets/juce_TextEditor.h
  15. +0
    -5
      modules/juce_video/capture/juce_CameraDevice.h

+ 3
- 3
modules/juce_data_structures/values/juce_Value.cpp View File

@@ -206,7 +206,7 @@ bool Value::operator!= (const Value& other) const
}
//==============================================================================
void Value::addListener (ValueListener* const listener)
void Value::addListener (Value::Listener* listener)
{
if (listener != nullptr)
{
@@ -217,7 +217,7 @@ void Value::addListener (ValueListener* const listener)
}
}
void Value::removeListener (ValueListener* const listener)
void Value::removeListener (Value::Listener* listener)
{
listeners.remove (listener);
@@ -230,7 +230,7 @@ void Value::callListeners()
if (listeners.size() > 0)
{
Value v (*this); // (create a copy in case this gets deleted by a callback)
listeners.call ([&] (ValueListener& l) { l.valueChanged (v); });
listeners.call ([&] (Value::Listener& l) { l.valueChanged (v); });
}
}


+ 0
- 2
modules/juce_data_structures/values/juce_Value.h View File

@@ -237,7 +237,5 @@ private:
/** Writes a Value to an OutputStream as a UTF8 string. */
OutputStream& JUCE_CALLTYPE operator<< (OutputStream&, const Value&);
/** This typedef is just for compatibility with old code - newer code should use the Value::Listener class directly. */
typedef Value::Listener ValueListener;
} // namespace juce

+ 0
- 4
modules/juce_gui_basics/buttons/juce_Button.h View File

@@ -514,9 +514,5 @@ private:
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (Button)
};
#ifndef DOXYGEN
/** This typedef is just for compatibility with old code and VC6 - newer code should use Button::Listener instead. */
typedef Button::Listener ButtonListener;
#endif
} // namespace juce

+ 0
- 2
modules/juce_gui_basics/layout/juce_ScrollBar.h View File

@@ -427,7 +427,5 @@ private:
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (ScrollBar)
};
/** This typedef is just for compatibility with old code - newer code should use the ScrollBar::Listener class directly. */
typedef ScrollBar::Listener ScrollBarListener;
} // namespace juce

+ 0
- 2
modules/juce_gui_basics/menus/juce_MenuBarModel.h View File

@@ -187,7 +187,5 @@ private:
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (MenuBarModel)
};
/** This typedef is just for compatibility with old code - newer code should use the MenuBarModel::Listener class directly. */
typedef MenuBarModel::Listener MenuBarModelListener;
} // namespace juce

+ 3
- 10
modules/juce_gui_basics/properties/juce_TextPropertyComponent.cpp View File

@@ -32,7 +32,7 @@ class TextPropertyComponent::LabelComp : public Label,
{
public:
LabelComp (TextPropertyComponent& tpc, int charLimit, bool multiline, bool editable)
: Label (String(), String()),
: Label ({}, {}),
owner (tpc),
maxChars (charLimit),
isMultiline (multiline)
@@ -159,15 +159,8 @@ void TextPropertyComponent::textWasEdited()
callListeners();
}
void TextPropertyComponent::addListener (TextPropertyComponentListener* const listener)
{
listenerList.add (listener);
}
void TextPropertyComponent::removeListener (TextPropertyComponentListener* const listener)
{
listenerList.remove (listener);
}
void TextPropertyComponent::addListener (TextPropertyComponent::Listener* l) { listenerList.add (l); }
void TextPropertyComponent::removeListener (TextPropertyComponent::Listener* l) { listenerList.remove (l); }
void TextPropertyComponent::callListeners()
{


+ 0
- 4
modules/juce_gui_basics/properties/juce_TextPropertyComponent.h View File

@@ -156,9 +156,5 @@ private:
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (TextPropertyComponent)
};
#ifndef DOXYGEN
/** This typedef is just for compatibility with old code and VC6 - newer code should use TextPropertyComponent::Listener instead. */
typedef TextPropertyComponent::Listener TextPropertyComponentListener;
#endif
} // namespace juce

+ 2
- 2
modules/juce_gui_basics/widgets/juce_ComboBox.cpp View File

@@ -623,8 +623,8 @@ void ComboBox::setScrollWheelEnabled (bool enabled) noexcept
}
//==============================================================================
void ComboBox::addListener (ComboBoxListener* listener) { listeners.add (listener); }
void ComboBox::removeListener (ComboBoxListener* listener) { listeners.remove (listener); }
void ComboBox::addListener (ComboBox::Listener* l) { listeners.add (l); }
void ComboBox::removeListener (ComboBox::Listener* l) { listeners.remove (l); }
void ComboBox::handleAsyncUpdate()
{


+ 0
- 2
modules/juce_gui_basics/widgets/juce_ComboBox.h View File

@@ -447,7 +447,5 @@ private:
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (ComboBox)
};
/** This typedef is just for compatibility with old code - newer code should use the ComboBox::Listener class directly. */
typedef ComboBox::Listener ComboBoxListener;
} // namespace juce

+ 4
- 11
modules/juce_gui_basics/widgets/juce_Label.cpp View File

@@ -190,7 +190,7 @@ void Label::textWasChanged() {}
void Label::editorShown (TextEditor* textEditor)
{
Component::BailOutChecker checker (this);
listeners.callChecked (checker, [this, textEditor] (LabelListener& l) { l.editorShown (this, *textEditor); });
listeners.callChecked (checker, [this, textEditor] (Label::Listener& l) { l.editorShown (this, *textEditor); });
}
void Label::editorAboutToBeHidden (TextEditor* textEditor)
@@ -199,7 +199,7 @@ void Label::editorAboutToBeHidden (TextEditor* textEditor)
peer->dismissPendingTextInput();
Component::BailOutChecker checker (this);
listeners.callChecked (checker, [this, textEditor] (LabelListener& l) { l.editorHidden (this, *textEditor); });
listeners.callChecked (checker, [this, textEditor] (Label::Listener& l) { l.editorHidden (this, *textEditor); });
}
void Label::showEditor()
@@ -395,15 +395,8 @@ KeyboardFocusTraverser* Label::createFocusTraverser()
}
//==============================================================================
void Label::addListener (LabelListener* listener)
{
listeners.add (listener);
}
void Label::removeListener (LabelListener* listener)
{
listeners.remove (listener);
}
void Label::addListener (Label::Listener* l) { listeners.add (l); }
void Label::removeListener (Label::Listener* l) { listeners.remove (l); }
void Label::callChangeListeners()
{


+ 0
- 2
modules/juce_gui_basics/widgets/juce_Label.h View File

@@ -349,7 +349,5 @@ private:
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (Label)
};
/** This typedef is just for compatibility with old code - newer code should use the Label::Listener class directly. */
typedef Label::Listener LabelListener;
} // namespace juce

+ 0
- 2
modules/juce_gui_basics/widgets/juce_Slider.h View File

@@ -960,7 +960,5 @@ private:
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (Slider)
};
/** This typedef is just for compatibility with old code - newer code should use the Slider::Listener class directly. */
typedef Slider::Listener SliderListener;
} // namespace juce

+ 0
- 2
modules/juce_gui_basics/widgets/juce_TableHeaderComponent.h View File

@@ -453,7 +453,5 @@ private:
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (TableHeaderComponent)
};
/** This typedef is just for compatibility with old code - newer code should use the TableHeaderComponent::Listener class directly. */
typedef TableHeaderComponent::Listener TableHeaderListener;
} // namespace juce

+ 0
- 2
modules/juce_gui_basics/widgets/juce_TextEditor.h View File

@@ -770,7 +770,5 @@ private:
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (TextEditor)
};
/** This typedef is just for compatibility with old code - newer code should use the TextEditor::Listener class directly. */
typedef TextEditor::Listener TextEditorListener;
} // namespace juce

+ 0
- 5
modules/juce_video/capture/juce_CameraDevice.h View File

@@ -159,11 +159,6 @@ private:
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (CameraDevice)
};
#ifndef DOXYGEN
/** This typedef is just for compatibility with VC6 - newer code should use the CameraDevice::Listener class directly. */
typedef CameraDevice::Listener CameraImageListener;
#endif
#endif
} // namespace juce

Loading…
Cancel
Save