Tue, 22 Oct 2013 19:28:45 +0300
more minor changes
src/configDialog.cpp | file | annotate | diff | comparison | revisions | |
src/file.cpp | file | annotate | diff | comparison | revisions | |
src/gldraw.cpp | file | annotate | diff | comparison | revisions | |
src/history.cpp | file | annotate | diff | comparison | revisions | |
src/ldtypes.cpp | file | annotate | diff | comparison | revisions | |
src/messagelog.cpp | file | annotate | diff | comparison | revisions |
--- a/src/configDialog.cpp Tue Oct 22 19:22:15 2013 +0300 +++ b/src/configDialog.cpp Tue Oct 22 19:28:45 2013 +0300 @@ -441,7 +441,7 @@ // Remove a quick color // ----------------------------------------------------------------------------- void ConfigDialog::slot_delColor() -{ if (ui->quickColorList->selectedItems().size() == 0) +{ if (ui->quickColorList->selectedItems().isEmpty()) return; QListWidgetItem* item = ui->quickColorList->selectedItems() [0]; @@ -455,7 +455,7 @@ void ConfigDialog::slot_moveColor() { const bool up = (static_cast<QPushButton*> (sender()) == ui->quickColor_moveUp); - if (ui->quickColorList->selectedItems().size() == 0) + if (ui->quickColorList->selectedItems().isEmpty()) return; QListWidgetItem* item = ui->quickColorList->selectedItems() [0]; @@ -544,7 +544,7 @@ // Which quick color is currently selected? // ----------------------------------------------------------------------------- QListWidgetItem* ConfigDialog::getSelectedQuickColor() -{ if (ui->quickColorList->selectedItems().size() == 0) +{ if (ui->quickColorList->selectedItems().isEmpty()) return null; return ui->quickColorList->selectedItems() [0];
--- a/src/file.cpp Tue Oct 22 19:22:15 2013 +0300 +++ b/src/file.cpp Tue Oct 22 19:28:45 2013 +0300 @@ -199,7 +199,7 @@ // ============================================================================= // ----------------------------------------------------------------------------- File* openLDrawFile (str relpath, bool subdirs) -{ log ("%1: Try to open %2\n", __func__, relpath); +{ log ("Opening %1...\n", relpath); File* f = new File; str fullPath; @@ -241,7 +241,7 @@ } // Did not find the file. - log ("could not find %1\n", relpath); + log ("Could not find %1.\n", relpath); delete f; return null; }
--- a/src/gldraw.cpp Tue Oct 22 19:22:15 2013 +0300 +++ b/src/gldraw.cpp Tue Oct 22 19:28:45 2013 +0300 @@ -614,11 +614,11 @@ } elif (editMode() == CircleMode) { // If we have not specified the center point of the circle yet, preview it on the screen. - if (m_drawedVerts.size() == 0) + if (m_drawedVerts.isEmpty()) drawBlip (paint, coordconv3_2 (m_hoverpos)); else { QVector<vertex> verts, verts2; - const double dist0 = circleDrawDist(0), + const double dist0 = circleDrawDist (0), dist1 = (m_drawedVerts.size() >= 2) ? circleDrawDist (1) : -1; const int segs = lores; const double angleUnit = (2 * pi) / segs; @@ -965,7 +965,7 @@ return; } - if (m_drawedVerts.size() == 0 && ev->modifiers() & Qt::ShiftModifier) + if (m_drawedVerts.isEmpty() && ev->modifiers() & Qt::ShiftModifier) { m_rectdraw = true; updateRectVerts(); } @@ -1821,7 +1821,7 @@ { if (!m_rectdraw) return; - if (m_drawedVerts.size() == 0) + if (m_drawedVerts.isEmpty()) { for (int i = 0; i < 4; ++i) m_rectverts[i] = m_hoverpos;
--- a/src/history.cpp Tue Oct 22 19:22:15 2013 +0300 +++ b/src/history.cpp Tue Oct 22 19:28:45 2013 +0300 @@ -34,7 +34,7 @@ // ============================================================================= // ----------------------------------------------------------------------------- void History::undo() -{ if (m_changesets.size() == 0 || pos() == -1) +{ if (m_changesets.isEmpty() || pos() == -1) return; const Changeset& set = changeset (pos());
--- a/src/ldtypes.cpp Tue Oct 22 19:22:15 2013 +0300 +++ b/src/ldtypes.cpp Tue Oct 22 19:28:45 2013 +0300 @@ -344,7 +344,7 @@ // ============================================================================= // ----------------------------------------------------------------------------- void LDObject::moveObjects (QList<LDObject*> objs, const bool up) -{ if (objs.size() == 0) +{ if (objs.isEmpty()) return; // If we move down, we need to iterate the array in reverse order. @@ -397,7 +397,7 @@ { bool firstDetails = true; str text = ""; - if (objs.size() == 0) + if (objs.isEmpty()) return "nothing"; // :) for (long i = 0; i < LDObject::NumTypes; ++i) @@ -416,7 +416,8 @@ str noun = fmt ("%1%2", typeName (objType), plural (count)); - // Plural of "vertex" is "vertices". Stupid English. + // Plural of "vertex" is "vertices", correct that + if (objType == LDObject::Vertex && count != 1) noun = "vertices";
--- a/src/messagelog.cpp Tue Oct 22 19:22:15 2013 +0300 +++ b/src/messagelog.cpp Tue Oct 22 19:28:45 2013 +0300 @@ -88,7 +88,7 @@ // redrawn if something changed. // ----------------------------------------------------------------------------- void MessageManager::tick() -{ if (m_lines.size() == 0) +{ if (m_lines.isEmpty()) return; bool changed = false;